{"version":3,"file":"chunk.6185.3d586c152287ecc62412.js","names":["PaginationData","Component","currentPage","assert","this","args","lastPage","itemsPerPage","pageMargins","pageRange","totalItems","_currentPage","number1","max1","Math","min","max","activeItems","allPages","range","endMarginPages","totalPages","pageMarginsThreshold","pageRangeUpperLimit","firstActiveItem","isFirstPage","isLastPage","lastActiveItem","nextPage","pageRangeLowerLimit","pageRangePages","pageRangeOffset1","floor","pageRangeStart1","pageRangeEnd1","previousPage","shouldShowLowerBreak","Array","isArray","length","shouldShowUpperBreak","startMarginPages","totalPages1","ceil","isNaN","start1","end1","fill","undefined","map","_1","i1","_PaginationData","setComponentTemplate","createTemplateFactory","id","block","moduleName","scope","hash","isStrictMode","mixinProps","buildURL","modelName","snapshot","requestType","query","urlForFindRecord","urlForFindAll","urlForQuery","urlForQueryRecord","urlForFindMany","urlForFindHasMany","urlForFindBelongsTo","urlForCreateRecord","urlForUpdateRecord","urlForDeleteRecord","_buildURL","path","url","host","prefix","urlPrefix","pathForType","push","encodeURIComponent","unshift","urlString","join","charAt","snapshots","ids","parentURL","namespace","test","camelized","camelize","pluralize","BuildURLMixin","Mixin","create","service","s","_store","WeakMap","Adapter","EmberObject","constructor","super","initializeDeferredDecorator","findRecord","store","type","findAll","neverSet","snapshotRecordArray","queryRecord","adapterOptions","serialize","options","createRecord","updateRecord","deleteRecord","coalesceFindRequests","_coalesceFindRequests","value","groupRecordsForFindMany","shouldReloadRecord","shouldReloadAll","shouldBackgroundReloadRecord","shouldBackgroundReloadAll","_Adapter","decorateFieldV2","prototype","newline","parseResponseHeaders","headersString","headers","Object","headerPairs","split","i","header","j","foundSep","charCodeAt","field","substring","trim","toLowerCase","RBRACKET","buildParams","obj","len","key","add","toString","call","name","k","v","_fetch","serializeIntoHash","modelClass","includeId","serializer","serializerFor","data","AdapterWithBuildURLMixin","extend","RESTAdapter","_defineProperty","fastboot","_fastboot","getOwner","lookup","sortQueryParams","keys","newQueryParams","sortedKeys","sort","buildQuery","ajax","neverUsed","findMany","findHasMany","relationship","findBelongsTo","schema","_stripIDFromURL","expandedURL","lastSegment","decodeURIComponent","string","suffix","String","endsWith","includes","groups","Map","maxURLLength","forEach","baseUrl","has","set","get","groupsArray","group","splitGroups","adapter","idsSize","additionalLength","lastGroupIndex","splitGroup","handleResponse","status","payload","requestData","isSuccess","isInvalid","InvalidError","errors","normalizeErrorResponse","detailedMessage","generatedDetailedMessage","UnauthorizedError","ForbiddenError","NotFoundError","ConflictError","ServerError","AdapterError","_headers","_payload","method","useFetch","ajaxOptions","response","_fetchRequest","promise","text","Promise","resolve","catch","e","then","ret","error","ok","payloadIsEmpty","statusIndicatesEmptyResponse","JSON","parse","SyntaxError","Error","errorThrown","responseData","fetchResponseData","parseErrorResponse","ajaxError","ajaxSuccess","reject","success","textStatus","jqXHR","ajaxResponseData","responseText","_ajax","_ajaxRequest","jQuery","fetchFunction","fetch","FastBoot","nodeFetch","require","httpRegex","protocolRelativeRegex","parseRequest","request","protocol","buildAbsoluteUrl","patchedFetch","input","href","info","assign","reqOptions","contentType","_defaultContentType","fetchOptions","dataType","context","stringify","beforeSend","xhr","headerValue","setRequestHeader","_ajaxURL","isFastBoot","fbError","message","json","title","detail","shortenedPayload","payloadContentType","include","isAdapterError","TimeoutError","AbortError","statusText","headersToObject","getAllResponseHeaders","headersObject","credentials","queryParamDelimiter","queryParamsObject","body","_RESTAdapter","decorateMethodV2","computed","deferred","StoreTypesMap","debugInfo","relationships","expensiveProperties","identifier","recordIdentifierFor","fields","attrGroup","properties","expand","attributes","values","kind","propertyInfo","includeOtherProperties","InspectorDataAdapter","DataAdapter","target","prop","desc","_a","cursor","defineProperty","enumerable","configurable","writable","initializer","getFilters","_nameToClass","modelFor","watchModelTypes","typesAdded","typesUpdated","discoveredTypes","typesMap","unsub","notifications","subscribe","notificationType","watchTypeIfUnseen","_releaseMethods","unsubscribe","assertPrivateStore","cacheKeyManager","_cache","resourcesByType","_","release","fn","releaseMethods","removeObject","pushObject","klass","_debugInfo","wrapped","wrapModelType","observeModelType","columnNameToDesc","capitalize","underscore","replace","columnsForType","typeClass","columns","count","meta","attributeLimit","getRecords","arguments","containerKey","_debugContainerKey","match","peekAll","getRecordColumnValues","record","columnValues","eachAttribute","getRecordKeywords","keywords","A","getRecordFilterValues","isNew","isModified","hasDirtyAttributes","isClean","getRecordColor","color","observeRecord","recordUpdated","keysToObserve","handler","wrapRecord","addObserver","removeObserver","decorators","decorator","proto","Exported","normalizeModelName","result","dasherize","deprecate","until","for","since","available","enabled","PromiseObject","ObjectProxy","PromiseProxyMixin","LegacyPromiseProxy","Symbol","Extended","PromiseBelongsTo","legacySupport","_belongsToState","referenceFor","reload","reloadBelongsTo","_PromiseBelongsTo","memoized","PromiseManyArray","content","_update","isDestroyed","cb","rejected","finally","destroy","links","proxy","isPending","isSettled","isFulfilled","isRejected","_PromiseManyArray","defineSignal","HasManyReference","graph","parentIdentifier","hasManyRelationship","definition","___identifier","___token","bucket","notifiedKey","_ref","___relatedTokenMap","token","clear","identifiers","ensureRefCanSubscribe","resource","_resource","resourceIdentifier","getOrCreateRecordIdentifier","delete","cache","getRelationship","remoteType","related","link","Boolean","doc","skipFetch","dataDoc","isResourceData","isMaybeResource","_push","newData","_join","op","load","_isLoaded","state","hasReceivedData","getData","every","_instanceCache","recordIsLoaded","support","LEGACY_SUPPORT","getManyArray","isAsync","areAllInverseRecordsLoaded","getHasMany","reloadHasMany","object","filter","rel","accessed","isResourceIdentiferWithRelatedLinks","_HasManyReference","defineNonEnumerableSignal","BelongsToReference","belongsToRelationship","___relatedToken","added","peekRecord","getBelongsTo","_BelongsToReference","getOrSetGlobal","lookupLegacySupport","LegacySupport","isPrivateStore","storeFor","_graph","_manyArrayCache","_relationshipPromisesCache","_relationshipProxyCache","_pending","references","_syncArray","array","isDestroying","currentState","Context","source","jsonApi","_getCurrentState","fastPush","mutate","mutation","_findBelongsTo","getRealFieldName","_findBelongsToByJsonApiResource","handleCompletedRelationshipRequest","loadingPromise","hasFailedLoadAttempt","shouldForceReload","_updatePromiseProxyFor","relatedIdentifier","isLoaded","getRecord","setDirtyBelongsTo","manyArray","getField","createLegacyManyArray","manager","editable","isPolymorphic","fetchAsyncHasMany","_findHasManyByJsonApiResource","promiseProxy","reference","relationshipKind","upgradeStore","adapterFor","isStale","hasDematerializedInverse","isEmpty","allInverseRecordsAreLoaded","shouldFindViaLink","inverseType","useLink","req","linksMode","getRelatedLink","records","EnableHydration","cacheOptions","preferLocalCache","hasLocalPartialData","attemptLocalCache","future","recordExt","isHasMany","notifyInternalSignal","signal","_flush","instanceCache","cacheFields","sourceKey","ArrayProxyWithCustomOverrides","ArrayProxy","_messages2","_isEmpty","Errors","_classPrivateFieldInitSpec","errorsByAttributeName","errorsFor","attribute","unknownProperty","messages","_findOrCreateMessages","addObjects","__record","notify","notifyPropertyChange","messagesArray","_messages","err","findBy","remove","rejectBy","setObjects","_Errors","mapBy","not","_reload","isReloading","RecordStore","_save","isDeleted","saveRecord","_destroyRecord","save","unloadRecord","notifyRelationship","hasPromise","async","notifyAttribute","cacheFor","getAttr","SOURCE_POINTER_REGEXP","SOURCE_POINTER_PRIMARY_REGEXP","isInvalidError","code","RecordState","identity","recordIdentifierFor$1","pendingCount","fulfilledCount","rejectedCount","_errorRequests","_lastError","requests","getRequestStateService","handleRequest","isSaving","notifyErrorsStateChanged","subscribeForRecord","lastRequest","getLastRequestForRecord","updateInvalidErrors","signals","withSignalStore","peekInternalSignal","jsonApiErrors","getErrors","pointer","keyMatch","search","errMsg","cleanErrorRequests","isLoading","isSaved","rd","isDeletionCommitted","isValid","isDirty","hasChangedAttrs","isError","adapterError","isPreloaded","stateName","dirtyType","computeOnce","propertyName","getter","hasComputed","_RecordState","gate","Model","init","createProps","_createProps","_secretInit","___recordState","setProperties","___private_notifications","relationshipsByName","eachRelationship","normalizedId","coerceId","didChange","setRecordId","_v","entangleSignal","attr","callback","binding","relationshipFor","inverseFor","typeForRelationship","inverseMap","inverse","_findInverseFor","hasResource","relationshipNames","names","hasMany","belongsTo","eachComputedProperty","isRelationshipSchema","relatedTypes","types","rels","relationshipsObject","isAttributeSchema","eachRelatedType","relationshipTypes","determineRelationshipType","knownSide","knownKey","knownKind","transformedAttributes","eachTransformedAttribute","_Model","destroyRecord","serializeRecord","_createSnapshot","_fetchManager","FetchManager","createSnapshot","changedAttributes","changedAttrs","rollbackAttributes","rollbackAttrs","defineGate","_isReloading","isLocal","ModelSchemaProvider","_schemas","_typeMisses","Set","resourceTypes","from","hasTrait","resourceHasTrait","trait","transformation","derivation","hashFn","_loadModelSchema","registerResources","schemas","registerResource","registerTransformation","transform","registerDerivation","registerHashFn","attributeMap","internalSchema","legacy","getModelFactory","buildSchema","_modelFactoryCache","factory","factoryFor","normalizedModelName","owner","MaybeMixin","mixin","class","ModelForMixin","__isMixin","__mixin","register","isModel","hasOwnProperty","instantiateRecord","createRecordArgs","createOptions","secretInit","setOwner","teardownRecord","maybeFactory","_forceShim","setRecordIdentifier","StoreMap","_attr","isAttribute","setAttr","maybeTarget","maybeKey","maybeDesc","normalizeType","singularize","splice","doesTypeExist","attributesDefinitionFor","relationshipsDefinitionFor","defaultRules","plurals","singular","irregularPairs","uncountable","Inflector","esc","default","inflector","originalPlural","plural","originalSingular","originalIrregular","irregular","originalUncountable","defaultPluralKeys","defaultSingularKeys","InflectionRuleDefaults","regex","rules","irregularMap","toIgnore","uncountableSet","single","plur","irregularLookups","replacement","defaultPlur","actualSingle","word","apply","Serializer","normalize","_typeClass","_Serializer","JSONSerializer","primaryKey","mergedProperties","applyTransforms","transformFor","transformMeta","deserialize","normalizeResponse","primaryModelClass","normalizeFindRecordResponse","normalizeQueryRecordResponse","normalizeFindAllResponse","normalizeFindBelongsToResponse","normalizeFindHasManyResponse","normalizeFindManyResponse","normalizeQueryResponse","normalizeCreateRecordResponse","normalizeDeleteRecordResponse","normalizeUpdateRecordResponse","normalizeSingleResponse","normalizeArrayResponse","normalizeSaveResponse","_normalizeResponse","isSingle","documentHash","included","extractMeta","l","item","concat","resourceHash","normalizeUsingDeclaredMapping","extractId","extractAttributes","extractRelationships","lid","attributeKey","keyForAttribute","extractRelationship","relationshipModelName","relationshipHash","modelNameFromPayloadKey","extractPolymorphicRelationship","relationshipOptions","relationshipMeta","relationshipKey","keyForRelationship","polymorphic","linkKey","keyForLink","normalizeRelationships","payloadKey","attrs","normalizedKey","_getMappedKey","warn","mappedKey","_canSerialize","_mustSerialize","shouldSerializeHasMany","relationshipType","serializeAttribute","serializeBelongsTo","serializeHasMany","belongsToId","serializePolymorphicType","extractErrors","extracted","attributeType","skipAssertion","EmbeddedRecordsMixin","normalizedHash","_super","_extractEmbeddedRecords","hasSerializeRecordsOption","hasDeserializeRecordsOption","noSerializeOptionSpecified","includeIds","hasSerializeIdsOption","includeRecords","embeddedSnapshot","serializedKey","_serializeEmbeddedBelongsTo","removeEmbeddedForeignKey","_serializeEmbeddedHasMany","hasSerializeIdsAndTypesOption","_serializeHasManyAsIdsAndTypes","recordSnapshot","_generateSerializedHasMany","embeddedJson","parentRecord","parentKey","hasEmbeddedAlwaysOption","option","attrsOption","embedded","alwaysEmbed","partial","_extractEmbeddedHasMany","_extractEmbeddedBelongsTo","_normalizeEmbeddedRelationship","isEmbeddedRecordsMixin","makeArray","RESTSerializer","keyForPolymorphicType","_normalizeArray","arrayHash","_normalizePolymorphicRecord","primarySerializer","forcedSecondary","substr","isPrimary","isPrimaryType","isUpdatedRecord","pushPayload","ModelSchema","typeSerializer","payloadKeyFromModelName","typeKey","typeProperty","Transform","BooleanTransform","serialized","allowNull","deserialized","DateTransform","_options","offset","indexOf","Date","slice","date","toISOString","isNumber","Infinity","NumberTransform","transformed","Number","StringTransform","RegistryProxyMixin","ContainerProxyMixin","_emberTestHelpersMockOwner","unregister","fullName","__container__","reset","__registry__","global$1","self","window","global","Function","DEPRECATIONS","URLSearchParams","queryParams","document","location","disabledDeprecations","debugDeprecations","registerDeprecationHandler","next","WARNINGS","disabledWarnings","debugWarnings","registerWarnHandler","hasEmberVersion","major","minor","numbers","VERSION","actualMajor","parseInt","actualMinor","check","it","Test","checkWaiters","getContext","TypeError","deprecations","warnings","globalObject","globalThis","__test_context__","getRootElement","maybeContext","pauseTest","resumeTest","rootElement","Window","Reflect","Node","ELEMENT_NODE","DOCUMENT_NODE","_rootElement","querySelector","WAITERS","symbolName","symbol","waiters","waiter","getWaiters","_reset","isRegistered","getPendingWaiterState","pending","waitUntil","hasPendingWaiters","WAITER_NAMES","_resetWaiterNames","NoopTestWaiter","beginAsync","endAsync","buildWaiter","waitForPromise","label","waitFor","descriptor","props","fns","waitForFetch","fetchPromise","Proxy","receiver","maybeProp","some","original","maybeFn","esCompat","m","__esModule","objectWithKey","FaIconComponent","html","abstractIcon","children","reduce","acc","cur","toHtml","htmlSafe","safeStyle","iconAttributes","style","iconExists","flipHorizontal","flip","flipVertical","classList","classes","spin","pulse","fixedWidth","border","listItem","size","rotation","pull","iconLookup","normalizeIconArgs","icon","console","mask","o","renderedIcon","abstract","iconName","dataPrefix","dataIcon","dataFaTransform","dataFaMask","dataFaProcessed","ariaHidden","ariaLabelledBy","viewBox","appConfig","resolveRegistration","defaultPrefix","fontawesome","_FaIconComponent","aliases","unicode","svgPathData","exports","DESTROYING","DESTROYED","ARGS_SET","DEBUG","GlimmerComponent","willDestroy","BaseComponentManager","createComponent","ComponentClass","named","component","CAPABILITIES","capabilities","destructor","asyncLifecycleCallbacks","updateHook","scheduledDestroyComponent","EmberGlimmerComponentManager","destroyComponent","schedule","setComponentManager","top","bottom","right","left","auto","basePlacements","start","end","clippingParents","viewport","popper","variationPlacements","placement","placements","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","getNodeName","element","nodeName","getWindow","node","ownerDocument","defaultView","isElement","Element","isHTMLElement","HTMLElement","isShadowRoot","ShadowRoot","modifiers_applyStyles","phase","elements","styles","removeAttribute","setAttribute","effect","_ref2","initialStyles","position","strategy","margin","arrow","property","requires","getBasePlacement","round","getUAString","uaData","navigator","userAgentData","brands","brand","version","userAgent","isLayoutViewport","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","offsetWidth","width","offsetHeight","height","visualViewport","addVisualOffsets","x","offsetLeft","y","offsetTop","getLayoutRect","abs","contains","parent","child","rootNode","getRootNode","isSameNode","parentNode","getComputedStyle","isTableElement","getDocumentElement","documentElement","getParentNode","assignedSlot","getTrueOffsetParent","offsetParent","getOffsetParent","isFirefox","currentNode","css","perspective","contain","willChange","getMainAxisFromPlacement","within","mathMax","mathMin","mergePaddingObject","paddingObject","expandToHashMap","hashMap","modifiers_arrow","_state$modifiersData$","arrowElement","popperOffsets","modifiersData","basePlacement","axis","padding","rects","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","clientHeight","clientWidth","centerToReference","center","axisProp","centerOffset","_options$element","requiresIfExists","getVariation","unsetSides","mapToStyles","_Object$assign2","popperRect","variation","offsets","gpuAcceleration","adaptive","roundOffsets","isFixed","_offsets$x","_offsets$y","_ref3","hasX","hasY","sideX","sideY","win","heightProp","widthProp","_Object$assign","commonStyles","_ref4","dpr","devicePixelRatio","modifiers_computeStyles","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","passive","eventListeners","instance","_options$scroll","scroll","_options$resize","resize","scrollParents","scrollParent","addEventListener","update","removeEventListener","getOppositePlacement","matched","getOppositeVariationPlacement","getWindowScroll","scrollLeft","pageXOffset","scrollTop","pageYOffset","getWindowScrollBarX","isScrollParent","_getComputedStyle","overflow","overflowX","overflowY","getScrollParent","listScrollParents","list","_element$ownerDocumen","isBody","updatedList","rectToClientRect","rect","getClientRectFromMixedType","clippingParent","layoutViewport","clientTop","clientLeft","winScroll","scrollWidth","scrollHeight","direction","computeOffsets","commonX","commonY","mainAxis","detectOverflow","_options$placement","_options$strategy","_options$boundary","boundary","_options$rootBoundary","rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","mainClippingParents","clipperElement","firstClippingParent","clippingRect","accRect","contextElement","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","modifiers_flip","_skip","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","flipVariations","allowedAutoPlacements","preferredPlacement","oppositePlacement","_options$allowedAutoP","allPlacements","allowedPlacements","overflows","a","b","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","isVertical","mainVariationSide","altVariationSide","checks","_loop","_i","fittingPlacement","find","getSideOffsets","preventedOffsets","isAnySideFullyClipped","side","modifiers_hide","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","modifiers_offset","_options$offset","invertDistance","skidding","distance","_data$state$placement","modifiers_popperOffsets","modifiers_preventOverflow","_options$tether","tether","_options$tetherOffset","tetherOffset","isBasePlacement","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","getCompositeRect","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","order","modifiers","visited","modifier","dep","depModifier","DEFAULT_OPTIONS","areValidElements","_key","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","orderedModifiers","effectCleanupFns","setOptions","setOptionsAction","cleanupModifierEffects","merged","current","existing","_ref$options","cleanupFn","forceUpdate","_state$elements","index","_state$orderedModifie","_state$orderedModifie2","onFirstUpdate","createPopper","computeStyles","applyStyles","hide","ARRAY_SIGNAL","OBJECT_SIGNAL","setupSignals","buildConfig","hooks","wellknown","setTransient","createSignal","peekTransient","willSyncFlushWatchers","INITIALIZER_PROTO","isInitializer","getPrototypeOf","Signals","createInternalSignal","initialValue","warpDriveSignal","getOrCreateInternalSignal","createInternalMemo","memo","createMemo","consumeInternalSignal","TrackingFrame","consumeSignal","notifySignal","internalSignal","entangleInitiallyStaleSignal","createSignalDescriptor","intialValue","memoSignal","bind","_target","setter","RequestCache","isAbortError","DOMException","RequestLoadingState","_trigger","_triggered","_future","getStream","sizeHint","_sizeHint","stream","loadingState","reader","getReader","bytesLoaded","shouldForward","_stream","readable","locked","isForwarding","writer","getWriter","buffer","_isPending","_isStarted","_startTime","performance","now","done","byteLength","_bytesLoaded","_lastPacketTime","ready","close","cancel","endTime","_endTime","_isComplete","_isCancelled","_isErrored","_error","TransformStream","isStarted","startTime","lastPacketTime","isComplete","isCancelled","isErrored","elapsedTime","completedRatio","remainingRatio","duration","speed","abort","RequestStateProto","performRefresh","requester","isReload","backgroundReload","getOwnPropertyDescriptor","reason","_loadingState","_request","DISPOSE","dispose","RequestSubscription","_maybeUpdate","_localRequest","_latestRequest","_args","_subscribedTo","_subscription","_intervalStart","_invalidated","_nextInterval","_requester","_DISPOSE","_installListeners","_beginPolling","isIdle","_scheduleInterval","autorefreshTypes","autorefresh","autorefreshThreshold","setTimeout","_clearInterval","clearTimeout","_updateSubscriptions","requestId","_removeSubscriptions","_getRequester","isStore","_id","_isUpdating","latest","requestManager","_deduped","priority","reqState","blocking","isRefreshing","isOnline","onLine","_unavailableStart","isHidden","visibilityState","_onlineChanged","event","_backgroundChanged","capture","mode","silent","shouldAttempt","deadline","val","autorefreshBehavior","refresh","errorFeatures","retry","contentFeatures","feat","latestRequest","_originalRequest","_originalQuery","getPromiseResult","promiseState","usePolicy","setPromiseResult","_RequestSubscription","PromiseStateProto","NUMERIC_KEYS","parseCacheControlValue","stringToParse","parsedValue","LRUCache","isParsingKey","cacheControlValue","char","upgradeHeaders","clone","Headers","toJSON","cloneResponseProperties","redirected","ContextOwner","god","isRoot","createDeferred","controller","enhancedRequest","hasSubscribers","hasRequestedStream","getResponse","hasSetResponse","nextCalled","hint","setStream","hasSetStream","resolveStream","setResponse","Response","isCacheHandler","___owner","_isCacheHandler","_finalized","setIdentifier","_finalize","PromiseCache","getOrSetUniversal","RequestMap","setRequestResult","clearRequestResult","getRequestResult","IS_CACHE_HANDLER","isDoc","STRUCTURED","ensureDoc","enhanceReason","executeNextHandler","wares","outcome","r","cbs","onFinalize","IS_FUTURE","maybe","inbound","outbound","aborted","res","rej","upgradePromise","CACHE_OWNER","urlFromLink","ReactiveDocumentProto","withBrand","prev","first","last","Destroy","createReactiveDocument","cacheKey","localCache","_localCache","isResource","hasProp","hasLid","hasId","normalized","ensureStringId","isResourceKey","isRequestKey","peek","recordArrayManager","getCollection","requestKey","_crypto","crypto","NEW_IDENTIFIERS","IDENTIFIER_CACHE_ID","defaultUpdateMethod","typeMap","idMap","defaultKeyInfoMethod","known","defaultGenerationMethod","randomUUID","toUpperCase","defaultEmptyCallback","defaultMergeMethod","_b","_c","CacheKeyManager","_generate","_forget","_merge","_keyInfoForResource","resources","documents","polymorphicLidBackMap","__configureMerge","upgradeIdentifier","_getRecordIdentifier","shouldGenerate","getIdentifierFromLid","makeResourceKey","keyInfo","addResourceToCache","peekResourceKey","peekRequestKey","getOrCreateDocumentIdentifier","createIdentifierForNewRecord","newLid","updateRecordIdentifier","identifierObject","existingIdentifier","newId","typeSet","newType","newTypeSet","detectMerge","hadLid","generatedIdentifier","_mergeRecordIdentifiers","updateFn","performRecordIdentifierUpdate","kept","abandoned","abandonedBackReferences","forgetRecordIdentifier","keptBackReferences","backReferences","recordIdentifier","clientOriginated","CacheCapabilitiesManager","_willNotify","_pendingNotifies","identifierCache","_scheduleNotification","_cbs","_schedule","_flushNotifications","notifyChange","hasRecord","disconnectRecord","disconnect","assertPrivateCapabilities","getSchemaDefinitionService","RecordCache","ignoreMissing","InstanceCache","__instances","_storeWrapper","matchedIdentifier","resourceData","keptIdentifier","staleIdentifier","keptHasRecord","staleHasRecord","patch","getDocument","_createRecord","filterDeleted","_requestCache","_clearEntries","instances","typeCache","oldId","isCacheOperationValue","NotificationManager","_buffered","_hasFlush","callbacks","_hasSubscribers","hasSubscriber","callbackMap","_scheduleNotify","_onNextFlush","_onFlushCB","asyncFlush","_enableAsyncFlush","buffered","states","_flushNotification","isUpdating","_updatingPromise","updatingPromise","all","ARRAY_GETTER_METHODS$1","iterator","ARRAY_SETTER_METHODS$1","isArrayGetter$1","convertToInt$1","num","isExtensionProp","extensions","performObjectExtensionGet","performExtensionSet","performArrayExtensionGet","_SIGNAL","boundFns","transaction","NativeProxy","IS_COLLECTION","isContextProp","MUTABLE_PROPS","ARR_BRACKET_DESC","IS_UPDATING_DESC","ArrayHandler","CONTEXT","arr","features","newIdentifier","deleteProperty","ILLEGAL_MUTATION","createReactiveResourceArray","TARGET","createRequestCollection","config","_updateLiveArray","_updateCollection","_recordArray","destroyCollection","_managed","FAKE_ARR","batch","RecordArrayManager","_live","_staged","_keyedArrays","_identifiers","_set","_visibilitySet","_documentSubscription","dirtyArray","_subscribeToResourceChanges","identifierAdded","identifierRemoved","identifierChanged","isLegacyQuery","isLegacyQueryArray","changes","arraySet","adds","removes","DEPRECATED_CLASS_NAME","populateManagedArray","liveArrayFor","staged","associate","delta","shouldSyncFromCache","_getPendingFor","includeManaged","isRemove","liveArray","allPending","managed","pendingLive","old","ArraysCache","disassociateIdentifier","changeSets","newState","pause","resume","isClear","Touching","RequestPromise","EMPTY_ARR","RequestStateService","_done","_enqueue","queryRequest","_triggerSubscriptions","_dequeue","finalizedRequest","_addDone","_toFlush","_flushRequest","subscriptions","_subscriptions","requestDataOp","getPendingRequestsForRecord","EmptyClass","BaseClass","Store","_schema","createSchemaService","_isDestroying","_isDestroyed","createArgs","_run","coalesce","sync","_getAllPending","requestConfig","opts","inputProperties","generateIdForRecord","defs","extractIdentifiersFromRecords$1","extractIdentifierFromRecord$1","resultProps","clientDidCreate","ReactiveResource","_CHECKOUT","setIsDeleted","isMaybeIdentifier","stableIdentifier","unloadAll","pushed","jsonApiDoc","put","createCache","maybeIdentifier","recordOrPromiseRecord","_convertPreloadRelationshipToJSON","registerSchemaDefinitionService","registerSchema","RecordReference","objectOrPromise","AvailableShims","ShimModelClass","__store","constructResource","preload","jsonPayload","preloadValue","relatedType","upsert","SkipCache","getReference","withReferences","shims","shim","operation","MUTATION_OPS$1","isMutation","cloneError","isAggregate","AggregateError","cloned","structuredClone","stack","getPriority","deduped","CacheHandler","DEDUPE","activeRequest","peeked","peekRequest","hasCachedValue","lifetimes","isHardExpired","fetchContentAndHydrate","queueMicrotask","willFetch","isSoftExpired","shouldHydrate","maybeUpdateUiObjects","newError","isMut","willCommit","willRequest","didCommit","didRequest","commitWasRejected","isNonEmptyString","str","trueId","CAUTION_MEGA_DANGER_ZONE_arrayExtensions","destroyLegacyManyArray","_MUTATE","collection","mutateReplaceRelatedRecords","prior","operationInfo","newValues","extractIdentifiersFromRecords","assertNoDuplicates","seen","unique","newArgs","mutateAddToRelatedRecords","mutateRemoveFromRelatedRecords","deleteCount","extractIdentifierFromRecord","duplicates","currentValue","currentIndex","localeCompare","ARRAY_GETTER_METHODS","SYNC_PROPS","isArrayGetter","ARRAY_SETTER_METHODS","ManagedArray","SOURCE","IS_EDITABLE","resourceKey","KeyMode","RefStorage","ManagedRecordRefs","rawValue","hydrate","objectType","schemaObjectKeyValue","typePath","hashField","recordRef","deref","recordPath","objectContext","modeName","schemaObject","WeakRef","errorPath","reflect","getArrayField","at","managedArray","defaultValue","getRemoteAttr","InvalidKinds","isNonIdentityCacheableField","getFieldCacheKeyStrict","getFieldCacheKey","ManyArrayManager","ObjectSymbols","ManagedObject","CAUTION_MEGA_DANGER_ZONE_objectExtensions","ownKeys","toPrimitive","toStringTag","ManagedObjectMap","peekManagedObject","managedObjectMapForRecord","ResourceRelationship","getRemoteRelationship","getHref","DefaultMode","realPath","rawData","mutable","serializable","alias","fieldSignal","_kind","derived","cached","managedObject","newValue","arrayValue","cachedSchemaObject","schemaFields","IgnoredGlobalFields","symbolList","Checkout","Commit","RecordSymbols","Editables","isEmbedded","identityField","BoundFns","CAUTION_MEGA_DANGER_ZONE_resourceExtensions","___notifications","arrSignal","objSignal","identityKey","schemaForField","_DESTROY","maybeField","propArray","fieldCacheKey","editableRecord","Support","_constructor","Type","BannedKeys","getExt","extCache","extName","ext","hasObjectSchema","processExtensions","scenario","resolvedType","objectExtensions","_extensions","fieldCache","_cachedFieldExtensionsByField","arrayExtensions","baseExtensions","feature","SchemaService","_transforms","_hashFns","_derivations","_traits","_modes","traits","finalized","getCacheFields","registerTrait","internalTrait","memoizedDerivation","CAUTION_MEGA_DANGER_ZONE_registerExtension","extension","baseFeatures","getOwnPropertyNames","decl","CAUTION_MEGA_DANGER_ZONE_hasExtension","_registerMode","kinds","finalizeResource","traitName","walkTrait","mergeMap","debugPath","subtrait","base","toApply","MUTATION_OPS","ERROR_STATUS_CODE_FOR","Fetch","isRequestError","isMutationOp","toUTCString","overrides","decoder","TextDecoder","isStreaming","decode","encode","TextEncoder","errorPayload","msg","replaceAll","RequestManager","_handlers","useCache","cacheHandler","use","newHandlers","handlers","AbortController","peekUniversalTransient","setUniversalTransient","cacheResult","finalPromise","GlobalRef","UniversalCache","__warpDrive_universalCache","__version","GlobalSink","ModuleScopedCaches","__warpDrive_ModuleScopedCaches","__warpDrive_hasOtherCopy","RuntimeConfig","debug","storage","sessionStorage","settings","getItem","doWork","STRING_DASHERIZE_REGEXP","STRING_DECAMELIZE_REGEXP","STRING_DASHERIZE_CACHE","emberDirtyTag","dirtyTag","buildSignalConfig","tagForProperty","consumeTag","propertyTag","wrappedFn","getValue","tag","track","updateTag","_backburner","currentInstance","_autorun","SnapshotRecordArray","_snapshots","LiveArrayContext","assertIdentifierHasId","iterateData","normalizeResponseHelper","Snapshot","__attributes","_belongsToRelationships","_belongsToIds","_hasManyRelationships","_hasManyIds","_attributes","_changedAttributes","keyName","changedAttributeKeys","returnModeIsId","inverseIdentifier","returnModeIsIds","results","cachedIds","cachedSnapshots","member","SaveOp","_pendingFetch","requestCache","scheduleSave","resolver","pendingSaveItem","monitored","adapterPayload","scheduleFetch","pendingFetch","getPendingFetch","pendingFetchItem","resolverPromise","isInitialLoad","potentiallyNewIm","isReleasable","unload","flushAllPendingFetches","fetchesByType","fetchesById","requestsForIdentifier","pendingFetches","matchingPendingFetch","existingOptions","arrCurrent","arrExisting","fetchItem","pendingFetchMap","pendingFetchItems","fetchMap","_processCoalescedGroup","_fetchRecord","fetchDataIfNeededForIdentifier","rejectFetchedItems","pair","payloads","coalescedPayload","snapshotsById","snapshotGroup","snapshotArray","_AdapterError","description","fileName","lineNumber","number","extendFn","ErrorClass","defaultMessage","ParentErrorClass","STRING_CAMELIZE_REGEXP_1","STRING_CAMELIZE_REGEXP_2","CAMELIZE_CACHE","_match","_separator","chr","STRING_UNDERSCORE_REGEXP_1","STRING_UNDERSCORE_REGEXP_2","UNDERSCORE_CACHE","STRING_CAPITALIZE_REGEXP","CAPITALIZE_CACHE","BLANK_REGEX","LAST_WORD_DASHED_REGEX","LAST_WORD_CAMELIZED_REGEX","CAMELIZED_REGEX","SINGULARS","inflect","SINGULAR_RULES","INVERSE_IRREGULAR","PLURALS","PLURAL_RULES","IRREGULAR","UNCOUNTABLE","reverse","loadIrregular","clearRules","unshiftMap","entries","rule","typeRules","irregulars","lowercase","wordSplit","exec","lastWord","isCamelized","substitution","RegExp","uncountables","luhn10","getCardTypes","verification","card","isPotentiallyValid","maxLength","testCardValue","potentialTypes","cardType","skipLuhnValidation","UNIONPAY","luhnValidateUnionPay","lengths","CARD_NUMBER_REGEX","thing","maximum","__assign","t","n","p","parse_date_1","expiration_month_1","expiration_year_1","month","year","maxElapsedYear","parseDate","fullDate","monthValid","expirationMonth","yearValid","expirationYear","isCurrentYear","isValidForThisYear","currentMonth","getMonth","currentYear","getFullYear","numericValue","twoDigitYear","valid","__createBinding","k2","__setModuleDefault","creditCardType","__importStar","mod","cardholder_name_1","card_number_1","expiration_date_1","cvv_1","postal_code_1","cardValidator","cardholderName","cardNumber","expirationDate","cvv","postalCode","module","arg","is_array_1","datestring","dateString","assumedYear","firstCharacter","numberOfDigitsInMonth","sum","alt","ALPHANUM","minLength","cardTypes","add_matching_cards_to_results_1","is_valid_input_type_1","find_best_match_1","clone_1","customCards","cardNames","VISA","MASTERCARD","AMERICAN_EXPRESS","DINERS_CLUB","DISCOVER","JCB","MAESTRO","ELO","MIR","HIPER","HIPERCARD","ORIGINAL_TEST_ORDER","testOrder","findType","getCardPosition","ignoreErrorForNotExisting","isValidInputType","cardConfiguration","addMatchingCardsToResults","bestMatch","findBestMatch","getTypeInfo","removeCard","addCard","existingCardPosition","updateCard","updates","originalObject","clonedCard","changeOrder","currentPosition","resetModifications","matches_1","patternLength","patterns","pattern","matches","clonedCardConfiguration","matchStrength","visa","niceType","gaps","mastercard","discover","jcb","unionpay","maestro","elo","mir","hiper","hipercard","numberOfResultsWithMaxStrengthProperty","maxLengthToCheck","integerRepresentationOfCardNumber","params","assign$1","buildHelper","scrollLineHeight","getScrollDeltas","deltaX","deltaY","deltaMode","iframe","createElement","src","visibility","appendChild","iframeDocument","contentWindow","open","firstElementChild","removeChild","getScrollLineHeight","calculateScrollDistribution","container","accumulator","scrollInformation","scrollLeftMax","scrollTopMax","availableScroll","elementStyle","distributeScroll","scrollInfos","BasicDropdownContent","transitioningInClass","transitionedInClass","transitioningOutClass","isTouchDevice","dropdown","uniqueId","_contentWormhole","_animationClass","dropdownContentWormhole","dropdownElement","actions","registerDropdownElement","selector","triggerElement","getTriggerElement","handleRootMouseDown","composedPath","hasMoved","touchMoveEvent","dropdownIsValidParent","dropdownId","rootEventType","repositionBound","touchStartHandlerBound","scrollableAncestors","nextScrollable","tagName","nextParent","addScrollHandling","removeGlobalEvents","removeScrollHandling","eager","reposition","animationEnabled","waitForAnimations","animationClass","parentElement","destinationElement","renderInPlace","cloneNode","mutationObserver","MutationObserver","mutations","shouldReposition","containsRelevantMutation","addedNodes","removedNodes","observe","childList","subtree","touchMoveHandler","touchStartHandler","destination","getElementById","animationEnabledArg","positionStyles","noop","touchMoveHandlerBound","preventScroll","wheelHandler","deltaXNegative","deltaXPositive","deltaYNegative","deltaYPositive","preventDefault","defaultPrevented","addScrollEvents","removeScrollEvents","el","nodeList","nodeValue","closestContent","requestAnimationFrame","computedStyle","animationName","animationPlayState","eventCallback","closestDropdown","getAttribute","trigger","parentDropdown","parentAttrId","_BasicDropdownContent","g","tracked","action","or","on","BasicDropdownTrigger","disableDocumentTextSelect","disable","_BasicDropdownTrigger","DropdownTriggerModifier","BasicDropdownWormholeComponent","getDestinationId","utilConfig","_configSet","configEnvironment","legacyConfigString","_BasicDropdownWormholeComponent","UNINITIALIZED","IGNORED_STYLES","_hPosition","_vPosition","_top","_left","_right","_width","_height","_otherStyles","_isOpen","_renderInPlace","BasicDropdown","horizontalPosition","verticalPosition","_getDestinationId","disabled","newVal","_previousDisabled","publicAPI","isOpen","registerAPI","_uid","_actions","guidFor","toggle","registerTriggerElement","onInit","onOpen","_getTriggerElement","_dropdownId","skipFocus","onClose","hPosition","vPosition","previousVerticalPosition","previousHorizontalPosition","tabIndex","focus","_getDropdownElement","matchTriggerWidth","positionData","calculatePosition","applyReposition","positions","otherStyles","setProperty","APP","triggerComponent","ensureSafeComponent","contentComponent","_BasicDropdown","initiallyOpened","_config","Modifier","handleMouseEvent","handleKeyDown","handleTouchStart","handleTouchEnd","_touchMoveHandler","registerDestructor","cleanup","modify","positional","desiredEventType","eventType","stopPropagation","didSetup","setup","handleMouseEventBound","handleKeyDownBound","handleTouchStartBound","handleTouchEndBound","_positional","notLeftClick","button","toggleIsBeingHandledByTouchEvents","keyCode","createEvent","initMouseEvent","dispatchEvent","Event","_DropdownTriggerModifier","excludeStaticParent","overflowRegex","calculateInPlacePosition","_destination","dropdownRect","triggerRect","viewportRight","innerWidth","triggerWidth","dropdownWidth","calculateWormholedPosition","triggerLeft","triggerTop","triggerHeight","dropdownHeight","viewportWidth","anchorElement","anchorPosition","isBodyPositionRelative","getPropertyValue","triggerLeftWithScroll","leftVisible","rightVisible","triggerTopWithScroll","enoughRoomBelow","innerHeight","enoughRoomAbove","endEvent","moveEvent","changedTouches","touchType","horizontalDistance","pageX","verticalDistance","pageY","setupDeprecationWorkflow","deprecationWorkflow","deprecationLog","handleDeprecationWorkflow","deprecationCollector","flushDeprecations","matchesWorkflow","matcher","detectWorkflow","workflow","idMatcher","matchMessage","matchId","collected","entry","mergedConfig","matchingWorkflow","logCounts","throwOnUnhandled","EmberEnvironment","Environment","reportUncaughtRejection","Ember","onerror","defer","globalDebuggingEnabled","ENV","DEBUG_TASKS","EMBER_ENVIRONMENT","deferable","DEFAULT_ENVIRONMENT","BoundedPolicy","maxConcurrency","CANCELLED","makeCancelState","DropReducer","remainingSlots","step","STARTED","DropPolicy","makeReducer","EnqueuedReducer","QUEUED","EnqueuedPolicy","TYPE_CANCELLED","TYPE_STARTED","KeepLatestReducer","numToCancel","KeepLatestPolicy","numRunning","numQueued","totalRunning","RestartableReducer","RestartablePolicy","LAST_APPLIED_TAGS","Refresh","schedulerPolicy","stateTracker","taskInstances","initialTaskInstances","startingInstances","process","filterFinishedTaskInstances","reducer","finalTaskInstances","taskInstance","setTaskInstanceExecutionState","computeFinalStates","applyState","taskState","stateFor","task","executorState","executor","isFinished","onCompletion","hasStarted","desiredState","counted","onPerformed","onStart","onRunning","TYPE_QUEUED","onQueued","taskable","onState","guid","numPerformedInc","RefreshState","completionState","lastRunning","lastComplete","COMPLETION_SUCCESS","lastSuccessful","COMPLETION_ERROR","lastErrored","COMPLETION_CANCEL","lastCanceled","lastIncomplete","lastPerformed","recurseTaskGroups","applyStateFrom","other","CURRENT_REFRESH_TAGS","StateTracker","currentTag","computeRecursiveState","forEachState","lastState","taskGroup","NULL_STATE","NullStateTracker","Scheduler","stateTrackingEnabled","cancelAll","cancelRequest","cancelations","guids","cancelation","perform","scheduleRefresh","SchedulerRefresh","SINGLETON_REDUCER","UnboundedPolicy","MODIFIER_REGISTRY","enqueue","setBufferPolicy","evented","setEvented","setDebug","drop","groupName","setGroup","keepLatest","setMaxConcurrency","onStateCallback","setOnState","restartable","registerModifier","getModifier","hasModifier","taskDefinition","setState","UnboundedSchedulerPolicy","_processModifierOptions","createTask","getTaskOptions","Task","generatorFactory","createTaskGroup","TaskGroup","getOptions","getScheduler","scheduler","_onStateCallback","_taskGroupPath","_schedulerPolicyClass","_maxConcurrency","_debug","env","hasEnabledEvents","_hasEnabledEvents","enabledModifiers","_enabledModifiers","modifierOptions","policy","_hasSetBufferPolicy","_hasSetConcurrencyConstraint","setName","setTaskDefinition","TASK_CANCELATION_NAME","didCancel","CancelRequest","finalize","GeneratorStepResult","errored","GeneratorState","resolvedValue","iteratorMethod","getIterator","PERFORM_TYPE_DEFAULT","PERFORM_TYPE_UNLINKED","PERFORM_TYPE_LINKED","CANCEL_RETURN_VALUE_SENTINEL","TASK_INSTANCE_STACK","getRunningInstance","TaskInstanceExecutor","generatorState","INITIAL_STATE","disposers","finalizeCallbacks","proceedSync","YIELDABLE_CONTINUE","onStarted","requestCancel","proceedWithCancelAsync","finalizeWithCancel","proceedChecked","yieldResumeType","advanceIndex","YIELDABLE_CANCEL","CANCEL_KIND_YIELDABLE_CANCEL","proceedAsync","YIELDABLE_RETURN","handleResolvedReturnedValue","handleResolvedContinueValue","resumeValue","beforeIndex","stepResult","generatorStep","handleYieldedValue","YIELDABLE_THROW","handleYieldedUnknownThenable","thenable","resumeIndex","yieldedValue","addDisposer","cancelableSymbol","yieldableSymbol","invokeYieldable","proceedWithSimpleValue","maybeDisposer","disposer","nextValue","pop","_expectsLinkedYield","performType","maybeResolveDefer","runFinalizeCallbacks","maybeThrowUnhandledTaskErrorLater","asyncErrorsHandled","isSuccessful","finalizeShared","cancelReason","formatCancelReason","debugEnabled","log","isCanceled","dispatchFinalizeEvents","onSuccess","onError","onCancel","onYielded","proceed","getPerformType","detectSelfCancelLoop","CANCEL_KIND_PARENT_CANCEL","parentCancelRequest","CANCEL_KIND_LIFESPAN_END","selfCancelLoopWarning","COMPLETION_PENDING","DEFAULT_STATE","performCount","freeze","Taskable","TaskLinkProxy","linkedObject","_performShared","_perform","linked","unlinked","_clone","_curry","_curryArgs","fullArgs","_taskInstanceFactory","_isAlive","_taskInstanceOptions","_linkedObject","guidId","cancelRequestKind","resetState","CANCEL_KIND_EXPLICIT","_resetState","isRunning","isQueued","YieldableState","_taskInstance","_resumeIndex","getTaskInstance","return","throw","Yieldable","onYield","_deferable","def","_toPromise","thinInstance","_index","resumeType","AnimationFrameYieldable","timerId","cancelAnimationFrame","RawTimeoutYieldable","ms","animationFrame","forever","rawTimeout","taskHelperClosure","helperName","taskMethod","outerArgs","innerArgs","EmberScheduler","once","handlerCounter","registerOnPrototype","addListenerOrObserver","taskName","handlerName","makeTaskCallback","scheduleOnce","ensureArray","possibleArr","eventNames","addCancelEvents","propertyPaths","addObserverKeys","addPerformEvents","TaskFactory","TaskFactory$1","EncapsulatedTask","taskObj","cancelEventNames","_cancelEventNames","_observes","_eventNames","TaskProperty","_setupEmberKVO","addListener","taskFn","TaskGroup$1","TRACKED_INITIAL_TASK_STATE","defineProperties","TASKABLE_MIXIN","BaseTaskInstance","parentTaskInstance","isDropped","TaskInstance","_recomputeState","triggerEvent","getName","parentName","childName","allArgs","eventNamespace","TRACKED_INITIAL_INSTANCE_STATE","taskFactorySymbol","propertyModifiers","RestartableSchedulerPolicy","EnqueueSchedulerPolicy","DropSchedulerPolicy","KeepLatestSchedulerPolicy","taskGroupPath","TaskGroupProperty","taskComputed","cp","callSuperSetup","cancelOn","observes","Task$1","currentTaskInstanceSymbol","_encapsulatedTaskStates","_encapsulatedTaskInstanceProxies","_getEncapsulatedTaskClass","encapsulatedTaskImplClass","_encapsulatedTaskImplClass","taskInstanceProxy","encapsulatedTaskImpl","_wrappedEncapsulatedTaskInstance","_performCount","derivedState","applyTracked","initial","propDesc","INITIAL_TASK_STATE","INITIAL_INSTANCE_STATE","buildTask","contextFn","bufferPolicyName","optionsWithBufferPolicy","generator","cancelHelper","cancelable","helper","maybeReportError","performHelper","EmberYieldable","TimeoutYieldable","later","timeout","taskFromPropertyDescriptor","factoryClass","displayName","tasks","taskGroupPropertyDescriptor","_descriptor","taskGroups","decoratorWithParams","descriptorFn","possibleDesc","createDecorator","baseOptions","userOptions","mergedOptions","createTaskDecorator","createTaskGroupDecorator","lastValue","lastInstance","dropTask","enqueueTask","keepLatestTask","restartableTask","dropTaskGroup","enqueueTaskGroup","keepLatestTaskGroup","restartableTaskGroup","taskFnOrProtoOrDecoratorOptions","isDecoratorOptions","taskDecorator","taskProperty","setPrototypeOf","possibleDecoratorOptions","taskGroupDecorator","tp","possibleOptions","taskAwareVariantOf","RSVP","allSettled","race","Promise$1","getValues","hashSettled","castForPromiseHelper","castable","getItems","awaitable","awaitables","arrOrHash","items","hasCancelled","WaitForQueueYieldable","queueName","WaitForEventYieldable","eventName","usesDOMEvents","off","WaitForPropertyYieldable","predicateCallback","observerBound","observerFn","waitForQueue","waitForEvent","c","one","waitForProperty","getStore","wrapper","expandingGet","key1","key2","expandingSet","checkIfNew","isBelongsTo","isImplicit","forAllRelatedIdentifiers","remoteState","localState","additions","localMembers","remoteMembers","removeIdentifierCompletelyFromRelationship","silenceNotifications","wasInRemovals","removals","canonicalIndex","_removing","isLegacyField","BOOL_LATER","IMPLICIT_KEY_RAND","implicitKeyFor","syncMeta","inverseDefinition","inverseKind","inverseKey","inverseName","inverseIsAsync","inverseIsCollection","isCollection","inverseIsPolymorphic","inverseIsImplicit","inverseIsLinksMode","isLinksMode","resetOnRemoteUpdate","upgradeMeta","niceMeta","replaceRelatedRecords","isRemote","resourceKeys","_addToTransaction","wasDirty","diff","diffCollection","registerPolymorphicType","addToInverse","removeFromInverse","finalSet","finalState","changed","_diff","deprecationInfo","triggered","_realStore","flushCanonical","localBecameDirty","onAdd","removalsHas","onRemove","additionsHas","del","becameDirty","_add","_removeRemote","_removeLocal","_scheduleLocalSync","replaceRelatedRecord","existingState","onDel","priorLocalState","newMembers","prevState","prevSet","remoteClearsLocal","newLength","prevLength","iterationLength","remoteOrderChanged","removed","priorLocalLength","adv","prevMember","finalLength","equalLength","hasValidIndex","rollbackRelationship","legacyGetCollectionRelationshipData","getRemoteState","legacyGetResourceRelationshipData","addRelatedRecord","removeRelatedRecord","_normalizeLink","upgradeIdentifiers","Graphs","Graph","_definitionCache","_metaCache","_potentialPolymorphicTypes","_willSyncRemote","_willSyncLocal","_pushedUpdates","deletions","_updatedRelationships","_transaction","getDefinition","storeWrapper","polymorphicLookup","altTypes","_cached","rhs_modelNames","inverseForRelationship","lhs_key","lhs_modelNames","lhs_baseModelName","lhs_relationshipName","lhs_definition","lhs_isPolymorphic","rhs_key","rhs_baseModelName","rhs_relationshipName","rhs_definition","rhs_isPolymorphic","hasInverse","isSelfReferential","isReflexive","baseType","upgradeDefinition","isLHS","transactionRef","getRemoteData","type1","type2","t1","t2","removeCompletelyFromInverse","inverseIdentifer","localInverse","removeDematerializedInverse","notifyInverseOfDematerialization","clearRelationship","destroyRelationship","_isDirty","hasAdditions","hasRemovals","isReordered","getChanged","reordered","hasChanged","rollback","cacheForKind","cacheForType","cacheForField","_flushRemoteQueue","mergeIdentifier","hasRelationshipDataProperty","hasUpdatedLink","originalLinks","relatedLink","currentLink","currentLinkHref","relationshipIsEmpty","relationshipTransactionId","graphTransactionId","updateRelationshipOperation","_isBelongsTo","addToRelatedRecords","removeFromRelatedRecords","_flushLocalQueue","flushPending","updated","ops","opList","flushPendingList","localMember","getWrapper","peekGraph","isErrorDocument","EMPTY_ITERATOR","JSONAPICache","_capabilities","__cache","__graph","__destroyedCache","__documents","_putDocument","putOne","resourceDocument","errorDoc","copyLinksAndMeta","hasExisting","parentField","patchCache","__safePeek","remoteAttrs","inflightAttrs","localAttrs","getDefaultValue","peekRemoteState","calculateChanges","cacheUpsert","fork","merge","dump","_createCache","propertyNames","propertyValue","fieldType","_context","committedIdentifier","responseIsCollection","hasMultipleIdentifiers","commitDidError","removeFromRecordArray","__peek","defaultAttrs","relatedIdentifiers","originating","queue","shift","_directlyRelatedIdentifiersIterable","isSimplePath","attrSchema","schemaHasLegacyDefaultValueFn","basePath","currentAttr","existingAttr","currentLocal","nextLink","dirtyKeys","notifyAttributes","changedRelationships","hasChangedRelationships","rollbackRelationships","allowDestroyed","getLocalState","hasLegacyDefaultValueFn","calculateChangedKeys","changedKeys","cacheIsEmpty","setupRelationships","relationshipData","isRelationship","patchLocalAttributes","changedRemoteKeys","hasAppliedPatch","mutatedKeys","initializedRelationships","initializedRelationshipsArr","findNext","existed","_isLoading","isUpdate","Cache","isRecord","shouldNotify","toRemove","existingId","newCanonicalAttributes","syncRelationshipDataFromLink","parentRelationship","parentType","parentRelationshipData","relData","relatedDataHash","parentPayload","PotentialLegacyOperations","LegacyNetworkHandler","maybeRecordArray","_findAll","recordArray","pendingRequest","fetches","saveOptions","errorsHash","out","PRIMARY_ATTRIBUTE_KEY","isAsyncFlush","_allowMissing","_adapterCache","_deprecatingNormalize","application","_serializerCache","inputPayload","adapterName","serializerName","BaseStore","store_defineProperty","ElementHelper","Helper","compute","componentClass","EmberComponent","runInDebug","_loop_1","args_1","HOOKS","defaults","_disable","allowInput","allowInvalidPreload","altFormat","altInput","altInputClass","animate","ariaDateFormat","autoFillDefaultTime","clickOpens","closeOnSelect","conjunction","dateFormat","defaultHour","defaultMinute","defaultSeconds","disableMobile","enableSeconds","enableTime","errorHandler","getWeek","givenDate","getTime","setHours","setDate","getDate","getDay","week1","hourIncrement","ignoredFocusElements","inline","locale","minuteIncrement","monthSelectorType","nextArrow","noCalendar","onChange","onDayCreate","onDestroy","onKeyDown","onMonthChange","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition","plugins","positionElement","prevArrow","shorthandCurrentMonth","showMonths","static","time_24hr","weekNumbers","wrap","english","weekdays","shorthand","longhand","months","daysInMonth","firstDayOfWeek","ordinal","nth","rangeSeparator","weekAbbreviation","scrollTitle","toggleTitle","amPM","yearAriaLabel","monthAriaLabel","hourAriaLabel","minuteAriaLabel","l10n_default","d","pad","int","bool","debounce","wait","_this","arrayify","toggleClass","elem","className","textContent","clearNode","firstChild","findParent","condition","createNumberInput","inputClassName","numInput","arrowUp","arrowDown","getEventTarget","doNothing","monthToStr","monthNumber","revFormat","D","F","dateObj","monthName","setMonth","G","hour","getHours","parseFloat","H","J","day","K","M","shortMonth","S","seconds","setSeconds","U","unixSeconds","W","weekNum","weekNumber","Y","setFullYear","Z","ISODate","h","minutes","setMinutes","u","unixMillSeconds","w","tokenRegex","formats","getSeconds","getMinutes","createDateFormatter","l10n","_d","isMobile","frmt","overrideLocale","formatDate","createDateParser","givenFormat","timeless","customLocale","parsedDate","dateOrig","toFixed","format","datestr","matchIndex","regexStr","isBackSlash","escaped","compareDates","date1","date2","calculateSecondsSinceMidnight","hours","getDefaultHours","minDate","minHour","minMinutes","minSeconds","maxDate","maxHr","maxMinutes","__spreadArrays","il","jl","FlatpickrInstance","instanceConfig","flatpickr","defaultConfig","English","getClosestActiveElement","calendarContainer","activeElement","bindToInstance","setCalendarWidth","display","daysContainer","daysWidth","days","weekWrapper","removeProperty","updateTime","selectedDates","defaultDate","getMilliseconds","latestSelectedDateObj","isKeyDown","eventTarget","curValue","which","isHourElem","hourElement","isMinuteElem","minuteElement","incrementNumInput","prevValue","_input","setHoursFromInputs","updateValue","_debouncedChange","secondElement","limitMinHours","minTime","minDateHasTime","limitMaxHours","maxTime","maxDateHasTime","minBound","maxBound","currentTime","secondsSinceMidnight","setHoursFromDate","onYearInput","changeYear","ev","triggerChange","jumpToDate","jumpDate","jumpTo","oldYear","oldMonth","buildMonthSwitch","redraw","timeIncrement","inputElem","createDay","_dayNumber","dateIsEnabled","isEnabled","dayElement","$i","todayDateElem","isDateSelected","selectedDateElem","insertAdjacentHTML","focusOnDayElem","targetNode","onMouseOver","getFirstAvailableDay","startMonth","endMonth","startIndex","endIndex","focusOnDay","dayFocused","isInView","startElem","givenMonth","loopDelta","numMonthDays","changeMonth","buildMonthDays","firstOfMonth","prevMonthDays","utils","getDaysInMonth","createDocumentFragment","isMultiMonth","prevMonthDayClass","nextMonthDayClass","dayNumber","dayIndex","dayNum","dayContainer","buildDays","frag","shouldBuildMonth","monthsDropdownContainer","innerHTML","selected","buildMonth","monthElement","monthNavFragment","selectedMonth","yearInput","tabindex","yearElement","getElementsByTagName","buildMonths","monthNav","prevMonthNav","yearElements","monthElements","nextMonthNav","buildWeekdays","weekdayContainer","updateWeekdays","isOffset","_hidePrevMonthArrow","_hideNextMonthArrow","updateNavigationCurrentMonth","isCalendarElem","documentClick","eventTarget_1","isCalendarElement","lostFocus","relatedTarget","isIgnored","timeContainer","newYear","newYearNum","isNewYear","dateToCheck","enable","parsed","to","onBlur","isInput","valueChanged","trimEnd","getDateStr","allowKeydown","allowInlineKeydown","blur","isTimeObj","focusAndClose","selectDate","delta_1","ctrlKey","currentYearElement","elems","pluginElements","shiftKey","cellClass","hoverDate","initialDate","rangeStartDate","rangeEndDate","containsDisabled","minRange","maxRange","rContainer","querySelectorAll","dayElem","ts","ts1","ts2","timestamp","outOfRange","onResize","positionCalendar","minMaxDateSetter","inverseDateObj","getInputElem","setupLocale","l10ns","dataset","customPositionElement","_positionElement","calendarHeight","calendarWidth","configPos","configPosVertical","configPosHorizontal","inputBounds","distanceFromBottom","showOnTop","isCenter","isRight","rightMost","centerMost","editableSheet","styleSheets","sheet","cssRules","head","bodyWidth","centerLeft","centerIndex","centerStyle","insertRule","centerBefore","msMaxTouchPoints","selectedDate","shouldChangeMonth","selectedIndex","loadedPlugins","_bind","_setHoursFromDate","_positionCalendar","triggerChangeEvent","toInitial","mobileInput","_initialDate","_createElement","lastChild","insertBefore","_type","click","wasOpen","select","CALLBACKS","setSelectedDate","updatePositionElement","inputDate","dates","parseDateRules","initEvent","specificFormat","dObj","mobileFormatStr","onMonthNavClick","isPrevMonth","isNextMonth","boolOpts","userConfig","_enable","timeMode","defaultDateFormat","defaultAltFormat","_minDate","_maxDate","minMaxTimeSetter","_minTime","_maxTime","hook","pluginConf","placeholder","required","nextSibling","preloadedDate","yr","fragment","__hidePrevMonthArrow","__hideNextMonthArrow","innerContainer","separator","hourInput","minuteInput","secondInput","customAppend","appendTo","nodeType","evt","inputType","debouncedResize","ontouchstart","isSafari","_flatpickr","nodes","HTMLCollection","NodeList","en","localize","setDefaults","fp_incr","esm","EmberFlatpickr","_applyDecoratedDescriptor","_class","onInsert","setupFlatpickr","onWillDestroy","flatpickrRef","_setFlatpickrOptions","rest","fromEntries","__webpack_require__","_setDisabled","onAltFormatUpdated","onAltInputClassUpdated","onDateUpdated","onDisabledUpdated","onLocaleUpdated","onMaxDateUpdated","onMinDateUpdated","TEMPLATE","candidateSelectors","candidateSelector","NoElement","msMatchesSelector","webkitMatchesSelector","getCandidates","includeContainer","candidates","getCandidatesIteratively","elementsToCheck","assigned","assignedElements","nestedCandidates","flatten","shadowRoot","getShadowRoot","validShadowRoot","shadowRootFilter","_nestedCandidates","getTabindex","isScope","isContentEditable","sortOrderedTabbables","documentOrder","isZeroArea","_node$getBoundingClie","isNodeMatchingSelectorFocusable","displayCheck","nodeUnderDetails","nodeRootHost","nodeIsAttached","originalNode","getClientRects","isNodeMatchingSelectorTabbable","radioSet","radioScope","form","queryRadios","CSS","escape","checked","isValidShadowRootTabbable","shadowHostNode","sortByOrder","regularTabbables","orderedTabbables","candidateTabindex","sortable","tabbable","isTabbable","focusableCandidateSelector","isFocusable","trapQueue","activeFocusTraps","activateTrap","trap","activeTrap","trapIndex","deactivateTrap","unpause","delay","findIndex","idx","valueOrHandler","getActualTarget","createFocusTrap","_objectSpread2","returnFocusOnDeactivate","escapeDeactivates","delayInitialFocus","containers","containerGroups","tabbableGroups","nodeFocusedBeforeActivation","mostRecentlyFocusedNode","active","paused","delayInitialFocusTimer","getOption","configOverrideOptions","optionName","configOptionName","findContainerIndex","tabbableNodes","getNodeForOption","optionValue","_len2","_key2","getInitialFocusNode","firstTabbableGroup","firstTabbableNode","updateTabbableNodes","tabbableOptions","focusableNodes","lastTabbableNode","nextTabbableNode","forward","nodeIdx","tryFocus","getReturnFocusNode","previousActiveElement","checkPointerDown","clickOutsideDeactivates","deactivate","returnFocus","allowOutsideClick","checkFocusIn","targetContained","Document","stopImmediatePropagation","checkKey","destinationNode","containerIndex","containerGroup","startOfGroupIndex","destinationGroupIndex","lastOfGroupIndex","_destinationGroupIndex","checkClick","addListeners","removeListeners","activate","activateOptions","onActivate","onPostActivate","checkCanFocusTrap","finishActivation","deactivateOptions","onDeactivate","onPostDeactivate","checkCanReturnFocus","finishDeactivation","updateContainerElements","containerElements","elementsAsArray","cap","focusTrap","setModifierManager","createModifier","focusTrapOptions","isActive","isPaused","shouldSelfFocus","installModifier","additionalElements","_createFocusTrap","initialFocus","createFocusTrap$1","updateModifier","destroyModifier","makeHelper","fullParams","withoutCount","CAPITALIZE_REGEX","loadUncountable","irregularInverse","ruleSet","makeDictionary","enableCache","_dict","purgeCache","_cacheUsed","_sCache","_singularize","numberOrWord","_pCache","_pluralize","disableCache","wordOrCount","inflection","isBlank","isUncountable","helperFunction","HTMLBars","makeBoundHelper","Handlebars","FormatDateRangeHelper","_intl","intl","formatDateRange","_FormatDateRangeHelper","FormatDateHelper","_FormatDateHelper","FormatDisplayNameHelper","formatDisplayName","_FormatDisplayNameHelper","FormatListHelper","formatList","_FormatListHelper","FormatMessageHelper","formatMessage","_FormatMessageHelper","FormatNumberHelper","formatNumber","_FormatNumberHelper","FormatRelativeTimeHelper","formatRelativeTime","_FormatRelativeTimeHelper","FormatTimeHelper","formatTime","_FormatTimeHelper","tKey","THelper","positionalOptions","namedOptions","_THelper","memoize","cacheDefault","serializerDefault","strategyDefault","monadic","computedValue","variadic","assemble","ObjectWithoutPrototypeCache","strategies","DATE_TIME_REGEX","parseDateTimeSkeleton","skeleton","era","RangeError","weekday","hour12","hourCycle","minute","second","timeZoneName","WHITE_SPACE_REGEX","icuUnitToEcma","unit","FRACTION_PRECISION_REGEX","SIGNIFICANT_PRECISION_REGEX","INTEGER_WIDTH_REGEX","CONCISE_INTEGER_WIDTH_REGEX","parseSignificantPrecision","roundingPriority","g1","g2","minimumSignificantDigits","maximumSignificantDigits","parseSign","signDisplay","currencySign","parseConciseScientificAndEngineeringStem","stem","notation","minimumIntegerDigits","parseNotationOptions","opt","parseNumberSkeleton","tokens","scale","currency","useGrouping","maximumFractionDigits","compactDisplay","currencyDisplay","unitDisplay","roundingMode","g3","g4","g5","minimumFractionDigits","trailingZeroDisplay","signOpts","conciseScientificAndEngineeringOpts","ErrorKind","EXPECT_ARGUMENT_CLOSING_BRACE","EMPTY_ARGUMENT","MALFORMED_ARGUMENT","EXPECT_ARGUMENT_TYPE","INVALID_ARGUMENT_TYPE","EXPECT_ARGUMENT_STYLE","INVALID_NUMBER_SKELETON","INVALID_DATE_TIME_SKELETON","EXPECT_NUMBER_SKELETON","EXPECT_DATE_TIME_SKELETON","UNCLOSED_QUOTE_IN_ARGUMENT_STYLE","EXPECT_SELECT_ARGUMENT_OPTIONS","EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE","INVALID_PLURAL_ARGUMENT_OFFSET_VALUE","EXPECT_SELECT_ARGUMENT_SELECTOR","EXPECT_PLURAL_ARGUMENT_SELECTOR","EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT","EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT","INVALID_PLURAL_ARGUMENT_SELECTOR","DUPLICATE_PLURAL_ARGUMENT_SELECTOR","DUPLICATE_SELECT_ARGUMENT_SELECTOR","MISSING_OTHER_CLAUSE","INVALID_TAG","INVALID_TAG_NAME","UNMATCHED_CLOSING_TAG","UNCLOSED_TAG","TYPE","literal","argument","time","pound","isLiteralElement","isArgumentElement","isNumberElement","isDateElement","isTimeElement","isSelectElement","isPluralElement","isPoundElement","isTagElement","isNumberSkeleton","isDateTimeSkeleton","SPACE_SEPARATOR_REGEX","timeData","AC","AD","AE","AF","AG","AI","AL","AM","AO","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CP","CR","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HN","HR","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TL","TM","TN","TO","TR","TT","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW","getDefaultHourSymbolFromLocale","hourCycles","languageTag","language","regionTag","maximize","region","SPACE_SEPARATOR_START_REGEX","SPACE_SEPARATOR_END_REGEX","createLocation","hasNativeFromEntries","hasTrimStart","trimStart","hasTrimEnd","IDENTIFIER_PREFIX_RE","Parser","line","column","ignoreTag","requiresOtherClause","shouldParseSkeletons","firstCode","plainEndPosition","clonePosition","parseMessage","nestingLevel","parentArgType","expectingCloseTag","isEOF","parseArgument","_isAlpha","parseTag","parseLiteral","bump","startPosition","parseTagName","bumpSpace","bumpIf","childrenResult","endTagStartPosition","closingTagNameStartPosition","startOffset","_isPotentialElementNameChar","parseQuoteResult","tryParseQuote","parseUnquotedResult","tryParseUnquoted","parseLeftAngleResult","tryParseLeftAngleBracket","codepoint","codePoints","ch","fromCodePoint","openingBracePosition","parseIdentifierIfPossible","parseArgumentOptions","startingPosition","lastIndex","endOffset","bumpTo","typeStartPosition","argType","typeEndPosition","styleAndLocation","styleStartPosition","parseSimpleArgStyleIfPossible","styleLocation","argCloseResult","tryParseArgumentClose","startsWith","parseNumberSkeletonFromString","dateTimePattern","skeletonCopy","patternPos","patternChar","extraLength","hourLen","dayPeriodLen","dayPeriodChar","hourChar","parsedOptions","identifierAndLocation","pluralOffset","tryParseDecimalInteger","optionsResult","tryParsePluralOrSelectOptions","pluralType","nestedBraces","apostrophePosition","bumpUntil","stringTokens","stringToken","stemAndOptions","expectCloseTag","parsedFirstIdentifier","hasOtherClause","parsedSelectors","selectorLocation","fragmentResult","expectNumberError","invalidNumberError","sign","hasDigits","decimal","isSafeInteger","codePointAt","currentOffset","targetOffset","_isWhiteSpace","pruneLocation","els","ErrorCode","MISSING_VALUE","INVALID_VALUE","MISSING_INTL_API","FormatError","originalMessage","InvalidValueError","variableId","InvalidValueTypeError","MissingValueError","isFormatXMLElementFn","formatToParts","locales","formatters","currentPluralValue","getNumberFormat","varName","getDateTimeFormat","medium","isInteger","BigInt","formatFn","chunks","exactKey","Intl","PluralRules","getPluralRules","parts","part","lastPart","createFastMemoizeCache","IntlMessageFormat","_IntlMessageFormat","defaultLocale","overrideFormats","formatterCache","dateTime","pluralRules","ast","resolvedOptions","resolvedLocale","NumberFormat","supportedLocalesOf","getAst","resolveLocale","__parse","parseOpts","configs","c1","c2","DateTimeFormat","memoizedDefaultLocale","Locale","supportedLocales","captureLocation","integer","percent","short","long","full","IntlError","exception","captureStackTrace","UnsupportedFormatterError","InvalidConfigError","MissingDataError","IntlFormatError","MessageFormatError","MissingTranslationError","filterProps","allowlist","filtered","DEFAULT_INTL_CONFIG","timeZone","defaultFormats","fallbackOnEmptyString","onWarn","warning","getNamedFormat","formatType","setTimeZoneInOptions","deepMergeOptions","opts1","opts2","deepMergeFormatsAndSetTimeZone","f1","mfFormats","defaultRichTextElements","messageDescriptor","msgId","Err","invariant","getMessageFormat","DATE_TIME_FORMAT_OPTIONS","getFormatter$2","filteredOptions","timeStyle","dateStyle","formatDateTimeRange","fromDate","toDate","formatRange","formatDateToParts","formatTimeToParts","DISPLAY_NAMES_OPTONS","getDisplayNames","DisplayNames","of","LIST_FORMAT_OPTIONS","getListFormat","formatListToParts","ListFormat","richValues","serializedValues","PLURAL_FORMAT_OPTIONS","formatPlural","RELATIVE_TIME_FORMAT_OPTIONS","getRelativeTimeFormat","RelativeTimeFormat","NUMBER_FORMAT_OPTIONS","getFormatter","formatNumberToParts","intlShape","parameters","convertToArray","convertToString","normalizeLocale","_intls","_locales","IntlService","Service","relativeTime","displayNames","primaryLocale","addTranslations","translations","updateIntl","createIntl","dateTimeRange","relative","_formats","resolvedConfig","$t","_onFormatjsError","exists","getTranslation","formatOptions","getIntlShape","output","getIntl","setFormats","setLocale","proposedLocale","locale1","locale2","_timer","updateDocumentLanguage","setOnFormatjsError","onFormatjsError","setOnMissingTranslation","onMissingTranslation","_onMissingTranslation","translation","documentService","newIntl","_IntlService","ClassBasedModifierManager","modifierClass","createdState","installedState","ClassBasedModifier","MANAGER","teardown","getDebugName","getDebugInstance","computeFn","datetime","allowEmpty","globalAllowEmpty","BaseHelper","moment","disableInterval","__config__","supportsGlobalAllowEmpty","localeOrTimeZoneChanged","observer","recompute","interval","clearTimer","intervalTimer","run","morphMoment","momentService","tz","isAfter","precision","comparisonArgs","isBefore","isBetween","inclusivity","_params","isSameOrAfter","isSameOrBefore","isSame","momentAdd","additionArgs","typeOf","momentCalendar","formatHash","referenceTime","mergedFormats","calendar","momentDiff","float","dateA","dateB","momentDuration","humanize","momentFormat","defaultFormatDidChange","formatArgs","defaultFormat","momentFromNow","hideAffix","fromNow","momentFrom","momentSubtract","subtractionArgs","subtract","momentToDate","hidePrefix","momentToNow","toNow","momentTo","unix","unixTimeStamp","utc","utcTime","momentOrMomentTimezone","importSync","Evented","_timeZone","localeOptions","outputFormat","readOnly","propertyKey","changeLocale","updateLocale","setTimeZone","changeTimeZone","isMoment","momentObj","PowerSelectMultipleComponent","computedTabIndex","searchEnabled","handleOpen","focusInput","handleFocus","onFocus","handleKeydown","onKeydown","highlighted","choose","defaultBuildSelection","newSelection","isEqual","root","_PowerSelectMultipleComponent","PowerSelectMultipleInputComponent","maybePlaceholder","isDefaultPlaceholder","handleInput","onInput","lastSelection","buildSelection","searchField","_PowerSelectMultipleInputComponent","TriggerComponent","_openChanged","openChanged","chooseOption","numericIndex","selectedObject","_el","_lastIsOpen","objectAt","_TriggerComponent","isPromiseLike","isPromiseProxyLike","isCancellablePromise","_resolvedOptions","_resolvedSelected","_repeatingChar","_expirableSearchText","_searchResult","_isActive","_loading","_searchText","_lastSearchedText","_highlighted","PowerSelectComponent","_search","highlight","_highlight","_select","_choose","scrollTo","_scrollTo","labelClick","_labelClick","searchText","__updateOptions","__updateSelected","__registerAPI","term","__performSearch","searchStartOffset","repeatingChar","charCode","isNumpadKeyEvent","fromCharCode","storedAPI","indexOfOption","isNone","findWithOffset","multiple","legacyMultiple","_lastSelectedPromise","_selectedObserverCallback","highlightOnHover","labelClickAction","highlightedIndex","pathForOption","searchMessage","noMatchesMessage","resultCountMessage","resultsCount","mustShowSearchMessage","loading","mustShowNoMessages","lastSearchedText","toPlainArray","_filterResultsCache","_filter","countOptions","ariaMultiSelectable","triggerId","labelId","labelText","labelComponent","searchFieldPosition","_defaultMultipleBuildSelection","KeyboardEvent","_resetHighlighted","handleClose","correctedTerm","_publicAPIActions","_routeKeydown","handleTriggerKeydown","metaKey","triggerTypingTask","_handleKeySpace","_updateIsActive","handleBlur","_updateOptions","_updateHighlighted","_updateSelected","selection","optionsList","optionElement","optionTopScroll","optionBottomScroll","_registerAPI","_performSearch","_lastOptionsPromise","currentOptionsPromise","currentSelectedPromise","resolvedSelected","_lastSearchPromise","searchResult","_defaultBuildSelection","_handleKeyUpDown","_handleKeyEnter","_handleKeyTab","_handleKeyESC","newHighlighted","advanceSelectableOption","defHighlighted","defaultHighlighted","skipDisabled","optionMatcher","getOptionMatcher","defaultMatcher","filterOptions","typeAheadOptionMatcher","defaultTypeAheadMatcher","findOptionWithOffset","_PowerSelectComponent","coll","PowerSelectBeforeOptionsComponent","_focusInput","autofocus","clearSearch","focusLaterTask","_PowerSelectBeforeOptionsComponent","PowerSelectInput","searchPlaceholder","_PowerSelectInput","PowerSelectLabelComponent","onLabelClick","_PowerSelectLabelComponent","templateOnly","ElementProto","mozMatchesSelector","closest","PowerSelectOptionsComponent","extra","_isTouchDevice","_didHandlerSetup","_listElement","_addHandlers","_removeHandlers","addHandlers","removeHandlers","_optionFromIndex","_hasMoved","changedTouch","findOptionAndPerform","optionItem","optionIndex","mouseUpHandler","mouseOverHandler","touchEndHandler","_PowerSelectOptionsComponent","PowerSelectGroupComponent","PowerSelectTriggerComponent","_PowerSelectTriggerComponent","emberPowerSelectIsEqual","isEmberArray","emberPowerSelectIsEqual_default","emberPowerSelectIsGroup","maybeGroup","isGroup","emberPowerSelectIsGroup_default","emberPowerSelectIsSelectedPresent","emberPowerSelectIsSelectedPresent_default","counter","walk","optionAtIndex","originalCollection","ancestorIsDisabled","localCounter","found","copyGroup","suboptions","groupCopy","foundBeforeOffset","foundAfterOffset","canStop","entryIsDisabled","currentOption","resultsLength","DIACRITICS","Ａ","À","Á","Â","Ầ","Ấ","Ẫ","Ẩ","Ã","Ā","Ă","Ằ","Ắ","Ẵ","Ẳ","Ȧ","Ǡ","Ä","Ǟ","Ả","Å","Ǻ","Ǎ","Ȁ","Ȃ","Ạ","Ậ","Ặ","Ḁ","Ą","Ⱥ","Ɐ","Ꜳ","Æ","Ǽ","Ǣ","Ꜵ","Ꜷ","Ꜹ","Ꜻ","Ꜽ","Ｂ","Ḃ","Ḅ","Ḇ","Ƀ","Ƃ","Ɓ","Ｃ","Ć","Ĉ","Ċ","Č","Ç","Ḉ","Ƈ","Ȼ","Ꜿ","Ｄ","Ḋ","Ď","Ḍ","Ḑ","Ḓ","Ḏ","Đ","Ƌ","Ɗ","Ɖ","Ꝺ","Ǳ","Ǆ","ǲ","ǅ","Ｅ","È","É","Ê","Ề","Ế","Ễ","Ể","Ẽ","Ē","Ḕ","Ḗ","Ĕ","Ė","Ë","Ẻ","Ě","Ȅ","Ȇ","Ẹ","Ệ","Ȩ","Ḝ","Ę","Ḙ","Ḛ","Ɛ","Ǝ","Ｆ","Ḟ","Ƒ","Ꝼ","Ｇ","Ǵ","Ĝ","Ḡ","Ğ","Ġ","Ǧ","Ģ","Ǥ","Ɠ","Ꞡ","Ᵹ","Ꝿ","Ｈ","Ĥ","Ḣ","Ḧ","Ȟ","Ḥ","Ḩ","Ḫ","Ħ","Ⱨ","Ⱶ","Ɥ","Ｉ","Ì","Í","Î","Ĩ","Ī","Ĭ","İ","Ï","Ḯ","Ỉ","Ǐ","Ȉ","Ȋ","Ị","Į","Ḭ","Ɨ","Ｊ","Ĵ","Ɉ","Ｋ","Ḱ","Ǩ","Ḳ","Ķ","Ḵ","Ƙ","Ⱪ","Ꝁ","Ꝃ","Ꝅ","Ꞣ","Ｌ","Ŀ","Ĺ","Ľ","Ḷ","Ḹ","Ļ","Ḽ","Ḻ","Ł","Ƚ","Ɫ","Ⱡ","Ꝉ","Ꝇ","Ꞁ","Ǉ","ǈ","Ｍ","Ḿ","Ṁ","Ṃ","Ɱ","Ɯ","Ｎ","Ǹ","Ń","Ñ","Ṅ","Ň","Ṇ","Ņ","Ṋ","Ṉ","Ƞ","Ɲ","Ꞑ","Ꞥ","Ǌ","ǋ","Ｏ","Ò","Ó","Ô","Ồ","Ố","Ỗ","Ổ","Õ","Ṍ","Ȭ","Ṏ","Ō","Ṑ","Ṓ","Ŏ","Ȯ","Ȱ","Ö","Ȫ","Ỏ","Ő","Ǒ","Ȍ","Ȏ","Ơ","Ờ","Ớ","Ỡ","Ở","Ợ","Ọ","Ộ","Ǫ","Ǭ","Ø","Ǿ","Ɔ","Ɵ","Ꝋ","Ꝍ","Ƣ","Ꝏ","Ȣ","Ｐ","Ṕ","Ṗ","Ƥ","Ᵽ","Ꝑ","Ꝓ","Ꝕ","Ｑ","Ꝗ","Ꝙ","Ɋ","Ｒ","Ŕ","Ṙ","Ř","Ȑ","Ȓ","Ṛ","Ṝ","Ŗ","Ṟ","Ɍ","Ɽ","Ꝛ","Ꞧ","Ꞃ","Ｓ","ẞ","Ś","Ṥ","Ŝ","Ṡ","Š","Ṧ","Ṣ","Ṩ","Ș","Ş","Ȿ","Ꞩ","Ꞅ","Ｔ","Ṫ","Ť","Ṭ","Ț","Ţ","Ṱ","Ṯ","Ŧ","Ƭ","Ʈ","Ⱦ","Ꞇ","Ꜩ","Ｕ","Ù","Ú","Û","Ũ","Ṹ","Ū","Ṻ","Ŭ","Ü","Ǜ","Ǘ","Ǖ","Ǚ","Ủ","Ů","Ű","Ǔ","Ȕ","Ȗ","Ư","Ừ","Ứ","Ữ","Ử","Ự","Ụ","Ṳ","Ų","Ṷ","Ṵ","Ʉ","Ｖ","Ṽ","Ṿ","Ʋ","Ꝟ","Ʌ","Ꝡ","Ｗ","Ẁ","Ẃ","Ŵ","Ẇ","Ẅ","Ẉ","Ⱳ","Ｘ","Ẋ","Ẍ","Ｙ","Ỳ","Ý","Ŷ","Ỹ","Ȳ","Ẏ","Ÿ","Ỷ","Ỵ","Ƴ","Ɏ","Ỿ","Ｚ","Ź","Ẑ","Ż","Ž","Ẓ","Ẕ","Ƶ","Ȥ","Ɀ","Ⱬ","Ꝣ","ａ","ẚ","à","á","â","ầ","ấ","ẫ","ẩ","ã","ā","ă","ằ","ắ","ẵ","ẳ","ȧ","ǡ","ä","ǟ","ả","å","ǻ","ǎ","ȁ","ȃ","ạ","ậ","ặ","ḁ","ą","ⱥ","ɐ","ꜳ","æ","ǽ","ǣ","ꜵ","ꜷ","ꜹ","ꜻ","ꜽ","ｂ","ḃ","ḅ","ḇ","ƀ","ƃ","ɓ","ｃ","ć","ĉ","ċ","č","ç","ḉ","ƈ","ȼ","ꜿ","ↄ","ｄ","ḋ","ď","ḍ","ḑ","ḓ","ḏ","đ","ƌ","ɖ","ɗ","ꝺ","ǳ","ǆ","ｅ","è","é","ê","ề","ế","ễ","ể","ẽ","ē","ḕ","ḗ","ĕ","ė","ë","ẻ","ě","ȅ","ȇ","ẹ","ệ","ȩ","ḝ","ę","ḙ","ḛ","ɇ","ɛ","ǝ","ｆ","ḟ","ƒ","ꝼ","ｇ","ǵ","ĝ","ḡ","ğ","ġ","ǧ","ģ","ǥ","ɠ","ꞡ","ᵹ","ꝿ","ｈ","ĥ","ḣ","ḧ","ȟ","ḥ","ḩ","ḫ","ẖ","ħ","ⱨ","ⱶ","ɥ","ƕ","ｉ","ì","í","î","ĩ","ī","ĭ","ï","ḯ","ỉ","ǐ","ȉ","ȋ","ị","į","ḭ","ɨ","ı","ｊ","ĵ","ǰ","ɉ","ｋ","ḱ","ǩ","ḳ","ķ","ḵ","ƙ","ⱪ","ꝁ","ꝃ","ꝅ","ꞣ","ｌ","ŀ","ĺ","ľ","ḷ","ḹ","ļ","ḽ","ḻ","ſ","ł","ƚ","ɫ","ⱡ","ꝉ","ꞁ","ꝇ","ǉ","ｍ","ḿ","ṁ","ṃ","ɱ","ɯ","ｎ","ǹ","ń","ñ","ṅ","ň","ṇ","ņ","ṋ","ṉ","ƞ","ɲ","ŉ","ꞑ","ꞥ","ǌ","ｏ","ò","ó","ô","ồ","ố","ỗ","ổ","õ","ṍ","ȭ","ṏ","ō","ṑ","ṓ","ŏ","ȯ","ȱ","ö","ȫ","ỏ","ő","ǒ","ȍ","ȏ","ơ","ờ","ớ","ỡ","ở","ợ","ọ","ộ","ǫ","ǭ","ø","ǿ","ɔ","ꝋ","ꝍ","ɵ","ƣ","ȣ","ꝏ","ｐ","ṕ","ṗ","ƥ","ᵽ","ꝑ","ꝓ","ꝕ","ｑ","ɋ","ꝗ","ꝙ","ｒ","ŕ","ṙ","ř","ȑ","ȓ","ṛ","ṝ","ŗ","ṟ","ɍ","ɽ","ꝛ","ꞧ","ꞃ","ｓ","ß","ś","ṥ","ŝ","ṡ","š","ṧ","ṣ","ṩ","ș","ş","ȿ","ꞩ","ꞅ","ẛ","ｔ","ṫ","ẗ","ť","ṭ","ț","ţ","ṱ","ṯ","ŧ","ƭ","ʈ","ⱦ","ꞇ","ꜩ","ｕ","ù","ú","û","ũ","ṹ","ū","ṻ","ŭ","ü","ǜ","ǘ","ǖ","ǚ","ủ","ů","ű","ǔ","ȕ","ȗ","ư","ừ","ứ","ữ","ử","ự","ụ","ṳ","ų","ṷ","ṵ","ʉ","ｖ","ṽ","ṿ","ʋ","ꝟ","ʌ","ꝡ","ｗ","ẁ","ẃ","ŵ","ẇ","ẅ","ẘ","ẉ","ⱳ","ｘ","ẋ","ẍ","ｙ","ỳ","ý","ŷ","ỹ","ȳ","ẏ","ÿ","ỷ","ẙ","ỵ","ƴ","ɏ","ỿ","ｚ","ź","ẑ","ż","ž","ẓ","ẕ","ƶ","ȥ","ɀ","ⱬ","ꝣ","Ά","Έ","Ή","Ί","Ϊ","Ό","Ύ","Ϋ","Ώ","ά","έ","ή","ί","ϊ","ΐ","ό","ύ","ϋ","ΰ","ω","ς","stripDiacritics","limit","func","misses","hits","purge","decamelize","DECAMELIZE_CACHE","STRING_CLASSIFY_REGEXP_1","STRING_CLASSIFY_REGEXP_2","STRING_CLASSIFY_REGEXP_3","CLASSIFY_CACHE","replace1","replace2","initialChar","ModuleRegistry","_entries","requirejs","moduleNames","Resolver","withModules","explicitModules","_Class","podBasedModuleName","podBasedComponentsInSubdir","mainModuleName","defaultModuleName","nestedColocationComponentModuleName","_moduleRegistry","addModules","modules","_eak_seen","pluralizedTypes","makeToString","modulePrefix","shouldWrapInClassFactory","parseName","parsedName","fullNameParts","prefixParts","nameParts","lastIndexOf","fullNameWithoutType","resolveMethodName","resolveOther","normalizedModuleName","findModuleName","defaultExport","_extractDefaultExport","injections","_normalizeCache","_normalize","resolved","podBasedLookupWithPrefix","podPrefix","podModulePrefix","resolveEngine","engineModule","resolveRouteMap","engineName","engineRoutesModule","routeMap","isRouteMap","resolveTemplate","tmpPrefix","moduleNameLookupPatterns","tmpModuleName","chooseModuleName","underscoredModuleName","knownForType","moduleKeys","fullname","translateToContainerFullname","podSuffix","nonPodPrefix","JwtAuthenticator","Token","tokenDataPropertyName","refreshAccessTokens","tokenExpirationInvalidateSession","serverTokenRefreshEndpoint","refreshTokenPropertyName","tokenExpireName","refreshLeeway","tokenRefreshInvalidateSessionResponseCodes","refreshAccessTokenRetryAttempts","refreshAccessTokenRetryTimeout","tokenRefreshFailInvalidateSession","disableScheduleAccessTokenExpiration","restore","dataObject","getCurrentTime","tokenPropertyName","refreshToken","expiresAt","getTokenData","scheduleAccessTokenExpiration","scheduleAccessTokenRefresh","refreshAccessToken","authenticate","makeRequest","serverTokenEndpoint","handleAuthResponse","_refreshTokenTimeout","attempts","makeRefreshData","sessionData","handleTokenRefreshFail","nestings","lastObject","nesting","decodedPayload","atob","Buffer","tokenData","invalidate","_tokenExpirationTimeout","tokenExpireData","refreshStatusCode","handleAccessTokenExpiration","cancelAllTimers","Base","headerObject","Accept","AuthenticatorEventTarget","EsaEventTarget","EsaBaseAuthenticator","authenticatorEvents","DEFAULTS","Configuration","rootURL","routeAfterAuthentication","EsaBaseSessionStore","SessionEventTarget","InternalSession","authenticator","isAuthenticated","attemptedTransition","sessionEvents","redirectTarget","authenticated","_busy","_bindToStoreEvents","authenticatorFactory","_lookupAuthenticator","_setup","rejectWithError","_clear","_onSessionDataUpdated","restoredContent","_clearWithContent","authenticatedContent","_bindToAuthenticatorEvents","_updateStore","setUnknownProperty","persist","_onSessionDataInvalidated","authenticatorName","setRedirectTarget","getRedirectTarget","clearRedirectTarget","LOCAL_STORAGE_TEST_KEY","proxyToInternalStore","AdaptiveStore","_dec","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","_initializerDefineProperty","_descriptor2","_descriptor3","_descriptor4","_descriptor5","_descriptor6","_descriptor7","_isLocalStorageAvailable","__isLocalStorageAvailable","localStorage","setItem","removeItem","emberOwner","_isFastBoot","cookieStorage","getProperties","_setupStoreEvents","LocalStorageStore","_handleStorageEvent","_lastData","stringifiedData","objectsAreEqual","emberSimpleAuth","initialize","registry","baseURL","Adaptive","Cookie","LocalStorage","SESSION_DATA_KEY_PREFIX","assertSetupHasBeenCalled","isSetupCalled","SessionService","session","redirectTargetKey","cookieName","sessionDataKey","_setupHandlers","handleAuthentication","handleInvalidation","requireAuthentication","transition","routeOrCallback","extraArgs","_setupIsCalled","sessionService","intent","authenticationRoute","transitionTo","prohibitAuthentication","routeIfAlreadyAuthenticated","routerService","handleSessionAuthenticated","routeAfterInvalidation","handleSessionInvalidated","SessionStoreEventTarget","sessionStoreEvents","persistingProperty","beforeSet","_value","rewriteCookie","CookieStore","_oldCookieName","_cookieName","_secureCookies","_isPageVisible","cachedExpirationTime","_read","parsedExpirationTime","_renew","_syncData","_renewExpiration","expiration","_calculateExpirationTime","_write","cachedExpirationTimeCookie","thisCookieExpirationTime","cookieOptions","domain","expires","secure","sameSite","partitioned","oldCookie","expirationCookieName","_syncDataTimeout","_renewExpirationTimeout","compare","_ALL_DEPRECATIONS_ENABLED","numEmberVersion","_OVERRIDE_DEPRECATION_VERSION","Version","emberVersionGte","emberVersion","significantUntil","isRemoved","deprecation","DEPRECATE_IMPORT_EMBER","importName","DEPRECATE_IMPORT_INJECT","DEPRECATE_AMD_BUNDLES","deprecateUntil","onErrorTarget","getOnerror","setOnerror","dispatchOverride","getDispatchOverride","setDispatchOverride","objectPrototype","UNDEFINED","ListenerKind","ADD","ONCE","REMOVE","currentListenerVersion","Meta","_parent","_descriptors","_mixins","_lazyChains","_values","_revisions","_isInit","_listeners","setInitializing","unsetInitializing","isInitializing","isPrototypeMeta","_getOrCreateOwnMap","_getOrCreateOwnSet","_findInheritedMap","subkey","_hasInInheritedSet","valueFor","setValueFor","revisionFor","revisions","setRevisionFor","revision","writableLazyChainsFor","lazyChains","chains","readableLazyChainsFor","addMixin","hasMixin","forEachMixins","writeDescriptors","peekDescriptors","removeDescriptors","forEachDescriptors","addToListeners","pushListener","removeFromListeners","listeners","writableListeners","indexOfListener","_inheritedEnd","listener","_flattenedVersion","flattenedListeners","parentListeners","matchingListeners","observerEvents","metaStore","setMeta","peekMeta","maybeMeta","newMeta","deprecateProperty","deprecatedKey","newKey","EACH_PROXIES","eachProxyArrayWillChange","removedCnt","addedCnt","eachProxy","arrayWillChange","eachProxyArrayDidChange","arrayDidChange","isFactory","getOwner$1","setOwner$1","onerrorDefault","withErrorThrown","overrideDispatch","configure","_rsvpErrorQueue","contentFor","UPDATE_TAG","tagForObject","customTagForProxy","addMandatorySetter","tagMetaFor","tagFor","tags","isObject","combine","ProxyMixin","setProxy","setCustomTagFor","isTruthy","ActionHandler","send","actionName","Comparable","ownerInjection","registryAlias","hasRegistration","registeredOption","registerOptions","registeredOptions","registerOptionsForType","registeredOptionsForType","TargetActionSupport","actionContext","actionContextObject","triggerAction","classify","Opaque","MUTABLE_CELL","ComponentLookup","componentFor","layoutFor","templateFullName","ActionSupport","ROOT_ELEMENT_CLASS","EventDispatcher","touchstart","touchmove","touchend","touchcancel","keydown","keyup","keypress","mousedown","mouseup","contextmenu","dblclick","focusin","focusout","submit","change","dragstart","drag","dragenter","dragleave","dragover","dragend","addedEvents","events","finalEventNameMapping","_reverseEventNameMapping","lazyEvents","specifiedRootElement","_sanitizedRootElement","_didSetup","setupHandlerForBrowserEvent","setupHandler","setupHandlerForEmberEvent","viewHandler","view","getElementView","handleEvent","_eventHandlers","cancelBubble","isSimpleClick","MouseEvent","altKey","secondaryClick","constructStyleDeprecationMessage","affectedStyle","getRootViews","rootViews","parentView","getViewId","elementId","ELEMENT_VIEW","VIEW_ELEMENT","getViewElement","setElementView","setViewElement","clearElementView","clearViewElement","CHILD_VIEW_IDS","getChildViews","collectChildViews","initChildViews","childViews","addChildView","views","getViewBounds","renderer","getBounds","getViewRange","bounds","createRange","setStartBefore","firstNode","setEndAfter","lastNode","getViewClientRects","getViewBoundingClientRect","_renderer","CoreView","FrameworkObject","_superTrigger","_superHas","_has","_state","_currentState","_states","preRender","instrumentDetails","_CoreView","inject","DEFAULT","rerender","PRE_RENDER","HAS_ELEMENT","flaggedInstrument","IN_DOM","enter","inDOM","hasElement","destroying","Application","Engine","buildRegistry","EmberRouter","Route","HashLocation","HistoryLocation","NoneLocation","privatize","BucketCache","RouterService","setupApplicationRegistry","_document","eventDispatcher","customEvents","autoboot","hasDOM","_globalsMode","_readinessDeferrals","_booted","_applicationInstances","_prepareForGlobalsMode","waitForDOMReady","buildInstance","ApplicationInstance","_watchInstance","_unwatchInstance","Router","_buildDeprecatedInstance","__deprecatedInstance__","readyState","domReady","_bootSync","deferReadiness","advanceReadiness","didBecomeReady","boot","_bootPromise","_bootResolver","runInitializers","runLoadHooks","startRouting","_loaded","visit","buildInitializerMethod","EngineInstance","instantiate","_BootOptions","setupRegistry","router","runInstanceInitializers","isInteractive","setupEventDispatcher","_router","didCreateRootView","setupRouter","handleURL","dispatcher","applicationCustomEvents","instanceCustomEvents","getURL","bootOptions","setURL","followRedirects","handleTransitionResolve","shouldRender","renderSettled","coptions","toEnvironment","_renderMode","isBrowser","environment","loadHooks","EMBER_LOAD_HOOKS","loaded","onLoad","CustomEvent","Namespace","addNamespace","existing_name","findNamespaces","nameClasses","processNamespace","removeNamespace","NAMESPACES","NAMESPACES_BY_ID","processAllNamespaces","findNamespace","isNamespace","EMBER_ARRAYS","WeakSet","setEmberArray","EMPTY_ARRAY","identityFunction","uniqBy","keyOrFunc","iter","valueProvided","predicate","startAt","any","withNaNCheck","removeAt","insertAt","setInterval","EmberArray","detect","nonEnumerableComputed","Enumerable","objectsAt","indexes","firstObject","beginIndex","validatedEndIndex","getEach","setEach","filterBy","isEvery","isAny","invoke","methodName","toArray","compact","sortBy","sortKeys","propA","propB","compareValue","uniq","without","MutableArray","MutableEnumerable","pushObjects","objects","popObject","shiftObject","unshiftObject","unshiftObjects","reverseObjects","loc","removeObjects","beginPropertyChanges","endPropertyChanges","addObject","NativeArray","Observable","replaceInNativeArray","ignore","ARRAY_OBSERVER_MAPPING","customTagForArrayProxy","_revalidate","_arrTag","_lengthTag","PROPERTY_DID_CHANGE","_removeArrangedContentArrayObserver","objectAtContent","arrangedContent","amt","replaceContent","_objects","_objectsDirtyIndex","_lengthDirty","_length","removedCount","_invalidate","_updateArrangedContentArray","oldLength","arrayContentWillChange","arrayContentDidChange","_addArrangedContentArrayObserver","addArrayObserver","_arrangedContent","removeArrayObserver","_arrangedContentArrayWillChange","_arrangedContentArrayDidChange","_proxy","dirtyIndex","_arrangedContentIsUpdating","_arrangedContentTag","validateTag","_arrangedContentRevision","arrangedContentTag","valueForTag","reopen","DEFAULT_FEATURES","FEATURES","ENABLE_OPTIONAL_FEATURES","setComponentManager$1","templateOnlyComponent","MODEL","ControllerMixin","isController","concatenatedProperties","model","_qpDelegate","_qpChanged","_prop","dotIndex","Controller","inject$1","ContainerDebugAdapter","canCatalogEntriesByType","catalogEntriesByType","namespaces","typeSuffixRegex","iterate","RecordsWatcher","getCacheForItem","recordCache","recordCaches","hasBeenAdded","recordsAdded","recordsUpdated","recordsRemoved","recordArrayCache","untrack","revalidate","TypeWatcher","hasBeenAccessed","containerDebugAdapter","typesToSend","modelTypes","getModelTypes","Factory","watchRecords","recordsWatchers","recordsWatcher","updateFlushWatchers","flushWatchers","typeWatchers","watcher","_klass","typeWatcher","_getObjectsOnNamespaces","_name","searchKeywords","filterValues","_record","debugSeal","debugFreeze","setDebugFunction","getDebugFunction","deprecateFunc","defaultDeprecate","captureRenderTree","app","domRenderer","debugRenderTree","registerHandler","missingOptionDeprecation","HANDLERS","_callback","objectToString","functionToString","objectKeys","LIST_LIMIT","SAFE_KEY","inspect","inspectValue","depth","valueIsArray","inspectKey","testing","isTesting","setTesting","destroyable","registerDestructor$1","unregisterDestructor","unregisterDestructor$1","Registry","resolverFor","optionsForType","singleton","RoutingService","setupEngineRegistry","ensureInitializers","_initializersRan","instanceInitializer","_runInitializer","bucketName","initializersByName","initializers","DAG","before","after","topsort","humanName","superclass","reopenClass","ENGINE_PARENT","_registry","fallback","cloneParentDependencies","buildChildEngineInstance","ChildEngine","engineInstance","setEngineParent","getEngineParent","registration","singletons","engine","helperCapabilities","setHelperManager","setHelperManager$1","invokeHelper","invokeHelper$1","hash$1","array$1","concat$1","get$1","fn$1","uniqueId$1","subscribers","perf","mozNow","webkitNow","msNow","oNow","instrument","p1","p2","p3","finalizer","_instrumentStart","NOOP","payloadFunc","payloadArg","subscriber","timeName","STRUCTURED_PROFILE","beforeValues","constListeners","timeEnd","paths","regexes","setModifierManager$1","on$1","wrapGetterSetter","originalGet","dependentKeyCompat","isElementDescriptor","_desc","_meta","isClassicDecorator","setClassicDecorator","hasSetUnknownProperty","wasApplied","prototypeMixinMap","destroyCalled","ensureDestroyCalled","keyNames","descriptorForProperty","isDescriptor","baseValue","activateObserver","sendEvent","CoreObject","OWNER","applyMixin","_properties","toStringExtension","getFactoryFor","mixins","Class","PrototypeMixin","setFactoryFor","flattenProps","willReopen","detectInstance","metaForProperty","empty","prototypeMixin","ownerConstructor","initProperties","removeListener","hasListeners","BINDINGS_MAP","setupAction","actionFn","parentActions","bindings","dependentKeys","funcOrDef","_DEFAULT_ASYNC_OBSERVERS","dependentKey","expandProperties","setObservers","generateComputedWithPredicate","additionalDependentKeys","predicateName","expandedProperties","extractProperty","lastIdx","notEmpty","none","regexp","equal","gt","gte","lt","lte","and","oneWay","deprecatingAlias","isNativeOrEmberArray","reduceMacro","arrayMacro","multiArrayMacro","_dependentKeys","additionalDependentKeysOrCallback","cCallback","uniqBy$1","union","intersect","arrays","candidate","setDiff","setAProperty","setBProperty","setA","setB","collect","itemsKey","additionalDependentKeysOrDefinition","sortDefinition","sortDefinitionOrString","comparator","sortPropertiesKey","autoComputed","sortProperties","itemsKeyIsAtThis","normalizedSortProperties","itemA","itemB","a_concat","concatenatedMixinProperties","concatProp","concats","giveDecoratorSuper","descs","originalGetter","_getter","superDesc","superProperty","descriptorForDecorator","superGetter","originalSetter","_setter","superSetter","newProperty","ComputedProperty","_readOnly","makeComputedDecorator","giveMethodSuper","superMethod","simpleMakeArray","applyConcatenatedProperties","applyMergedProperties","newBase","hasFunction","propValue","ROOT","mergeMixins","keysWithSuper","currentMixin","MIXINS","mergeProps","_without","mergings","propKeys","updateObserversAndListeners","isFunction","observerListenerMetaFor","observers","updateObserver","updateListener","_hideKeys","meta$1","defineValue","defineDecorator","revalidateObservers","nativeDescDecorator","buildMixinsArray","setUnprocessedMixins","applyPartial","_detect","_keys","curMixin","targetMixin","hasObserverFor","incrementProperty","increment","decrementProperty","decrement","toggleProperty","promiseAlias","_location","_hashchangeHandler","getHash","originalPath","outPath","lastSetURL","replaceURL","onUpdateURL","_removeEventListener","_event","formatURL","popstateFired","_uuid","random","hasAttribute","_popstateHandler","initState","history","_previousURL","replaceState","pathname","pushState","uuid","bucketKey","stash","controllerFor","controllerName","lookupOptions","isCallback","DSLImpl","enableLoadingSubstates","route","dummyErrorRoute","createRoute","resetNamespace","getFullName","dsl","generate","engineInfo","localFullName","routeInfo","serializeMethod","addRouteForEngine","explicitIndex","dslMatches","mount","engineRouteMap","as","instanceId","mountPoint","shouldResetEngineInfo","oldEngineInfo","optionsForChild","childDSL","substateName","generateControllerFactory","generateController","getPath","getQuery","getFullPath","getOrigin","origin","hostname","port","replacePath","QueryParams","RouterState","emberRouter","routerJsState","isActiveIntent","routeName","models","visibleQueryParams","_prepareQueryParams","shallowEqual","ROUTER","hasRoute","shouldReplace","_doTransition","normalizeQueryParams","_generateURL","generateURL","_initialTransitionStarted","_e","isActiveForRoute","contexts","routerState","_routerMicrolib","recognizer","handlersFor","leafName","maximumContexts","handlerInfos","targetState","currentRouteName","currentPath","ALL_PERIODS_REGEX","extractRouteArgs","qps","getActiveTargetName","routeInfos","activeTransition","STATE_SYMBOL","stashParamNames","_namesStashed","dynamicParent","targetRouteName","recogHandlers","_names","_stashNames","_calculateCacheValuePrefix","currPrefix","currPart","calculateCacheKey","suffixes","cacheValuePrefix","partRemovedPrefix","normalizeControllerQueryParams","qpMap","queryParam","accumulateQueryParamDescriptors","accum","_singleDesc","singleDesc","resemblesURL","prefixRouteNameArg","routable","aCount","bCount","kA","kB","updateCallback","RENDER","RENDER_STATE","bucketCache","_bucketCache","_topLevelViewTemplate","_environment","isProxy","_setRouteName","fullRouteName","getEngineRouteName","namePaths","qp","_activeQPChanged","scopedPropertyName","_updatingQPChanged","urlKey","paramsFor","getQueryParamsFor","serializeQueryParamKey","controllerPropertyName","serializeQueryParam","_urlKey","defaultValueType","_serializeQueryParam","deserializeQueryParam","_deserializeQueryParam","_optionsForQueryParam","resetController","_controller","_isExiting","_transition","exit","teardownViews","_internalReset","isExiting","inactive","intermediateTransitionTo","preparedArgs","propNames","lookupDescriptor","allowOverrides","PARAMS_SYMBOL","aQp","undecoratedDefaultValue","qpValues","setupController","flushAsyncObservers","beforeModel","afterModel","_resolvedModel","redirect","_model","contextDidChange","currentModel","sawParams","resolveIndex","_paramsFor","_skipAssert","modelLookupName","resolvedModels","template","templateFactoryOrComponent","templateName","hasInternalComponentManager","buildRouteInfoMetadata","_qp","combinedQueryParameterConfiguration","queryParameterConfiguraton","hasRouterDefinedQueryParams","controllerDefinedQueryParameterConfiguration","controllerQP","routeQP","keysAlreadyMergedOrSkippable","cqpName","rqpName","mergeEachQueryParams","propName","copyDefaultValue","defaultValueSerialized","serializedDefaultValue","serializedValue","getRenderState","getFullQueryParams","fullQueryParams","haveAllRouteInfosResolved","fullQueryParamsState","_deserializeQueryParams","queryParamsFor","qpValueWasPassedIn","_Route","defaultSerialize","hasDefaultSerialize","queryParamsDidChange","_totalPresent","totalChanged","finalizeQueryParamChange","finalParams","replaceUrl","qpMeta","_queryParamsFor","_qpUpdates","qpUpdated","svalue","presentKey","queryParamsOnly","replaceConfigValue","visible","routeQpMeta","cleanURL","_currentRouteName","_currentURL","_rootURL","_currentRoute","_doURLTransition","replaceWith","urlFor","routerMicrolib","currentQueryParams","recognize","internalURL","recognizeAndLoad","pivotRouteName","pivotRoute","_RouterService","dslCallbacks","_routePath","oldNameParts","intersectionMatches","a1","a2","_resetQueuedQueryParameterChanges","_routerService","_initRouterJs","PrivateRouter","getRoute","routeOwner","_engineInfoByRoute","_getEngineInstance","DefaultRoute","getSerializer","updateURL","didTransition","infos","willTransition","oldInfos","newInfos","ignoreFailure","routeWillChange","isIntermediate","routeDidChange","transitionDidError","wasAborted","isAborted","logAbort","_isErrorHandled","doReplaceURL","_buildDSL","overrideNameAssertion","_hasModuleBasedResolver","_queuedQPChanges","initialURL","initialTransition","_didSetupRouter","_setupLocation","_setOutlets","currentRouteInfos","render","outlets","_toplevelView","setOutletState","OutletView","_url","routerJsMethod","didBeginTransition","updatePaths","_engineInstances","instanceMap","queryParameterName","_fireQueryParamTransition","resolvedLocation","_serializeQueryParams","forEachQueryParam","defaultType","valueOf","_pruneDefaultQueryParamValues","_targetRouteName","_queryParams","_fromRouterService","_processActiveTransitionQueryParams","unchangedQPs","qpUpdates","_fullyScopeQueryParams","calculatePostTransitionState","_hydrateUnsuppliedQueryParams","_getQPMeta","leafRouteName","_qpCache","shouldCache","finalQPMeta","presentProp","appCache","qpLen","_scheduleLoadingEvent","originRoute","_cancelSlowTransitionTimer","_slowTransitionTimer","_handleSlowTransition","_markErrorAsHandled","_handledErrors","_clearHandledError","engineInstances","namedInstances","forEachRouteAbove","defaultActionHandlers","willResolveModel","_routeInfos","routeInfoWithError","errorRouteName","findRouteStateName","errorSubstateName","findRouteSubstateName","initialMessage","errorArgs","targetName","routeInfoWithSlowLoading","loadingRouteName","loadingSubstateName","pivotHandler","substateNameFull","routeHasBeenDefined","stateNameFull","localName","routerHasRoute","ownerHasRoute","actionHandler","eventWasHandled","defaultHandler","applyIntent","isResolved","currentURL","qpCache","currentRunLoop","_getCurrentRunLoop","_queues","Backburner","defaultQueue","onBegin","onEnd","_current","_internals_error_handling_index_js__WEBPACK_IMPORTED_MODULE_1__","onErrorMethod","flush","methodOrTarget","methodOrArg","additionalArgs","curried","begin","_hasScheduledTimers","hasTimers","_cancelTimers","cancelTimers","timer","throttle","__emberTemplateCompiler","__registerTemplateCompiler","compileTemplate","compile","registerAsyncHelper","registerHelper","registerWaiter","unregisterHelper","unregisterWaiter","_impl","testingNotAvailableMessage","registerTestImplementation","impl","TYPE_ORDER","null","boolean","function","filelist","spaceship","isComparable","vLen","wLen","hasUnknownProperty","isPresent","TYPE_MAP","DESTROYABLE_META","newItem","getDestroyableMeta","parents","eagerDestructors","destructors","associateDestroyableChild","parentMeta","childMeta","destructorsKey","scheduleDestroy","scheduleDestroyed","destroyChildren","_hasDestroyableChildren","toIterator","toBool","getProp","setProp","setPath","warnIfStyleNotTrusted","scheduleRevalidate","debugAssert","setGlobalContext","dynamicLayout","dynamicTag","prepareArgs","attributeHook","elementHook","dynamicScope","createCaller","createInstance","hasSubOwner","SERIALIZATION_FIRST_NODE_STRING","isSerializationFirstNode","RehydratingCursor","CursorImpl","startingBlockDepth","openBlockDepth","RehydrateTree","NewTreeBuilder","currentCursor","isOpenBlock","startingBlockOffset","getBlockDepth","newBlockDepth","newCandidate","dom","createComment","closingNode","isCloseBlock","newClosingBlock","cursors","disableRehydration","enableRehydration","pushElement","blockDepth","clearMismatch","getBlockDepthWithOffset","__openBlock","__closeBlock","isRehydrating","__appendNode","__appendHTML","candidateBounds","markerBounds","newBounds","ConcreteBounds","previousSibling","possibleEmptyMarker","expect","_candidate","isMarker","__appendText","TEXT_NODE","COMMENT_NODE","__appendComment","__openElement","namespaceURI","NS_SVG","unmatchedAttributes","injectedOmittedNode","__setAttribute","unmatched","findByName","__setProperty","__flushElement","constructing","willCloseElement","popElement","getMarker","marker","castToSimple","__pushRemoteElement","cursorId","castToBrowser","RemoteBlock","pushBlock","didAppendBounds","rehydrationBuilder","forInitialRender","caches","LOCAL_LOGGER","LOGGER","clearElement","intern","strip","strings","enumerate","lines","isPresentArray","getFirst","getLast","leading","stripped","assertNever","$REVISION","COMPUTE","MonomorphicTagImpl","CONSTANT_TAG","subtag","lastChecked","subtagValue","subtagBufferCache","_tag","_subtag","disableConsumptionAssertion","DIRTY_TAG","createTag","createUpdatableTag","isConstTag","VolatileTag","NaN","VOLATILE_TAG","CurrentTag","CURRENT_TAG","tag1","tag2","tag3","Tracker","CURRENT_TRACKER","OPEN_TRACK_FRAMES","beginTrackFrame","debuggingContext","endTrackFrame","beginUntrackFrame","endUntrackFrame","resetTracking","isTracking","FN","LAST_VALUE","TAG","SNAPSHOT","debuggingLabel","isConst","debugLabel","ARRAY_WRITE_THEN_READ_METHODS","convertToInt","_collection","_storages","_TrackedArray_brand","TrackedArray","_classPrivateMethodInitSpec","_classPrivateFieldSet","nativelyAccessingLengthFromWriteMethod","_assertClassBrand","_readStorageFor","_classPrivateFieldGet","equals","_dirtyStorageFor","_dirtyCollection","trackedArray","is","_options2","_collection2","_storages2","_vals","_TrackedMap_brand","TrackedMap","_storageFor","getOrInsert","getOrInsertComputed","creator","currentKey","_dirtyStorageFor2","storages","trackedMap","_options3","_storages3","_collection3","_TrackedObject_brand","TrackedObject","getOwnPropertyDescriptors","_readStorageFor2","_dirtyStorageFor3","_dirtyCollection2","trackedObject","_options4","_collection4","_storages4","_vals2","_TrackedSet_brand","TrackedSet","_storageFor2","intersection","difference","symmetricDifference","isSubsetOf","isSupersetOf","isDisjointFrom","_dirtyStorageFor4","trackedSet","_options5","_storages5","_vals3","_TrackedWeakMap_brand","TrackedWeakMap","_storageFor3","_dirtyStorageFor5","trackedWeakMap","_options6","_storages6","_vals4","_TrackedWeakSet_brand","TrackedWeakSet","_storageFor4","_dirtyStorageFor6","trackedWeakSet","TRACKED_TAGS","dirtyTagFor","trackedData","hasInitializer","GLIMMER_VALIDATOR_REGISTRATION","Empty","SafeString","Fragment","Other","opcodes","Append","TrustingAppend","Comment","StrictModifier","Block","StrictBlock","OpenElement","OpenElementWithSplat","FlushElement","CloseElement","StaticAttr","DynamicAttr","ComponentAttr","AttrSplat","Yield","DynamicArg","StaticArg","TrustingDynamicAttr","TrustingComponentAttr","StaticComponentAttr","Debugger","Undefined","Call","Concat","GetSymbol","GetLexicalSymbol","GetStrictKeyword","GetFreeAsComponentOrHelperHead","GetFreeAsHelperHead","GetFreeAsModifierHead","GetFreeAsComponentHead","InElement","If","Each","Let","WithDynamicVars","InvokeComponent","HasBlock","HasBlockParams","Curry","Not","IfInline","GetDynamicVar","Log","variant","isFlushElement","isStringLiteral","expr","getStringFromValue","isArgument","isHelper","isGet","Strict","ResolveAsComponentOrHelperHead","ResolveAsHelperHead","ResolveAsModifierHead","ResolveAsComponentHead","div","span","EMPTY_ATTRS","indexOfAttribute","adjustAttrName","specified","ChildNodes","stale","oldLen","newChild","refChild","oldChild","childNodes","_childNodes","SimpleNodeImpl","deep","copy","nextChild","raw","getAttributeNS","setAttributeNS","qualifiedName","removeAttributeNS","doctype","createElementNS","createTextNode","createRawHTMLSection","createHTMLDocument","SET_TIMEOUT","buildNext","autorunPromise","iterations","characterData","buildPlatform","clearNext","NUMBER","isCoercableNumber","suspect","getOnError","findItem","findTimerItem","getQueueItems","queueItemLength","queueItemPositionOffset","queueItems","maybeError","queueItem","binarySearch","timers","middle","Queue","globalOptions","_queueBeingFlushed","targetQueues","_queue","stackFor","errorRecordedForStack","invokeWithOnError","mustYield","hasWork","targetQueueMap","pushUnique","localQueueMap","queueIndex","_getDebugInfo","DeferredActionQueues","queueNames","queues","queueNameIndex","onceFlag","fromAutorun","numberOfQueues","iteratorDrain","DISABLE_SCHEDULE","parseArgs","argsIndex","methodOrArgs","parseDebounceArgs","isImmediate","UUID","beginCount","endCount","beginEventCount","runCount","joinCount","deferCount","scheduleCount","scheduleIterableCount","deferOnceCount","scheduleOnceCount","setTimeoutCount","laterCount","throttleCount","debounceCount","cancelTimersCount","cancelCount","autorunsCreatedCount","autorunsCompletedCount","deferredActionQueuesCreatedCount","nestedDeferredActionQueuesCreated","instanceStack","_eventCallbacks","_timerTimeoutId","_timers","_autorunStack","_defaultQueue","_onBegin","_onEnd","_boundRunExpiredTimers","_runExpiredTimers","_boundAutorunEnd","_end","builder","_buildPlatform","_platform","counters","autoruns","created","completed","scheduleIterable","deferOnce","loops","total","nested","previousInstance","_cancelAutorun","callbackFound","_ensureInstance","iterable","_later","argIndex","executeAt","_reinstallTimerTimeout","_clearTimerTimeout","timerType","_cancelLaterTimer","ensureInstance","getDebugInfo","autorun","deferredActionQueue","nextInstance","finallyAlreadyCalled","plannedNextQueue","_scheduleAutorun","_installTimerTimeout","arg1","arg2","_scheduleExpiredTimers","minExpiresAt","_vertices","Vertices","vertices","addEdge","addEdges","each","IntStack","vertex","flag","msg_1","pushIncoming","incomming","indices","_Ember","Container","_setComponentManager","_componentManagerCapabilities","componentCapabilities","_modifierManagerCapabilities","modifierCapabilities","_cacheGetValue","_cacheIsConst","_getPath","_setClassicDecorator","_tracked","changeProperties","libraries","LIBRARIES","_ContainerProxyMixin","_ProxyMixin","_RegistryProxyMixin","_Cache","GUID_KEY","canInvoke","generateGuid","canary_features","_Input","Input","_captureRenderTree","Debug","registerHandler$1","isComputed","_assertDestroyablesDestroyed","assertDestroyablesDestroyed","_associateDestroyableChild","_enableDestroyableTracking","enableDestroyableTracking","_registerDestructor","_unregisterDestructor","Instrumentation","_action","trySet","getCachedValueFor","_dependentKeyCompat","RouterDSL","ViewUtils","runtime","_getComponentTemplate","getComponentTemplate","_helperManagerCapabilities","_setComponentTemplate","_setHelperManager","_setModifierManager","_templateOnlyComponent","_invokeHelper","_hash","_array","_concat","_get","_on","_fn","_Backburner","__loader","define","getENV","getLookup","setLookup","isSearchDisabled","setSearchDisabled","getTemplates","setTemplates","EmberHandlebars","templateFactory","Utils","EmberHTMLBars","defineEmberTemplateCompilerLazyLoad","precompile","defineEmberTestingLazyLoad","QUnitAdapter","setupForTesting","createObject","createMap","__","Target","delegate","willAddRoute","addChild","Matcher","routes","generateMatch","startingPath","fullPath","addRoute","routeArray","eachRoute","baseRoute","normalizePath","normalizeSegment","contextEntered","SEGMENT_RESERVED_CHARS","segment","PATH_SEGMENT_ENCODINGS","encodePathSegment","escapeRegex","getParam","eachChar","RouteRecognizer","ENCODE_AND_DECODE_PATH_SEGMENTS","EmptyObject","EmptyArray","segments","shouldDecodes","flags","isEqualCharSpec","spec","negate","State","repeat","nextStates","_regex","isMatch","recognizeChar","child$1","returned","RecognizeResults","decodeQueryParamPart","rootState","allSegments","ref","generateQueryString","pairs","arrayPair","parseQueryString","queryString","keyLength","isSlashDropped","hashStart","queryStart","decodeURI","pathLen","solutions","i$1","astatics","adynamics","astars","ref$1","bstatics","bdynamics","bstars","captures","currentCapture","isDynamic","Normalizer","addRouteCallback","AliasedProperty","AliasDecoratorImpl","ComputedDescriptor","propertyDesc","CHAIN_PASS_THROUGH","tagMeta","lastRevision","getChainTagsForKey","finishLazyChains","_keyName","AliasedProperty_readOnlySet","AliasedProperty_oneWaySet","managerAPI","buildCapabilities","asyncLifeCycleCallbacks","hasAsyncLifeCycleCallbacks","hasUpdateHook","CustomComponentManager","getDelegateFor","componentManagerDelegates","vmArgs","argsProxyFor","CustomComponentState","updateComponent","didCreate","didCreateComponent","didUpdate","didUpdateComponent","didRenderLayout","didUpdateLayout","getSelf","createConstRef","getDestroyable","getCapabilities","optionalFeatures","disableAutoTracking","CustomModifierManager","capturedArgs","getTag","install","setInternalComponentManager","setInternalModifierManager","setInternalHelperManager","CustomHelperManager","CUSTOM_TAG_FOR","getCustomTagFor","customTagFn","NamedArgsProxy","valueForRef","isExtensible","PositionalArgsProxy","namedHandler","positionalHandler","namedTarget","namedProxy","positionalProxy","getNamedTag","_obj","namedArgs","getPositionalTag","positionalArgs","startIdx","removeAmt","addAmt","removedAmount","previousLength","normalStartIdx","CHUNK_SIZE","chunk","arrayObserversHelper","SIGN_BIT","MAX_INT","MIN_INT","isHandle","constants","isSmallInt","encodeHandle","decodeHandle","encodeImmediate","decodeImmediate","isMachineOp","decodeCurry","curry","decodeRegister","$pc","$ra","$fp","$sp","$s0","$s1","$t0","$t1","$v0","decodePrimitive","primitive","todo","_disms","Disassembler","build","addNullable","dism","getArray","heap","getaddr","symbols","lexical","ANNOTATION_STYLES","_template","_substitutions","_footnotes","_nextFootnote","_style","_LogFragmentBuffer_brand","LogFragmentBuffer","addFootnoted","subtle","_this$style","_this$style2","showSubtle","substitutions","append","flatMap","queued","_mapLine","STYLES","var","varReference","varBinding","specialVar","specialProp","builtin","punct","kw","specialString","atom","attrName","attrValue","comment","constant","dim","internals","diffAdd","diffDelete","diffChange","sublabel","errorLabel","errorMessage","unbold","pointee","focusColor","intoFormat","FORMATTERS","special","_Fragment_brand","isSubtle","leaves","leaf","ifPresent","_shouldShow","f","_subtle","styleAll","allFormats","toLoggable","override","footnote","appendValueAsFootnote","intoFragment","fragments","intoFragments","intoLeafFragment","dynamic","_Fragment","EMPTY","InternalComponentCapabilities","capabilityFlagsFrom","capability","managerHasCapability","_manager","hasCapability","__defProp","__export","decorateClass","decorateFieldV1","decorateMethodV1","decoratePOJO","pojo","decorated","decoratePojoField","unwrap","dict","isDict","isIndexable","StackImpl","unwrapHandle","handle","problem","unwrapTemplate","DEFAULT_TEMPLATE_BLOCK","DEFAULT_TEMPLATE","WELL_KNOWN_EMPTY_ARRAY","STARTER_CONSTANTS","WELL_KNOWN_EMPTY_ARRAY_POSITION","ConstantsImpl","indexMap","handles","toPool","hasHandle","definitionState","_resolvedName","isOptional","helperDefinitionCache","managerOrHelper","getInternalHelperManager","getHelper","helperDefinitionCount","resolvedName","modifierDefinitionCache","getInternalModifierManager","modifierDefinitionCount","debugName","componentDefinitionCache","getInternalComponentManager","compilable","defaultTemplate","asWrappedLayout","asLayout","componentDefinitionCount","resolvedComponent","resolvedDefinition","reifiedArrs","reified","setLocalDebugType","debugToString","NS_MATHML","checker","externs","vm","validate","expected","APPEND_OPCODES","VM_SYSCALL_SIZE","evaluate","evaluateOpcode","syscall","opcode","isMachine","lowlevel","INNER","ARGS","RESOLVED","CURRIED_VALUES","isCurriedValue","isCurriedType","CurriedValue","inner","resolveCurriedValue","curriedValue","currentWrapper","curriedArgs","curriedNamed","curriedPositional","move","hasCustomDebugRenderTreeLifecycle","GUID","Ref","DebugRenderTreeImpl","internalNode","refs","didRender","nodeFor","commit","captureRefs","roots","captured","captureNode","captureTemplate","captureBounds","reifyArgsDebug","normalizeStringValue","isEmpty$1","isSafeString","toHTML","isString","VM_CHILD_SCOPE_OP","pushChildScope","VM_POP_SCOPE_OP","popScope","VM_PUSH_DYNAMIC_SCOPE_OP","pushDynamicScope","VM_POP_DYNAMIC_SCOPE_OP","popDynamicScope","VM_CONSTANT_OP","op1","VM_CONSTANT_REFERENCE_OP","VM_PRIMITIVE_OP","VM_PRIMITIVE_REFERENCE_OP","UNDEFINED_REFERENCE","NULL_REFERENCE","TRUE_REFERENCE","FALSE_REFERENCE","createPrimitiveRef","VM_DUP_OP","op2","fetchValue","dup","VM_POP_OP","VM_LOAD_OP","VM_FETCH_OP","VM_BIND_DYNAMIC_SCOPE_OP","bindDynamicScope","VM_ENTER_OP","VM_EXIT_OP","VM_PUSH_SYMBOL_TABLE_OP","_table","VM_PUSH_BLOCK_SCOPE_OP","VM_COMPILE_BLOCK_OP","VM_INVOKE_YIELD_OP","table","pushFrame","pushScope","invokingScope","locals","localsCount","bindSymbol","VM_JUMP_IF_OP","isConstRef","goto","updateWith","Assert","VM_JUMP_UNLESS_OP","VM_JUMP_EQ_OP","comparison","VM_ASSERT_SAME_OP","VM_TO_BOOLEAN_OP","valueRef","createComputeRef","AssertFilter","JumpIfNotModifiedOpcode","INITIAL","didModify","alwaysRevalidate","BeginTrackFrameOpcode","EndTrackFrameOpcode","VM_TEXT_OP","tree","appendText","VM_COMMENT_OP","appendComment","VM_OPEN_ELEMENT_OP","openElement","VM_OPEN_DYNAMIC_ELEMENT_OP","VM_PUSH_REMOTE_ELEMENT_OP","elementRef","insertBeforeRef","guidRef","pushRemoteElement","associateDestroyable","createCapturedArgs","VM_POP_REMOTE_ELEMENT_OP","popRemoteElement","VM_FLUSH_ELEMENT_OP","operations","loadValue","flushElement","VM_CLOSE_ELEMENT_OP","closeElement","scheduleInstallModifier","VM_MODIFIER_OP","addModifier","UpdateModifierOpcode","VM_DYNAMIC_MODIFIER_OP","outerPositional","outerNamed","initialOwner","instanceRef","hostDefinition","isIndexable$1","CURRIED_MODIFIER","curriedOwner","UpdateDynamicModifierOpcode","lastUpdated","scheduleUpdateModifier","newInstance","VM_STATIC_ATTR_OP","op3","_namespace","setStaticAttribute","VM_DYNAMIC_ATTR_OP","_trusting","trusting","setDynamicAttribute","UpdateDynamicAttributeOpcode","initialized","updateRef","VM_PUSH_COMPONENT_DEFINITION_OP","VM_RESOLVE_DYNAMIC_COMPONENT_OP","_isStrict","lookupComponent","VM_RESOLVE_CURRIED_COMPONENT_OP","VM_PUSH_DYNAMIC_COMPONENT_INSTANCE_OP","VM_PUSH_ARGS_OP","_blockNames","positionalCount","atNames","blockNames","EMPTY_STRING_ARRAY","VM_PUSH_EMPTY_ARGS_OP","VM_CAPTURE_ARGS_OP","VM_PREPARE_ARGS_OP","CURRIED_COMPONENT","realloc","prepend","blocks","VM_CREATE_COMPONENT_OP","hasDefaultBlock","UpdateComponentOpcode","VM_REGISTER_COMPONENT_DESTRUCTOR_OP","VM_BEGIN_COMPONENT_TRANSACTION_OP","beginCacheGroup","pushAppendingBlock","VM_PUT_COMPONENT_OPERATIONS_OP","ComponentElementOperations","VM_COMPONENT_ATTR_OP","VM_STATIC_COMPONENT_ATTR_OP","DebugRenderTreeUpdateOpcode","DebugRenderTreeDidRenderOpcode","setDeferredAttr","mergeClasses","bindBlock","blockName","VM_DID_CREATE_ELEMENT_OP","didCreateElement","VM_GET_COMPONENT_SELF_OP","selfRef","getDynamicLayout","getDebugCustomRenderTree","VM_GET_COMPONENT_TAG_NAME_OP","getTagName","VM_GET_COMPONENT_LAYOUT_OP","symbolTable","VM_MAIN_OP","invocation","VM_POPULATE_LAYOUT_OP","VM_VIRTUAL_ROOT_SCOPE_OP","pushRootScope","VM_SET_NAMED_VARIABLES_OP","callerNames","atName","VM_SET_BLOCKS_OP","symbolNames","VM_INVOKE_COMPONENT_LAYOUT_OP","VM_DID_RENDER_LAYOUT_OP","popBlock","EMPTY_ARGS","DidUpdateLayoutOpcode","VM_COMMIT_COMPONENT_TRANSACTION_OP","commitCacheGroup","_vm","REFERENCE","VMArgumentsImpl","PositionalArgumentsImpl","NamedArgumentsImpl","BlockArgumentsImpl","registers","namedCount","namedBase","positionalBase","blocksCount","blocksBase","pos","EMPTY_POSITIONAL","EMPTY_NAMED","EMPTY_REFERENCES","emptyArray","_references","_atNames","toSyntheticName","toAtName","newNames","toSymbolName","EMPTY_BLOCK_VALUES","_symbolNames","internalTag","internalValues","CapturedBlockArgumentsImpl","reifyNamed","reifyPositional","reifyArgs","ARGUMENT_ERROR","isArgumentError","ArgumentErrorImpl","castToString","resolveHelper","isUndefinedReference","VM_CURRY_OP","curriedDefinition","VM_DYNAMIC_HELPER_OP","helperRef","helperInstanceRef","CURRIED_HELPER","resolvedDef","helperValueRef","VM_HELPER_OP","VM_GET_VARIABLE_OP","referenceForSymbol","VM_SET_VARIABLE_OP","VM_SET_BLOCK_OP","VM_ROOT_SCOPE_OP","VM_GET_PROPERTY_OP","childRefFor","VM_GET_BLOCK_OP","_block","getBlock","VM_SPREAD_BLOCK_OP","handleOrCompilable","VM_HAS_BLOCK_OP","VM_HAS_BLOCK_PARAMS_OP","hasBlockParams","VM_CONCAT_OP","partsRefs","VM_IF_INLINE_OP","truthy","falsy","VM_NOT_OP","VM_GET_DYNAMIC_VAR_OP","nameRef","VM_LOG_OP","DynamicTextContent","toContentType","ContentType","hasInternalHelperManager","toDynamicContentType","debugCallback","VM_CONTENT_TYPE_OP","VM_DYNAMIC_CONTENT_TYPE_OP","VM_APPEND_HTML_OP","appendDynamicHTML","VM_APPEND_SAFE_HTML_OP","VM_APPEND_TEXT_OP","appendDynamicText","VM_APPEND_DOCUMENT_FRAGMENT_OP","appendDynamicFragment","VM_APPEND_NODE_OP","appendDynamicNode","setDebuggerCallback","resetDebuggerCallback","_symbols","ScopeInspector","tail","getSymbol","VM_DEBUGGER_OP","debuggerInfo","inspector","VM_ENTER_LIST_OP","relativeStart","elseTarget","listRef","keyRef","keyValue","iteratorRef","createIteratorRef","enterList","VM_EXIT_LIST_OP","exitList","VM_ITERATE_OP","breaks","registerItem","enterItem","TemplateOnlyComponentManager","TEMPLATE_ONLY_COMPONENT_MANAGER","TemplateOnlyComponentDefinition","SVG_INTEGRATION_POINTS","foreignObject","BLACKLIST_TABLE","DOMOperations","setupUselessElement","uselessElement","isElementInSVGNamespace","isHTMLIntegrationPoint","isElementInMathMlNamespace","ns","insertHTMLBefore","WHITESPACE","isWhitespace","DOMChangesImpl","insertAfter","DOMChanges","normalizeProperty","slotName","lower","ATTR_OVERRIDES","INPUT","autocorrect","SELECT","OPTION","TEXTAREA","LABEL","FIELDSET","LEGEND","OBJECT","OUTPUT","BUTTON","internalHelper","normalizeTextValue","callbackRef","invocationArgs","isInvokableRef","sourceRef","pathRef","getArgs","argsCache","SimpleArgsProxy","computeArgs","createHelper","hasValue","hasDestroyable","OnModifierState","userProvidedCallback","_once","_passive","_capture","shouldUpdate","_owner","badProtocols","badTags","badTagsForDataURI","badAttributes","badAttributesForDataURI","checkURI","checkDataURI","requiresSanitization","_protocolForUrlImplementation","sanitizeAttributeValue","weirdURL","URL","nodeURL","dynamicAttribute","isTrusting","buildDynamicAttribute","SafeDynamicProperty","InputValueDynamicAttribute","OptionSelectedDynamicAttribute","DefaultDynamicProperty","SafeDynamicAttribute","SimpleDynamicAttribute","DynamicAttribute","_env","normalizedValue","normalizeValue","normalizedName","sanitized","TreeConstruction","DOMTreeConstruction","First","Last","getAppendOperations","updateOperations","getDOM","debugBlocks","blockStack","hasBlocks","AppendingBlockImpl","pushResettableBlock","ResettableBlockImpl","pushBlockList","AppendingBlockList","pushModifiers","didOpenElement","popModifiers","_guid","modifierStack","didAppendNode","__appendFragment","trustedContent","untrustedContent","boundList","_element","_node","_bounds","_stack","clientBuilder","InstructionEncoderImpl","machine","TYPE_SIZE","ARG_SHIFT","checkGlobal","mainContext","imports","EXTEND_PROTOTYPES","LOG_STACKTRACE_ON_DEPRECATION","LOG_VERSION","RAISE_ON_DEPRECATION","_DEBUG_RENDER_TREE","_RERENDER_LOOP_LIMIT","EmberENV","hookName","artifacts","ProgramHeapImpl","location$1","history$1","isChrome","chrome","opera","__proto__","RootTemplate","InputTemplate","NOOP$1","InternalComponent","caller","validateArguments","isSupportedArgument","onUnsupportedArgument","listenerFor","OPAQUE_CONSTRUCTOR_MAP","opaquify","opaque","INTERNAL_COMPONENT_MANAGER","CAPABILITIES$3","_dynamicScope","valueForEvent","valueFrom","LocalValue","isUpdatableRef","UpstreamValue","ForkedValue","_LocalValue","upstream","upstreamValue","lastUpstreamValue","local","AbstractInput","valueDidChange","keyUp","isVirtualEventListener","_listener","_AbstractInput","INPUT_TYPES","INPUT_ELEMENT","checkbox","isCheckbox","_checked","checkedDidChange","_Input2","LinkToTemplate","EMPTY_ARRAY$1","EMPTY_QUERY_PARAMS","isMissing","isQueryParams","_routing","_LinkTo","routing","classFor","willBeActive","isDisabled","currentTarget","namespaceRoute","currentRoute","currentRouteCache","isActiveForState","isEngine","engineMountPoint","currentWhen","_LinkTo2","descriptorFor","superOnUnsupportedArgument","superModelsGetter","superQueryGetter","LinkTo","TextareaTemplate","_Textarea","_Textarea2","Textarea","referenceForParts","rootRef","childRefFromParts","parseAttributeBinding","microsyntax","colonIndex","installAttributeBinding","isSimple","elementIdRef","createSimpleClassNameBindingRef","dasherizedPath","ComponentStateBucket","argsTag","hasWrappedElement","classRef","argsRevision","processComponentArgs","MutableCell","REF","enumerableSymbol","HAS_BLOCK","IS_DISPATCHING_ATTRS","BOUNDS","EMBER_VIEW_REF","CurlyComponentManager","templateFor","layout","layoutName","CURLY_CAPABILITIES","__ARGS__","__args__","positionalParams","EMPTY_ARRAY$2","callerSelfRef","hasBlock","initialRenderInstrumentDetails","_transitionTo","attributeBindings","classNames","classNameBindings","isPath","rerenderInstrumentDetails","initialRender","CURLY_COMPONENT_MANAGER","isCurlyManager","lazyEventsProcessed","didReceiveAttrs","didUpdateAttrs","willRender","willUpdate","_superRerender","_rerender","_dispatcher","lazyEventsProcessedForComponentClass","mappedEventName","__dispatcher","DIRTY_TAG$1","readDOMAttr","isSVG","priorState","nearestOfType","nearestWithProperty","getElement","willInsertElement","didInsertElement","willClearRender","willDestroyElement","didDestroyElement","parentViewDidChange","_Component","RECOMPUTE_TAG","IS_CLASSIC_HELPER","helper$1","ClassicHelperManager","CLASSIC_HELPER_MANAGER","Wrapper","SIMPLE_CLASSIC_HELPER_MANAGER","helperFn","TrustedHTML","__string","trustHTML","isHTMLSafe","isTrustedHTML","instrumentationPayload$1","CAPABILITIES$2","CAPABILITIES_MASK$1","OUTLET_MANAGER","parentStateRef","currentStateRef","parentState","parentOwner","currentOwner","_definition","OUTLET_COMPONENT_TEMPLATE","OutletComponent","RootComponentManager","ROOT_CAPABILITIES","RootComponentDefinition","EachInWrapper","eachIn","BoundedIterator","memoFor","ArrayIterator","fromForEachable","EmberArrayIterator","ObjectIterator","fromIndexable","isMapLike","NativeIterator","ArrayLikeNativeIterator","_result","MapLikeNativeIterator","hasForEach","isNativeIterable","_getProp","_setProp","finalizeDestructor","EmberEnvironmentDelegate","onTransactionCommit","disallowDynamicResolution","nameOrValueRef","typeRef","locRef","originalRef","inElementNullCheckHelper","normalizeClassHelper","classNameArg","valueArg","classNameParts","fullNameRef","trackArray","mut","createInvokableRef","readonly","firstArg","createReadOnlyRef","unbound","createUnboundRef","CAPABILITIES$1","MOUNT_MANAGER","modelRef","controllerFactory","templateModuleName","MountDefinition","mountHelper","lastName","lastDef","CAPABILITIES_MASK","ROUTE_TEMPLATE_MANAGER","RouteTemplate","unwrapped","makeRouteTemplate","routeTemplate","outletHelper","outletRef","outlet","outletState","outletOwner","instrumentationPayload","BUILTIN_KEYWORD_HELPERS","BUILTIN_HELPERS","_dynamic_CuBsUXX8_js__WEBPACK_IMPORTED_MODULE_8__","BUILTIN_KEYWORD_MODIFIERS","BUILTIN_MODIFIERS","ResolverImpl","lookupPartial","lookupHelper","lookupBuiltInHelper","lookupModifier","lookupBuiltInModifier","cachedComponentDefinition","TOP_LEVEL_NAME","outletStateTag","DynamicScope","NO_OP","_result2","_render","ComponentRootState","renderComponent$1","into","isFor","_component","destroyed","ClassicRootState","renderMain","possibleRoot","inTransaction","renderers","_resetRenderers","deregister","renderSettledDeferred","_data","_lastRevision","_inRenderTransaction","_destroyed","_roots","_removedRoots","_RendererState_brand","RendererState","clearAllRoots","inRenderTransaction","renderRoot","_renderRootsTransaction","renderRoots","initialRootsLength","removedRoots","rootIndex","completedWithoutError","renderComponent","RENDERER_CACHE","BaseRenderer","strict","RENDER_CACHE","innerResult","envOptions","sharedArtifacts","runtimeOptions","EvaluationContextImpl","RuntimeOpImpl","Renderer","_viewRegistry","rootTemplate","viewRegistry","_rootTemplate","appendOutletView","outletView","_appendDefinition","cleanupRootFor","_isInteractive","OutletTemplate","makeResolutionTypeVerifier","typeToVerify","isGetFreeComponent","isGetFreeModifier","isGetFreeHelper","isGetFreeComponentOrHelper","upvars","HighLevelResolutionOpcodes","HighLevelBuilderOpcodes","labelOperand","stdlibOperand","symbolTableOperand","layoutOperand","Labels","labels","targets","address","getbyaddr","setbyaddr","encodeOp","encoder","program","operands","startLabels","stopLabels","scopeValues","ifComponent","ifHelper","ifValue","freeVar","andThen","valueIndex","EncoderImpl","stdlib","malloc","pushMachine","VM_RETURN_OP","finishMalloc","MACHINE_MASK","pushRaw","operand","currentLabels","containing","CompilableTemplateImpl","labelsStack","templateCompilationContext","evaluation","Compilers","funcs","sexp","EXPRESSIONS","withPath","expression","PushPrimitive","PushPrimitiveReference","VM_PUSH_FRAME_OP","SimpleArgs","VM_POP_FRAME_OP","CallDynamic","YieldBlock","PushYieldableBlock","PushCompilable","InvokeStaticBlock","VM_INVOKE_VIRTUAL_OP","InvokeStaticBlockWithStack","callerCount","calleeCount","CompilePositional","lexicalSymbols","sym","NamedBlocksImpl","with","hasAny","EMPTY_BLOCKS","namedBlocks","SwitchCases","bootstrap","clauses","clause","VM_JUMP_OP","Replayable","VM_RETURN_TO_OP","ReplayableIf","ifTrue","ifFalse","ATTRS_BLOCK","_elementBlock","_blocks","elementBlock","InvokeNonStaticComponent","blockSymbols","argSymbols","argNames","InvokeDynamicComponent","bindableBlocks","bindableAtNames","invokePreparedComponent","populateLayout","InvokeBareComponent","STATEMENTS","INFLATE_ATTR_TABLE","INFLATE_TAG_TABLE","inflateTagName","inflateAttrName","hashToArgs","VM_INVOKE_STATIC_OP","when","expressions","statements","compiled","compileStatements","syntaxContext","sCompiler","pushOp","statement","WrappedBuilder","attrsBlockIndex","attrsBlockNumber","syntax","clientId","templateCacheCounters","cacheHit","cacheMiss","templateId","parsedBlock","ownerlessTemplate","templateCache","TemplateImpl","__id","__meta","parsedLayout","referrer","wrappedLayout","PROXIES","NULL_IDENTITY","KEY","INDEX","IDENTITY","WeakMapWithPrimitives","weakMap","_weakMap","primitiveMap","_primitiveMap","IDENTITIES","uniqueKeyFor","keyFor","identities","maybeIterator","IteratorWrapper","createIteratorItemRef","GUID_PREFIX","OBJECT_GUIDS","NON_OBJECT_GUIDS","HAS_SUPER_PATTERN","fnToString","checkHasSuper","HAS_SUPER_MAP","hasSuper","ObserverListenerMeta","OBSERVERS_LISTENERS_MAP","createObserverListenerMetaFor","setListeners","IS_WRAPPED_FUNCTION_SET","superFunc","_wrap","superWrapper","orig","NAMES","searchDisabled","_unprocessedNamespaces","unprocessedNamespaces","unprocessedMixins","isUppercase","tryIsNamespace","_processNamespace","NodeDOMTreeConstruction","SELF_TAG","customTagFor","markObjectAsDirty","lazyTags","deps","getChainTagsForKeys","getChainTags","chainTags","currentTagMeta","currentMeta","pathLength","segmentEnd","lastSegmentEnd","arrLength","instanceMeta","placeholderTag","_propertyDesc","DESCRIPTOR_SETTER_FUNCTION","COMPUTED_SETTERS","DecoratorClass","DECORATOR_DESCRIPTOR_MAP","dec","END_WITH_EACH_REGEX","dive","newStart","arrayLength","tempArr","changeEvent","targetOrFunction","functionOrName","SYNC_DEFAULT","SYNC_OBSERVERS","ASYNC_OBSERVERS","deactivateObserver","activeObservers","observerMap","suspended","DEACTIVATE_SUSPENDED","SCHEDULED_DEACTIVATE","lastKnownRevision","currentRevision","sendObserver","flushSyncObservers","setObserverSuspended","maybeConfig","_hasConfig","objectConfig","_property","passedArgs","addArg","_throwReadOnlyError","isComponent","hadCachedValue","cachedValue","AutoComputedProperty","ComputedDecoratorImpl","previousDesc","wasDescriptor","firstDotIndexCache","PROXY_CONTENT","forSet","fakeProxy","Libraries","_coreLibIndex","_getLibraryByName","libs","lib","isCoreLibrary","registerCoreLibrary","deRegister","elementDescriptor","descriptorForField","newDesc","isTracked","TrackedDescriptor","OPERAND_LEN_MASK","TYPE_MASK","PAGE_SIZE","Int32Array","handleTable","handleState","sizeCheck","newHeap","sizeof","free","compactedSize","ProgramImpl","_opcode","StdLib","trustingGuardedAppend","cautiousGuardedAppend","trustingNonDynamicAppend","cautiousNonDynamicAppend","getAppend","StdAppend","nonDynamicAppend","compileStd","mainHandle","trustingGuardedNonDynamicAppend","cautiousGuardedNonDynamicAppend","trustingGuardedDynamicAppend","cautiousGuardedDynamicAppend","STDLIB_META","createOp","tolerant","newRoot","EmberTesting","_ember_testing_lib_adapters_adapter_js__WEBPACK_IMPORTED_MODULE_1__","_ember_testing_lib_adapters_qunit_js__WEBPACK_IMPORTED_MODULE_3__","_ember_testing_lib_test_js__WEBPACK_IMPORTED_MODULE_0__","_ember_testing_lib_setup_for_testing_js__WEBPACK_IMPORTED_MODULE_2__","ReferenceImpl","newTag","_parentRef","parentRef","isLowLevelRegister","factoryManagerCache","isSingleton","factoryManager","isInstantiatable","destroyDestroyables","finalizeDestroy","resetCache","injection","InternalFactoryManager","INIT_FACTORY","madeToString","VALID_FULL_NAME_REGEXP","registrations","_resolveCache","_failSet","_typeOptions","_normalizedName","describe","lookupDescription","normalizeFullName","isValidFullName","getOptionsForType","fallbackKnown","resolverKnown","localKnown","registeredNames","privateNames","privateSuffix","rawName","DynamicScopeImpl","ScopeImpl","sized","slots","callerScope","bindSelf","bindCallerScope","getCallerScope","TRANSACTION","TransactionImpl","createdComponents","updatedComponents","scheduledInstallModifiers","scheduledUpdateModifiers","modifierTag","EnvironmentImpl","enableDebugTooling","isArgumentCaptureError","appendOperations","LowLevelVM","fetchRegister","loadRegister","setPc","pc","popFrame","pushSmallFrame","popSmallFrame","currentOpSize","returnTo","nextStatement","operationSize","evaluateOuter","evaluateInner","evaluateMachine","evaluateSyscall","UpdatingVM","execute","_execute","frameStack","try","frame","UpdatingVMFrame","handleException","BlockOpcode","TryOpcode","pushUpdating","ListItemOpcode","shouldRemove","retained","ListBlockOpcode","iterableRef","lastIterator","initializeChild","opcodeMap","itemMap","currentOpcodeIndex","seenIndex","retainItem","itemOpcode","moveItem","seenUnretained","insertItem","deleteItem","elementStack","currentSibling","exceptionHandler","RenderResultImpl","updating","EvaluationStackImpl","Stacks","_stacks","_registers","_tree","VM","evalStack","captureClosure","Closure","guard","tryOpcode","didEnter","memoRef","listBlock","addr","popUpdating","TemplateIteratorImpl","renderSync","numSymbols","argList","ROUTE_INFOS","toReadOnlyRouteInfo","includeAttributes","localizeMapUpdates","LOCAL_ROUTE_INFOS","paramNames","metadata","routeInfoWithAttribute","createRouteInfoWithAttributes","routeInfosRef","thisArg","publicInfo","InternalRouteInfo","_routePromise","_route","_processRoute","getModel","routePromise","throwIfAborted","runBeforeModelHook","resolvedModel","runAfterModelHook","becomeResolved","resolvedContext","stashResolvedModel","contextsMatch","ResolvedRouteInfo","shouldSupersede","fetchRoute","updateRoute","_internalName","isTransition","prepareResult","isPromise","UnresolvedRouteInfoByParam","QUERY_PARAMS_SYMBOL","UnresolvedRouteInfoByObject","isParam","TransitionIntent","handleError","errorHandlerIndex","TransitionError","resolveOneRouteInfo","promiseLabel","resolvedRouteInfo","wasAlreadyResolved","TransitionState","NamedTransitionIntent","preTransitionState","applyToState","oldState","applyToHandlers","parsedHandlers","checkingIfActive","invalidateIndex","oldHandlerInfo","newHandlerInfo","createParamHandlerInfo","getHandlerInfoForDynamicSegment","oldContext","handlerToUse","invalidateChildren","objectToUse","preTransitionHandlerInfo","numNames","missingParams","oldParams","paramName","URLTransitionIntent","UnrecognizedURLError","statesDiffer","checkHandlerAccessibility","inaccessibleByURL","newRouteInfo","oldRouteInfo","logger","_lastQueryParams","_changedQueryParams","currentSequence","queryParamsTransition","changelist","wasTransitioning","fireQueryParamDidChange","newTransition","Transition","toReadOnlyInfos","_updateURL","toInfos","transitionByIntent","getTransitionByIntent","generateNewState","readonlyInfos","routeInfosWithAttributes","queryParamChangelist","getChangelist","routeInfosEqual","setupContexts","otherRouteInfos","paramsEqual","finalizeTransition","notifyExistingHandlers","doTransition","modelsArray","lastArg","sequence","isTransitionAborted","partition","partitionRoutes","exited","unchanged","updatedContext","routeEnteredOrUpdated","entered","_routeEnteredOrUpdated","routeChanged","oldRouteInfos","newRouteInfos","contextChanged","urlMethod","_visibleQueryParams","isCausedByInitialTransition","replaceAndNotAborting","isCausedByAbortingTransition","isQueryParamsRefreshTransition","replacingReplace","isCausedByAbortingReplaceTransition","resolvedHandlers","finalQueryParamsArray","finalQueryParams","fromInfos","oldRouteInfoLen","oldHandler","previousTransition","partitionedArgs","extractQueryParams","suppliedParams","routeParams","targetRouteInfos","targetHandler","recognizerHandlers","testState","routesEqual","activeQPsOnNewHandler","activeQueryParams","otherParams","otherKeys","callbacksFor","_promiseCallbacks","EventTarget","allCallbacks","queue$1","_guidKey","childId","_label","timeStamp","childGuid","resolve$2","resolve$1","PENDING","handleMaybeThenable","maybeThenable","then$1","fulfill","_onError","reject$2","sealed","publishRejection","publish","_subscribers","onFulfillment","onRejection","settled","invokeCallback","hasCallback","succeeded","Enumerator","Constructor","abortOnReject","_instanceConstructor","_abortOnReject","_isUsingOwnPromise","_isUsingOwnResolve","_init","_remaining","_enumerate","_eachEntry","_checkFullfillment","_settleMaybeThenable","firstPass","_settledAt","_willSettleAt","_setResultAt","setSettledResult","guidKey","wrapThenable","onFulFillment","denodeify","nodeFunc","promiseInput","argumentNames","handleValueInput","cast","AllSettled","PromiseHash","HashSettled","rethrow","MapEnumerator","mapFn","_mapFn","promises","EMPTY_OBJECT","FilterEnumerator","filterFn","vertxNext","asap","scheduleFlush","browserWindow","browserGlobal","BrowserMutationObserver","WebKitMutationObserver","isNode","isWorker","Uint8ClampedArray","importScripts","MessageChannel","useSetTimeout","nextTick","versions","setImmediate","channel","port1","onmessage","port2","postMessage","vertx","runOnLoop","runOnContext","__PROMISE_INSTRUMENTATION__","RSVP$1","NEEDS_EXTRA_CLOSE","SerializeBuilder","serializeBlockDepth","openIndex","script","serializeBuilder","sugaryCheck","TEMPLATES","templates","getTemplate","hasTemplate","setTemplate","GENERATED_SYMBOLS","isInternalSymbol","possibleSymbol","buildTransitionAborted","maybeAbortable","coerceQueryParamsToString","oldObject","newObject","oldElement","newElement","REDIRECT_DESTINATION_SYMBOL","handlerInfo","onFulfilled","onRejected","DASHERIZE_REGEX","StyleModifier","setStyles","newStyles","existingStyles","rulesToRemove","flat","symbolMap","numberMap","pluralForm","withoutSuffix","isFuture","defineLocale","monthsShort","weekdaysShort","weekdaysMin","weekdaysParseExact","longDateFormat","LTS","L","LL","LLL","LLLL","meridiemParse","isPM","meridiem","isLower","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","past","ss","mm","hh","dd","yy","preparse","postformat","week","dow","doy","hookCallback","hasOwnProp","isObjectEmpty","isUndefined","isDate","arrLen","createUTC","createLocalOrUTC","getParsingFlags","_pf","unusedTokens","unusedInput","charsLeftOver","nullInput","invalidEra","invalidMonth","invalidOffset","invalidFormat","userInvalidated","iso","parsedDateParts","rfc2822","weekdayMismatch","isValid$2","parsedParts","isNowValid","invalidWeekday","_strict","bigHour","isFrozen","_isValid","createInvalid$1","fun","momentProperties","updateInProgress","copyConfig","momentPropertiesLen","_isAMomentObject","_f","_l","_tzm","_isUTC","_locale","Moment","updateOffset","suppressDeprecationWarnings","firstTime","deprecationHandler","argLen","deprecateSimple","E","isoweekdays","isoweekday","DDD","dayofyears","dayofyear","milliseconds","millisecond","Q","quarters","quarter","gg","weekyears","weekyear","isoweekyears","isoweekyear","weeks","isoweeks","isoweek","years","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","isoWeekday","dayOfYear","weekYear","isoWeekYear","isoWeek","zeroFill","targetLength","forceSign","absNumber","zerosToFill","pow","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","padded","localeData","removeFormattingTokens","formatMoment","invalidDate","expandFormat","mom","replaceLongDateFormatTokens","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchWord","match1to2NoLeadingZero","match1to2HasZero","addRegexToken","strictRegex","isStrict","getParseRegexForToken","regexEscape","p4","absFloor","toInt","argumentForCoercion","coercedNumber","isFinite","addParseToken","tokenLen","addWeekParseToken","_w","addTimeToArrayFromToken","isLeapYear","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","daysInYear","parseTwoDigitYear","getSetYear","makeGetSet","keepTime","set$1","get$2","isUTC","getUTCMilliseconds","getUTCSeconds","getUTCMinutes","getUTCHours","getUTCDate","getUTCDay","getUTCMonth","getUTCFullYear","setUTCMilliseconds","setMilliseconds","setUTCSeconds","setUTCMinutes","setUTCHours","setUTCDate","setUTCFullYear","modMonth","monthsShortRegex","monthsRegex","monthsParse","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","monthsParseProperties","handleStrictParse$1","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","setUTCMonth","getSetMonth","computeMonthsParse","cmpLenRev","shortP","longP","shortPieces","longPieces","mixedPieces","_monthsRegex","_monthsShortRegex","_monthsStrictRegex","_monthsShortStrictRegex","shiftWeekdays","ws","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","weekdaysParse","weekdayEnd","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","weekdaysParseProperties","handleStrictParse","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","computeWeekdaysParse","minp","shortp","longp","minPieces","_weekdaysRegex","_weekdaysShortRegex","_weekdaysMinRegex","_weekdaysStrictRegex","_weekdaysShortStrictRegex","_weekdaysMinStrictRegex","mergeConfigs","parentConfig","childConfig","relativeTimeWithoutPostformat","_relativeTime","pastFutureWithoutPostformat","createDate","createUTCDate","UTC","firstWeekOffset","fwd","dayOfYearFromWeeks","resYear","resDayOfYear","weekOfYearFromDayOfYear","resWeek","weekOffset","weeksInYear","weekOfYear","weekOfYearFromDate","weekOffsetNext","hFormat","matchMeridiem","_meridiemParse","kInput","_isPm","_meridiem","pos1","pos2","globalLocale","getSetHour","baseConfig","dayOfMonthOrdinalParse","ww","localeFamilies","commonPrefix","arr1","arr2","minl","loadLocale","oldLocale","_abbr","aliasedRequire","getSetGlobalLocale","getLocale","abbr","parentLocale","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","configFromISO","allowTime","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","untruncateYear","yearStr","configFromRFC2822","parsedArray","monthStr","dayStr","hourStr","minuteStr","secondStr","weekdayStr","parsedInput","obsOffset","militaryOffset","numOffset","hm","currentDateArray","forWeek","hadWeekContext","weekContext","_isDefaultDatePartsForWeek","_getDefaultDateParts","configFromArray","currentDate","expectedWeekday","yearToUse","dateIsDefaulted","_defaultDatePartsNow","temp","weekdayOverflow","curWeek","_week","_dayOfYear","_nextDay","_useUTC","ISO_8601","RFC_2822","skipped","stringLength","totalParsedInputLength","isPm","meridiemHour","erasConvertYear","prepareConfig","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","defaultDatePartsNow","configfLen","score","createFromInputFallback","dayOrDate","createLocal","useWeekDefaults","nowValue","prototypeMin","prototypeMax","pickBy","moments","ordering","Duration","unitHasDecimal","orderLen","_milliseconds","_days","_months","_bubble","isDuration","absRound","utcOffset","offsetFromString","chunkOffset","cloneWithOffset","setTime","getDateOffset","getTimezoneOffset","isUtc","aspNetRegex","isoRegex","createDuration","diffRes","parseIso","positiveMomentsDifference","inp","createAdder","period","tmp","addSubtract$1","isAdding","invalid","add$1","subtract$1","isMomentInput","arrayTest","dataTypeTest","objectTest","propertyTest","propertyLen","monthDiff","wholeMonthDiff","anchor","newLocaleData","defaultFormatUtc","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","dividend","divisor","localStartOfDate","utcStartOfDate","matchEraAbbr","erasAbbrRegex","computeErasParse","erasName","erasAbbr","erasNarrow","abbrPieces","namePieces","narrowPieces","eras","narrow","_erasRegex","_erasNameRegex","_erasAbbrRegex","_erasNarrowRegex","addWeekYearFormatToken","getSetWeekYearHelper","weeksTarget","setWeekAll","dayOfYearData","erasNameRegex","erasNarrowRegex","erasParse","_eraYearOrdinalRegex","eraYearOrdinalParse","_dayOfMonthOrdinalParse","_ordinalParse","_dayOfMonthOrdinalParseLenient","getSetDayOfMonth","getSetMinute","getSetMillisecond","getSetSecond","parseMs","proto$2","preParsePostFormat","sod","startOf","calendarFormat","asFloat","that","zoneDelta","endOf","startOfDate","inputString","invalidAt","localInput","localFrom","localTo","inputMs","parsingFlags","prioritized","unitsObj","prioritizedLen","toObject","keepOffset","zone","creationData","eraName","eraNarrow","eraAbbr","eraYear","dir","isoWeeks","weekInfo","weeksInWeekYear","isoWeeksInYear","isoWeeksInISOWeekYear","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","parseZone","tZone","hasAlignedHourOffset","isDST","isUtcOffset","zoneAbbr","zoneName","isDSTShifted","_isDSTShifted","array1","array2","lengthDiff","diffs","proto$1","listMonthsImpl","listWeekdaysImpl","localeSorted","_calendar","_longDateFormat","formatUpper","formatCache","_longDateFormatCache","tok","_invalidDate","_ordinal","pastFuture","_eras","isFormat","standalone","_monthsShort","_monthsParseExact","firstDayOfYear","_weekdays","_weekdaysMin","_weekdaysShort","_weekdaysParseExact","_fullWeekdaysParse","langData","mathAbs","addSubtract","absCeil","daysToMonths","monthsToDays","makeAs","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","makeGetter","thresholds","substituteTimeAgo","posNegDuration","totalSign","ymSign","daysSign","hmsSign","monthsFromDays","argWithSuffix","argThresholds","withSuffix","th","toIsoString","tmpLocale","relativeTimeRounding","roundingFunction","relativeTimeThreshold","threshold","myMoment","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS","getOrCreateMeta","metas","localCopy","memoFn","prevRemote","incomingValue","trackedReset","memoOrConfig","_prototype","dedupeTracked","getOwnPropertySymbols","_WINDOW","_DOCUMENT","_MUTATION_OBSERVER","_PERFORMANCE","mark","measure","WINDOW","DOCUMENT","MUTATION_OBSERVER","PERFORMANCE","IS_DOM","IS_IE","classic","fa","fas","far","fal","fat","fab","duotone","fad","fadr","fadl","fadt","sharp","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt","P","pt","defaultShortPrefixId","defaultStyleId","styleIds","futureStyleIds","defaultFontWeight","Ft","Lt","t$1","GROUP","SWAP_OPACITY","PRIMARY","SECONDARY","bt$1","ga","Ia","c$1","F$1","ma","NAMESPACE_IDENTIFIER","UNITS_IN_GRID","DEFAULT_REPLACEMENT_CLASS","DATA_FA_I2SVG","DATA_FA_PSEUDO_ELEMENT","DATA_PREFIX","DATA_ICON","HTML_CLASS_I2SVG_BASE_CLASS","TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS","PRODUCTION","e$$1","familyProxy","_PREFIX_TO_STYLE","fak","fakd","PREFIX_TO_STYLE","_STYLE_TO_PREFIX","solid","regular","light","thin","kit","STYLE_TO_PREFIX","_PREFIX_TO_LONG_STYLE","PREFIX_TO_LONG_STYLE","_LONG_STYLE_TO_PREFIX","ICON_SELECTION_SYNTAX_PATTERN","LAYERS_TEXT_CLASSNAME","FONT_FAMILY_PATTERN","ATTRIBUTES_WATCHED_FOR_MUTATION","normal","RESERVED_CLASSES","FontAwesomeConfig","_default","styleDefault","familyDefault","cssPrefix","replacementClass","autoReplaceSvg","autoAddCss","autoA11y","searchPseudoElements","observeMutations","mutateApproach","keepOriginalSource","measurePerformance","showMissingIcons","familyPrefix","_onChangeCb","d$2","meaninglessTransform","rotate","flipX","flipY","nextUniqueId","classArray","htmlEscape","joinStyles","styleName","transformIsMeaningful","dcp","drc","fp","rc","dPatt","customPropPatt","rPatt","_cssInserted","ensureCss","headChildren","beforeChild","InjectCSS","mixout","insertCss","beforeDOMElementCreation","beforeI2svg","functions","abstractNodes","attributeName","iconFromMapping","mapping","doScroll","subject","thisContext","toHex","decoded","normalizeIcons","icons","defineIcons","skipHooks","addPack","FAMILY_NAMES","PREFIXES_FOR_FAMILY","familyId","_defaultUsablePrefix","_byUnicode","_byLigature","_byOldName","_byOldUnicode","_byAlias","o$$1","a$$1","hasRegular","autoFetchSvg","shimLookups","maybeNameMaybeUnicode","unicodes","getCanonicalPrefix","family","byUnicode","byAlias","byOldName","getDefaultUsablePrefix","styleOrPrefix","defined","sortedUniqueValues","getCanonicalIcon","skipLookups","givenPrefix","faCombinedClasses","faStyleOrFamilyClasses","cls","nonStyleOrFamilyClasses","faStyles","styleFromValues","famProps","v$$1","canonical","prefixOptions","config$$1","isDuotoneFamily","valuesHasDuotone","defaultFamilyIsDuotone","canonicalPrefixIsDuotone","newCanonicalFamilies","newCanonicalStyles","aliasIconName","c$$1","_plugins","_hooks","providers","defaultProviderKeys","chainHooks","hookFn","callHooks","callProvided","findIconDefinition","library","definitions","_pullDefinitions","longPrefix","i2svg","watch","autoReplaceSvgRoot","autoReplace","canonicalIcon","api","noAuto","domVariants","abstractCreator","makeInlineSvgAbstract","maskId","titleId","watchable","isUploadedIcon","attrClass","role","xmlns","uploadedIconWidthStyle","makeLayersTextAbstract","startCentered","styleString","styles$1","asFoundIcon","vectorData","missingIconResolutionMixin","findIcon","noop$1","p$2","preamble","noop$2","isWatched","convertSVG","abstractObj","ceFn","mutators","outerHTML","replaceChild","nest","forSvg","splitClasses","toSvg","toNode","newInnerHTML","performOperationSync","callbackFunction","mutator","disableObservation","enableObservation","mo","treeCallback","nodeCallback","pseudoElementsCallback","observeMutationsRoot","mutationRecord","parseMeta","parser","styleParser","extraClasses","existingPrefix","existingIconName","innerText","ligature","extraAttributes","focusable","pluginMeta","extraStyles","styles$2","generateMutation","nodeMeta","onTree","htmlClassList","hclAdd","hclRemove","prefixes","prefixesDomQuery","p$$1","resolvedMutations","onNode","iconDefinition","ReplaceElements","maybeIconDefinition","mutationObserverCallbacks","provides","providers$$1","generateSvgReplacementMutation","generateAbstractIcon","containerWidth","iconWidth","Layers","layer","assembler","LayersCounter","LayersText","generateLayersText","computedFontSize","fontSize","boundingClientRect","CLEAN_CONTENT_PATTERN","SECONDARY_UNICODE_RANGE","_FONT_FAMILY_WEIGHT_TO_PREFIX","FontAwesome","FONT_FAMILY_WEIGHT_TO_PREFIX","FONT_FAMILY_WEIGHT_FALLBACK","fontFamily","weights","replaceForPosition","pendingAttribute","alreadyProcessedPseudoElement","fontFamilyMatch","fontWeight","fontFamilySanitized","fontWeightInteger","fontWeightSanitized","hexValue","isSecondary","cleaned","codePoint","isPrependTen","isDoubled","isV4","iconIdentifier","iconName4","oldUnicode","newUnicode","processable","PseudoElements","pseudoElements2svg","_unwatched","MutationObserver$1","unwatch","parseTransformString","transformString","PowerTransforms","parseNodeAttributes","generateAbstractTransformGrouping","outer","innerTranslate","innerScale","innerRotate","ALL_SPACE","fillBlack","force","Masks","maskData","generateAbstractMask","explicitMaskId","mainWidth","mainPath","maskWidth","maskPath","trans","maskRect","maskInnerGroupChildrenMixin","maskInnerGroup","maskOuterGroup","clipId","maskTag","maskUnits","maskContentUnits","MissingIconIndicator","reduceMotion","matchMedia","missingIconAbstract","gChildren","FILL","ANIMATION_BASE","repeatCount","dur","OPACITY_ANIMATE","dot","cx","cy","opacity","nextPlugins","mixoutsTo","plugin","tk","sk","symbolData","noAuto$1","config$1","library$1","dom$1","parse$1","findIconDefinition$1","toHtml$1","stripePromise","RELEASE_TRAIN","ORIGIN","STRIPE_JS_URL","V3_URL_REGEX","STRIPE_JS_URL_REGEX","isStripeJSURL","injectScript","advancedFraudSignals","headOrBody","stripePromise$1","onErrorListener","onLoadListener","loadCalled","getStripePromise","Stripe","_script$parentNode","scripts","cause","loadStripe","maybeStripe","isTestKey","expectedVersion","stripe","_registerWrapper","Lowercase","Uppercase","Capitalize","Uncapitalize","CamelToDash","CamelToPascal","CamelToSnake","CamelToUpperDash","CamelToUpperSnake","DashToCamel","DashToPascal","DashToSnake","DashToUpperDash","DashToUpperSnake","PascalToCamel","PascalToDash","PascalToSnake","PascalToUpperDash","PascalToUpperSnake","SnakeToCamel","SnakeToDash","SnakeToPascal","SnakeToUpperDash","SnakeToUpperSnake","UpperDashToCamel","UpperDashToDash","UpperDashToPascal","UpperDashToSnake","UpperDashToUpperSnake","UpperSnakeToCamel","UpperSnakeToDash","UpperSnakeToPascal","UpperSnakeToSnake","UpperSnakeToUpperDash","objectParser","parsedKey","arrayParser","converter","camelToDash","camelToSnake","camelToPascal","camelToUpperSnake","camelToUpperDash","dashToSnake","dashToCamel","dashToPascal","dashToUpperSnake","dashToUpperDash","pascalToCamel","pascalToSnake","pascalToDash","pascalToUpperSnake","pascalToUpperDash","snakeToCamel","snakeToDash","snakeToPascal","snakeToUpperSnake","snakeToUpperDash","upperDashToCamel","upperDashToSnake","upperDashToDash","upperDashToPascal","upperDashToUpperSnake","upperSnakeToCamel","upperSnakeToSnake","upperSnakeToDash","upperSnakeToPascal","upperSnakeToUpperDash","multiMatcher","hexPair","parsePercentByte","digits","byte","utf8SequenceLength","isContinuationByte","firstByte","sequenceLength","validSequence","nextByte","encodedSequence","includeKeys","splitOnFirst","separatorIndex","encodeFragmentIdentifier","validateArrayFormatSeparator","encodedURI","replaceMap","keysSorter","removeHash","getUrlWithoutQuery","parseValue","arrayFormat","parseBooleans","parseNumbers","extract","arrayFormatSeparator","formatter","returnValue","parameterStart","firstSeparator","parameter","parameter_","value2","typeOption","shouldFilter","skipNull","skipEmptyString","keyValueSeparator","objectCopy","replacer","processedArray","parseUrl","url_","parseFragmentIdentifier","fragmentIdentifier","stringifyUrl","throwawayUrl","pick","exclude","filterSet"],"sources":["webpack://__ember_auto_import__/src/components/pagination-data.gts","webpack://__ember_auto_import__/node_modules/@warp-drive/legacy/dist/adapter.js","webpack://__ember_auto_import__/node_modules/@warp-drive/legacy/dist/serialize-into-hash-DPZYoF-i.js","webpack://__ember_auto_import__/node_modules/@warp-drive/legacy/dist/adapter/rest.js","webpack://__ember_auto_import__/node_modules/@ember-data/debug/dist/data-adapter.js","webpack://__ember_auto_import__/node_modules/@warp-drive/legacy/dist/util-Dul6TZts.js","webpack://__ember_auto_import__/node_modules/@warp-drive/legacy/dist/errors-Cz5KrzBk.js","webpack://__ember_auto_import__/node_modules/@warp-drive/legacy/dist/schema-provider-DJCV_6AF.js","webpack://__ember_auto_import__/node_modules/@warp-drive/legacy/dist/hooks-D6diaM34.js","webpack://__ember_auto_import__/node_modules/@warp-drive/legacy/dist/model.js","webpack://__ember_auto_import__/node_modules/@warp-drive/utilities/dist/-private.js","webpack://__ember_auto_import__/node_modules/@ember-data/request-utils/dist/deprecation-support.js","webpack://__ember_auto_import__/node_modules/@warp-drive/legacy/dist/serializer.js","webpack://__ember_auto_import__/node_modules/@warp-drive/legacy/dist/json-ChdEfB0X.js","webpack://__ember_auto_import__/node_modules/@warp-drive/legacy/dist/serializer/rest.js","webpack://__ember_auto_import__/node_modules/@warp-drive/legacy/dist/serializer/transform.js","webpack://__ember_auto_import__/src/-internal/build-registry.ts","webpack://__ember_auto_import__/src/global.ts","webpack://__ember_auto_import__/src/test-metadata.ts","webpack://__ember_auto_import__/src/-internal/deprecations.ts","webpack://__ember_auto_import__/src/-internal/warnings.ts","webpack://__ember_auto_import__/src/has-ember-version.ts","webpack://__ember_auto_import__/src/setup-context.ts","webpack://__ember_auto_import__/src/helper-hooks.ts","webpack://__ember_auto_import__/src/-internal/debug-info-helpers.ts","webpack://__ember_auto_import__/src/setup-application-context.ts","webpack://__ember_auto_import__/src/settled.ts","webpack://__ember_auto_import__/src/setup-onerror.ts","webpack://__ember_auto_import__/src/dom/get-root-element.ts","webpack://__ember_auto_import__/src/dom/-target.ts","webpack://__ember_auto_import__/src/waiter-manager.ts","webpack://__ember_auto_import__/src/build-waiter.ts","webpack://__ember_auto_import__/src/wait-for-promise.ts","webpack://__ember_auto_import__/src/wait-for.ts","webpack://__ember_auto_import__/src/wait-for-fetch.ts","webpack://__ember_auto_import__/node_modules/@embroider/macros/src/addon/es-compat2.js","webpack://__ember_auto_import__/src/components/fa-icon.gts","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faBuffer.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faCss.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faEmber.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faFacebook.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faFacebookF.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faGithub.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faGoogle.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faInstagram.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faJs.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faLine.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faLinkedin.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faLinkedinIn.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faMailchimp.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faMedium.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faMeta.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faPinterest.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faSnapchat.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faStripe.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faTelegram.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faTiktok.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faTwitter.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faVimeo.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faWhatsapp.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faWindows.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-brands-svg-icons/faYoutube.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/fa0.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/fa1.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/fa2.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/fa3.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/fa4.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/fa5.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/fa6.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/fa7.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/fa8.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/fa9.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faA.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faAddressBook.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faAddressCard.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faArrowDown.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faArrowDownAZ.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faArrowDownUpAcrossLine.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faArrowLeft.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faArrowPointer.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faArrowRight.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faArrowRotateLeft.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faArrowTrendUp.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faArrowTurnDown.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faArrowUp.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faArrowUpRightFromSquare.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faArrowsLeftRight.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faArrowsRotate.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faAsterisk.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faAt.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faBagShopping.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faBan.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faBarcode.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faBars.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faBarsStaggered.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faBlog.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faBolt.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faBookOpen.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faBriefcase.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faBroom.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faBuilding.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faBuildingColumns.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faBullseye.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCalculator.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCalendar.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCalendarCheck.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCalendarDays.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCamera.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCaretDown.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCartShopping.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faChartBar.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faChartLine.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faChartPie.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faChartSimple.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCheck.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faChevronDown.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faChevronUp.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCircle.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCircleCheck.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCircleExclamation.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCircleInfo.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCircleQuestion.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCircleUser.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCircleXmark.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCity.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faClock.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faClockRotateLeft.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCloudArrowUp.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faClover.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCode.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCodeCompare.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faComment.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCommentSms.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCompassDrafting.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCompress.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCookie.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCopy.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCreditCard.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCrop.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCropSimple.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faCross.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faD.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faDatabase.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faDeleteLeft.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faDesktop.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faDiagramProject.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faDiamond.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faDisplay.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faDownload.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faE.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faEnvelope.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faEquals.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faEraser.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faEye.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faEyeSlash.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faFile.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faFileArrowDown.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faFileCirclePlus.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faFileCode.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faFileContract.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faFileExport.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faFileImage.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faFileInvoiceDollar.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faFileLines.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faFilePdf.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faFilePen.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faFileZipper.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faFill.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faFilter.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faFingerprint.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faFlagCheckered.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faFloppyDisk.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faFont.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faG.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faGasPump.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faGauge.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faGaugeHigh.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faGear.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faGlassWater.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faGlobe.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faGraduationCap.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faH.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faHandHoldingHeart.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faHardDrive.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faHashtag.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faHeart.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faHeartPulse.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faHouse.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faIdCard.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faImage.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faImagePortrait.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faImages.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faInfo.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faKey.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faLanguage.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faLayerGroup.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faLeaf.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faLightbulb.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faLink.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faList.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faListOl.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faLocationCrosshairs.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faLocationDot.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faLock.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faM.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faMagnifyingGlass.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faMap.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faMessage.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faMinus.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faMobile.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faMobileScreenButton.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faMoneyBillTransfer.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faMoneyBillWave.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faNetworkWired.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faObjectGroup.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faOm.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faP.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faPalette.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faParagraph.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faPaste.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faPen.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faPenToSquare.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faPercent.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faPersonRunning.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faPhone.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faPiggyBank.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faPills.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faPlay.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faPlug.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faPlus.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faPrint.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faPuzzlePiece.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faQrcode.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faQuoteLeft.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faQuoteRight.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faRadio.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faReceipt.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faRectangleAd.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faRightFromBracket.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faRightLeft.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faRobot.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faRotate.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faRotateLeft.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faRotateRight.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faRoute.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faRuler.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faRulerCombined.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faS.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faScaleBalanced.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faScissors.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faScrewdriverWrench.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faScroll.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faSection.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faServer.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faShare.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faShareNodes.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faShieldHalved.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faShieldHeart.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faSitemap.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faSliders.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faSort.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faSpinner.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faSquare.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faStar.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faStore.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faT.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faTable.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faTablet.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faTags.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faTemperatureHalf.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faTerminal.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faTextHeight.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faTextWidth.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faTrash.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faTrashCan.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faTriangleExclamation.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faTrophy.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faUnlock.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faUpRightAndDownLeftFromCenter.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faUpRightFromSquare.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faUpload.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faUser.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faUserPlus.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faUsers.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faV.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faVectorSquare.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faVideo.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faWallet.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faWandMagicSparkles.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faWaveSquare.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faWeightHanging.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faWeightScale.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faWifi.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faX.js","webpack://__ember_auto_import__/node_modules/@fortawesome/free-solid-svg-icons/faXmark.js","webpack://__ember_auto_import__/node_modules/@glimmer/component/dist/index.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/enums.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/getWindow.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/modifiers/applyStyles.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/getBasePlacement.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/math.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/userAgent.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/contains.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/within.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/expandToHashMap.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/modifiers/arrow.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/getVariation.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/modifiers/computeStyles.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/modifiers/eventListeners.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/rectToClientRect.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/computeOffsets.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/detectOverflow.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/modifiers/flip.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/modifiers/hide.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/modifiers/offset.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/getAltAxis.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/orderModifiers.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/createPopper.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/debounce.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/utils/mergeByName.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/popper.js","webpack://__ember_auto_import__/node_modules/@popperjs/core/lib/popper-lite.js","webpack://__ember_auto_import__/node_modules/@warp-drive/core/dist/configure-DPUFCemT.js","webpack://__ember_auto_import__/node_modules/@warp-drive/core/dist/default-cache-policy-D7_u4YRH.js","webpack://__ember_auto_import__/node_modules/@warp-drive/core/dist/future-BKkJJkj7.js","webpack://__ember_auto_import__/node_modules/@warp-drive/core/dist/types/identifier.js","webpack://__ember_auto_import__/node_modules/@warp-drive/core/dist/index-CQP2NSqg.js","webpack://__ember_auto_import__/node_modules/@warp-drive/core/dist/types/schema/fields.js","webpack://__ember_auto_import__/node_modules/@warp-drive/core/dist/request.js","webpack://__ember_auto_import__/node_modules/@warp-drive/core/dist/symbols-3C1OkYtZ.js","webpack://__ember_auto_import__/node_modules/@warp-drive/core/dist/types/-private.js","webpack://__ember_auto_import__/node_modules/@warp-drive/core/dist/types/request.js","webpack://__ember_auto_import__/node_modules/@warp-drive/core/dist/types/runtime.js","webpack://__ember_auto_import__/node_modules/@warp-drive/core/dist/types/symbols.js","webpack://__ember_auto_import__/node_modules/@warp-drive/core/dist/utils/string.js","webpack://__ember_auto_import__/node_modules/@warp-drive/ember/dist/install.js","webpack://__ember_auto_import__/node_modules/@warp-drive/legacy/dist/-private-BG3bMiKp.js","webpack://__ember_auto_import__/node_modules/@warp-drive/legacy/dist/adapter/error.js","webpack://__ember_auto_import__/node_modules/@warp-drive/legacy/dist/runtime-BPCpkOf1-BKOwiRJp.js","webpack://__ember_auto_import__/node_modules/@warp-drive/utilities/dist/string.js","webpack://__ember_auto_import__/node_modules/card-validator/dist/card-number.js","webpack://__ember_auto_import__/node_modules/card-validator/dist/cardholder-name.js","webpack://__ember_auto_import__/node_modules/card-validator/dist/cvv.js","webpack://__ember_auto_import__/node_modules/card-validator/dist/expiration-date.js","webpack://__ember_auto_import__/node_modules/card-validator/dist/expiration-month.js","webpack://__ember_auto_import__/node_modules/card-validator/dist/expiration-year.js","webpack://__ember_auto_import__/node_modules/card-validator/dist/index.js","webpack://__ember_auto_import__/node_modules/card-validator/dist/lib/is-array.js","webpack://__ember_auto_import__/node_modules/card-validator/dist/lib/parse-date.js","webpack://__ember_auto_import__/node_modules/card-validator/dist/luhn-10.js","webpack://__ember_auto_import__/node_modules/card-validator/dist/postal-code.js","webpack://__ember_auto_import__/node_modules/credit-card-type/dist/index.js","webpack://__ember_auto_import__/node_modules/credit-card-type/dist/lib/add-matching-cards-to-results.js","webpack://__ember_auto_import__/node_modules/credit-card-type/dist/lib/card-types.js","webpack://__ember_auto_import__/node_modules/credit-card-type/dist/lib/clone.js","webpack://__ember_auto_import__/node_modules/credit-card-type/dist/lib/find-best-match.js","webpack://__ember_auto_import__/node_modules/credit-card-type/dist/lib/is-valid-input-type.js","webpack://__ember_auto_import__/node_modules/credit-card-type/dist/lib/matches.js","webpack://__ember_auto_import__/src/helpers/assign.js","webpack://__ember_auto_import__/src/utils/scroll-helpers.ts","webpack://__ember_auto_import__/src/components/basic-dropdown-content.gts","webpack://__ember_auto_import__/src/components/basic-dropdown-trigger.gts","webpack://__ember_auto_import__/src/components/basic-dropdown-wormhole.gts","webpack://__ember_auto_import__/src/components/basic-dropdown.gts","webpack://__ember_auto_import__/src/config.ts","webpack://__ember_auto_import__/src/modifiers/basic-dropdown-trigger.ts","webpack://__ember_auto_import__/src/utils/calculate-position.ts","webpack://__ember_auto_import__/src/utils/has-moved.ts","webpack://__ember_auto_import__/node_modules/ember-cli-deprecation-workflow/src/index.js","webpack://__ember_auto_import__/src/-private/ember-environment.js","webpack://__ember_auto_import__/src/-private/external/environment.js","webpack://__ember_auto_import__/src/-private/external/scheduler/policies/bounded-policy.js","webpack://__ember_auto_import__/src/-private/external/scheduler/policies/drop-policy.js","webpack://__ember_auto_import__/src/-private/external/scheduler/policies/enqueued-policy.js","webpack://__ember_auto_import__/src/-private/external/scheduler/policies/execution-states.js","webpack://__ember_auto_import__/src/-private/external/scheduler/policies/keep-latest-policy.js","webpack://__ember_auto_import__/src/-private/external/scheduler/policies/restartable-policy.js","webpack://__ember_auto_import__/src/-private/external/scheduler/refresh.js","webpack://__ember_auto_import__/src/-private/external/scheduler/state-tracker/state.js","webpack://__ember_auto_import__/src/-private/external/scheduler/state-tracker/state-tracker.js","webpack://__ember_auto_import__/src/-private/external/scheduler/state-tracker/null-state-tracker.js","webpack://__ember_auto_import__/src/-private/external/scheduler/state-tracker/null-state.js","webpack://__ember_auto_import__/src/-private/external/scheduler/scheduler.js","webpack://__ember_auto_import__/src/-private/external/scheduler/policies/unbounded-policy.js","webpack://__ember_auto_import__/src/-private/external/task-factory.js","webpack://__ember_auto_import__/src/-private/external/task-instance/cancelation.js","webpack://__ember_auto_import__/src/-private/external/generator-state.js","webpack://__ember_auto_import__/src/-private/external/task-instance/executor.js","webpack://__ember_auto_import__/src/-private/external/task-instance/initial-state.js","webpack://__ember_auto_import__/src/-private/external/task/default-state.js","webpack://__ember_auto_import__/src/-private/external/task/task-group.js","webpack://__ember_auto_import__/src/-private/external/task/task.js","webpack://__ember_auto_import__/src/-private/external/task/taskable.js","webpack://__ember_auto_import__/src/-private/external/yieldables.js","webpack://__ember_auto_import__/src/-private/helpers.js","webpack://__ember_auto_import__/src/-private/scheduler/ember-scheduler.js","webpack://__ember_auto_import__/src/-private/task-factory.js","webpack://__ember_auto_import__/src/-private/task-group.js","webpack://__ember_auto_import__/src/-private/external/task-instance/base.js","webpack://__ember_auto_import__/src/-private/task-instance.js","webpack://__ember_auto_import__/src/-private/task-properties.js","webpack://__ember_auto_import__/src/-private/task.js","webpack://__ember_auto_import__/src/-private/taskable-mixin.js","webpack://__ember_auto_import__/src/-private/tracked-state.js","webpack://__ember_auto_import__/src/-private/async-arrow-runtime.js","webpack://__ember_auto_import__/src/helpers/cancel-all.ts","webpack://__ember_auto_import__/src/helpers/perform.ts","webpack://__ember_auto_import__/src/helpers/task.ts","webpack://__ember_auto_import__/src/-private/utils.js","webpack://__ember_auto_import__/src/-private/external/task-decorators.js","webpack://__ember_auto_import__/src/-private/task-decorators.js","webpack://__ember_auto_import__/src/-private/task-public-api.js","webpack://__ember_auto_import__/src/-private/cancelable-promise-helpers.js","webpack://__ember_auto_import__/src/-private/wait-for.js","webpack://__ember_auto_import__/node_modules/@warp-drive/core/dist/graph/-private.js","webpack://__ember_auto_import__/node_modules/@warp-drive/json-api/dist/index.js","webpack://__ember_auto_import__/node_modules/@warp-drive/legacy/dist/compat.js","webpack://__ember_auto_import__/node_modules/ember-data/dist/store.js","webpack://__ember_auto_import__/src/helpers/element.ts","webpack://__ember_auto_import__/node_modules/flatpickr/dist/esm/utils/polyfills.js","webpack://__ember_auto_import__/node_modules/flatpickr/dist/esm/types/options.js","webpack://__ember_auto_import__/node_modules/flatpickr/dist/esm/l10n/default.js","webpack://__ember_auto_import__/node_modules/flatpickr/dist/esm/utils/index.js","webpack://__ember_auto_import__/node_modules/flatpickr/dist/esm/utils/dom.js","webpack://__ember_auto_import__/node_modules/flatpickr/dist/esm/utils/formatting.js","webpack://__ember_auto_import__/node_modules/flatpickr/dist/esm/utils/dates.js","webpack://__ember_auto_import__/node_modules/flatpickr/dist/esm/index.js","webpack://__ember_auto_import__/src/components/ember-flatpickr.ts","webpack://__ember_auto_import__/src/index.js","webpack://__ember_auto_import__/index.js","webpack://__ember_auto_import__/node_modules/ember-focus-trap/dist/modifiers/focus-trap.js","webpack://__ember_auto_import__/src/helpers/pluralize.js","webpack://__ember_auto_import__/src/helpers/singularize.js","webpack://__ember_auto_import__/src/lib/system/inflections.js","webpack://__ember_auto_import__/src/lib/system/inflector.js","webpack://__ember_auto_import__/src/lib/system/string.js","webpack://__ember_auto_import__/src/lib/utils/make-helper.js","webpack://__ember_auto_import__/src/helpers/format-date-range.ts","webpack://__ember_auto_import__/src/helpers/format-date.ts","webpack://__ember_auto_import__/src/helpers/format-display-name.ts","webpack://__ember_auto_import__/src/helpers/format-list.ts","webpack://__ember_auto_import__/src/helpers/format-message.ts","webpack://__ember_auto_import__/src/helpers/format-number.ts","webpack://__ember_auto_import__/src/helpers/format-relative-time.ts","webpack://__ember_auto_import__/src/helpers/format-time.ts","webpack://__ember_auto_import__/src/helpers/t-key.ts","webpack://__ember_auto_import__/src/helpers/t.ts","webpack://__ember_auto_import__/index.ts","webpack://__ember_auto_import__/date-time.ts","webpack://__ember_auto_import__/node_modules/.aspect_rules_js/@formatjs_generated+unicode@0.0.0/node_modules/@formatjs_generated/unicode/icu-skeleton-parser-regex.js","webpack://__ember_auto_import__/number.ts","webpack://__ember_auto_import__/error.ts","webpack://__ember_auto_import__/types.ts","webpack://__ember_auto_import__/node_modules/.aspect_rules_js/@formatjs_generated+unicode@0.0.0/node_modules/@formatjs_generated/unicode/icu-messageformat-parser-regex.js","webpack://__ember_auto_import__/node_modules/.aspect_rules_js/@formatjs_generated+cldr.core@0.0.0/node_modules/@formatjs_generated/cldr.core/time-data.js","webpack://__ember_auto_import__/date-time-pattern-generator.ts","webpack://__ember_auto_import__/parser.ts","webpack://__ember_auto_import__/formatters.ts","webpack://__ember_auto_import__/core.ts","webpack://__ember_auto_import__/utils.ts","webpack://__ember_auto_import__/message.ts","webpack://__ember_auto_import__/dateTime.ts","webpack://__ember_auto_import__/displayName.ts","webpack://__ember_auto_import__/list.ts","webpack://__ember_auto_import__/plural.ts","webpack://__ember_auto_import__/relativeTime.ts","webpack://__ember_auto_import__/src/-private/formatjs/format-message.ts","webpack://__ember_auto_import__/src/-private/utils/locale.ts","webpack://__ember_auto_import__/src/services/intl.ts","webpack://__ember_auto_import__/src/-private/formatjs/formats.ts","webpack://__ember_auto_import__/create-intl.ts","webpack://__ember_auto_import__/src/-private/formatjs/format-date.ts","webpack://__ember_auto_import__/src/-private/formatjs/format-date-range.ts","webpack://__ember_auto_import__/src/-private/formatjs/format-display-name.ts","webpack://__ember_auto_import__/src/-private/formatjs/format-list.ts","webpack://__ember_auto_import__/src/-private/formatjs/format-number.ts","webpack://__ember_auto_import__/src/-private/formatjs/format-relative-time.ts","webpack://__ember_auto_import__/src/-private/formatjs/format-time.ts","webpack://__ember_auto_import__/src/-private/utils/get-html-element.ts","webpack://__ember_auto_import__/src/-private/class-based/modifier-manager.ts","webpack://__ember_auto_import__/src/-private/class-based/modifier.ts","webpack://__ember_auto_import__/src/-private/function-based/modifier.ts","webpack://__ember_auto_import__/src/-private/function-based/modifier-manager.ts","webpack://__ember_auto_import__/src/utils/helper-compute.js","webpack://__ember_auto_import__/src/helpers/-base.js","webpack://__ember_auto_import__/src/helpers/is-after.js","webpack://__ember_auto_import__/src/helpers/is-before.js","webpack://__ember_auto_import__/src/helpers/is-between.js","webpack://__ember_auto_import__/src/helpers/is-same-or-after.js","webpack://__ember_auto_import__/src/helpers/is-same-or-before.js","webpack://__ember_auto_import__/src/helpers/is-same.js","webpack://__ember_auto_import__/src/helpers/moment-add.js","webpack://__ember_auto_import__/src/helpers/moment-calendar.js","webpack://__ember_auto_import__/src/helpers/moment-diff.js","webpack://__ember_auto_import__/src/helpers/moment-duration.js","webpack://__ember_auto_import__/src/helpers/moment-format.js","webpack://__ember_auto_import__/src/helpers/moment-from-now.js","webpack://__ember_auto_import__/src/helpers/moment-from.js","webpack://__ember_auto_import__/src/helpers/moment-subtract.js","webpack://__ember_auto_import__/src/helpers/moment-to-date.js","webpack://__ember_auto_import__/src/helpers/moment-to-now.js","webpack://__ember_auto_import__/src/helpers/moment-to.js","webpack://__ember_auto_import__/src/helpers/moment.js","webpack://__ember_auto_import__/src/helpers/now.js","webpack://__ember_auto_import__/src/helpers/unix.js","webpack://__ember_auto_import__/src/helpers/utc.js","webpack://__ember_auto_import__/src/services/moment.js","webpack://__ember_auto_import__/src/components/power-select-multiple.ts","webpack://__ember_auto_import__/src/components/power-select-multiple/input.ts","webpack://__ember_auto_import__/src/components/power-select-multiple/trigger.ts","webpack://__ember_auto_import__/src/components/power-select.ts","webpack://__ember_auto_import__/src/components/power-select/before-options.ts","webpack://__ember_auto_import__/src/components/power-select/input.ts","webpack://__ember_auto_import__/src/components/power-select/label.ts","webpack://__ember_auto_import__/src/components/power-select/no-matches-message.ts","webpack://__ember_auto_import__/src/components/power-select/options.ts","webpack://__ember_auto_import__/src/components/power-select/placeholder.ts","webpack://__ember_auto_import__/src/components/power-select/power-select-group.ts","webpack://__ember_auto_import__/src/components/power-select/search-message.ts","webpack://__ember_auto_import__/src/components/power-select/trigger.ts","webpack://__ember_auto_import__/src/helpers/ember-power-select-is-equal.ts","webpack://__ember_auto_import__/src/helpers/ember-power-select-is-group.ts","webpack://__ember_auto_import__/src/helpers/ember-power-select-is-selected-present.ts","webpack://__ember_auto_import__/src/utils/group-utils.ts","webpack://__ember_auto_import__/node_modules/ember-resolver/addon/string/cache.js","webpack://__ember_auto_import__/node_modules/ember-resolver/addon/string/index.js","webpack://__ember_auto_import__/node_modules/ember-resolver/addon/index.js","webpack://__ember_auto_import__/node_modules/ember-resolver/addon/utils/class-factory.js","webpack://__ember_auto_import__/src/authenticators/jwt.js","webpack://__ember_auto_import__/src/authenticators/token.js","webpack://__ember_auto_import__/src/authenticators/base.ts","webpack://__ember_auto_import__/src/configuration.js","webpack://__ember_auto_import__/src/-internals/event-target.ts","webpack://__ember_auto_import__/src/session-stores/ephemeral.ts","webpack://__ember_auto_import__/src/internal-session.js","webpack://__ember_auto_import__/src/session-stores/adaptive.ts","webpack://__ember_auto_import__/src/session-stores/local-storage.ts","webpack://__ember_auto_import__/src/initializers/ember-simple-auth.js","webpack://__ember_auto_import__/src/initializers/setup-session.js","webpack://__ember_auto_import__/src/utils/location.js","webpack://__ember_auto_import__/src/services/session.ts","webpack://__ember_auto_import__/src/-internals/routing.js","webpack://__ember_auto_import__/src/session-stores/base.ts","webpack://__ember_auto_import__/src/session-stores/cookie.ts","webpack://__ember_auto_import__/src/utils/is-fastboot.ts","webpack://__ember_auto_import__/src/utils/objects-are-equal.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/deprecations/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/error-handling/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/meta/lib/meta.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/metal/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/owner/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/runtime/lib/ext/rsvp.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/runtime/lib/mixins/-proxy.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/runtime/lib/mixins/action_handler.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/runtime/lib/mixins/comparable.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/runtime/lib/mixins/container_proxy.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/string/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/utility-types/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/views/lib/compat/attrs.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/views/lib/component_lookup.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/views/lib/mixins/action_support.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/views/lib/system/event_dispatcher.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/views/lib/system/utils.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/views/lib/views/core_view.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/-internals/views/lib/views/states.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/application/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/application/instance.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/application/lib/lazy_load.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/application/namespace.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/array/-internals.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/array/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/array/lib/make-array.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/array/proxy.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/canary-features/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/component/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/component/template-only.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/controller/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/debug/container-debug-adapter.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/debug/data-adapter.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/debug/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/debug/lib/assert.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/debug/lib/capture-render-tree.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/debug/lib/deprecate.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/debug/lib/handlers.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/debug/lib/inspect.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/debug/lib/testing.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/debug/lib/warn.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/destroyable/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/engine/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/engine/instance.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/engine/lib/engine-parent.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/enumerable/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/enumerable/mutable.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/helper/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/instrumentation/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/modifier/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/modifier/on.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/object/-internals.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/object/compat.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/object/core.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/object/evented.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/object/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/object/lib/computed/computed_macros.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/object/lib/computed/reduce_computed_macros.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/object/mixin.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/object/observable.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/object/promise-proxy-mixin.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/object/proxy.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/owner/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/routing/hash-location.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/routing/history-location.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/routing/lib/cache.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/routing/lib/controller_for.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/routing/lib/dsl.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/routing/lib/generate_controller.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/routing/lib/location-utils.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/routing/lib/query_params.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/routing/lib/router_state.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/routing/lib/routing-service.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/routing/lib/utils.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/routing/none-location.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/routing/route.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/routing/router-service.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/routing/router.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/runloop/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/service/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/template-compilation/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/test/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/utils/lib/compare.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/utils/lib/is-equal.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/utils/lib/is_blank.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/utils/lib/is_empty.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/utils/lib/is_none.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/utils/lib/is_present.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@ember/utils/lib/type-of.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@glimmer/destroyable/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@glimmer/global-context/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@glimmer/opcode-compiler/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@glimmer/runtime/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@glimmer/tracking/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@glimmer/util/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@glimmer/validator/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@glimmer/vm/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@glimmer/wire-format/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/@simple-dom/document/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/backburner.js/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/dag-map/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/ember/barrel.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/ember/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/ember/version.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/route-recognizer/index.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/alias-BEMS3qgG.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/api-1B_9SjFR.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/args-proxy-B91L3LRK.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/array-BqYCCatg.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/assert-CUCJBR2C.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/cache-qDyqAcpg.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/capabilities-DHiXCCuB.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/chunk-3SQBS3Y5-Cj4eryg1.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/collections-B8me-ZlQ.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/computed_cache-DmYKevAP.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/constants-oDhF27qL.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/debug-brand-B1TWjOCH.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/debug-to-string-BsFOvUtQ.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/dictionary-gc5gpyOG.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/dynamic-CuBsUXX8.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/element-builder-BuVym8EM.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/encoder-CT1wqYMF.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/env-DEd6hPbj.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/flags-BsZlvEeR.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/helpers-C1rIkuSd.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/index-BGP1rw3B.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/index-ByyoGpfz.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/index-CQkjwqTv.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/invoke-BjRgvK2V.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/is_proxy-C2q5rUMp.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/iterable-BKS7az3P.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/mandatory-setter-DLKyVs4Q.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/name-DVtQREj6.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/namespace_search-ClQOZuFA.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/node-dom-helper-BYL7Plyj.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/object-utils-AijlD-JH.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/observers-DhgQ6ba5.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/present-B1rrjAVM.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/program-CcLlGnAU.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/program-context-CZJnCFdo.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/property_set-DrZnfGQ7.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/public-api-BQsJemZG.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/reference-B6HMX4y0.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/registers-ylirb0dq.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/registry-XY5cfmbH.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/render-DTOhhssy.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/router-DSi8WnDi.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/rsvp-CnCSY930.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/serialize-builder-DEgRJgNQ.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/set_properties-Dag9Xz6u.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/setup-registry-Bbj8WQen.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/simple-cast-BXTrayoV.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/template_registry-DigcUg9m.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/to-string-CqD7_vQ4.js","webpack://__ember_auto_import__/node_modules/ember-source/dist/packages/shared-chunks/unrecognized-url-error-BBMMZhBN.js","webpack://__ember_auto_import__/src/modifiers/style.ts","webpack://__ember_auto_import__/node_modules/moment/locale/ar.js","webpack://__ember_auto_import__/node_modules/moment/moment.js","webpack://__ember_auto_import__/node_modules/tracked-toolbox/dist/index.js","webpack://__ember_auto_import__/node_modules/@fortawesome/fontawesome-svg-core/index.mjs","webpack://__ember_auto_import__/node_modules/@stripe/stripe-js/dist/index.mjs","webpack://__ember_auto_import__/node_modules/caseparser/dist/index.mjs","webpack://__ember_auto_import__/src/runtime.ts","webpack://__ember_auto_import__/node_modules/query-string/node_modules/decode-uri-component/index.js","webpack://__ember_auto_import__/node_modules/filter-obj/index.js","webpack://__ember_auto_import__/node_modules/split-on-first/index.js","webpack://__ember_auto_import__/node_modules/query-string/base.js"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport { assert } from '@ember/debug';\nimport { hash } from '@ember/helper';\nimport Component from '@glimmer/component';\ninterface PaginationDataSignature {\n    Args: {\n        currentPage: number;\n        itemsPerPage: number;\n        pageMargins?: number;\n        pageRange?: number;\n        totalItems: number;\n    };\n    Blocks: {\n        default: [{\n                activeItems: number;\n                allPages: number[];\n                currentPage: number;\n                endMarginPages: number[] | null;\n                firstActiveItem: number;\n                isFirstPage: boolean;\n                isLastPage: boolean;\n                itemsPerPage: number;\n                lastActiveItem: number;\n                lastPage: number;\n                nextPage: number | null;\n                pageMargins: number;\n                pageRange: number | null;\n                pageRangePages: number[] | null;\n                previousPage: number | null;\n                shouldShowLowerBreak: boolean;\n                shouldShowUpperBreak: boolean;\n                startMarginPages: number[] | null;\n                totalItems: number;\n                totalPages: number;\n            }];\n    };\n}\nconst DISABLED = null;\nconst FIRST_PAGE = 1;\nexport default class PaginationData extends Component<PaginationDataSignature> {\n    /**\n   * Argument getters\n   */ get currentPage() {\n        assert(`@currentPage is required and must be a number. You provided \\`${this.args.currentPage}\\`.`, typeof this.args.currentPage === 'number');\n        assert(`@currentPage must be a value between \\`${FIRST_PAGE}\\` and \\`${this.lastPage}\\`. You provided \\`${this.args.currentPage}\\`.`, this.args.currentPage >= FIRST_PAGE && this.args.currentPage <= this.lastPage);\n        return this.args.currentPage;\n    }\n    get itemsPerPage() {\n        assert(`@itemsPerPage is required and must be a number. You provided \\`${this.args.itemsPerPage}\\`.`, typeof this.args.itemsPerPage === 'number');\n        return this.args.itemsPerPage;\n    }\n    get pageMargins() {\n        if (typeof this.args.pageMargins !== 'number') {\n            return 1;\n        }\n        assert(`@pageMargins must be a number higher than \\`0\\`. You provided \\`${this.args.pageMargins}\\`.`, this.args.pageMargins > 0);\n        return this.args.pageMargins;\n    }\n    get pageRange() {\n        if (typeof this.args.pageRange !== 'number') {\n            return null;\n        }\n        assert(`@pageRange must be an uneven number to make sure that the active page is always center aligned. You provided \\`${this.args.pageRange}\\`.`, this.args.pageRange % 2 !== 0);\n        return this.args.pageRange;\n    }\n    get totalItems() {\n        assert(`@totalItems is required and must be a number. You provided \\`${this.args.totalItems}\\`.`, typeof this.args.totalItems === 'number');\n        return this.args.totalItems;\n    }\n    /**\n   * State getters\n   */ get _currentPage() {\n        return clamp(this.currentPage, FIRST_PAGE, this.lastPage);\n    }\n    get activeItems() {\n        if (this.itemsPerPage * this._currentPage > this.totalItems) {\n            return this.totalItems % this.itemsPerPage;\n        }\n        return this.itemsPerPage;\n    }\n    get allPages() {\n        return range(FIRST_PAGE, this.lastPage);\n    }\n    get endMarginPages() {\n        if (this.pageRange === null) {\n            return null;\n        }\n        if (this.totalPages < this.pageMarginsThreshold) {\n            return [];\n        }\n        return range(this.pageRangeUpperLimit + 1, this.totalPages);\n    }\n    get firstActiveItem() {\n        if (this.totalItems > 0) {\n            return this._currentPage * this.itemsPerPage - this.itemsPerPage + 1;\n        }\n        return 0;\n    }\n    get isFirstPage() {\n        return this._currentPage === FIRST_PAGE;\n    }\n    get isLastPage() {\n        return this._currentPage === this.lastPage;\n    }\n    get lastActiveItem() {\n        if (this.totalItems > 0) {\n            return this.firstActiveItem + this.activeItems - 1;\n        }\n        return 0;\n    }\n    get lastPage() {\n        return this.totalPages;\n    }\n    get nextPage() {\n        return this.isLastPage ? DISABLED : this._currentPage + 1;\n    }\n    get pageMarginsThreshold() {\n        return (this.pageRange || 0) + this.pageMargins * 2;\n    }\n    get pageRangeLowerLimit() {\n        return this.pageMargins + 1;\n    }\n    get pageRangePages() {\n        if (this.pageRange === null) {\n            return null;\n        }\n        if (this.totalPages < this.pageMarginsThreshold) {\n            return this.allPages;\n        }\n        const pageRangeOffset1 = Math.floor(this.pageRange / 2);\n        let pageRangeStart1 = this._currentPage - pageRangeOffset1;\n        let pageRangeEnd1 = this._currentPage + pageRangeOffset1;\n        if (pageRangeStart1 < this.pageRangeLowerLimit) {\n            pageRangeStart1 = this.pageRangeLowerLimit;\n            pageRangeEnd1 = pageRangeStart1 + this.pageRange - 1;\n        }\n        if (pageRangeEnd1 > this.pageRangeUpperLimit) {\n            pageRangeStart1 = this.pageRangeUpperLimit - this.pageRange + 1;\n            pageRangeEnd1 = this.pageRangeUpperLimit;\n        }\n        return range(pageRangeStart1, pageRangeEnd1);\n    }\n    get pageRangeUpperLimit() {\n        return this.totalPages - this.pageMargins;\n    }\n    get previousPage() {\n        return this.isFirstPage ? DISABLED : this._currentPage - 1;\n    }\n    get shouldShowLowerBreak() {\n        if (this.pageRange === null) {\n            return false;\n        }\n        if (this.totalPages < this.pageMarginsThreshold) {\n            return false;\n        }\n        return (Array.isArray(this.pageRangePages) && this.pageRangePages.length > 0 && this.pageRangePages[0] !== this.pageRangeLowerLimit);\n    }\n    get shouldShowUpperBreak() {\n        if (this.pageRange === null) {\n            return false;\n        }\n        if (this.totalPages < this.pageMarginsThreshold) {\n            return false;\n        }\n        return (Array.isArray(this.pageRangePages) && this.pageRangePages.length > 0 && this.pageRangePages[this.pageRangePages.length - 1] !== this.pageRangeUpperLimit);\n    }\n    get startMarginPages() {\n        if (this.pageRange === null) {\n            return null;\n        }\n        if (this.totalPages < this.pageMarginsThreshold) {\n            return [];\n        }\n        return range(FIRST_PAGE, this.pageMargins);\n    }\n    get totalPages() {\n        const totalPages1 = Math.ceil(this.totalItems / this.itemsPerPage);\n        return isNaN(totalPages1) || totalPages1 === 0 ? 1 : totalPages1;\n    }\n    static{\n        template(`\n    {{yield\n      (hash\n        activeItems=this.activeItems\n        allPages=this.allPages\n        currentPage=this._currentPage\n        endMarginPages=this.endMarginPages\n        firstActiveItem=this.firstActiveItem\n        isFirstPage=this.isFirstPage\n        isLastPage=this.isLastPage\n        itemsPerPage=this.itemsPerPage\n        lastActiveItem=this.lastActiveItem\n        lastPage=this.lastPage\n        nextPage=this.nextPage\n        pageMargins=this.pageMargins\n        pageRange=this.pageRange\n        pageRangePages=this.pageRangePages\n        previousPage=this.previousPage\n        shouldShowLowerBreak=this.shouldShowLowerBreak\n        shouldShowUpperBreak=this.shouldShowUpperBreak\n        startMarginPages=this.startMarginPages\n        totalItems=this.totalItems\n        totalPages=this.totalPages\n      )\n    }}\n  `, {\n            component: this,\n            eval () {\n                return eval(arguments[0]);\n            }\n        });\n    }\n}\nfunction clamp(number1: number, min1: number, max1: number) {\n    return Math.min(Math.max(number1, min1), max1);\n}\nfunction range(start1: number, end1: number) {\n    return new Array(end1 - start1 + 1).fill(undefined).map((_1, i1)=>i1 + start1);\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9iZXJ0ZGVibG9jay9Db2RlL29wZW4tc291cmNlL3NvdXJjZS9AYmFnYWFyL2VtYmVyLXBhZ2luYXRpb24vZW1iZXItcGFnaW5hdGlvbi9zcmMvY29tcG9uZW50cy9wYWdpbmF0aW9uLWRhdGEuZ3RzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGFzc2VydCB9IGZyb20gJ0BlbWJlci9kZWJ1Zyc7XG5pbXBvcnQgeyBoYXNoIH0gZnJvbSAnQGVtYmVyL2hlbHBlcic7XG5pbXBvcnQgQ29tcG9uZW50IGZyb20gJ0BnbGltbWVyL2NvbXBvbmVudCc7XG5cbmludGVyZmFjZSBQYWdpbmF0aW9uRGF0YVNpZ25hdHVyZSB7XG4gIEFyZ3M6IHtcbiAgICBjdXJyZW50UGFnZTogbnVtYmVyO1xuICAgIGl0ZW1zUGVyUGFnZTogbnVtYmVyO1xuICAgIHBhZ2VNYXJnaW5zPzogbnVtYmVyO1xuICAgIHBhZ2VSYW5nZT86IG51bWJlcjtcbiAgICB0b3RhbEl0ZW1zOiBudW1iZXI7XG4gIH07XG4gIEJsb2Nrczoge1xuICAgIGRlZmF1bHQ6IFtcbiAgICAgIHtcbiAgICAgICAgYWN0aXZlSXRlbXM6IG51bWJlcjtcbiAgICAgICAgYWxsUGFnZXM6IG51bWJlcltdO1xuICAgICAgICBjdXJyZW50UGFnZTogbnVtYmVyO1xuICAgICAgICBlbmRNYXJnaW5QYWdlczogbnVtYmVy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TTtJQUN2QyxPQUFPLElBQUksTUFBTSxPQUFNLFNBQVEsR0FBRyxJQUFJLENBQUMsV0FBVyxHQUFHLENBQUMsQ0FBQyxJQUFHLEtBQU0sS0FBSTtBQUN0RSJ9","import EmberObject from '@ember/object';\nimport * as s from '@ember/service';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nimport { a as decorateFieldV2, i as initializeDeferredDecorator } from \"./runtime-BPCpkOf1-BKOwiRJp.js\";\nimport Mixin from '@ember/object/mixin';\nimport { camelize, pluralize } from '@warp-drive/utilities/string';\n\n/*\n The structure of this file is such because typing Mixins is hard. Here we've structured it in\n such a way as to maximize the type information that a consumer can utilize. There are simpler\n ways to type a mixin but we would not be able to provide the nice overload signature for buildURL\n*/\n// the interface must fully declare the function signatures that the individual functions\n// will also declare. If instead we try to keep them in sync by doing something like\n// `interface BuildURLMixin { buildURL: typeof buildURL }`\n// then an extending class overwriting one of the methods will break because typescript\n// thinks it is a switch from an instance prop (that is a method) to an instance method.\n\n// prevents the final constructed object from needing to add\n// host and namespace which are provided by the final consuming\n// class to the prototype which can result in overwrite errors\n\n/**\n  ## Using BuildURLMixin\n\n  To use URL building, include the mixin when extending an adapter, and call `buildURL` where needed.\n  The default behaviour is designed for RESTAdapter.\n\n  ### Example\n\n  ```javascript\n  import Adapter, { BuildURLMixin } from '@ember-data/adapter';\n\n  export default class ApplicationAdapter extends Adapter.extend(BuildURLMixin) {\n    findRecord(store, type, id, snapshot) {\n      var url = this.buildURL(type.modelName, id, snapshot, 'findRecord');\n      return this.ajax(url, 'GET');\n    }\n  }\n  ```\n\n  ### Attributes\n\n  The `host` and `namespace` attributes will be used if defined, and are optional.\n\n  @class BuildURLMixin\n  @public\n*/\n/**\n    Builds a URL for a given type and optional ID.\n\n    By default, it pluralizes the type's name (for example, 'post'\n    becomes 'posts' and 'person' becomes 'people'). To override the\n    pluralization see [pathForType](./pathForType?anchor=pathForType).\n\n    If an ID is specified, it adds the ID to the path generated\n    for the type, separated by a `/`.\n\n    When called by `RESTAdapter.findMany()` the `id` and `snapshot` parameters\n    will be arrays of ids and snapshots.\n\n    @public\n    @param {String} modelName\n    @param {(String|Array|Object)} id single id or array of ids or query\n    @param {(Snapshot|SnapshotRecordArray)} snapshot single snapshot or array of snapshots\n    @param {String} requestType\n    @param {Object} query object of query parameters to send for query requests.\n    @return {String} url\n  */\n\nfunction buildURL(modelName, id, snapshot, requestType, query) {\n  /*\n      Switch statements in typescript don't currently narrow even when the function is implemented\n      with overloads.\n       We still extract this to stand alone so that we can provide nice overloads for calling signatures,\n      but we will still require all of this casting (or a ridiculous number of assertsthat narrow it down\n      for us).\n  */\n  switch (requestType) {\n    case 'findRecord':\n      return this.urlForFindRecord(id, modelName, snapshot);\n    case 'findAll':\n      return this.urlForFindAll(modelName, snapshot);\n    case 'query':\n      return this.urlForQuery(query || {}, modelName);\n    case 'queryRecord':\n      return this.urlForQueryRecord(query || {}, modelName);\n    case 'findMany':\n      return this.urlForFindMany(id, modelName, snapshot);\n    case 'findHasMany':\n      return this.urlForFindHasMany(id, modelName, snapshot);\n    case 'findBelongsTo':\n      return this.urlForFindBelongsTo(id, modelName, snapshot);\n    case 'createRecord':\n      return this.urlForCreateRecord(modelName, snapshot);\n    case 'updateRecord':\n      return this.urlForUpdateRecord(id, modelName, snapshot);\n    case 'deleteRecord':\n      return this.urlForDeleteRecord(id, modelName, snapshot);\n    default:\n      // this is the 'never' case but someone may call `buildURL` manually so\n      // we try to do something for them.\n      return this._buildURL(modelName, id);\n  }\n}\n\n/**\n    @private\n    @param {String} modelName\n    @param {String} id\n    @return {String} url\n  */\nfunction _buildURL(modelName, id) {\n  let path;\n  const url = [];\n  const {\n    host\n  } = this;\n  const prefix = this.urlPrefix();\n  if (modelName) {\n    path = this.pathForType(modelName);\n    if (path) {\n      url.push(path);\n    }\n  }\n  if (id) {\n    url.push(encodeURIComponent(id));\n  }\n  if (prefix) {\n    url.unshift(prefix);\n  }\n  let urlString = url.join('/');\n  if (!host && urlString && urlString.charAt(0) !== '/') {\n    urlString = '/' + urlString;\n  }\n  return urlString;\n}\n\n/**\n   Builds a URL for a `store.findRecord(type, id)` call.\n\n   Example:\n\n   ```js [app/adapters/user.js]\n   import { JSONAPIAdapter } from '@warp-drive/legacy/adapter/json-api';\n\n   export default class ApplicationAdapter extends JSONAPIAdapter {\n     urlForFindRecord(id, modelName, snapshot) {\n       let baseUrl = this.buildURL(modelName, id, snapshot);\n       return `${baseUrl}/users/${snapshot.adapterOptions.user_id}/playlists/${id}`;\n     }\n   }\n   ```\n\n   @public\n   @param {String} id\n   @param {String} modelName\n   @param {Snapshot} snapshot\n   @return {String} url\n\n   */\nfunction urlForFindRecord(id, modelName, snapshot) {\n  return this._buildURL(modelName, id);\n}\n\n/**\n   Builds a URL for a `store.findAll(type)` call.\n\n   Example:\n\n   ```js [app/adapters/comment.js]\n   import { JSONAPIAdapter } from '@warp-drive/legacy/adapter/json-api';\n\n   export default class ApplicationAdapter extends JSONAPIAdapter {\n     urlForFindAll(modelName, snapshot) {\n       let baseUrl = this.buildURL(modelName);\n       return `${baseUrl}/data/comments.json`;\n     }\n   }\n   ```\n\n    @public\n   @param {String} modelName\n   @param {SnapshotRecordArray} snapshot\n   @return {String} url\n   */\nfunction urlForFindAll(modelName, snapshots) {\n  return this._buildURL(modelName);\n}\n\n/**\n   Builds a URL for a `store.query(type, query)` call.\n\n   Example:\n\n   ```js [app/adapters/application.js]\n   import { RESTAdapter } from '@warp-drive/legacy/adapter/rest';\n\n   export default class ApplicationAdapter extends RESTAdapter {\n     host = 'https://api.github.com';\n     urlForQuery (query, modelName) {\n       switch(modelName) {\n         case 'repo':\n           return `https://api.github.com/orgs/${query.orgId}/repos`;\n         default:\n           return super.urlForQuery(...arguments);\n       }\n     }\n   }\n   ```\n\n    @public\n   @param {Object} query\n   @param {String} modelName\n   @return {String} url\n   */\nfunction urlForQuery(query, modelName) {\n  return this._buildURL(modelName);\n}\n\n/**\n   Builds a URL for a `store.queryRecord(type, query)` call.\n\n   Example:\n\n   ```js [app/adapters/application.js]\n   import { RESTAdapter } from '@warp-drive/legacy/adapter/rest';\n\n   export default class ApplicationAdapter extends RESTAdapter {\n     urlForQueryRecord({ slug }, modelName) {\n       let baseUrl = this.buildURL();\n       return `${baseUrl}/${encodeURIComponent(slug)}`;\n     }\n   }\n   ```\n\n    @public\n   @param {Object} query\n   @param {String} modelName\n   @return {String} url\n   */\nfunction urlForQueryRecord(query, modelName) {\n  return this._buildURL(modelName);\n}\n\n/**\n   Builds a URL for coalescing multiple `store.findRecord(type, id)`\n   records into 1 request when the adapter's `coalesceFindRequests`\n   property is `true`.\n\n   Example:\n\n   ```js [app/adapters/application.js]\n   import { RESTAdapter } from '@warp-drive/legacy/adapter/rest';\n\n   export default class ApplicationAdapter extends RESTAdapter {\n     urlForFindMany(ids, modelName) {\n       let baseUrl = this.buildURL();\n       return `${baseUrl}/coalesce`;\n     }\n   }\n   ```\n\n    @public\n   @param {Array} ids\n   @param {String} modelName\n   @param {Array} snapshots\n   @return {String} url\n   */\nfunction urlForFindMany(ids, modelName, snapshots) {\n  return this._buildURL(modelName);\n}\n\n/**\n   Builds a URL for fetching an async `hasMany` relationship when a URL\n   is not provided by the server.\n\n   Example:\n\n   ```js [app/adapters/application.js]\n   import { JSONAPIAdapter } from '@warp-drive/legacy/adapter/json-api';\n\n   export default class ApplicationAdapter extends JSONAPIAdapter {\n     urlForFindHasMany(id, modelName, snapshot) {\n       let baseUrl = this.buildURL(modelName, id);\n       return `${baseUrl}/relationships`;\n     }\n   }\n   ```\n\n    @public\n   @param {String} id\n   @param {String} modelName\n   @param {Snapshot} snapshot\n   @return {String} url\n   */\nfunction urlForFindHasMany(id, modelName, snapshot) {\n  return this._buildURL(modelName, id);\n}\n\n/**\n   Builds a URL for fetching an async `belongsTo` relationship when a url\n   is not provided by the server.\n\n   Example:\n\n   ```js [app/adapters/application.js]\n   import { JSONAPIAdapter } from '@warp-drive/legacy/adapter/json-api';\n\n   export default class ApplicationAdapter extends JSONAPIAdapter {\n     urlForFindBelongsTo(id, modelName, snapshot) {\n       let baseUrl = this.buildURL(modelName, id);\n       return `${baseUrl}/relationships`;\n     }\n   }\n   ```\n\n    @public\n   @param {String} id\n   @param {String} modelName\n   @param {Snapshot} snapshot\n   @return {String} url\n   */\nfunction urlForFindBelongsTo(id, modelName, snapshot) {\n  return this._buildURL(modelName, id);\n}\n\n/**\n   Builds a URL for a `record.save()` call when the record was created\n   locally using `store.createRecord()`.\n\n   Example:\n\n   ```js [app/adapters/application.js]\n   import { RESTAdapter } from '@warp-drive/legacy/adapter/rest';\n\n   export default class ApplicationAdapter extends RESTAdapter {\n     urlForCreateRecord(modelName, snapshot) {\n       return super.urlForCreateRecord(...arguments) + '/new';\n     }\n   }\n   ```\n\n    @public\n   @param {String} modelName\n   @param {Snapshot} snapshot\n   @return {String} url\n   */\nfunction urlForCreateRecord(modelName, snapshot) {\n  return this._buildURL(modelName);\n}\n\n/**\n   Builds a URL for a `record.save()` call when the record has been updated locally.\n\n   Example:\n\n   ```js [app/adapters/application.js]\n   import { RESTAdapter } from '@warp-drive/legacy/adapter/rest';\n\n   export default class ApplicationAdapter extends RESTAdapter {\n     urlForUpdateRecord(id, modelName, snapshot) {\n       return `/${id}/feed?access_token=${snapshot.adapterOptions.token}`;\n     }\n   }\n   ```\n\n    @public\n   @param {String} id\n   @param {String} modelName\n   @param {Snapshot} snapshot\n   @return {String} url\n   */\nfunction urlForUpdateRecord(id, modelName, snapshot) {\n  return this._buildURL(modelName, id);\n}\n\n/**\n   Builds a URL for a `record.save()` call when the record has been deleted locally.\n\n   Example:\n\n   ```js [app/adapters/application.js]\n   import { RESTAdapter } from '@warp-drive/legacy/adapter/rest';\n\n   export default class ApplicationAdapter extends RESTAdapter {\n     urlForDeleteRecord(id, modelName, snapshot) {\n       return super.urlForDeleteRecord(...arguments) + '/destroy';\n     }\n   }\n   ```\n\n    @public\n   @param {String} id\n   @param {String} modelName\n   @param {Snapshot} snapshot\n   @return {String} url\n   */\nfunction urlForDeleteRecord(id, modelName, snapshot) {\n  return this._buildURL(modelName, id);\n}\n\n/**\n    @private\n    @param {String} path\n    @param {String} parentURL\n    @return {String} urlPrefix\n  */\nfunction urlPrefix(path, parentURL) {\n  const {\n    namespace\n  } = this;\n  let {\n    host\n  } = this;\n  if (!host || host === '/') {\n    host = '';\n  }\n  if (path) {\n    // Protocol relative url\n    if (/^\\/\\//.test(path) || /http(s)?:\\/\\//.test(path)) {\n      // Do nothing, the full host is already included.\n      return path;\n\n      // Absolute path\n    } else if (path.charAt(0) === '/') {\n      return `${host}${path}`;\n      // Relative path\n    } else {\n      return `${parentURL}/${path}`;\n    }\n  }\n\n  // No path provided\n  const url = [];\n  if (host) {\n    url.push(host);\n  }\n  if (namespace) {\n    url.push(namespace);\n  }\n  return url.join('/');\n}\n\n/**\n    Determines the pathname for a given type.\n\n    By default, it pluralizes the type's name (for example,\n    'post' becomes 'posts' and 'person' becomes 'people').\n\n    ### Pathname customization\n\n    For example, if you have an object `LineItem` with an\n    endpoint of `/line_items/`.\n\n    ```js [app/adapters/application.js]\n    import { RESTAdapter } from '@warp-drive/legacy/adapter/rest';\n    import { undesrcore, pluralize } from '<app-name>/utils/string-utils';\n\n    export default class ApplicationAdapter extends RESTAdapter {\n      pathForType(modelName) {\n        return pluralize(underscore(modelName));\n      }\n    }\n    ```\n\n    @public\n    @param {String} modelName\n    @return {String} path\n  **/\nfunction pathForType(modelName) {\n  const camelized = camelize(modelName);\n  return pluralize(camelized);\n}\n\n// we build it this way vs casting to BuildURLMixin so that any\n// changes to the interface surface as errors here.\nconst mixinProps = {\n  buildURL,\n  _buildURL,\n  urlForFindRecord,\n  urlForFindAll,\n  urlForQueryRecord,\n  urlForQuery,\n  urlForFindMany,\n  urlForFindHasMany,\n  urlForFindBelongsTo,\n  urlForCreateRecord,\n  urlForDeleteRecord,\n  urlForUpdateRecord,\n  urlPrefix,\n  pathForType\n};\nconst BuildURLMixin = Mixin.create(mixinProps);\n\n/**\n * ## Overview\n *\n * :::danger\n *   ⚠️ **This is LEGACY documentation** for a feature that is no longer encouraged to be used.\n *   If starting a new app or thinking of implementing a new adapter, consider writing a\n *   {@link Handler} instead to be used with the {@link RequestManager}\n * ::::\n *\n * In order to properly fetch and update data, @warp-drive/legacy\n * needs to understand how to connect to your API.\n *\n * `Adapters` accept various kinds of requests from the store\n * and manage fulfillment of the request from your API.\n *\n * ### Request Flow\n *\n * When the store decides it needs to issue a request it uses the following flow to manage the request and process the data.\n *\n * - find the appropriate adapter\n * - issue the request to the adapter\n * - await the adapter's response\n *   - if an error occurs reject with the error\n *   - if no error\n *      - if there is response data\n *      - pass the response data to the appropriate serializer\n *      - update the cache using the JSON:API formatted data from the serializer's response\n *    - return the primary record(s) associated with the request\n *\n * ### Request Errors\n *\n * When a request errors and your adapter does not have the ability to recover from the error,\n * you may either reject the promise returned by your adapter method with the error or simply\n * throw the error.\n *\n * If the request was for a `createRecord` `updateRecord` or `deleteRecord` special rules\n * apply to how this error will affect the state of the store and additional properties on\n * the `Error` class may be used. See the documentation for these methods in\n * {@link MinimumAdapterInterface} for more information.\n *\n * ### Implementing an Adapter\n *\n * There are seven required adapter methods, one for each of\n * the primary request types that @warp-drive/legacy issues.\n *\n * They are:\n *\n *  - findRecord\n *  - findAll\n *  - queryRecord\n *  - query\n *  - createRecord\n *  - updateRecord\n *  - deleteRecord\n *\n * Each of these request types has a matching store method that triggers it\n * and matching `requestType` that is passed to the serializer's\n * `normalizeResponse` method.\n *\n * If your app only reads data but never writes data, it is not necessary\n * to implement the methods for create, update, and delete. This extends to\n * all of the store's find methods with the exception of `findRecord` (`findAll`,\n * `query`, `queryRecord`): if you do not use the store method in your app then\n * your Adapter does not need the method.\n *\n * ```ts\n * async function fetchData(url, options = {}) {\n *   let response = await fetch(url, options);\n *   return response.toJSON();\n * }\n *\n * export default class ApplicationAdapter {\n *   findRecord(_, { modelName }, id) {\n *     return fetchData(`./${modelName}s/${id}`);\n *   }\n *\n *   static create() {\n *     return new this();\n *   }\n * }\n * ```\n *\n * ### Adapter Resolution\n *\n * `store.adapterFor(name)` will lookup adapters defined in `app/adapters/` and\n * return an instance.\n *\n * `adapterFor` first attempts to find an adapter with an exact match on `name`,\n  then falls back to checking for the presence of an adapter named `application`.\n\n  If no adapter is found, an error will be thrown.\n\n  ```ts\n  store.adapterFor('author');\n\n  // lookup paths (in order) =>\n  //   app/adapters/author.js\n  //   app/adapters/application.js\n  ```\n\n  Most requests in @warp-drive/legacy are made with respect to a particular `type` (or `modelName`)\n  (e.g., \"get me the full collection of **books**\" or \"get me the **employee** whose id is 37\"). We\n  refer to this as the **primary** resource `type`.\n\n  `adapterFor` is used by the store to find an adapter with a name matching that of the primary\n  resource `type` for the request, which then falls back to the `application` adapter.\n\n  It is recommended that applications define only a single `application` adapter and serializer\n  where possible, only implementing an adapter specific to the `type` when absolutely necessary.\n\n  If you need to support multiple API versions for the same type, the per-type strategy for\n  defining adapters might not be adequate.\n\n  If you have multiple APIs or multiple API versions and the single application adapter and per-type\n  strategy does not suite your needs, one strategy is to write an `application` adapter and serializer\n  that make use of `options` to specify the desired format when making a request, then forwards to the\n  request to the desired adapter or serializer as needed.\n\n  ```js [app/adapters/application.js]\n  export default class Adapter extends EmberObject {\n    findRecord(store, schema, id, snapshot) {\n      let { apiVersion } = snapshot.adapterOptions;\n      return this.adapterFor(`-api-${apiVersion}`).findRecord(store, schema, id, snapshot);\n    }\n  }\n  ```\n\n  ### Overriding `Store.adapterFor`\n\n  ```js\n  import Store from '@ember-data/store';\n  import Adapter from '@ember-data/adapter/json-api';\n\n  class extends Store {\n    #adapter = new Adapter();\n\n    adapterFor() {\n      return this.#adapter;\n    }\n  }\n  ```\n\n\nNote: If you are using Ember and would like to make use of `service` injections in your adapter, you will want to additionally `setOwner` for the Adapter.\n\n  ```js\n  import Store from '@ember-data/store';\n  import Adapter from '@ember-data/adapter/json-api';\n  import { getOwner, setOwner } from '@ember/owner';\n\n  class extends Store {\n    #adapter = null;\n\n    adapterFor() {\n      let adapter = this.#adapter;\n      if (!adapter) {\n        const owner = getOwner(this);\n        adapter = new Adapter();\n        setOwner(adapter, owner);\n        this.#adapter = adapter;\n      }\n\n      return adapter;\n    }\n  }\n  ```\n\nBy default when using with Ember you only need to implement this hook if you want your adapter usage to be statically analyzeable. *Ember***Data** will attempt to resolve adapters using Ember's resolver. To provide a single Adapter for your application like the above you would provide it as the default export of the file `app/adapters/application.{js/ts}`\n\n  ### Using an Adapter\n\n  Any adapter in `app/adapters/` can be looked up by `name` using `store.adapterFor(name)`.\n\n  ### Default Adapters\n\n  Applications whose API's structure endpoint URLs *very close to* or *exactly* the **REST**\n  or **JSON:API** convention, the `@ember-data/adapter` package contains implementations\n  these applications can extend.\n\n  Many applications will find writing their own adapter to be allow greater flexibility,\n  customization, and maintenance than attempting to override methods in these adapters.\n\n  @module\n*/\n\nconst service = s.service ?? s.inject;\n/**\n  An adapter is an object that receives requests from a store and\n  translates them into the appropriate action to take against your\n  persistence layer. The persistence layer is usually an HTTP API but\n  may be anything, such as the browser's local storage. Typically the\n  adapter is not invoked directly instead its functionality is accessed\n  through the `store`.\n\n  > ⚠️ CAUTION you likely want the docs for {@link MinimumAdapterInterface}\n  > as extending this abstract class is unnecessary.\n\n  ### Creating an Adapter\n\n  Create a new subclass of `Adapter` in the `app/adapters` folder:\n\n  ```js [app/adapters/application.js]\n  import { Adapter } from '@warp-drive/legacy/adapter';\n\n  export default class extends Adapter {\n    // ...your code here\n  }\n  ```\n\n  Model-specific adapters can be created by putting your adapter\n  class in an `app/adapters/` + `model-name` + `.js` file of the application.\n\n  ```js [app/adapters/post.js]\n  import { Adapter } from '@warp-drive/legacy/adapter';\n\n  export default class extends Adapter {\n    // ...Post-specific adapter code goes here\n  }\n  ```\n\n  `Adapter` is an abstract base class that you should override in your\n  application to customize it for your backend. The minimum set of methods\n  that you should implement is:\n\n    * `findRecord()`\n    * `createRecord()`\n    * `updateRecord()`\n    * `deleteRecord()`\n    * `findAll()`\n    * `query()`\n\n  To improve the network performance of your application, you can optimize\n  your adapter by overriding these lower-level methods:\n\n    * `findMany()`\n\n\n  For an example of the implementation, see `RESTAdapter`, the\n  included REST adapter.\n\n  @public\n*/\nclass Adapter extends EmberObject {\n  static {\n    decorateFieldV2(this.prototype, \"store\", [service]);\n  }\n  #store = (initializeDeferredDecorator(this, \"store\"), void 0);\n  /**\n    The `findRecord()` method is invoked when the store is asked for a record that\n    has not previously been loaded. In response to `findRecord()` being called, you\n    should query your persistence layer for a record with the given ID. The `findRecord`\n    method should return a promise that will resolve to a JavaScript object that will be\n    normalized by the serializer.\n     Here is an example of the `findRecord` implementation:\n     ```js [app/adapters/application.js]\n    import { Adapter } from '@warp-drive/legacy/adapter';\n    import RSVP from 'RSVP';\n    import $ from 'jquery';\n     export default class ApplicationAdapter extends Adapter {\n      findRecord(store, type, id, snapshot) {\n        return new RSVP.Promise(function(resolve, reject) {\n          $.getJSON(`/${type.modelName}/${id}`).then(function(data) {\n            resolve(data);\n          }, function(jqXHR) {\n            reject(jqXHR);\n          });\n        });\n      }\n    }\n    ```\n     @public\n  */\n  // @ts-expect-error\n  findRecord(store, type, id, snapshot) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      throw new Error('You subclassed the Adapter class but missing a findRecord override');\n    }\n  }\n\n  /**\n    The `findAll()` method is used to retrieve all records for a given type.\n     Example\n     ```js [app/adapters/application.js]\n    import { Adapter } from '@warp-drive/legacy/adapter';\n    import RSVP from 'RSVP';\n    import $ from 'jquery';\n     export default class ApplicationAdapter extends Adapter {\n      findAll(store, type) {\n        return new RSVP.Promise(function(resolve, reject) {\n          $.getJSON(`/${type.modelName}`).then(function(data) {\n            resolve(data);\n          }, function(jqXHR) {\n            reject(jqXHR);\n          });\n        });\n      }\n    }\n    ```\n     @param neverSet a value is never provided to this argument\n    @public\n  */\n  findAll(store, type, neverSet, snapshotRecordArray) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      throw new Error('You subclassed the Adapter class but missing a findAll override');\n    }\n  }\n\n  /**\n    This method is called when you call `query` on the store.\n     Example\n     ```js [app/adapters/application.js]\n    import { Adapter } from '@warp-drive/legacy/adapter';\n    import RSVP from 'RSVP';\n    import $ from 'jquery';\n     export default class ApplicationAdapter extends Adapter {\n      query(store, type, query) {\n        return new RSVP.Promise(function(resolve, reject) {\n          $.getJSON(`/${type.modelName}`, query).then(function(data) {\n            resolve(data);\n          }, function(jqXHR) {\n            reject(jqXHR);\n          });\n        });\n      }\n    }\n    ```\n     @public\n  */\n  // @ts-expect-error\n  query(store, type, query) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      throw new Error('You subclassed the Adapter class but missing a query override');\n    }\n  }\n\n  /**\n    The `queryRecord()` method is invoked when the store is asked for a single\n    record through a query object.\n     In response to `queryRecord()` being called, you should always fetch fresh\n    data. Once found, you can asynchronously call the store's `push()` method\n    to push the record into the store.\n     Here is an example `queryRecord` implementation:\n     Example\n     ```js [app/adapters/application.js]\n    import  { Adapter, BuildURLMixin } from '@warp-drive/legacy/adapter';\n     export default class ApplicationAdapter extends Adapter.extend(BuildURLMixin) {\n      queryRecord(store, type, query) {\n        return fetch(`/${type.modelName}`, { body: JSON.stringify(query) })\n          .then((response) => response.json());\n      }\n    }\n    ```\n     @public\n  */\n  queryRecord(store, type, query, adapterOptions) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      throw new Error('You subclassed the Adapter class but missing a queryRecord override');\n    }\n  }\n\n  /**\n    If the globally unique IDs for your records should be generated on the client,\n    implement the `generateIdForRecord()` method. This method will be invoked\n    each time you create a new record, and the value returned from it will be\n    assigned to the record's `primaryKey`.\n     Most traditional REST-like HTTP APIs will not use this method. Instead, the ID\n    of the record will be set by the server, and your adapter will update the store\n    with the new ID when it calls `didCreateRecord()`. Only implement this method if\n    you intend to generate record IDs on the client-side.\n     The `generateIdForRecord()` method will be invoked with the requesting store as\n    the first parameter and the newly created record as the second parameter:\n     ```javascript\n    import { Adapter } from '@warp-drive/legacy/adapter';\n    import { v4 } from 'uuid';\n     export default class ApplicationAdapter extends Adapter {\n      generateIdForRecord(store, type, inputProperties) {\n        return v4();\n      }\n    }\n    ```\n     @param {Store} store\n    @param {Model} type   the Model class of the record\n    @param {Object} inputProperties a hash of properties to set on the\n      newly created record.\n    @return {(String|Number)} id\n    @public\n  */\n\n  /**\n    Proxies to the serializer's `serialize` method.\n     Example\n     ```js [app/adapters/application.js]\n    import { Adapter } from '@warp-drive/legacy/adapter';\n     export default class ApplicationAdapter extends Adapter {\n      createRecord(store, type, snapshot) {\n        let data = this.serialize(snapshot, { includeId: true });\n        let url = `/${type.modelName}`;\n         // ...\n      }\n    }\n    ```\n     @public\n  */\n  serialize(snapshot, options) {\n    const serialized = snapshot.serialize(options);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Your adapter's serialize method must return an object, but it returned ${typeof serialized}`);\n      }\n    })(serialized && typeof serialized === 'object') : {};\n    return serialized;\n  }\n\n  /**\n    Implement this method in a subclass to handle the creation of\n    new records.\n     Serializes the record and sends it to the server.\n     Example\n     ```js [app/adapters/application.js]\n    import { Adapter } from '@warp-drive/legacy/adapter';\n    import RSVP from 'RSVP';\n    import $ from 'jquery';\n     export default class ApplicationAdapter extends Adapter {\n      createRecord(store, type, snapshot) {\n        let data = this.serialize(snapshot, { includeId: true });\n         return new RSVP.Promise(function (resolve, reject) {\n          $.ajax({\n            type: 'POST',\n            url: `/${type.modelName}`,\n            dataType: 'json',\n            data: data\n          }).then(function (data) {\n            resolve(data);\n          }, function (jqXHR) {\n            jqXHR.then = null; // tame jQuery's ill mannered promises\n            reject(jqXHR);\n          });\n        });\n      }\n    }\n    ```\n     @public\n  */\n  // @ts-expect-error\n  createRecord(store, type, snapshot) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      throw new Error('You subclassed the Adapter class but missing a createRecord override');\n    }\n  }\n\n  /**\n    Implement this method in a subclass to handle the updating of\n    a record.\n     Serializes the record update and sends it to the server.\n     The updateRecord method is expected to return a promise that will\n    resolve with the serialized record. This allows the backend to\n    inform the WarpDrive store the current state of this record after\n    the update. If it is not possible to return a serialized record\n    the updateRecord promise can also resolve with `undefined` and the\n    WarpDrive store will assume all of the updates were successfully\n    applied on the backend.\n     Example\n     ```js [app/adapters/application.js]\n    import { Adapter } from '@warp-drive/legacy/adapter';\n    import RSVP from 'RSVP';\n    import $ from 'jquery';\n     export default class ApplicationAdapter extends Adapter {\n      updateRecord(store, type, snapshot) {\n        let data = this.serialize(snapshot, { includeId: true });\n        let id = snapshot.id;\n         return new RSVP.Promise(function(resolve, reject) {\n          $.ajax({\n            type: 'PUT',\n            url: `/${type.modelName}/${id}`,\n            dataType: 'json',\n            data: data\n          }).then(function(data) {\n            resolve(data);\n          }, function(jqXHR) {\n            jqXHR.then = null; // tame jQuery's ill mannered promises\n            reject(jqXHR);\n          });\n        });\n      }\n    }\n    ```\n     @param {Store} store\n    @param {Model} type   the Model class of the record\n    @param {Snapshot} snapshot\n    @return {Promise} promise\n    @public\n  */\n  // @ts-expect-error\n  updateRecord(store, type, snapshot) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      throw new Error('You subclassed the Adapter class but missing a updateRecord override');\n    }\n  }\n\n  /**\n    Implement this method in a subclass to handle the deletion of\n    a record.\n     Sends a delete request for the record to the server.\n     Example\n     ```js [app/adapters/application.js]\n    import { Adapter } from '@warp-drive/legacy/adapter';\n    import RSVP from 'RSVP';\n    import $ from 'jquery';\n     export default class ApplicationAdapter extends Adapter {\n      deleteRecord(store, type, snapshot) {\n        let data = this.serialize(snapshot, { includeId: true });\n        let id = snapshot.id;\n         return new RSVP.Promise(function(resolve, reject) {\n          $.ajax({\n            type: 'DELETE',\n            url: `/${type.modelName}/${id}`,\n            dataType: 'json',\n            data: data\n          }).then(function(data) {\n            resolve(data)\n          }, function(jqXHR) {\n            jqXHR.then = null; // tame jQuery's ill mannered promises\n            reject(jqXHR);\n          });\n        });\n      }\n    }\n    ```\n     @param {Store} store\n    @param {Model} type   the Model class of the record\n    @param {Snapshot} snapshot\n    @return {Promise} promise\n    @public\n  */\n  // @ts-expect-error\n  deleteRecord(store, type, snapshot) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      throw new Error('You subclassed the Adapter class but missing a deleteRecord override');\n    }\n  }\n\n  /**\n    By default the store will try to coalesce all `findRecord` calls within the same runloop\n    into as few requests as possible by calling groupRecordsForFindMany and passing it into a findMany call.\n    You can opt out of this behaviour by either not implementing the findMany hook or by setting\n    coalesceFindRequests to false.\n     @property coalesceFindRequests\n    @public\n    @type {Boolean}\n  */\n  get coalesceFindRequests() {\n    const coalesceFindRequests = this._coalesceFindRequests;\n    if (typeof coalesceFindRequests === 'boolean') {\n      return coalesceFindRequests;\n    }\n    return this._coalesceFindRequests = true;\n  }\n  set coalesceFindRequests(value) {\n    this._coalesceFindRequests = value;\n  }\n\n  /**\n    The store will call `findMany` instead of multiple `findRecord`\n    requests to find multiple records at once if coalesceFindRequests\n    is true.\n     ```js [app/adapters/application.js]\n    import { Adapter } from '@warp-drive/legacy/adapter';\n    import RSVP from 'RSVP';\n    import $ from 'jquery';\n     export default class ApplicationAdapter extends Adapter {\n      findMany(store, type, ids, snapshots) {\n        return new RSVP.Promise(function(resolve, reject) {\n          $.ajax({\n            type: 'GET',\n            url: `/${type.modelName}/`,\n            dataType: 'json',\n            data: { filter: { id: ids.join(',') } }\n          }).then(function(data) {\n            resolve(data);\n          }, function(jqXHR) {\n            jqXHR.then = null; // tame jQuery's ill mannered promises\n            reject(jqXHR);\n          });\n        });\n      }\n    }\n    ```\n     @param {Store} store\n    @param {Model} type   the Model class of the records\n    @param {Array}    ids\n    @param {Array} snapshots\n    @return {Promise} promise\n    @public\n  */\n\n  /**\n    Organize records into groups, each of which is to be passed to separate\n    calls to `findMany`.\n     For example, if your API has nested URLs that depend on the parent, you will\n    want to group records by their parent.\n     The default implementation returns the records as a single group.\n     @public\n    @param {Store} store\n    @param {Array} snapshots\n    @return {Array}  an array of arrays of records, each of which is to be\n                      loaded separately by `findMany`.\n  */\n  groupRecordsForFindMany(store, snapshots) {\n    return [snapshots];\n  }\n\n  /**\n    This method is used by the store to determine if the store should\n    reload a record from the adapter when a record is requested by\n    `store.findRecord`.\n     If this method returns `true`, the store will re-fetch a record from\n    the adapter. If this method returns `false`, the store will resolve\n    immediately using the cached record.\n     For example, if you are building an events ticketing system, in which users\n    can only reserve tickets for 20 minutes at a time, and want to ensure that\n    in each route you have data that is no more than 20 minutes old you could\n    write:\n     ```javascript\n    shouldReloadRecord(store, ticketSnapshot) {\n      let lastAccessedAt = ticketSnapshot.attr('lastAccessedAt');\n      let timeDiff = moment().diff(lastAccessedAt, 'minutes');\n       if (timeDiff > 20) {\n        return true;\n      } else {\n        return false;\n      }\n    }\n    ```\n     This method would ensure that whenever you do `store.findRecord('ticket',\n    id)` you will always get a ticket that is no more than 20 minutes old. In\n    case the cached version is more than 20 minutes old, `findRecord` will not\n    resolve until you fetched the latest version.\n     By default this hook returns `false`, as most UIs should not block user\n    interactions while waiting on data update.\n     Note that, with default settings, `shouldBackgroundReloadRecord` will always\n    re-fetch the records in the background even if `shouldReloadRecord` returns\n    `false`. You can override `shouldBackgroundReloadRecord` if this does not\n    suit your use case.\n     @since 1.13.0\n    @param {Store} store\n    @param {Snapshot} snapshot\n    @return {Boolean}\n    @public\n  */\n  shouldReloadRecord(store, snapshot) {\n    return false;\n  }\n\n  /**\n    This method is used by the store to determine if the store should\n    reload all records from the adapter when records are requested by\n    `store.findAll`.\n     If this method returns `true`, the store will re-fetch all records from\n    the adapter. If this method returns `false`, the store will resolve\n    immediately using the cached records.\n     For example, if you are building an events ticketing system, in which users\n    can only reserve tickets for 20 minutes at a time, and want to ensure that\n    in each route you have data that is no more than 20 minutes old you could\n    write:\n     ```javascript\n    shouldReloadAll(store, snapshotArray) {\n      let snapshots = snapshotArray.snapshots();\n       return snapshots.any((ticketSnapshot) => {\n        let lastAccessedAt = ticketSnapshot.attr('lastAccessedAt');\n        let timeDiff = moment().diff(lastAccessedAt, 'minutes');\n         if (timeDiff > 20) {\n          return true;\n        } else {\n          return false;\n        }\n      });\n    }\n    ```\n     This method would ensure that whenever you do `store.findAll('ticket')` you\n    will always get a list of tickets that are no more than 20 minutes old. In\n    case a cached version is more than 20 minutes old, `findAll` will not\n    resolve until you fetched the latest versions.\n     By default, this method returns `true` if the passed `snapshotRecordArray`\n    is empty (meaning that there are no records locally available yet),\n    otherwise, it returns `false`.\n     Note that, with default settings, `shouldBackgroundReloadAll` will always\n    re-fetch all the records in the background even if `shouldReloadAll` returns\n    `false`. You can override `shouldBackgroundReloadAll` if this does not suit\n    your use case.\n     @since 1.13.0\n    @param {Store} store\n    @param {SnapshotRecordArray} snapshotRecordArray\n    @return {Boolean}\n    @public\n  */\n  shouldReloadAll(store, snapshotRecordArray) {\n    return !snapshotRecordArray.length;\n  }\n\n  /**\n    This method is used by the store to determine if the store should\n    reload a record after the `store.findRecord` method resolves a\n    cached record.\n     This method is *only* checked by the store when the store is\n    returning a cached record.\n     If this method returns `true` the store will re-fetch a record from\n    the adapter.\n     For example, if you do not want to fetch complex data over a mobile\n    connection, or if the network is down, you can implement\n    `shouldBackgroundReloadRecord` as follows:\n     ```javascript\n    shouldBackgroundReloadRecord(store, snapshot) {\n      let { downlink, effectiveType } = navigator.connection;\n       return downlink > 0 && effectiveType === '4g';\n    }\n    ```\n     By default, this hook returns `true` so the data for the record is updated\n    in the background.\n     @since 1.13.0\n    @param {Store} store\n    @param {Snapshot} snapshot\n    @return {Boolean}\n    @public\n  */\n  shouldBackgroundReloadRecord(store, snapshot) {\n    return true;\n  }\n\n  /**\n    This method is used by the store to determine if the store should\n    reload a record array after the `store.findAll` method resolves\n    with a cached record array.\n     This method is *only* checked by the store when the store is\n    returning a cached record array.\n     If this method returns `true` the store will re-fetch all records\n    from the adapter.\n     For example, if you do not want to fetch complex data over a mobile\n    connection, or if the network is down, you can implement\n    `shouldBackgroundReloadAll` as follows:\n     ```javascript\n    shouldBackgroundReloadAll(store, snapshotArray) {\n      let { downlink, effectiveType } = navigator.connection;\n       return downlink > 0 && effectiveType === '4g';\n    }\n    ```\n     By default this method returns `true`, indicating that a background reload\n    should always be triggered.\n     @since 1.13.0\n    @param {Store} store\n    @param {SnapshotRecordArray} snapshotRecordArray\n    @return {Boolean}\n    @public\n  */\n  shouldBackgroundReloadAll(store, snapshotRecordArray) {\n    return true;\n  }\n}\nexport { Adapter, BuildURLMixin };","import { warn } from '@ember/debug';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nimport '@warp-drive/core/reactive/-private';\nimport \"./-private-BG3bMiKp.js\";\nimport '@warp-drive/core/store/-private';\nconst newline = /\\r?\\n/;\nfunction parseResponseHeaders(headersString) {\n  const headers = Object.create(null);\n  if (!headersString) {\n    return headers;\n  }\n  const headerPairs = headersString.split(newline);\n  for (let i = 0; i < headerPairs.length; i++) {\n    const header = headerPairs[i];\n    let j = 0;\n    let foundSep = false;\n    for (; j < header.length; j++) {\n      if (header.charCodeAt(j) === 58 /* ':' */) {\n        foundSep = true;\n        break;\n      }\n    }\n    if (foundSep === false) {\n      continue;\n    }\n    const field = header.substring(0, j).trim();\n    const value = header.substring(j + 1, header.length).trim();\n    if (value) {\n      const lowerCasedField = field.toLowerCase();\n      headers[lowerCasedField] = value;\n      headers[field] = value;\n    }\n  }\n  return headers;\n}\n\n/**\n * A utility function that returns a promise that resolves\n * even when the source promise rejects.\n *\n * @internal\n */\nfunction continueOnReject(promise) {\n  return Promise.resolve(promise).catch(e => e);\n}\n\n/*\n * Function that always attempts to parse the response as json, and if an error is thrown,\n * returns `undefined` if the response is successful and has a status code of 204 (No Content),\n * or 205 (Reset Content) or if the request method was 'HEAD', and the plain payload otherwise.\n */\nfunction _determineContent(response, requestData, payload) {\n  let ret = payload;\n  let error = null;\n  if (!response.ok) {\n    return payload;\n  }\n  const status = response.status;\n  const payloadIsEmpty = payload === '' || payload === null;\n  const statusIndicatesEmptyResponse = status === 204 || status === 205 || requestData.method === 'HEAD';\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    if (payloadIsEmpty && !statusIndicatesEmptyResponse) {\n      const message = `The server returned an empty string for ${requestData.method} ${requestData.url}, which cannot be parsed into a valid JSON. Return either null or {}.`;\n      if (payload === '') {\n        warn(message, {\n          id: 'ds.adapter.returned-empty-string-as-JSON'\n        });\n      }\n    }\n  }\n  if (response.ok && (statusIndicatesEmptyResponse || payloadIsEmpty)) {\n    return;\n  }\n  try {\n    ret = JSON.parse(payload);\n  } catch (e) {\n    if (!(e instanceof SyntaxError)) {\n      return e;\n    }\n    e.payload = payload;\n    error = e;\n  }\n  if (error) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      // eslint-disable-next-line no-console\n      console.warn('This response was unable to be parsed as json.', payload);\n    }\n    return error;\n  }\n  return ret;\n}\nfunction determineBodyPromise(response, requestData) {\n  // response.text() may resolve or reject\n  // it is a native promise, may not have finally\n  return continueOnReject(response.text()).then(payload => _determineContent(response, requestData, payload));\n}\nconst RBRACKET = /\\[\\]$/;\nfunction isPlainObject(obj) {\n  return Object.prototype.toString.call(obj) === '[object Object]';\n}\nfunction isPrimitiveArray(obj) {\n  return Array.isArray(obj);\n}\nfunction isParamsArray(obj) {\n  return Array.isArray(obj);\n}\nfunction buildParams(prefix, obj, s) {\n  let i, len, key;\n  if (prefix) {\n    if (isPrimitiveArray(obj)) {\n      for (i = 0, len = obj.length; i < len; i++) {\n        if (RBRACKET.test(prefix)) {\n          add(s, prefix, obj[i]);\n        } else {\n          buildParams(prefix + '[' + (typeof obj[i] === 'object' && obj[i] !== null ? i : '') + ']', obj[i], s);\n        }\n      }\n    } else if (isPlainObject(obj)) {\n      for (key in obj) {\n        buildParams(prefix + '[' + key + ']', obj[key], s);\n      }\n    } else {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`query params cannot be a { name, value } pair if prefix is present`);\n        }\n      })(obj === null || typeof obj !== 'object') : {};\n      add(s, prefix, obj);\n    }\n  } else if (isParamsArray(obj)) {\n    for (i = 0, len = obj.length; i < len; i++) {\n      add(s, obj[i].name, obj[i].value);\n    }\n  } else {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`query params cannot be a string if no prefix is present`);\n      }\n    })(typeof obj !== 'string') : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`query params should not be an array if no prefix is present`);\n      }\n    })(!Array.isArray(obj)) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`query params should not be a { name, value } pair if no prefix is present`);\n      }\n    })(isPlainObject(obj)) : {};\n    for (key in obj) {\n      buildParams(key, obj[key], s);\n    }\n  }\n  return s;\n}\n\n/*\n * Helper function that turns the data/body of a request into a query param string.\n * This is directly copied from jQuery.param.\n */\nfunction serializeQueryParams(queryParamsObject) {\n  return buildParams('', queryParamsObject, []).join('&');\n}\n\n/*\n * Part of the `serializeQueryParams` helper function.\n */\nfunction add(s, k, v) {\n  // Strip out keys with undefined value and replace null values with\n  // empty strings (mimics jQuery.ajax)\n  if (v === undefined) {\n    return;\n  } else if (v === null) {\n    v = '';\n  }\n  v = typeof v === 'function' ? v() : v;\n  s[s.length] = `${encodeURIComponent(k)}=${encodeURIComponent(v)}`;\n}\nlet _fetch = null;\nlet REQUEST = null;\nfunction getFetchFunction() {\n  // return cached fetch function\n  if (_fetch !== null) {\n    return _fetch();\n  }\n\n  // grab browser native fetch if available, or global fetch if otherwise configured\n  if (typeof fetch === 'function') {\n    // fallback to using global fetch\n    _fetch = () => fetch;\n\n    /* global FastBoot */\n    // grab fetch from node-fetch\n  } else if (typeof FastBoot !== 'undefined') {\n    try {\n      const nodeFetch = FastBoot.require('node-fetch');\n      const httpRegex = /^https?:\\/\\//;\n      const protocolRelativeRegex = /^\\/\\//;\n      function parseRequest(request) {\n        if (request === null) {\n          throw new Error(\"Trying to fetch with relative url but the application hasn't finished loading FastBootInfo, see details at https://github.com/ember-cli/ember-fetch#relative-url\");\n        }\n        // Old Prember version is not sending protocol\n        const protocol = request.protocol === 'undefined:' ? 'http:' : request.protocol;\n        return [request.get('host'), protocol];\n      }\n      function buildAbsoluteUrl(url) {\n        if (protocolRelativeRegex.test(url)) {\n          const [host] = parseRequest(REQUEST);\n          url = host + url;\n        } else if (!httpRegex.test(url)) {\n          const [host, protocol] = parseRequest(REQUEST);\n          url = protocol + '//' + host + url;\n        }\n        return url;\n      }\n      function patchedFetch(input, options) {\n        if (input && typeof input === 'object' && 'href' in input) {\n          const url = buildAbsoluteUrl(input.href);\n          const info = Object.assign({}, input, {\n            url\n          });\n          return nodeFetch(info, options);\n        } else if (typeof input === 'string') {\n          const url = buildAbsoluteUrl(input);\n          return nodeFetch(url, options);\n        }\n        return nodeFetch(input, options);\n      }\n      _fetch = () => patchedFetch;\n    } catch {\n      throw new Error(`Unable to create a compatible 'fetch' for FastBoot with node-fetch`);\n    }\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Cannot find a 'fetch' global and did not detect FastBoot.`);\n    }\n  })(_fetch) : {};\n  return _fetch();\n}\nfunction setupFastboot(fastBootRequest) {\n  REQUEST = fastBootRequest;\n}\nfunction serializeIntoHash(store, modelClass, snapshot, options = {\n  includeId: true\n}) {\n  const serializer = store.serializerFor(modelClass.modelName);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Cannot serialize record, no serializer defined`);\n    }\n  })(serializer) : {};\n  if (typeof serializer.serializeIntoHash === 'function') {\n    const data = {};\n    serializer.serializeIntoHash(data, modelClass, snapshot, options);\n    return data;\n  }\n  return serializer.serialize(snapshot, options);\n}\nexport { setupFastboot as a, serializeIntoHash as b, determineBodyPromise as d, getFetchFunction as g, parseResponseHeaders as p, serializeQueryParams as s };","import { getOwner } from '@ember/application';\nimport { warn } from '@ember/debug';\nimport { computed } from '@ember/object';\nimport { Adapter, BuildURLMixin } from '../adapter.js';\nimport { b as serializeIntoHash, d as determineBodyPromise, g as getFetchFunction, s as serializeQueryParams, p as parseResponseHeaders } from \"../serialize-into-hash-DPZYoF-i.js\";\nimport { InvalidError, ServerError, ConflictError, NotFoundError, ForbiddenError, UnauthorizedError, AdapterError, TimeoutError, AbortError } from './error.js';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nimport { d as decorateMethodV2 } from \"../runtime-BPCpkOf1-BKOwiRJp.js\";\n\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-return */\n\nconst AdapterWithBuildURLMixin = Adapter.extend(BuildURLMixin);\n\n/**\n * :::danger\n    ⚠️ **This is LEGACY documentation** for a feature that is no longer encouraged to be used.\n    If starting a new app or thinking of implementing a new adapter, consider writing a\n    {@link Handler} instead to be used with the {@link RequestManager}\n  :::\n\n  The REST adapter allows your store to communicate with an HTTP server by\n  transmitting JSON via XHR.\n\n  This adapter is designed around the idea that the JSON exchanged with\n  the server should be conventional. It builds URLs in a manner that follows\n  the structure of most common REST-style web services.\n\n  ## Success and failure\n\n  The REST adapter will consider a success any response with a status code\n  of the 2xx family (\"Success\"), as well as 304 (\"Not Modified\"). Any other\n  status code will be considered a failure.\n\n  On success, the request promise will be resolved with the full response\n  payload.\n\n  Failed responses with status code 422 (\"Unprocessable Entity\") will be\n  considered \"invalid\". The response will be discarded, except for the\n  `errors` key. The request promise will be rejected with a `InvalidError`.\n  This error object will encapsulate the saved `errors` value.\n\n  Any other status codes will be treated as an \"adapter error\". The request\n  promise will be rejected, similarly to the \"invalid\" case, but with\n  an instance of `AdapterError` instead.\n\n  ## JSON Structure\n\n  The REST adapter expects the JSON returned from your server to follow\n  these conventions.\n\n  ### Object Root\n\n  The JSON payload should be an object that contains the record inside a\n  root property. For example, in response to a `GET` request for\n  `/posts/1`, the JSON should look like this:\n\n  ```js\n  {\n    \"posts\": {\n      \"id\": 1,\n      \"title\": \"I'm Running to Reform the W3C\",\n      \"author\": \"Yehuda Katz\"\n    }\n  }\n  ```\n\n  Similarly, in response to a `GET` request for `/posts`, the JSON should\n  look like this:\n\n  ```js\n  {\n    \"posts\": [\n      {\n        \"id\": 1,\n        \"title\": \"I'm Running to Reform the W3C\",\n        \"author\": \"Yehuda Katz\"\n      },\n      {\n        \"id\": 2,\n        \"title\": \"Rails is omakase\",\n        \"author\": \"D2H\"\n      }\n    ]\n  }\n  ```\n\n  Note that the object root can be pluralized for both a single-object response\n  and an array response: the REST adapter is not strict on this. Further, if the\n  HTTP server responds to a `GET` request to `/posts/1` (e.g. the response to a\n  `findRecord` query) with more than one object in the array, WarpDrive will\n  only display the object with the matching ID.\n\n  ### Conventional Names\n\n  Attribute names in your JSON payload should be the camelCased versions of\n  the attributes in your Ember.js models.\n\n  For example, if you have a `Person` model:\n\n  ```js [app/models/person.js]\n  import { Model, attr } from '@warp-drive/legacy/model';\n\n  export default Model.extend({\n    firstName: attr('string'),\n    lastName: attr('string'),\n    occupation: attr('string')\n  });\n  ```\n\n  The JSON returned should look like this:\n\n  ```js\n  {\n    \"people\": {\n      \"id\": 5,\n      \"firstName\": \"Zaphod\",\n      \"lastName\": \"Beeblebrox\",\n      \"occupation\": \"President\"\n    }\n  }\n  ```\n\n  #### Relationships\n\n  Relationships are usually represented by ids to the record in the\n  relationship. The related records can then be sideloaded in the\n  response under a key for the type.\n\n  ```js\n  {\n    \"posts\": {\n      \"id\": 5,\n      \"title\": \"I'm Running to Reform the W3C\",\n      \"author\": \"Yehuda Katz\",\n      \"comments\": [1, 2]\n    },\n    \"comments\": [{\n      \"id\": 1,\n      \"author\": \"User 1\",\n      \"message\": \"First!\",\n    }, {\n      \"id\": 2,\n      \"author\": \"User 2\",\n      \"message\": \"Good Luck!\",\n    }]\n  }\n  ```\n\n  If the records in the relationship are not known when the response\n  is serialized it's also possible to represent the relationship as a\n  URL using the `links` key in the response. WarpDrive will fetch\n  this URL to resolve the relationship when it is accessed for the\n  first time.\n\n  ```js\n  {\n    \"posts\": {\n      \"id\": 5,\n      \"title\": \"I'm Running to Reform the W3C\",\n      \"author\": \"Yehuda Katz\",\n      \"links\": {\n        \"comments\": \"/posts/5/comments\"\n      }\n    }\n  }\n  ```\n\n  ### Errors\n\n  If a response is considered a failure, the JSON payload is expected to include\n  a top-level key `errors`, detailing any specific issues. For example:\n\n  ```js\n  {\n    \"errors\": {\n      \"msg\": \"Something went wrong\"\n    }\n  }\n  ```\n\n  This adapter does not make any assumptions as to the format of the `errors`\n  object. It will simply be passed along as is, wrapped in an instance\n  of `InvalidError` or `AdapterError`. The serializer can interpret it\n  afterwards.\n\n  ## Customization\n\n  ### Endpoint path customization\n\n  Endpoint paths can be prefixed with a `namespace` by setting the namespace\n  property on the adapter:\n\n  ```js [app/adapters/application.js]\n  import { RESTAdapter } from '@warp-drive/legacy/adapter/rest';\n\n  export default class ApplicationAdapter extends RESTAdapter {\n    namespace = 'api/1';\n  }\n  ```\n  Requests for the `Person` model would now target `/api/1/people/1`.\n\n  ### Host customization\n\n  An adapter can target other hosts by setting the `host` property.\n\n  ```js [app/adapters/application.js]\n  import { RESTAdapter } from '@warp-drive/legacy/adapter/rest';\n\n  export default class ApplicationAdapter extends RESTAdapter {\n    host = 'https://api.example.com';\n  }\n  ```\n\n  ### Headers customization\n\n  Some APIs require HTTP headers, e.g. to provide an API key. Arbitrary\n  headers can be set as key/value pairs on the `RESTAdapter`'s `headers`\n  object and WarpDrive will send them along with each ajax request.\n\n\n  ```js [app/adapters/application.js]\n  import { RESTAdapter } from '@warp-drive/legacy/adapter/rest';\n\n  export default class ApplicationAdapter extends RESTAdapter {\n    get headers() {\n      return {\n        'API_KEY': 'secret key',\n        'ANOTHER_HEADER': 'Some header value'\n      };\n    }\n  }\n  ```\n\n  @public\n*/\nclass RESTAdapter extends AdapterWithBuildURLMixin {\n  /**\n    This property allows ajax to still be used instead when `false`.\n     @default true\n    @public\n  */\n  useFetch = true;\n  _defaultContentType = 'application/json; charset=utf-8';\n  get fastboot() {\n    // Avoid computed property override deprecation in fastboot as suggested by:\n    // https://deprecations.emberjs.com/v3.x/#toc_computed-property-override\n    const fastboot = this._fastboot;\n    if (fastboot) {\n      return fastboot;\n    }\n    return this._fastboot = getOwner(this).lookup('service:fastboot');\n  }\n  static {\n    decorateMethodV2(this.prototype, \"fastboot\", [computed()]);\n  }\n  set fastboot(value) {\n    this._fastboot = value;\n  }\n\n  /**\n    By default, the RESTAdapter will send the query params sorted alphabetically to the\n    server.\n     For example:\n     ```js\n    store.query('posts', { sort: 'price', category: 'pets' });\n    ```\n     will generate a requests like this `/posts?category=pets&sort=price`, even if the\n    parameters were specified in a different order.\n     That way the generated URL will be deterministic and that simplifies caching mechanisms\n    in the backend.\n     Setting `sortQueryParams` to a falsey value will respect the original order.\n     In case you want to sort the query parameters with a different criteria, set\n    `sortQueryParams` to your custom sort function.\n     ```js [app/adapters/application.js]\n    import { RESTAdapter } from '@warp-drive/legacy/adapter/rest';\n     export default class ApplicationAdapter extends RESTAdapter {\n      sortQueryParams(params) {\n        let sortedKeys = Object.keys(params).sort().reverse();\n        let len = sortedKeys.length, newParams = {};\n         for (let i = 0; i < len; i++) {\n          newParams[sortedKeys[i]] = params[sortedKeys[i]];\n        }\n         return newParams;\n      }\n    }\n    ```\n     @public\n  */\n  sortQueryParams(obj) {\n    const keys = Object.keys(obj);\n    const len = keys.length;\n    if (len < 2) {\n      return obj;\n    }\n    const newQueryParams = {};\n    const sortedKeys = keys.sort();\n    for (let i = 0; i < len; i++) {\n      newQueryParams[sortedKeys[i]] = obj[sortedKeys[i]];\n    }\n    return newQueryParams;\n  }\n\n  /**\n    By default the RESTAdapter will send each find request coming from a `store.find`\n    or from accessing a relationship separately to the server. If your server supports passing\n    ids as a query string, you can set coalesceFindRequests to true to coalesce all find requests\n    within a single runloop.\n     For example, if you have an initial payload of:\n     ```javascript\n    {\n      post: {\n        id: 1,\n        comments: [1, 2]\n      }\n    }\n    ```\n     By default calling `post.comments` will trigger the following requests(assuming the\n    comments haven't been loaded before):\n     ```\n    GET /comments/1\n    GET /comments/2\n    ```\n     If you set coalesceFindRequests to `true` it will instead trigger the following request:\n     ```\n    GET /comments?ids[]=1&ids[]=2\n    ```\n     Setting coalesceFindRequests to `true` also works for `store.find` requests and `belongsTo`\n    relationships accessed within the same runloop. If you set `coalesceFindRequests: true`\n     ```javascript\n    store.findRecord('comment', 1);\n    store.findRecord('comment', 2);\n    ```\n     will also send a request to: `GET /comments?ids[]=1&ids[]=2`\n     Note: Requests coalescing rely on URL building strategy. So if you override `buildURL` in your app\n    `groupRecordsForFindMany` more likely should be overridden as well in order for coalescing to work.\n     @public\n  */\n  get coalesceFindRequests() {\n    const coalesceFindRequests = this._coalesceFindRequests;\n    if (typeof coalesceFindRequests === 'boolean') {\n      return coalesceFindRequests;\n    }\n    return this._coalesceFindRequests = false;\n  }\n  set coalesceFindRequests(value) {\n    this._coalesceFindRequests = value;\n  }\n\n  /**\n    Endpoint paths can be prefixed with a `namespace` by setting the namespace\n    property on the adapter:\n     ```js [app/adapters/application.js]\n    import { RESTAdapter } from '@warp-drive/legacy/adapter/rest';\n     export default class ApplicationAdapter extends RESTAdapter {\n      namespace = 'api/1';\n    }\n    ```\n     Requests for the `Post` model would now target `/api/1/post/`.\n     @public\n  */\n\n  /**\n    An adapter can target other hosts by setting the `host` property.\n     ```js [app/adapters/application.js]\n    import { RESTAdapter } from '@warp-drive/legacy/adapter/rest';\n     export default class ApplicationAdapter extends RESTAdapter {\n      host = 'https://api.example.com';\n    }\n    ```\n     Requests for the `Post` model would now target `https://api.example.com/post/`.\n     @public\n  */\n\n  /**\n    Some APIs require HTTP headers, e.g. to provide an API\n    key. Arbitrary headers can be set as key/value pairs on the\n    `RESTAdapter`'s `headers` object and WarpDrive will send them\n    along with each ajax request..\n     ```js [app/adapters/application.js]\n    import { RESTAdapter } from '@warp-drive/legacy/adapter/rest';\n     export default class ApplicationAdapter extends RESTAdapter {\n      get headers() {\n        return {\n          'API_KEY': 'secret key',\n          'ANOTHER_HEADER': 'Some header value'\n        };\n      }\n    }\n    ```\n     @public\n   */\n\n  /**\n    Called by the store in order to fetch the JSON for a given\n    type and ID.\n     The `findRecord` method makes an Ajax request to a URL computed by\n    `buildURL`, and returns a promise for the resulting payload.\n     This method performs an HTTP `GET` request with the id provided as part of the query string.\n     @since 1.13.0\n    @public\n  */\n  findRecord(store, type, id, snapshot) {\n    const url = this.buildURL(type.modelName, id, snapshot, 'findRecord');\n    const query = this.buildQuery(snapshot);\n    return this.ajax(url, 'GET', {\n      data: query\n    });\n  }\n\n  /**\n    Called by the store in order to fetch a JSON array for all\n    of the records for a given type.\n     The `findAll` method makes an Ajax (HTTP GET) request to a URL computed by `buildURL`, and returns a\n    promise for the resulting payload.\n     @public\n  */\n  findAll(store, type, neverUsed, snapshotRecordArray) {\n    const query = this.buildQuery(snapshotRecordArray);\n    const url = this.buildURL(type.modelName, null, snapshotRecordArray, 'findAll');\n    return this.ajax(url, 'GET', {\n      data: query\n    });\n  }\n\n  /**\n    Called by the store in order to fetch a JSON array for\n    the records that match a particular query.\n     The `query` method makes an Ajax (HTTP GET) request to a URL\n    computed by `buildURL`, and returns a promise for the resulting\n    payload.\n     The `query` argument is a simple JavaScript object that will be passed directly\n    to the server as parameters.\n     @public\n  */\n  query(store, type, query) {\n    const url = this.buildURL(type.modelName, null, null, 'query', query);\n    if (this.sortQueryParams) {\n      query = this.sortQueryParams(query);\n    }\n    return this.ajax(url, 'GET', {\n      data: query\n    });\n  }\n\n  /**\n    Called by the store in order to fetch a JSON object for\n    the record that matches a particular query.\n     The `queryRecord` method makes an Ajax (HTTP GET) request to a URL\n    computed by `buildURL`, and returns a promise for the resulting\n    payload.\n     The `query` argument is a simple JavaScript object that will be passed directly\n    to the server as parameters.\n     @since 1.13.0\n    @public\n  */\n  queryRecord(store, type, query, adapterOptions) {\n    const url = this.buildURL(type.modelName, null, null, 'queryRecord', query);\n    if (this.sortQueryParams) {\n      query = this.sortQueryParams(query);\n    }\n    return this.ajax(url, 'GET', {\n      data: query\n    });\n  }\n\n  /**\n    Called by the store in order to fetch several records together if `coalesceFindRequests` is true\n     For example, if the original payload looks like:\n     ```js\n    {\n      \"id\": 1,\n      \"title\": \"Rails is omakase\",\n      \"comments\": [ 1, 2, 3 ]\n    }\n    ```\n     The IDs will be passed as a URL-encoded Array of IDs, in this form:\n     ```\n    ids[]=1&ids[]=2&ids[]=3\n    ```\n     Many servers, such as Rails and PHP, will automatically convert this URL-encoded array\n    into an Array for you on the server-side. If you want to encode the\n    IDs, differently, just override this (one-line) method.\n     The `findMany` method makes an Ajax (HTTP GET) request to a URL computed by `buildURL`, and returns a\n    promise for the resulting payload.\n     @public\n  */\n  findMany(store, type, ids, snapshots) {\n    const url = this.buildURL(type.modelName, ids, snapshots, 'findMany');\n    return this.ajax(url, 'GET', {\n      data: {\n        ids: ids\n      }\n    });\n  }\n\n  /**\n    Called by the store in order to fetch a JSON array for\n    the unloaded records in a has-many relationship that were originally\n    specified as a URL (inside of `links`).\n     For example, if your original payload looks like this:\n     ```js\n    {\n      \"post\": {\n        \"id\": 1,\n        \"title\": \"Rails is omakase\",\n        \"links\": { \"comments\": \"/posts/1/comments\" }\n      }\n    }\n    ```\n     This method will be called with the parent record and `/posts/1/comments`.\n     The `findHasMany` method will make an Ajax (HTTP GET) request to the originally specified URL.\n     The format of your `links` value will influence the final request URL via the `urlPrefix` method:\n     * Links beginning with `//`, `http://`, `https://`, will be used as is, with no further manipulation.\n     * Links beginning with a single `/` will have the current adapter's `host` value prepended to it.\n     * Links with no beginning `/` will have a parentURL prepended to it, via the current adapter's `buildURL`.\n     @public\n  */\n  findHasMany(store, snapshot, url, relationship) {\n    const id = snapshot.id;\n    const type = snapshot.modelName;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to fetch the hasMany relationship for ${type}, but the record has no id`);\n      }\n    })(typeof id === 'string' && id.length > 0) : {};\n    url = this.urlPrefix(url, this.buildURL(type, id, snapshot, 'findHasMany'));\n    return this.ajax(url, 'GET');\n  }\n\n  /**\n    Called by the store in order to fetch the JSON for the unloaded record in a\n    belongs-to relationship that was originally specified as a URL (inside of\n    `links`).\n     For example, if your original payload looks like this:\n     ```js\n    {\n      \"person\": {\n        \"id\": 1,\n        \"name\": \"Tom Dale\",\n        \"links\": { \"group\": \"/people/1/group\" }\n      }\n    }\n    ```\n     This method will be called with the parent record and `/people/1/group`.\n     The `findBelongsTo` method will make an Ajax (HTTP GET) request to the originally specified URL.\n     The format of your `links` value will influence the final request URL via the `urlPrefix` method:\n     * Links beginning with `//`, `http://`, `https://`, will be used as is, with no further manipulation.\n     * Links beginning with a single `/` will have the current adapter's `host` value prepended to it.\n     * Links with no beginning `/` will have a parentURL prepended to it, via the current adapter's `buildURL`.\n     @public\n  */\n  findBelongsTo(store, snapshot, url, relationship) {\n    const id = snapshot.id;\n    const type = snapshot.modelName;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to fetch the belongsTo relationship for ${type}, but the record has no id`);\n      }\n    })(typeof id === 'string' && id.length > 0) : {};\n    url = this.urlPrefix(url, this.buildURL(type, id, snapshot, 'findBelongsTo'));\n    return this.ajax(url, 'GET');\n  }\n\n  /**\n    Called by the store when a newly created record is\n    saved via the `save` method on a model record instance.\n     The `createRecord` method serializes the record and makes an Ajax (HTTP POST) request\n    to a URL computed by `buildURL`.\n     See `serialize` for information on how to customize the serialized form\n    of a record.\n     @public\n  */\n  createRecord(store, type, snapshot) {\n    const url = this.buildURL(type.modelName, null, snapshot, 'createRecord');\n    const data = serializeIntoHash(store, type, snapshot);\n    return this.ajax(url, 'POST', {\n      data\n    });\n  }\n\n  /**\n    Called by the store when an existing record is saved\n    via the `save` method on a model record instance.\n     The `updateRecord` method serializes the record and makes an Ajax (HTTP PUT) request\n    to a URL computed by `buildURL`.\n     See `serialize` for information on how to customize the serialized form\n    of a record.\n     @public\n  */\n  updateRecord(store, schema, snapshot) {\n    const data = serializeIntoHash(store, schema, snapshot, {});\n    const type = snapshot.modelName;\n    const id = snapshot.id;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to update the ${type} record, but the record has no id`);\n      }\n    })(typeof id === 'string' && id.length > 0) : {};\n    const url = this.buildURL(type, id, snapshot, 'updateRecord');\n    return this.ajax(url, 'PUT', {\n      data\n    });\n  }\n\n  /**\n    Called by the store when a record is deleted.\n     The `deleteRecord` method  makes an Ajax (HTTP DELETE) request to a URL computed by `buildURL`.\n     @public\n  */\n  deleteRecord(store, schema, snapshot) {\n    const type = snapshot.modelName;\n    const id = snapshot.id;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to delete the ${type} record, but the record has no id`);\n      }\n    })(typeof id === 'string' && id.length > 0) : {};\n    return this.ajax(this.buildURL(type, id, snapshot, 'deleteRecord'), 'DELETE');\n  }\n\n  /**\n    @private\n  */\n  _stripIDFromURL(store, snapshot) {\n    const type = snapshot.modelName;\n    const id = snapshot.id;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to strip the url from the ${type} record for coalescing, but the record has no id`);\n      }\n    })(typeof id === 'string' && id.length > 0) : {};\n    const url = this.buildURL(type, id, snapshot);\n    const expandedURL = url.split('/');\n    // Case when the url is of the format ...something/:id\n    // We are decodeURIComponent-ing the lastSegment because if it represents\n    // the id, it has been encodeURIComponent-ified within `buildURL`. If we\n    // don't do this, then records with id having special characters are not\n    // coalesced correctly (see GH #4190 for the reported bug)\n    const lastSegment = expandedURL[expandedURL.length - 1];\n    if (decodeURIComponent(lastSegment) === id) {\n      expandedURL[expandedURL.length - 1] = '';\n    } else if (id && endsWith(lastSegment, '?id=' + id)) {\n      //Case when the url is of the format ...something?id=:id\n      expandedURL[expandedURL.length - 1] = lastSegment.substring(0, lastSegment.length - id.length - 1);\n    }\n    return expandedURL.join('/');\n  }\n\n  // http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers\n  maxURLLength = 2048;\n\n  /**\n    Organize records into groups, each of which is to be passed to separate\n    calls to `findMany`.\n     This implementation groups together records that have the same base URL but\n    differing ids. For example `/comments/1` and `/comments/2` will be grouped together\n    because we know findMany can coalesce them together as `/comments?ids[]=1&ids[]=2`\n     It also supports urls where ids are passed as a query param, such as `/comments?id=1`\n    but not those where there is more than 1 query param such as `/comments?id=2&name=David`\n    Currently only the query param of `id` is supported. If you need to support others, please\n    override this or the `_stripIDFromURL` method.\n     It does not group records that have differing base urls, such as for example: `/posts/1/comments/2`\n    and `/posts/2/comments/3`\n     @public\n    @return an array of arrays of records, each of which is to be\n      loaded separately by `findMany`.\n  */\n  groupRecordsForFindMany(store, snapshots) {\n    const groups = new Map();\n    const maxURLLength = this.maxURLLength;\n    snapshots.forEach(snapshot => {\n      const baseUrl = this._stripIDFromURL(store, snapshot);\n      if (!groups.has(baseUrl)) {\n        groups.set(baseUrl, []);\n      }\n      groups.get(baseUrl).push(snapshot);\n    });\n    const groupsArray = [];\n    groups.forEach((group, key) => {\n      const paramNameLength = '&ids%5B%5D='.length;\n      const splitGroups = splitGroupToFitInUrl(store, this, group, maxURLLength, paramNameLength);\n      splitGroups.forEach(splitGroup => groupsArray.push(splitGroup));\n    });\n    return groupsArray;\n  }\n\n  /**\n    Takes an ajax response, and returns the json payload or an error.\n     By default this hook just returns the json payload passed to it.\n    You might want to override it in two cases:\n     1. Your API might return useful results in the response headers.\n    Response headers are passed in as the second argument.\n     2. Your API might return errors as successful responses with status code\n    200 and an Errors text or object. You can return a `InvalidError` or a\n    `AdapterError` (or a sub class) from this hook and it will automatically\n    reject the promise and put your record into the invalid or error state.\n     Returning a `InvalidError` from this method will cause the\n    record to transition into the `invalid` state and make the\n    `errors` object available on the record. When returning an\n    `InvalidError` the store will attempt to normalize the error data\n    returned from the server using the serializer's `extractErrors`\n    method.\n     @since 1.13.0\n    @public\n  */\n  handleResponse(status, headers, payload, requestData) {\n    if (this.isSuccess(status, headers, payload)) {\n      return payload;\n    } else if (this.isInvalid(status, headers, payload)) {\n      // @ts-expect-error needs cast to ApiError\n      return new InvalidError(typeof payload === 'object' && 'errors' in payload ? payload.errors : undefined);\n    }\n    const errors = this.normalizeErrorResponse(status, headers, payload);\n    const detailedMessage = this.generatedDetailedMessage(status, headers, payload, requestData);\n    switch (status) {\n      case 401:\n        return new UnauthorizedError(errors, detailedMessage);\n      case 403:\n        return new ForbiddenError(errors, detailedMessage);\n      case 404:\n        return new NotFoundError(errors, detailedMessage);\n      case 409:\n        return new ConflictError(errors, detailedMessage);\n      default:\n        if (status >= 500) {\n          return new ServerError(errors, detailedMessage);\n        }\n    }\n    return new AdapterError(errors, detailedMessage);\n  }\n\n  /**\n    Default `handleResponse` implementation uses this hook to decide if the\n    response is a success.\n     @since 1.13.0\n    @public\n  */\n  isSuccess(status, _headers, _payload) {\n    return status >= 200 && status < 300 || status === 304;\n  }\n\n  /**\n    Default `handleResponse` implementation uses this hook to decide if the\n    response is an invalid error.\n     @since 1.13.0\n    @public\n  */\n  isInvalid(status, _headers, _payload) {\n    return status === 422;\n  }\n\n  /**\n    Takes a URL, an HTTP method and a hash of data, and makes an\n    HTTP request.\n     When the server responds with a payload, WarpDrive will call into `extractSingle`\n    or `extractArray` (depending on whether the original query was for one record or\n    many records).\n     By default, `ajax` method has the following behavior:\n     * It sets the response `dataType` to `\"json\"`\n    * If the HTTP method is not `\"GET\"`, it sets the `Content-Type` to be\n      `application/json; charset=utf-8`\n    * If the HTTP method is not `\"GET\"`, it stringifies the data passed in. The\n      data is the serialized record in the case of a save.\n    * Registers success and failure handlers.\n     @private\n  */\n  async ajax(url, type, options = {}) {\n    const requestData = {\n      url: url,\n      method: type\n    };\n    if (this.useFetch) {\n      // @ts-expect-error poorly typed\n      const hash = this.ajaxOptions(url, type, options);\n      const response = await this._fetchRequest(hash);\n      const payload = await determineBodyPromise(response, requestData);\n      if (response.ok && !(payload instanceof Error)) {\n        return fetchSuccessHandler(this, payload, response, requestData);\n      } else {\n        // eslint-disable-next-line @typescript-eslint/only-throw-error\n        throw fetchErrorHandler(this, payload, response, null, requestData);\n      }\n    } else {\n      return execjQAjax(this, requestData, options);\n    }\n  }\n\n  /**\n    @private\n    @param options jQuery ajax options to be used for the ajax request\n  */\n  _ajaxRequest(options) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error('You must install jQuery globally when `useFetch` is false');\n      }\n    })(typeof jQuery !== 'undefined') : {};\n    void jQuery.ajax(options);\n  }\n  /**\n    @private\n  */\n  _fetchRequest(options) {\n    const fetchFunction = getFetchFunction();\n    return fetchFunction(options.url, options);\n  }\n  /**\n    @private\n  */\n  _ajax(options) {\n    if (this.useFetch) {\n      void this._fetchRequest(options);\n    } else {\n      this._ajaxRequest(options);\n    }\n  }\n\n  /**\n    @private\n  */\n  ajaxOptions(url, method, options) {\n    let reqOptions = Object.assign({\n      url,\n      method,\n      type: method\n    }, options);\n    if (this.headers !== undefined) {\n      // @ts-expect-error poorly typed\n      reqOptions.headers = {\n        ...this.headers,\n        ...reqOptions.headers\n      };\n    } else if (!options.headers) {\n      reqOptions.headers = {};\n    }\n\n    // @ts-expect-error poorly typed\n    const contentType = reqOptions.contentType || this._defaultContentType;\n    if (this.useFetch) {\n      // @ts-expect-error poorly typed\n      if (reqOptions.data && reqOptions.type !== 'GET' && reqOptions.headers) {\n        if (!reqOptions.headers['Content-Type'] && !reqOptions.headers['content-type']) {\n          reqOptions.headers['content-type'] = contentType;\n        }\n      }\n      // @ts-expect-error poorly typed\n      reqOptions = fetchOptions(reqOptions);\n    } else {\n      // GET requests without a body should not have a content-type header\n      // and may be unexpected by a server\n      // @ts-expect-error poorly typed\n      if (reqOptions.data && reqOptions.type !== 'GET') {\n        reqOptions = {\n          ...reqOptions,\n          contentType\n        };\n      }\n      // @ts-expect-error poorly typed\n      reqOptions = ajaxOptions(reqOptions, this);\n    }\n    reqOptions.url = this._ajaxURL(reqOptions.url);\n    return reqOptions;\n  }\n\n  /**\n   * @private\n   */\n  _ajaxURL(url) {\n    if (this.fastboot?.isFastBoot) {\n      const httpRegex = /^https?:\\/\\//;\n      const protocolRelativeRegex = /^\\/\\//;\n      const protocol = this.fastboot.request.protocol;\n      const host = this.fastboot.request.host;\n      if (protocolRelativeRegex.test(url)) {\n        return `${protocol}${url}`;\n      } else if (!httpRegex.test(url)) {\n        try {\n          return `${protocol}//${host}${url}`;\n        } catch (fbError) {\n          throw new Error('You are using WarpDrive with no host defined in your adapter. This will attempt to use the host of the FastBoot request, which is not configured for the current host of this request. Please set the hostWhitelist property for in your environment.js. FastBoot Error: ' + fbError.message);\n        }\n      }\n    }\n    return url;\n  }\n\n  /**\n    @private\n  */\n  parseErrorResponse(responseText) {\n    let json = responseText;\n    try {\n      json = JSON.parse(responseText);\n    } catch {\n      // ignored\n    }\n    return json;\n  }\n\n  /**\n    @private\n    @return errors payload\n  */\n  normalizeErrorResponse(status, _headers, payload) {\n    if (payload && typeof payload === 'object' && 'errors' in payload && Array.isArray(payload.errors)) {\n      return payload.errors;\n    } else {\n      return [{\n        status: `${status}`,\n        // Set to a string per the JSON API spec: https://jsonapi.org/format/#errors\n        title: 'The backend responded with an error',\n        // Detail is intended to be a string, but backends be non-compliant.\n        // stringifying gives the user a more friendly error in this situation, whereas\n        // they'd instead receive [object Object].\n        // JSON.stringify will convert *anything* to a string without erroring.\n        detail: typeof payload === 'string' ? payload : JSON.stringify(payload)\n      }];\n    }\n  }\n\n  /**\n    Generates a detailed (\"friendly\") error message, with plenty\n    of information for debugging (good luck!)\n     @private\n    @return detailed error message\n  */\n  generatedDetailedMessage(status, headers, payload, requestData) {\n    let shortenedPayload;\n    const payloadContentType = headers['content-type'] || 'Empty Content-Type';\n    if (payloadContentType === 'text/html' && typeof payload === 'string' && payload.length > 250) {\n      shortenedPayload = '[Omitted Lengthy HTML]';\n    } else if (typeof payload === 'object' && payload !== null) {\n      shortenedPayload = JSON.stringify(payload, null, 2);\n    } else {\n      shortenedPayload = payload;\n    }\n    const requestDescription = requestData.method + ' ' + requestData.url;\n    const payloadDescription = 'Payload (' + payloadContentType + ')';\n    return ['Ember Data Request ' + requestDescription + ' returned a ' + status, payloadDescription, shortenedPayload].join('\\n');\n  }\n\n  /**\n    Used by `findAll` and `findRecord` to build the query's `data` hash\n    supplied to the ajax method.\n     @since 2.5.0\n    @public\n  */\n  buildQuery(snapshot) {\n    const query = {};\n    if (snapshot) {\n      const {\n        include\n      } = snapshot;\n      if (include) {\n        // note: if user passed in an array, this will serialize like `?include[]=foo&include[]=bar`\n        // but if user passed in a string, this will serialize like `?include=foo,bar`\n        // users that want consistent behavior should override this method\n        query.include = include;\n      }\n    }\n    return query;\n  }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\n\nfunction ajaxSuccess(adapter, payload, requestData, responseData) {\n  let response;\n  try {\n    response = adapter.handleResponse(responseData.status, responseData.headers, payload, requestData);\n  } catch (error) {\n    // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\n    return Promise.reject(error);\n  }\n  if (response && response.isAdapterError) {\n    // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\n    return Promise.reject(response);\n  } else {\n    return response;\n  }\n}\nfunction ajaxError(adapter, payload, requestData, responseData) {\n  let error;\n  if (responseData.errorThrown instanceof Error && payload !== '') {\n    error = responseData.errorThrown;\n  } else if (responseData.textStatus === 'timeout') {\n    error = new TimeoutError();\n  } else if (responseData.textStatus === 'abort' || responseData.status === 0) {\n    error = handleAbort(requestData, responseData);\n  } else {\n    try {\n      error = adapter.handleResponse(responseData.status, responseData.headers, payload || responseData.errorThrown, requestData);\n    } catch (e) {\n      error = e;\n    }\n  }\n  return error;\n}\n\n// Adapter abort error to include any relevent info, e.g. request/response:\nfunction handleAbort(requestData, responseData) {\n  const {\n    method,\n    url,\n    errorThrown\n  } = requestData;\n  const {\n    status\n  } = responseData;\n  const msg = `Request failed: ${method} ${url} ${String(errorThrown ?? '')}`;\n  const errors = [{\n    title: 'Adapter Error',\n    detail: msg.trim(),\n    status\n  }];\n  return new AbortError(errors);\n}\n\n//From http://stackoverflow.com/questions/280634/endswith-in-javascript\nfunction endsWith(string, suffix) {\n  if (typeof String.prototype.endsWith !== 'function') {\n    return string.includes(suffix, string.length - suffix.length);\n  } else {\n    return string.endsWith(suffix);\n  }\n}\nfunction fetchSuccessHandler(adapter, payload, response, requestData) {\n  const responseData = fetchResponseData(response);\n  return ajaxSuccess(adapter, payload, requestData, responseData);\n}\nfunction fetchErrorHandler(adapter, payload, response, errorThrown, requestData) {\n  const responseData = fetchResponseData(response);\n  if (responseData.status === 200 && payload instanceof Error) {\n    responseData.errorThrown = payload;\n    // @ts-expect-error poorly typed\n    payload = responseData.errorThrown.payload;\n  } else {\n    responseData.errorThrown = errorThrown;\n    if (typeof payload === 'string') {\n      payload = adapter.parseErrorResponse(payload);\n    }\n  }\n  return ajaxError(adapter, payload, requestData, responseData);\n}\nfunction ajaxSuccessHandler(adapter, payload, jqXHR, requestData) {\n  const responseData = ajaxResponseData(jqXHR);\n  return ajaxSuccess(adapter, payload, requestData, responseData);\n}\nfunction ajaxErrorHandler(adapter, jqXHR, errorThrown, requestData) {\n  const responseData = ajaxResponseData(jqXHR);\n  responseData.errorThrown = errorThrown;\n  const payload = adapter.parseErrorResponse(jqXHR.responseText);\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    const message = `The server returned an empty string for ${requestData.method} ${requestData.url}, which cannot be parsed into a valid JSON. Return either null or {}.`;\n    const validJSONString = !(responseData.textStatus === 'parsererror' && payload === '');\n    warn(message, validJSONString, {\n      id: 'ds.adapter.returned-empty-string-as-JSON'\n    });\n  }\n  return ajaxError(adapter, payload, requestData, responseData);\n}\nfunction fetchResponseData(response) {\n  return {\n    status: response.status,\n    textStatus: response.statusText,\n    headers: headersToObject(response.headers)\n  };\n}\nfunction ajaxResponseData(jqXHR) {\n  return {\n    status: jqXHR.status,\n    textStatus: jqXHR.statusText,\n    headers: parseResponseHeaders(jqXHR.getAllResponseHeaders())\n  };\n}\nfunction headersToObject(headers) {\n  const headersObject = {};\n  if (headers) {\n    headers.forEach((value, key) => headersObject[key] = value);\n  }\n  return headersObject;\n}\n\n/**\n * Helper function that translates the options passed to `jQuery.ajax` into a format that `fetch` expects.\n *\n * @private\n */\nfunction fetchOptions(options, adapter) {\n  options.credentials = options.credentials || 'same-origin';\n  if (options.data) {\n    // GET and HEAD requests can't have a `body`\n    if (options.method === 'GET' || options.method === 'HEAD') {\n      // If no options are passed, WarpDrive sets `data` to an empty object, which we test for.\n      if (Object.keys(options.data).length && options.url) {\n        // Test if there are already query params in the url (mimics jQuey.ajax).\n        const queryParamDelimiter = options.url.includes('?') ? '&' : '?';\n        options.url += `${queryParamDelimiter}${serializeQueryParams(options.data)}`;\n      }\n    } else {\n      // NOTE: a request's body cannot be an object, so we stringify it if it is.\n      // JSON.stringify removes keys with values of `undefined` (mimics jQuery.ajax).\n      // If the data is not a POJO (it's a String, FormData, etc), we just set it.\n      // If the data is a string, we assume it's a stringified object.\n\n      /* We check for Objects this way because we want the logic inside the consequent to run\n       * if `options.data` is a POJO, not if it is a data structure whose `typeof` returns \"object\"\n       * when it's not (Array, FormData, etc). The reason we don't use `options.data.constructor`\n       * to check is in case `data` is an object with no prototype (e.g. created with null).\n       */\n      if (Object.prototype.toString.call(options.data) === '[object Object]') {\n        options.body = JSON.stringify(options.data);\n      } else {\n        // @ts-expect-error poorly typed\n        options.body = options.data;\n      }\n    }\n  }\n  return options;\n}\nfunction ajaxOptions(options, adapter) {\n  options.dataType = 'json';\n  options.context = adapter;\n  if (options.data && options.type !== 'GET') {\n    options.data = JSON.stringify(options.data);\n  }\n  options.beforeSend = function (xhr) {\n    if (options.headers) {\n      Object.keys(options.headers).forEach(key => {\n        const headerValue = options.headers && options.headers[key];\n        const isString = value => typeof value === 'string';\n        if (isString(headerValue)) {\n          xhr.setRequestHeader(key, headerValue);\n        }\n      });\n    }\n  };\n  return options;\n}\nfunction execjQAjax(adapter, requestData, options) {\n  const hash = adapter.ajaxOptions(requestData.url, requestData.method, options);\n  return new Promise((resolve, reject) => {\n    hash.success = function (payload, textStatus, jqXHR) {\n      const response = ajaxSuccessHandler(adapter, payload, jqXHR, requestData);\n      resolve(response);\n    };\n    hash.error = function (jqXHR, textStatus, errorThrown) {\n      const error = ajaxErrorHandler(adapter, jqXHR, errorThrown, requestData);\n      // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\n      reject(error);\n    };\n    adapter._ajax(hash);\n  });\n}\nfunction splitGroupToFitInUrl(store, adapter, group, maxURLLength, paramNameLength) {\n  let idsSize = 0;\n  const baseUrl = adapter._stripIDFromURL(store, group[0]);\n  const splitGroups = [[]];\n  group.forEach(snapshot => {\n    const additionalLength = encodeURIComponent(snapshot.id).length + paramNameLength;\n    if (baseUrl.length + idsSize + additionalLength >= maxURLLength) {\n      idsSize = 0;\n      splitGroups.push([]);\n    }\n    idsSize += additionalLength;\n    const lastGroupIndex = splitGroups.length - 1;\n    splitGroups[lastGroupIndex].push(snapshot);\n  });\n  return splitGroups;\n}\nexport { RESTAdapter, fetchOptions };","import { A } from '@ember/array';\nimport DataAdapter from '@ember/debug/data-adapter';\nimport { addObserver, removeObserver } from '@ember/object/observers';\nimport * as s from '@ember/service';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nimport { recordIdentifierFor } from '@warp-drive/core';\nimport { assertPrivateStore } from '@warp-drive/core/store/-private';\nimport { capitalize, underscore } from '@warp-drive/utilities/string';\n\nconst deferred = /* @__PURE__ */new WeakMap();\nfunction deferDecorator(proto, prop, desc) {\n  let map = deferred.get(proto);\n  if (!map) {\n    map = /* @__PURE__ */new Map();\n    deferred.set(proto, map);\n  }\n  map.set(prop, desc);\n}\nfunction findDeferredDecorator(target, prop) {\n  var _a;\n  let cursor = target.prototype;\n  while (cursor) {\n    let desc = (_a = deferred.get(cursor)) == null ? void 0 : _a.get(prop);\n    if (desc) {\n      return desc;\n    }\n    cursor = cursor.prototype;\n  }\n}\nfunction decorateFieldV2(prototype, prop, decorators, initializer) {\n  let desc = {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: null\n  };\n  if (initializer) {\n    desc.initializer = initializer;\n  }\n  for (let decorator of decorators) {\n    desc = decorator(prototype, prop, desc) || desc;\n  }\n  if (desc.initializer === void 0) {\n    Object.defineProperty(prototype, prop, desc);\n  } else {\n    deferDecorator(prototype, prop, desc);\n  }\n}\nfunction initializeDeferredDecorator(target, prop) {\n  let desc = findDeferredDecorator(target.constructor, prop);\n  if (desc) {\n    Object.defineProperty(target, prop, {\n      enumerable: desc.enumerable,\n      configurable: desc.configurable,\n      writable: desc.writable,\n      value: desc.initializer ? desc.initializer.call(target) : void 0\n    });\n  }\n}\n\nconst service = s.service ?? s.inject;\nconst StoreTypesMap = new WeakMap();\nfunction debugInfo() {\n  const relationships = {};\n  const expensiveProperties = [];\n  const identifier = recordIdentifierFor(this);\n  const fields = this.store.schema.fields(identifier);\n  const attrGroup = {\n    name: 'Attributes',\n    properties: ['id'],\n    expand: true\n  };\n  const attributes = attrGroup.properties;\n  const groups = [attrGroup];\n  for (const field of fields.values()) {\n    switch (field.kind) {\n      case 'attribute':\n        attributes.push(field.name);\n        break;\n      case 'belongsTo':\n      case 'hasMany':\n        {\n          let properties = relationships[field.kind];\n          if (properties === undefined) {\n            properties = relationships[field.kind] = [];\n            groups.push({\n              name: field.kind,\n              properties,\n              expand: true\n            });\n          }\n          properties.push(field.name);\n          expensiveProperties.push(field.name);\n          break;\n        }\n    }\n  }\n  groups.push({\n    name: 'Flags',\n    properties: ['isLoaded', 'hasDirtyAttributes', 'isSaving', 'isDeleted', 'isError', 'isNew', 'isValid'],\n    expand: false\n  });\n  return {\n    propertyInfo: {\n      // include all other mixins / properties (not just the grouped ones)\n      includeOtherProperties: true,\n      groups: groups,\n      // don't pre-calculate unless cached\n      expensiveProperties: expensiveProperties\n    }\n  };\n}\nfunction installDebugInfo(ModelKlass) {\n  /**\n   Provides info about the model for debugging purposes\n   by grouping the properties into more semantic groups.\n    Meant to be used by debugging tools such as the Chrome Ember Extension.\n    - Groups all attributes in \"Attributes\" group.\n   - Groups all belongsTo relationships in \"Belongs To\" group.\n   - Groups all hasMany relationships in \"Has Many\" group.\n   - Groups all flags in \"Flags\" group.\n   - Flags relationship CPs as expensive properties.\n   */\n  ModelKlass.prototype._debugInfo = debugInfo;\n}\nfunction typesMapFor(store) {\n  let typesMap = StoreTypesMap.get(store);\n  if (typesMap === undefined) {\n    typesMap = new Map();\n    StoreTypesMap.set(store, typesMap);\n  }\n  return typesMap;\n}\n\n/**\n  Implements `@ember/debug/data-adapter` with for EmberData\n  integration with the ember-inspector.\n\n  @private\n*/\nclass InspectorDataAdapter extends DataAdapter {\n  static {\n    decorateFieldV2(this.prototype, \"store\", [service('store')]);\n  }\n  #store = (initializeDeferredDecorator(this, \"store\"), void 0);\n  /**\n    Specifies how records can be filtered based on the state of the record\n    Records returned will need to have a `filterValues`\n    property with a key for every name in the returned array\n     @private\n    @return List of objects defining filters\n     The object should have a `name` and `desc` property\n  */\n  getFilters() {\n    return [{\n      name: 'isNew',\n      desc: 'New'\n    }, {\n      name: 'isModified',\n      desc: 'Modified'\n    }, {\n      name: 'isClean',\n      desc: 'Clean'\n    }];\n  }\n  _nameToClass(type) {\n    return this.store.modelFor(type);\n  }\n\n  /**\n    Fetch the model types and observe them for changes.\n    Maintains the list of model types without needing the Model package for detection.\n     @private\n    @param typesAdded Callback to call to add types.\n    Takes an array of objects containing wrapped types (returned from `wrapModelType`).\n    @param typesUpdated Callback to call when a type has changed.\n    Takes an array of objects containing wrapped types.\n    @return Method to call to remove all observers\n  */\n  watchModelTypes(typesAdded, typesUpdated) {\n    const {\n      store\n    } = this;\n    const discoveredTypes = typesMapFor(store);\n    const unsub = store.notifications.subscribe('resource', (identifier, notificationType) => {\n      if (notificationType === 'added') {\n        this.watchTypeIfUnseen(store, discoveredTypes, identifier.type, typesAdded, typesUpdated, _releaseMethods);\n      }\n    });\n    const _releaseMethods = [() => {\n      store.notifications.unsubscribe(unsub);\n    }];\n    assertPrivateStore(store);\n    Object.keys(store.cacheKeyManager._cache.resourcesByType).forEach(type => {\n      discoveredTypes.set(type, false);\n    });\n\n    // Add any models that were added during initialization of the app, before the inspector was opened\n    discoveredTypes.forEach((_, type) => {\n      this.watchTypeIfUnseen(store, discoveredTypes, type, typesAdded, typesUpdated, _releaseMethods);\n    });\n    const release = () => {\n      _releaseMethods.forEach(fn => fn());\n      // reset the list so the models can be added if the inspector is re-opened\n      // the entries are set to false instead of removed, since the models still exist in the app\n      // we just need the inspector to become aware of them\n      discoveredTypes.forEach((value, key) => {\n        discoveredTypes.set(key, false);\n      });\n      this.releaseMethods.removeObject(release);\n    };\n    this.releaseMethods.pushObject(release);\n    return release;\n  }\n\n  /**\n   * Loop over the discovered types and use the callbacks from watchModelTypes to notify\n   * the consumer of this adapter about the mdoels.\n   *\n   * @private\n   */\n  watchTypeIfUnseen(store, discoveredTypes, type, typesAdded, typesUpdated, releaseMethods) {\n    if (discoveredTypes.get(type) !== true) {\n      const klass = store.modelFor(type);\n      installDebugInfo(klass);\n      const wrapped = this.wrapModelType(klass, type);\n      releaseMethods.push(this.observeModelType(type, typesUpdated));\n      typesAdded([wrapped]);\n      discoveredTypes.set(type, true);\n    }\n  }\n\n  /**\n    Creates a human readable string used for column headers\n     @private\n    @param name The attribute name\n    @return Human readable string based on the attribute name\n  */\n  columnNameToDesc(name) {\n    return capitalize(underscore(name).replace(/_/g, ' ').trim());\n  }\n\n  /**\n    Get the columns for a given model type\n     @private\n    @return An array of columns of the following format:\n     name: {String} The name of the column\n     desc: {String} Humanized description (what would show in a table column name)\n  */\n  columnsForType(typeClass) {\n    const columns = [{\n      name: 'id',\n      desc: 'Id'\n    }];\n    let count = 0;\n    typeClass.attributes.forEach((meta, name) => {\n      if (count++ > this.attributeLimit) {\n        return false;\n      }\n      const desc = this.columnNameToDesc(name);\n      columns.push({\n        name: name,\n        desc: desc\n      });\n    });\n    return columns;\n  }\n\n  /**\n    Fetches all loaded records for a given type\n     @private\n    @param modelClass of the record\n    @param modelName of the record\n    @return An array of Model records\n     This array will be observed for changes,\n     so it should update when new records are added/removed\n  */\n  getRecords(modelClass, modelName) {\n    if (arguments.length < 2) {\n      // Legacy Ember.js < 1.13 support\n      const containerKey = modelClass._debugContainerKey;\n      if (containerKey) {\n        const match = containerKey.match(/model:(.*)/);\n        if (match !== null) {\n          modelName = match[1];\n        }\n      }\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error('Cannot find model name. Please upgrade to Ember.js >= 1.13 for Ember Inspector support');\n      }\n    })(!!modelName) : {};\n    return this.store.peekAll(modelName);\n  }\n\n  /**\n    Gets the values for each column\n    This is the attribute values for a given record\n     @private\n    @param record to get values from\n    @return Keys should match column names defined by the model type\n  */\n  getRecordColumnValues(record) {\n    let count = 0;\n    const columnValues = {\n      id: record.id\n    };\n    record.eachAttribute(key => {\n      if (count++ > this.attributeLimit) {\n        return false;\n      }\n      columnValues[key] = record[key];\n    });\n    return columnValues;\n  }\n\n  /**\n    Returns keywords to match when searching records\n     @private\n    @return Relevant keywords for search based on the record's attribute values\n  */\n  getRecordKeywords(record) {\n    const keywords = [record.id];\n    record.eachAttribute(key => {\n      keywords.push(record[key]);\n    });\n    return A(keywords);\n  }\n\n  /**\n    Returns the values of filters defined by `getFilters`\n    These reflect the state of the record\n     @private\n    @return The record state filter values\n  */\n  getRecordFilterValues(record) {\n    return {\n      isNew: record.isNew,\n      isModified: record.hasDirtyAttributes && !record.isNew,\n      isClean: !record.hasDirtyAttributes\n    };\n  }\n\n  /**\n    Returns a color that represents the record's state\n    Possible colors: black, blue, green\n     @private\n    @return The record color\n  */\n  getRecordColor(record) {\n    let color = 'black';\n    if (record.isNew) {\n      color = 'green';\n    } else if (record.hasDirtyAttributes) {\n      color = 'blue';\n    }\n    return color;\n  }\n\n  /**\n    Observes all relevant properties and re-sends the wrapped record\n    when a change occurs\n     @private\n    @param record\n    @param recordUpdated Callback used to notify changes\n    @return The function to call to remove all observers\n  */\n  observeRecord(record, recordUpdated) {\n    const releaseMethods = [];\n    const keysToObserve = ['id', 'isNew', 'hasDirtyAttributes'];\n    record.eachAttribute(key => keysToObserve.push(key));\n    keysToObserve.forEach(key => {\n      const handler = () => {\n        recordUpdated(this.wrapRecord(record));\n      };\n      addObserver(record, key, handler);\n      releaseMethods.push(function () {\n        removeObserver(record, key, handler);\n      });\n    });\n    const release = function () {\n      releaseMethods.forEach(fn => fn());\n    };\n    return release;\n  }\n}\nconst Exported = macroCondition(getGlobalConfig().WarpDrive.includeDataAdapter) ? InspectorDataAdapter : null;\n\nexport { Exported as default };\n","import { deprecate } from '@ember/debug';\nimport { dasherize } from '@warp-drive/utilities/string';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nfunction isElementDescriptor(args) {\n  const [maybeTarget, maybeKey, maybeDesc] = args;\n  return (\n    // Ensure we have the right number of args\n    args.length === 3 && (\n    // Make sure the target is a class or object (prototype)\n    typeof maybeTarget === 'function' || typeof maybeTarget === 'object' && maybeTarget !== null) &&\n    // Make sure the key is a string\n    typeof maybeKey === 'string' && (\n    // Make sure the descriptor is the right shape\n    typeof maybeDesc === 'object' && maybeDesc !== null && 'enumerable' in maybeDesc && 'configurable' in maybeDesc ||\n    // TS compatibility\n    maybeDesc === undefined)\n  );\n}\nfunction normalizeModelName(type) {\n  if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_NON_STRICT_TYPES)) {\n    const result = dasherize(type);\n    deprecate(`The resource type '${type}' is not normalized. Update your application code to use '${result}' instead of '${type}'.`, result === type, {\n      id: 'ember-data:deprecate-non-strict-types',\n      until: '6.0',\n      for: 'ember-data',\n      since: {\n        available: '4.13',\n        enabled: '5.3'\n      }\n    });\n    return result;\n  }\n  return type;\n}\nexport { isElementDescriptor as i, normalizeModelName as n };","import { Context } from '@warp-drive/core/reactive/-private';\nimport { memoized, defineSignal, defineNonEnumerableSignal, notifyInternalSignal } from '@warp-drive/core/signals/-leaked';\nimport { assertPrivateStore, isResourceKey, recordIdentifierFor, isPrivateStore, storeFor, fastPush, createLegacyManyArray } from '@warp-drive/core/store/-private';\nimport { getOrSetGlobal } from '@warp-drive/core/types/-private';\nimport { EnableHydration } from '@warp-drive/core/types/request';\nimport { u as upgradeStore } from \"./-private-BG3bMiKp.js\";\nimport { computed, get } from '@ember/object';\nimport PromiseProxyMixin from '@ember/object/promise-proxy-mixin';\nimport ObjectProxy from '@ember/object/proxy';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nimport { d as decorateMethodV2, a as decorateFieldV2, i as initializeDeferredDecorator } from \"./runtime-BPCpkOf1-BKOwiRJp.js\";\nimport { A } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\nimport { mapBy, not } from '@ember/object/computed';\nconst PromiseObject = ObjectProxy.extend(PromiseProxyMixin);\nconst LegacyPromiseProxy = Symbol.for('LegacyPromiseProxy');\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-extraneous-class\n\nconst Extended = PromiseObject;\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n/**\n  A PromiseBelongsTo is a PromiseObject that also proxies certain method calls\n  to the underlying belongsTo model.\n  Right now we proxy:\n    * `reload()`\n  @class PromiseBelongsTo\n  @private\n*/\nclass PromiseBelongsTo extends Extended {\n  get id() {\n    const {\n      key,\n      legacySupport\n    } = this._belongsToState;\n    const ref = legacySupport.referenceFor('belongsTo', key);\n    return ref.id();\n  }\n\n  // we don't proxy meta because we would need to proxy it to the relationship state container\n  //  however, meta on relationships does not trigger change notifications.\n  //  if you need relationship meta, you should do `record.belongsTo(relationshipName).meta()`\n  static {\n    decorateMethodV2(this.prototype, \"id\", [memoized]);\n  }\n  get meta() {\n    // eslint-disable-next-line no-constant-condition\n    {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        {\n          throw new Error('You attempted to access meta on the promise for the async belongsTo relationship ' + `${this._belongsToState.modelName}:${this._belongsToState.key}'.` + '\\nUse `record.belongsTo(relationshipName).meta()` instead.');\n        }\n      })() : {};\n    }\n    return;\n  }\n  static {\n    decorateMethodV2(this.prototype, \"meta\", [computed()]);\n  }\n  async reload(options) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error('You are trying to reload an async belongsTo before it has been created');\n      }\n    })(this.content !== undefined) : {};\n    const {\n      key,\n      legacySupport\n    } = this._belongsToState;\n    await legacySupport.reloadBelongsTo(key, options);\n    return this;\n  }\n}\nPromiseBelongsTo.prototype[LegacyPromiseProxy] = true;\n\n/**\n  This class is returned as the result of accessing an async hasMany relationship\n  on an instance of a Model extending from `@ember-data/model`.\n\n  A PromiseManyArray is an iterable proxy that allows templates to consume related\n  ManyArrays and update once their contents are no longer pending.\n\n  In your JS code you should resolve the promise first.\n\n  ```js\n  const comments = await post.comments;\n  ```\n\n  @public\n*/\nclass PromiseManyArray {\n  constructor(promise, content) {\n    this._update(promise, content);\n    this.isDestroyed = false;\n    this[LegacyPromiseProxy] = true;\n  }\n\n  /**\n   * Retrieve the length of the content\n   * @public\n   */\n  get length() {\n    // shouldn't be needed, but ends up being needed\n    // for computed chains even in 4.x\n    if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_COMPUTED_CHAINS)) {\n      // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n      this['[]'];\n    }\n    return this.content ? this.content.length : 0;\n  }\n\n  // this will error if someone tries to call\n  // A(identifierArray) since it is not configurable\n  // which is preferrable to the `meta` override we used\n  // before which required importing all of Ember\n  static {\n    decorateMethodV2(this.prototype, \"length\", [memoized]);\n  }\n  get '[]'() {\n    // ember-source < 3.23 (e.g. 3.20 lts)\n    // requires that the tag `'[]'` be notified\n    // on the ArrayProxy in order for `{{#each}}`\n    // to recompute. We entangle content.\n    return this.content?.length && this.content;\n  }\n\n  /**\n   * Iterate the proxied content. Called by the glimmer iterator in #each\n   * We do not guarantee that forEach will always be available. This\n   * may eventually be made to use Symbol.Iterator once glimmer supports it.\n   *\n   * @param cb\n   * @return\n   * @private\n   */\n  static {\n    decorateMethodV2(this.prototype, '[]', [memoized]);\n  }\n  forEach(cb) {\n    if (this.content && this.length) {\n      this.content.forEach(cb);\n    }\n  }\n\n  /**\n   * Reload the relationship\n   * @public\n   */\n  reload(options) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error('You are trying to reload an async manyArray before it has been created');\n      }\n    })(this.content) : {};\n    void this.content.reload(options);\n    return this;\n  }\n\n  //----  Properties/Methods from the PromiseProxyMixin that we will keep as our API\n\n  /**\n   * Whether the loading promise is still pending\n   *\n   * @public\n   */\n\n  /**\n   * Whether the loading promise rejected\n   *\n   * @public\n   */\n\n  /**\n   * Whether the loading promise succeeded\n   *\n   * @public\n   */\n\n  /**\n   * Whether the loading promise completed (resolved or rejected)\n   *\n   * @public\n   */\n\n  /**\n   * chain this promise\n   *\n   * @public\n   */\n  then(success, rejected) {\n    return this.promise.then(success, rejected);\n  }\n\n  /**\n   * catch errors thrown by this promise\n   * @public\n   */\n  catch(cb) {\n    return this.promise.catch(cb);\n  }\n\n  /**\n   * run cleanup after this promise completes\n   *\n   * @public\n   */\n  finally(cb) {\n    return this.promise.finally(cb);\n  }\n\n  //---- Methods on EmberObject that we should keep\n\n  destroy() {\n    this.isDestroyed = true;\n    this.content = null;\n    this.promise = null;\n  }\n\n  //---- Methods/Properties on ManyArray that we own and proxy to\n\n  /**\n   * Retrieve the links for this relationship\n   * @public\n   */\n  get links() {\n    return this.content ? this.content.links : undefined;\n  }\n\n  /**\n   * Retrieve the meta for this relationship\n   * @public\n   */\n  static {\n    decorateMethodV2(this.prototype, \"links\", [memoized]);\n  }\n  get meta() {\n    return this.content ? this.content.meta : undefined;\n  }\n\n  //---- Our own stuff\n\n  /** @internal */\n  static {\n    decorateMethodV2(this.prototype, \"meta\", [memoized]);\n  }\n  _update(promise, content) {\n    if (content !== undefined) {\n      this.content = content;\n    }\n    this.promise = tapPromise(this, promise);\n  }\n  static create({\n    promise,\n    content\n  }) {\n    return new this(promise, content);\n  }\n}\ndefineSignal(PromiseManyArray.prototype, 'content', null);\ndefineSignal(PromiseManyArray.prototype, 'isPending', false);\ndefineSignal(PromiseManyArray.prototype, 'isRejected', false);\ndefineSignal(PromiseManyArray.prototype, 'isFulfilled', false);\ndefineSignal(PromiseManyArray.prototype, 'isSettled', false);\nfunction tapPromise(proxy, promise) {\n  proxy.isPending = true;\n  proxy.isSettled = false;\n  proxy.isFulfilled = false;\n  proxy.isRejected = false;\n  return Promise.resolve(promise).then(content => {\n    proxy.isPending = false;\n    proxy.isFulfilled = true;\n    proxy.isSettled = true;\n    proxy.content = content;\n    return content;\n  }, error => {\n    proxy.isPending = false;\n    proxy.isFulfilled = false;\n    proxy.isRejected = true;\n    proxy.isSettled = true;\n    throw error;\n  });\n}\n\n/*\n  Assert that `addedRecord` has a valid type so it can be added to the\n  relationship of the `record`.\n\n  The assert basically checks if the `addedRecord` can be added to the\n  relationship (specified via `relationshipMeta`) of the `record`.\n\n  This utility should only be used internally, as both record parameters must\n  be stable record identifiers and the `relationshipMeta` needs to be the meta\n  information about the relationship, retrieved via\n  `record.relationshipFor(key)`.\n*/\nlet assertPolymorphicType;\nif (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n  // eslint-disable-next-line @typescript-eslint/no-shadow\n  assertPolymorphicType = function assertPolymorphicType(parentIdentifier, parentDefinition, addedIdentifier, store) {\n    if (parentDefinition.inverseIsImplicit) {\n      return;\n    }\n    if (parentDefinition.isPolymorphic) {\n      const meta = store.schema.fields(addedIdentifier)?.get(parentDefinition.inverseKey);\n      if (meta) {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Expected the schema for the field ${parentDefinition.inverseKey} on ${addedIdentifier.type} to be for a legacy relationship`);\n          }\n        })(meta.kind === 'belongsTo' || meta.kind === 'hasMany') : {};\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`The schema for the relationship '${parentDefinition.inverseKey}' on '${addedIdentifier.type}' type does not implement '${parentDefinition.type}' and thus cannot be assigned to the '${parentDefinition.key}' relationship in '${parentIdentifier.type}'. The definition should specify 'as: \"${parentDefinition.type}\"' in options.`);\n          }\n        })(meta?.options?.as === parentDefinition.type) : {};\n      }\n    }\n  };\n}\nfunction isResourceIdentiferWithRelatedLinks$1(value) {\n  return Boolean(value && value.links && value.links.related);\n}\n/**\n A `HasManyReference` is a low-level API that allows access\n and manipulation of a hasMany relationship.\n\n It is especially useful when you're dealing with `async` relationships\n from `@warp-drive/legacy/model` as it allows synchronous access to\n the relationship data if loaded, as well as APIs for loading, reloading\n the data or accessing available information without triggering a load.\n\n It may also be useful when using `sync` relationships with `@warp-drive/legacy/model`\n that need to be loaded/reloaded with more precise timing than marking the\n relationship as `async` and relying on autofetch would have allowed.\n\n However,keep in mind that marking a relationship as `async: false` will introduce\n bugs into your application if the data is not always guaranteed to be available\n by the time the relationship is accessed. Ergo, it is recommended when using this\n approach to utilize `links` for unloaded relationship state instead of identifiers.\n\n Reference APIs are entangled with the relationship's underlying state,\n thus any getters or cached properties that utilize these will properly\n invalidate if the relationship state changes.\n\n References are \"stable\", meaning that multiple calls to retrieve the reference\n  for a given relationship will always return the same HasManyReference.\n\n @class HasManyReference\n @public\n */\nclass HasManyReference {\n  /**\n   * The field name on the parent record for this has-many relationship.\n   *\n   * @property key\n   * @type {String}\n   * @public\n   */\n\n  /**\n   * The type of resource this relationship will contain.\n   *\n   * @property type\n   * @type {String}\n   * @public\n   */\n\n  // unsubscribe tokens given to us by the notification manager\n  ___token;\n  ___identifier;\n  ___relatedTokenMap;\n  constructor(store, graph, parentIdentifier, hasManyRelationship, key) {\n    this.graph = graph;\n    this.key = key;\n    this.hasManyRelationship = hasManyRelationship;\n    this.type = hasManyRelationship.definition.type;\n    this.store = store;\n    this.___identifier = parentIdentifier;\n    this.___token = store.notifications.subscribe(parentIdentifier, (_, bucket, notifiedKey) => {\n      if (bucket === 'relationships' && notifiedKey === key) {\n        this._ref++;\n      }\n    });\n    this.___relatedTokenMap = new Map();\n    // TODO inverse\n  }\n\n  /**\n   * This method should never be called by user code.\n   *\n   * @internal\n   */\n  destroy() {\n    this.store.notifications.unsubscribe(this.___token);\n    this.___relatedTokenMap.forEach(token => {\n      this.store.notifications.unsubscribe(token);\n    });\n    this.___relatedTokenMap.clear();\n  }\n\n  /**\n   * An array of identifiers for the records that this reference refers to.\n   *\n   * @property identifiers\n   * @type {ResourceKey[]}\n   * @public\n   */\n  get identifiers() {\n    ensureRefCanSubscribe(this);\n    // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n    this._ref;\n    const resource = this._resource();\n    const map = this.___relatedTokenMap;\n    this.___relatedTokenMap = new Map();\n    if (resource && resource.data) {\n      return resource.data.map(resourceIdentifier => {\n        const identifier = this.store.cacheKeyManager.getOrCreateRecordIdentifier(resourceIdentifier);\n        let token = map.get(identifier);\n        if (token) {\n          map.delete(identifier);\n        } else {\n          token = this.store.notifications.subscribe(identifier, (_, bucket, notifiedKey) => {\n            if (bucket === 'identity' || bucket === 'attributes' && notifiedKey === 'id') {\n              this._ref++;\n            }\n          });\n        }\n        this.___relatedTokenMap.set(identifier, token);\n        return identifier;\n      });\n    }\n    map.forEach(token => {\n      this.store.notifications.unsubscribe(token);\n    });\n    map.clear();\n    return [];\n  }\n  static {\n    decorateMethodV2(this.prototype, \"identifiers\", [memoized]);\n  }\n  _resource() {\n    const cache = this.store.cache;\n    return cache.getRelationship(this.___identifier, this.key);\n  }\n\n  /**\n   This returns a string that represents how the reference will be\n   looked up when it is loaded. If the relationship has a link it will\n   use the \"link\" otherwise it defaults to \"id\".\n    Example\n    ```js [app/models/post.js]\n   import { Model, hasMany } from '@warp-drive/legacy/model';\n    export default class PostModel extends Model {\n     @hasMany('comment', { async: true, inverse: null }) comments;\n   }\n   ```\n    ```javascript\n   let post = store.push({\n     data: {\n       type: 'post',\n       id: 1,\n       relationships: {\n         comments: {\n           data: [{ type: 'comment', id: 1 }]\n         }\n       }\n     }\n   });\n    let commentsRef = post.hasMany('comments');\n    // get the identifier of the reference\n   if (commentsRef.remoteType() === \"ids\") {\n     let ids = commentsRef.ids();\n   } else if (commentsRef.remoteType() === \"link\") {\n     let link = commentsRef.link();\n   }\n   ```\n    @public\n   @return The name of the remote type. This should either be `link` or `ids`\n   */\n  remoteType() {\n    const value = this._resource();\n    if (value && value.links && value.links.related) {\n      return 'link';\n    }\n    return 'ids';\n  }\n\n  /**\n   `ids()` returns an array of the record IDs in this relationship.\n    Example\n    ```js [app/models/post.js]\n   import { Model, hasMany } from '@warp-drive/legacy/model';\n    export default class PostModel extends Model {\n     @hasMany('comment', { async: true, inverse: null }) comments;\n   }\n   ```\n    ```javascript\n   let post = store.push({\n     data: {\n       type: 'post',\n       id: 1,\n       relationships: {\n         comments: {\n           data: [{ type: 'comment', id: 1 }]\n         }\n       }\n     }\n   });\n    let commentsRef = post.hasMany('comments');\n    commentsRef.ids(); // ['1']\n   ```\n     @public\n   @return The ids in this has-many relationship\n   */\n  ids() {\n    return this.identifiers.map(identifier => identifier.id);\n  }\n\n  /**\n   The link WarpDrive will use to fetch or reload this belongs-to\n   relationship. By default it uses only the \"related\" resource linkage.\n    Example\n    ```javascript\n   // models/blog.js\n   import { Model, belongsTo } from '@warp-drive/legacy/model';\n   export default Model.extend({\n      user: belongsTo('user', { async: true, inverse: null })\n    });\n    let blog = store.push({\n      data: {\n        type: 'blog',\n        id: 1,\n        relationships: {\n          user: {\n            links: {\n              related: '/articles/1/author'\n            }\n          }\n        }\n      }\n    });\n   let userRef = blog.belongsTo('user');\n    // get the identifier of the reference\n   if (userRef.remoteType() === \"link\") {\n      let link = userRef.link();\n    }\n   ```\n    @public\n   @return The link WarpDrive will use to fetch or reload this belongs-to relationship.\n   */\n  link() {\n    const resource = this._resource();\n    if (isResourceIdentiferWithRelatedLinks$1(resource)) {\n      if (resource.links) {\n        const related = resource.links.related;\n        return !related || typeof related === 'string' ? related : related.href;\n      }\n    }\n    return null;\n  }\n\n  /**\n   * any links that have been received for this relationship\n   *\n   * @public\n   * @return\n   */\n  links() {\n    const resource = this._resource();\n    return resource && resource.links ? resource.links : null;\n  }\n\n  /**\n   The meta data for the has-many relationship.\n    Example\n    ```javascript\n   // models/blog.js\n   import { Model, hasMany } from '@warp-drive/legacy/model';\n   export default Model.extend({\n      users: hasMany('user', { async: true, inverse: null })\n    });\n    let blog = store.push({\n      data: {\n        type: 'blog',\n        id: 1,\n        relationships: {\n          users: {\n            links: {\n              related: {\n                href: '/articles/1/authors'\n              },\n            },\n            meta: {\n              lastUpdated: 1458014400000\n            }\n          }\n        }\n      }\n    });\n    let usersRef = blog.hasMany('user');\n    usersRef.meta() // { lastUpdated: 1458014400000 }\n   ```\n   @public\n  @return The meta information for the belongs-to relationship.\n  */\n  meta() {\n    let meta = null;\n    const resource = this._resource();\n    if (resource && resource.meta && typeof resource.meta === 'object') {\n      meta = resource.meta;\n    }\n    return meta;\n  }\n\n  /**\n   `push` can be used to update the data in the relationship and WarpDrive\n   will treat the new data as the canonical value of this relationship on\n   the backend. An empty array will signify the canonical value should be\n   empty.\n    Example model\n    ```js [app/models/post.js]\n   import { Model, hasMany } from '@warp-drive/legacy/model';\n    export default class PostModel extends Model {\n     @hasMany('comment', { async: true, inverse: null }) comments;\n   }\n   ```\n    Setup some initial state, note we haven't loaded the comments yet:\n    ```js\n   const post = store.push({\n     data: {\n       type: 'post',\n       id: '1',\n       relationships: {\n         comments: {\n           data: [{ type: 'comment', id: '1' }]\n         }\n       }\n     }\n   });\n    const commentsRef = post.hasMany('comments');\n   commentsRef.ids(); // ['1']\n   ```\n    Update the state using `push`, note we can do this even without\n   having loaded these comments yet by providing resource identifiers.\n    Both full resources and resource identifiers are supported.\n    ```js\n   await commentsRef.push({\n    data: [\n     { type: 'comment', id: '2' },\n     { type: 'comment', id: '3' },\n    ]\n   });\n    commentsRef.ids(); // ['2', '3']\n   ```\n    For convenience, you can also pass in an array of resources or resource identifiers\n   without wrapping them in the `data` property:\n    ```js\n   await commentsRef.push([\n     { type: 'comment', id: '4' },\n     { type: 'comment', id: '5' },\n   ]);\n    commentsRef.ids(); // ['4', '5']\n   ```\n    When using the `data` property, you may also include other resource data via included,\n   as well as provide new links and meta to the relationship.\n    ```js\n   await commentsRef.push({\n     links: {\n       related: '/posts/1/comments'\n     },\n     meta: {\n       total: 2\n     },\n     data: [\n       { type: 'comment', id: '4' },\n       { type: 'comment', id: '5' },\n     ],\n     included: [\n       { type: 'other-thing', id: '1', attributes: { foo: 'bar' },\n     ]\n   });\n   ```\n    By default, the store will attempt to fetch any unloaded records before resolving\n   the returned promise with the ManyArray.\n    Alternatively, pass `true` as the second argument to avoid fetching unloaded records\n   and instead the promise will resolve with void without attempting to fetch. This is\n   particularly useful if you want to update the state of the relationship without\n   forcing the load of all of the associated records.\n    @public\n   @param doc a JSONAPI document object describing the new value of this relationship.\n   @param skipFetch [optional] if `true`, do not attempt to fetch unloaded records\n  */\n  async push(doc, skipFetch) {\n    const {\n      store\n    } = this;\n    const dataDoc = Array.isArray(doc) ? {\n      data: doc\n    } : doc;\n    const isResourceData = Array.isArray(dataDoc.data) && dataDoc.data.length > 0 && isMaybeResource(dataDoc.data[0]);\n\n    // enforce that one of links, meta or data is present\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You must provide at least one of 'links', 'meta' or 'data' when calling hasManyReference.push`);\n      }\n    })('links' in dataDoc || 'meta' in dataDoc || 'data' in dataDoc) : {};\n    const identifiers = !Array.isArray(dataDoc.data) ? [] : isResourceData ? store._push(dataDoc, true) : dataDoc.data.map(i => store.cacheKeyManager.getOrCreateRecordIdentifier(i));\n    const {\n      identifier\n    } = this.hasManyRelationship;\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      const relationshipMeta = this.hasManyRelationship.definition;\n      identifiers.forEach(added => {\n        assertPolymorphicType(identifier, relationshipMeta, added, store);\n      });\n    }\n    const newData = {};\n    // only set data if it was passed in\n    if (Array.isArray(dataDoc.data)) {\n      newData.data = identifiers;\n    }\n    if ('links' in dataDoc) {\n      newData.links = dataDoc.links;\n    }\n    if ('meta' in dataDoc) {\n      newData.meta = dataDoc.meta;\n    }\n    assertPrivateStore(store);\n    store._join(() => {\n      this.graph.push({\n        op: 'updateRelationship',\n        record: identifier,\n        field: this.key,\n        value: newData\n      });\n    });\n    if (!skipFetch) return this.load();\n  }\n  _isLoaded() {\n    const hasRelationshipDataProperty = this.hasManyRelationship.state.hasReceivedData;\n    if (!hasRelationshipDataProperty) {\n      return false;\n    }\n    const relationship = this.graph.getData(this.hasManyRelationship.identifier, this.key);\n    return relationship.data ? relationship.data.every(identifier => {\n      assertPrivateStore(this.store);\n      return this.store._instanceCache.recordIsLoaded(identifier, true) === true;\n    }) : false;\n  }\n\n  /**\n   `value()` synchronously returns the current value of the has-many\n   relationship. Unlike `record.relationshipName`, calling\n   `value()` on a reference does not trigger a fetch if the async\n   relationship is not yet loaded. If the relationship is not loaded\n   it will always return `null`.\n    Example\n    ```js [app/models/post.js]\n   import { Model, hasMany } from '@warp-drive/legacy/model';\n    export default class PostModel extends Model {\n     @hasMany('comment', { async: true, inverse: null }) comments;\n   }\n   ```\n    ```javascript\n   let post = store.push({\n     data: {\n       type: 'post',\n       id: 1,\n       relationships: {\n         comments: {\n           data: [{ type: 'comment', id: 1 }]\n         }\n       }\n     }\n   });\n    let commentsRef = post.hasMany('comments');\n    post.comments.then(function(comments) {\n     commentsRef.value() === comments\n   })\n   ```\n     @public\n   */\n  value() {\n    const support = LEGACY_SUPPORT.get(this.___identifier);\n    if (!ensureRefCanSubscribe(this)) {\n      // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n      this._ref;\n      return null;\n    }\n    return support.getManyArray(this.key);\n  }\n\n  /**\n   Loads the relationship if it is not already loaded.  If the\n   relationship is already loaded this method does not trigger a new\n   load. This causes a request to the specified\n   relationship link or reloads all items currently in the relationship.\n    Example\n    ```js [app/models/post.js]\n   import { Model, hasMany } from '@warp-drive/legacy/model';\n    export default class PostModel extends Model {\n     @hasMany('comment', { async: true, inverse: null }) comments;\n   }\n   ```\n    ```javascript\n   let post = store.push({\n     data: {\n       type: 'post',\n       id: 1,\n       relationships: {\n         comments: {\n           data: [{ type: 'comment', id: 1 }]\n         }\n       }\n     }\n   });\n    let commentsRef = post.hasMany('comments');\n    commentsRef.load().then(function(comments) {\n     //...\n   });\n   ```\n    You may also pass in an options object whose properties will be\n   fed forward. This enables you to pass `adapterOptions` into the\n   request given to the adapter via the reference.\n    Example\n    ```javascript\n   commentsRef.load({ adapterOptions: { isPrivate: true } })\n     .then(function(comments) {\n       //...\n     });\n   ```\n    ```js [app/adapters/comment.js]\n   export default ApplicationAdapter.extend({\n     findMany(store, type, id, snapshots) {\n       // In the adapter you will have access to adapterOptions.\n       let adapterOptions = snapshots[0].adapterOptions;\n     }\n   });\n   ```\n    @public\n   @param options the options to pass in.\n   @return a promise that resolves with the ManyArray in\n   this has-many relationship.\n   */\n  async load(options) {\n    const support = LEGACY_SUPPORT.get(this.___identifier);\n    const fetchSyncRel = !this.hasManyRelationship.definition.isAsync && !areAllInverseRecordsLoaded(this.store, this._resource());\n    return fetchSyncRel ? support.reloadHasMany(this.key, options) :\n    // we cast to fix the return type since typescript and eslint don't understand async functions\n    // properly\n    support.getHasMany(this.key, options);\n  }\n\n  /**\n   Reloads this has-many relationship. This causes a request to the specified\n   relationship link or reloads all items currently in the relationship.\n    Example\n    ```js [app/models/post.js]\n   import { Model, hasMany } from '@warp-drive/legacy/model';\n    export default class PostModel extends Model {\n     @hasMany('comment', { async: true, inverse: null }) comments;\n   }\n   ```\n    ```javascript\n   let post = store.push({\n     data: {\n       type: 'post',\n       id: 1,\n       relationships: {\n         comments: {\n           data: [{ type: 'comment', id: 1 }]\n         }\n       }\n     }\n   });\n    let commentsRef = post.hasMany('comments');\n    commentsRef.reload().then(function(comments) {\n     //...\n   });\n   ```\n    You may also pass in an options object whose properties will be\n   fed forward. This enables you to pass `adapterOptions` into the\n   request given to the adapter via the reference. A full example\n   can be found in the `load` method.\n    Example\n    ```javascript\n   commentsRef.reload({ adapterOptions: { isPrivate: true } })\n   ```\n    @public\n   @param options the options to pass in.\n   @return a promise that resolves with the ManyArray in this has-many relationship.\n   */\n  reload(options) {\n    const support = LEGACY_SUPPORT.get(this.___identifier);\n    return support.reloadHasMany(this.key, options);\n  }\n}\ndefineNonEnumerableSignal(HasManyReference.prototype, '_ref', 0);\nfunction isMaybeResource(object) {\n  const keys = Object.keys(object).filter(k => k !== 'id' && k !== 'type' && k !== 'lid');\n  return keys.length > 0;\n}\nfunction ensureRefCanSubscribe(rel) {\n  const loaded = rel._isLoaded();\n  if (!loaded) {\n    // subscribe to changes\n    // for when we are not loaded yet\n    //\n    // because the graph optimizes the case where a relationship has never been subscribed,\n    // we force accessed to be true here. When we make the graph public we should create a\n    // subscribe/unsubscribe API\n    const edge = rel.graph.get(rel.___identifier, rel.key);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected a hasMany relationship for ${rel.___identifier.type}:${rel.key}`);\n      }\n    })('accessed' in edge) : {};\n    edge.accessed = true;\n    return false;\n  }\n  return true;\n}\nfunction isResourceIdentiferWithRelatedLinks(value) {\n  return Boolean(value && value.links && value.links.related);\n}\n\n/**\n A `BelongsToReference` is a low-level API that allows access\n and manipulation of a belongsTo relationship.\n\n It is especially useful when you're dealing with `async` relationships\n from `@warp-drive/legacy/model` as it allows synchronous access to\n the relationship data if loaded, as well as APIs for loading, reloading\n the data or accessing available information without triggering a load.\n\n It may also be useful when using `sync` relationships with `@warp-drive/legacy/model`\n that need to be loaded/reloaded with more precise timing than marking the\n relationship as `async` and relying on autofetch would have allowed.\n\n However,keep in mind that marking a relationship as `async: false` will introduce\n bugs into your application if the data is not always guaranteed to be available\n by the time the relationship is accessed. Ergo, it is recommended when using this\n approach to utilize `links` for unloaded relationship state instead of identifiers.\n\n Reference APIs are entangled with the relationship's underlying state,\n thus any getters or cached properties that utilize these will properly\n invalidate if the relationship state changes.\n\n References are \"stable\", meaning that multiple calls to retrieve the reference\n  for a given relationship will always return the same HasManyReference.\n\n @public\n */\nclass BelongsToReference {\n  /**\n   * The field name on the parent record for this has-many relationship.\n   *\n   */\n\n  /**\n   * The type of resource this relationship will contain.\n   *\n   */\n\n  // unsubscribe tokens given to us by the notification manager\n\n  constructor(store, graph, parentIdentifier, belongsToRelationship, key) {\n    this.graph = graph;\n    this.key = key;\n    this.belongsToRelationship = belongsToRelationship;\n    this.type = belongsToRelationship.definition.type;\n    this.store = store;\n    this.___identifier = parentIdentifier;\n    this.___relatedToken = null;\n    this.___token = store.notifications.subscribe(parentIdentifier, (_, bucket, notifiedKey) => {\n      if (bucket === 'relationships' && notifiedKey === key) {\n        this._ref++;\n      }\n    });\n\n    // TODO inverse\n  }\n  destroy() {\n    // TODO @feature we need the notification manager often enough\n    // we should potentially just expose it fully public\n    this.store.notifications.unsubscribe(this.___token);\n    this.___token = null;\n    if (this.___relatedToken) {\n      this.store.notifications.unsubscribe(this.___relatedToken);\n      this.___relatedToken = null;\n    }\n  }\n\n  /**\n   * The identifier of the record that this reference refers to.\n   * `null` if no related record is known.\n   *\n   */\n  get identifier() {\n    if (this.___relatedToken) {\n      this.store.notifications.unsubscribe(this.___relatedToken);\n      this.___relatedToken = null;\n    }\n    const resource = this._resource();\n    if (resource && resource.data) {\n      const identifier = this.store.cacheKeyManager.getOrCreateRecordIdentifier(resource.data);\n      this.___relatedToken = this.store.notifications.subscribe(identifier, (_, bucket, notifiedKey) => {\n        if (bucket === 'identity' || bucket === 'attributes' && notifiedKey === 'id') {\n          this._ref++;\n        }\n      });\n      return identifier;\n    }\n    return null;\n  }\n\n  /**\n   The `id` of the record that this reference refers to. Together, the\n   `type()` and `id()` methods form a composite key for the identity\n   map. This can be used to access the id of an async relationship\n   without triggering a fetch that would normally happen if you\n   attempted to use `record.relationship.id`.\n    Example\n    ```javascript\n   // models/blog.js\n   import { Model, belongsTo } from '@warp-drive/legacy/model';\n    export default class BlogModel extends Model {\n    @belongsTo('user', { async: true, inverse: null }) user;\n   }\n    let blog = store.push({\n      data: {\n        type: 'blog',\n        id: 1,\n        relationships: {\n          user: {\n            data: { type: 'user', id: 1 }\n          }\n        }\n      }\n    });\n   let userRef = blog.belongsTo('user');\n    // get the identifier of the reference\n   if (userRef.remoteType() === \"id\") {\n      let id = userRef.id();\n    }\n   ```\n    @public\n   @return The id of the record in this belongsTo relationship.\n   */\n  static {\n    decorateMethodV2(this.prototype, \"identifier\", [memoized]);\n  }\n  id() {\n    return this.identifier?.id || null;\n  }\n\n  /**\n   The link WarpDrive will use to fetch or reload this belongs-to\n   relationship. By default it uses only the \"related\" resource linkage.\n    Example\n    ```javascript\n   // models/blog.js\n   import { Model, belongsTo } from '@warp-drive/legacy/model';\n   export default Model.extend({\n      user: belongsTo('user', { async: true, inverse: null })\n    });\n    let blog = store.push({\n      data: {\n        type: 'blog',\n        id: 1,\n        relationships: {\n          user: {\n            links: {\n              related: '/articles/1/author'\n            }\n          }\n        }\n      }\n    });\n   let userRef = blog.belongsTo('user');\n    // get the identifier of the reference\n   if (userRef.remoteType() === \"link\") {\n      let link = userRef.link();\n    }\n   ```\n    @public\n   @return The link WarpDrive will use to fetch or reload this belongs-to relationship.\n   */\n  link() {\n    const resource = this._resource();\n    if (isResourceIdentiferWithRelatedLinks(resource)) {\n      if (resource.links) {\n        const related = resource.links.related;\n        return !related || typeof related === 'string' ? related : related.href;\n      }\n    }\n    return null;\n  }\n\n  /**\n   * any links that have been received for this relationship\n   *\n   * @public\n   * @return\n   */\n  links() {\n    const resource = this._resource();\n    return resource && resource.links ? resource.links : null;\n  }\n\n  /**\n   The meta data for the belongs-to relationship.\n    Example\n    ```javascript\n   // models/blog.js\n   import { Model, belongsTo } from '@warp-drive/legacy/model';\n   export default Model.extend({\n      user: belongsTo('user', { async: true, inverse: null })\n    });\n    let blog = store.push({\n      data: {\n        type: 'blog',\n        id: 1,\n        relationships: {\n          user: {\n            links: {\n              related: {\n                href: '/articles/1/author'\n              },\n            },\n            meta: {\n              lastUpdated: 1458014400000\n            }\n          }\n        }\n      }\n    });\n    let userRef = blog.belongsTo('user');\n    userRef.meta() // { lastUpdated: 1458014400000 }\n   ```\n     @public\n   @return The meta information for the belongs-to relationship.\n   */\n  meta() {\n    let meta = null;\n    const resource = this._resource();\n    if (resource && resource.meta && typeof resource.meta === 'object') {\n      meta = resource.meta;\n    }\n    return meta;\n  }\n  _resource() {\n    // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n    this._ref; // subscribe\n    const cache = this.store.cache;\n    return cache.getRelationship(this.___identifier, this.key);\n  }\n\n  /**\n   This returns a string that represents how the reference will be\n   looked up when it is loaded. If the relationship has a link it will\n   use the \"link\" otherwise it defaults to \"id\".\n    Example\n    ```js [app/models/post.js]\n   import Model, { hasMany } from '@warp-drive/legacy/model';\n    export default class PostModel extends Model {\n     @hasMany('comment', { async: true, inverse: null }) comments;\n   }\n   ```\n    ```javascript\n   let post = store.push({\n     data: {\n       type: 'post',\n       id: 1,\n       relationships: {\n         comments: {\n           data: [{ type: 'comment', id: 1 }]\n         }\n       }\n     }\n   });\n    let commentsRef = post.hasMany('comments');\n    // get the identifier of the reference\n   if (commentsRef.remoteType() === \"ids\") {\n     let ids = commentsRef.ids();\n   } else if (commentsRef.remoteType() === \"link\") {\n     let link = commentsRef.link();\n   }\n   ```\n    @public\n   @return The name of the remote type. This should either be `link` or `id`\n   */\n  remoteType() {\n    const value = this._resource();\n    if (isResourceIdentiferWithRelatedLinks(value)) {\n      return 'link';\n    }\n    return 'id';\n  }\n\n  /**\n   `push` can be used to update the data in the relationship and WarpDrive\n   will treat the new data as the canonical value of this relationship on\n   the backend. A value of `null` (e.g. `{ data: null }`) can be passed to\n   clear the relationship.\n    Example model\n    ```js [app/models/blog.js]\n   import { Model, belongsTo } from '@warp-drive/legacy/model';\n    export default class BlogModel extends Model {\n      @belongsTo('user', { async: true, inverse: null }) user;\n    }\n   ```\n    Setup some initial state, note we haven't loaded the user yet:\n    ```js\n   const blog = store.push({\n      data: {\n        type: 'blog',\n        id: '1',\n        relationships: {\n          user: {\n            data: { type: 'user', id: '1' }\n          }\n        }\n      }\n   });\n    const userRef = blog.belongsTo('user');\n   userRef.id(); // '1'\n   ```\n    Update the state using `push`, note we can do this even without\n   having loaded the user yet by providing a resource-identifier.\n    Both full a resource and a resource-identifier are supported.\n    ```js\n   await userRef.push({\n      data: {\n        type: 'user',\n        id: '2',\n      }\n    });\n     userRef.id(); // '2'\n   ```\n    You may also pass in links and meta fore the relationship, and sideload\n   additional resources that might be required.\n    ```js\n    await userRef.push({\n        data: {\n          type: 'user',\n          id: '2',\n        },\n        links: {\n          related: '/articles/1/author'\n        },\n        meta: {\n          lastUpdated: Date.now()\n        },\n        included: [\n          {\n            type: 'user-preview',\n            id: '2',\n            attributes: {\n              username: '@runspired'\n            }\n          }\n        ]\n      });\n    ```\n    By default, the store will attempt to fetch the record if it is not loaded or its\n   resource data is not included in the call to `push` before resolving the returned\n   promise with the new state..\n    Alternatively, pass `true` as the second argument to avoid fetching unloaded records\n   and instead the promise will resolve with void without attempting to fetch. This is\n   particularly useful if you want to update the state of the relationship without\n   forcing the load of all of the associated record.\n    @public\n   @param doc a JSONAPI document object describing the new value of this relationship.\n   @param skipFetch [optional] if `true`, do not attempt to fetch unloaded records\n   @return a promise that resolves with the record in this belongs-to relationship after the push has completed.\n  */\n  async push(doc, skipFetch) {\n    const {\n      store\n    } = this;\n    const isResourceData = doc.data && isMaybeResource(doc.data);\n    const added = isResourceData ? store._push(doc, true) : doc.data ? store.cacheKeyManager.getOrCreateRecordIdentifier(doc.data) : null;\n    const {\n      identifier\n    } = this.belongsToRelationship;\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      if (added) {\n        assertPolymorphicType(identifier, this.belongsToRelationship.definition, added, store);\n      }\n    }\n    const newData = {};\n\n    // only set data if it was passed in\n    if (doc.data || doc.data === null) {\n      newData.data = added;\n    }\n    if ('links' in doc) {\n      newData.links = doc.links;\n    }\n    if ('meta' in doc) {\n      newData.meta = doc.meta;\n    }\n    assertPrivateStore(store);\n    store._join(() => {\n      this.graph.push({\n        op: 'updateRelationship',\n        record: identifier,\n        field: this.key,\n        value: newData\n      });\n    });\n    if (!skipFetch) return this.load();\n  }\n\n  /**\n   `value()` synchronously returns the current value of the belongs-to\n   relationship. Unlike `record.relationshipName`, calling\n   `value()` on a reference does not trigger a fetch if the async\n   relationship is not yet loaded. If the relationship is not loaded\n   it will always return `null`.\n    Example\n    ```javascript\n   // models/blog.js\n   import { Model, belongsTo } from '@warp-drive/legacy/model';\n    export default class BlogModel extends Model {\n     @belongsTo('user', { async: true, inverse: null }) user;\n   }\n    let blog = store.push({\n      data: {\n        type: 'blog',\n        id: 1,\n        relationships: {\n          user: {\n            data: { type: 'user', id: 1 }\n          }\n        }\n      }\n    });\n   let userRef = blog.belongsTo('user');\n    userRef.value(); // null\n    // provide data for reference\n   userRef.push({\n      data: {\n        type: 'user',\n        id: 1,\n        attributes: {\n          username: \"@user\"\n        }\n      }\n    }).then(function(user) {\n      userRef.value(); // user\n    });\n   ```\n     @public\n   @return the record in this relationship\n   */\n  value() {\n    const resource = this._resource();\n    return resource && resource.data ? this.store.peekRecord(resource.data) : null;\n  }\n\n  /**\n   Loads a record in a belongs-to relationship if it is not already\n   loaded. If the relationship is already loaded this method does not\n   trigger a new load.\n    Example\n    ```javascript\n   // models/blog.js\n   import { Model, belongsTo } from '@warp-drive/legacy/model';\n    export default class BlogModel extends Model {\n     @belongsTo('user', { async: true, inverse: null }) user;\n   }\n    let blog = store.push({\n      data: {\n        type: 'blog',\n        id: 1,\n        relationships: {\n          user: {\n            data: { type: 'user', id: 1 }\n          }\n        }\n      }\n    });\n   let userRef = blog.belongsTo('user');\n    userRef.value(); // null\n    userRef.load().then(function(user) {\n      userRef.value() === user\n    });\n   ```\n    You may also pass in an options object whose properties will be\n   fed forward. This enables you to pass `adapterOptions` into the\n   request given to the adapter via the reference.\n    Example\n    ```javascript\n   userRef.load({ adapterOptions: { isPrivate: true } }).then(function(user) {\n     userRef.value() === user;\n   });\n   ```\n   ```js [app/adapters/user.js]\n   import Adapter from '@warp-drive/legacy/adapter';\n    export default class UserAdapter extends Adapter {\n     findRecord(store, type, id, snapshot) {\n       // In the adapter you will have access to adapterOptions.\n       let adapterOptions = snapshot.adapterOptions;\n     }\n   });\n   ```\n     @public\n   @param options the options to pass in.\n   @return a promise that resolves with the record in this belongs-to relationship.\n   */\n  async load(options) {\n    const support = LEGACY_SUPPORT.get(this.___identifier);\n    const fetchSyncRel = !this.belongsToRelationship.definition.isAsync && !areAllInverseRecordsLoaded(this.store, this._resource());\n    return fetchSyncRel ? support.reloadBelongsTo(this.key, options).then(() => this.value()) :\n    // we cast to fix the return type since typescript and eslint don't understand async functions\n    // properly\n    support.getBelongsTo(this.key, options);\n  }\n\n  /**\n   Triggers a reload of the value in this relationship. If the\n   remoteType is `\"link\"` WarpDrive will use the relationship link to\n   reload the relationship. Otherwise it will reload the record by its\n   id.\n    Example\n    ```javascript\n   // models/blog.js\n   import { Model, belongsTo } from '@warp-drive/legacy/model';\n    export default class BlogModel extends Model {\n     @belongsTo('user', { async: true, inverse: null }) user;\n   }\n    let blog = store.push({\n      data: {\n        type: 'blog',\n        id: 1,\n        relationships: {\n          user: {\n            data: { type: 'user', id: 1 }\n          }\n        }\n      }\n    });\n   let userRef = blog.belongsTo('user');\n    userRef.reload().then(function(user) {\n      userRef.value() === user\n    });\n   ```\n    You may also pass in an options object whose properties will be\n   fed forward. This enables you to pass `adapterOptions` into the\n   request given to the adapter via the reference. A full example\n   can be found in the `load` method.\n    Example\n    ```javascript\n   userRef.reload({ adapterOptions: { isPrivate: true } })\n   ```\n     @public\n   @param options the options to pass in.\n   @return a promise that resolves with the record in this belongs-to relationship after the reload has completed.\n   */\n  reload(options) {\n    const support = LEGACY_SUPPORT.get(this.___identifier);\n    return support.reloadBelongsTo(this.key, options).then(() => this.value());\n  }\n}\ndefineNonEnumerableSignal(BelongsToReference.prototype, '_ref', 0);\nconst LEGACY_SUPPORT = getOrSetGlobal('LEGACY_SUPPORT', new Map());\nfunction lookupLegacySupport(record) {\n  const identifier = recordIdentifierFor(record);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected a record`);\n    }\n  })(identifier) : {};\n  let support = LEGACY_SUPPORT.get(identifier);\n  if (!support) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Memory Leak Detected`);\n      }\n    })(!record.isDestroyed && !record.isDestroying) : {};\n    support = new LegacySupport(record, identifier);\n    LEGACY_SUPPORT.set(identifier, support);\n  }\n  return support;\n}\n\n/**\n * @hideconstructor\n */\nclass LegacySupport {\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  constructor(record, identifier) {\n    this.record = record;\n    this.store = isPrivateStore(storeFor(record, false));\n    this.identifier = identifier;\n    this.cache = this.store.cache;\n    if (this.store._graph) {\n      this.graph = this.store._graph;\n    }\n    this._manyArrayCache = Object.create(null);\n    this._relationshipPromisesCache = Object.create(null);\n    this._relationshipProxyCache = Object.create(null);\n    this._pending = Object.create(null);\n    this.references = Object.create(null);\n  }\n\n  /** @private */\n  _syncArray(array) {\n    // It’s possible the parent side of the relationship may have been destroyed by this point\n    if (this.isDestroyed || this.isDestroying) {\n      return;\n    }\n    const currentState = array[Context].source;\n    const identifier = this.identifier;\n    const [identifiers, jsonApi] = this._getCurrentState(identifier, array.key);\n    if (jsonApi.meta) {\n      array.meta = jsonApi.meta;\n    }\n    if (jsonApi.links) {\n      array.links = jsonApi.links;\n    }\n    currentState.length = 0;\n    fastPush(currentState, identifiers);\n  }\n  mutate(mutation) {\n    this.cache.mutate(mutation);\n  }\n  _findBelongsTo(key, resource, relationship, options) {\n    const name = getRealFieldName(this, key);\n\n    // TODO @runspired follow up if parent isNew then we should not be attempting load here\n    // TODO @runspired follow up on whether this should be in the relationship requests cache\n    return this._findBelongsToByJsonApiResource(resource, this.identifier, relationship, options).then(identifier => handleCompletedRelationshipRequest(this, name, relationship, identifier), e => handleCompletedRelationshipRequest(this, name, relationship, null, e));\n  }\n  reloadBelongsTo(key, options) {\n    const loadingPromise = this._relationshipPromisesCache[key];\n    if (loadingPromise) {\n      return loadingPromise;\n    }\n    const name = getRealFieldName(this, key);\n    const resource = this.store.cache.getRelationship(this.identifier, name);\n    const relationship = this.graph.get(this.identifier, name);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected ${key === name ? name : `${key} (source: ${name})`} to be a belongs-to relationship`);\n      }\n    })(isBelongsTo(relationship)) : {};\n    relationship.state.hasFailedLoadAttempt = false;\n    relationship.state.shouldForceReload = true;\n    const promise = this._findBelongsTo(name, resource, relationship, options);\n    if (this._relationshipProxyCache[name]) {\n      // @ts-expect-error\n      return this._updatePromiseProxyFor('belongsTo', name, {\n        promise\n      });\n    }\n    return promise;\n  }\n  getBelongsTo(key, options) {\n    const {\n      identifier\n    } = this;\n    const name = getRealFieldName(this, key);\n    const resource = this.store.cache.getRelationship(this.identifier, name);\n    const relatedIdentifier = resource && resource.data ? resource.data : null;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected a stable identifier`);\n      }\n    })(!relatedIdentifier || isResourceKey(relatedIdentifier)) : {};\n    const store = this.store;\n    const relationship = this.graph.get(this.identifier, name);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected ${key === name ? name : `${key} (source: ${name})`} to be a belongs-to relationship`);\n      }\n    })(isBelongsTo(relationship)) : {};\n    const isAsync = relationship.definition.isAsync;\n    const _belongsToState = {\n      key,\n      store,\n      legacySupport: this,\n      modelName: relationship.definition.type\n    };\n    if (isAsync) {\n      if (relationship.state.hasFailedLoadAttempt) {\n        return this._relationshipProxyCache[name];\n      }\n      const promise = this._findBelongsTo(name, resource, relationship, options);\n      const isLoaded = relatedIdentifier && store._instanceCache.recordIsLoaded(relatedIdentifier);\n      return this._updatePromiseProxyFor('belongsTo', name, {\n        promise,\n        content: isLoaded ? store._instanceCache.getRecord(relatedIdentifier) : null,\n        _belongsToState\n      });\n    } else {\n      if (relatedIdentifier === null) {\n        return null;\n      } else {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`You looked up the '${key === name ? name : `${key} (source: ${name})`}' relationship on a '${identifier.type}' with id ${identifier.id || 'null'} but some of the associated records were not loaded. Either make sure they are all loaded together with the parent record, or specify that the relationship is async (\\`belongsTo(<type>, { async: true, inverse: <inverse> })\\`)`);\n          }\n        })(store._instanceCache.recordIsLoaded(relatedIdentifier, true)) : {};\n        return store._instanceCache.getRecord(relatedIdentifier);\n      }\n    }\n  }\n  setDirtyBelongsTo(key, value) {\n    const name = getRealFieldName(this, key);\n    return this.cache.mutate({\n      op: 'replaceRelatedRecord',\n      record: this.identifier,\n      field: name,\n      value: extractIdentifierFromRecord(value)\n    },\n    // @ts-expect-error\n    true);\n  }\n  _getCurrentState(identifier, field) {\n    const jsonApi = this.cache.getRelationship(identifier, field);\n    const cache = this.store._instanceCache;\n    const identifiers = [];\n    if (jsonApi.data) {\n      for (let i = 0; i < jsonApi.data.length; i++) {\n        const relatedIdentifier = jsonApi.data[i];\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Expected a stable identifier`);\n          }\n        })(isResourceKey(relatedIdentifier)) : {};\n        if (cache.recordIsLoaded(relatedIdentifier, true)) {\n          identifiers.push(relatedIdentifier);\n        }\n      }\n    }\n    return [identifiers, jsonApi];\n  }\n  getManyArray(key, definition) {\n    const name = getRealFieldName(this, key);\n    if (this.graph) {\n      let manyArray = this._manyArrayCache[name];\n      if (!definition) {\n        definition = this.graph.get(this.identifier, name).definition;\n      }\n      if (!manyArray) {\n        const [identifiers, doc] = this._getCurrentState(this.identifier, name);\n        const field = getField(this, name);\n        manyArray = createLegacyManyArray({\n          store: this.store,\n          // @ts-expect-error Typescript doesn't have a way for us to thread the generic backwards so it infers unknown instead of T\n          manager: this,\n          source: identifiers,\n          type: definition.type,\n          isLoaded: !definition.isAsync,\n          editable: true,\n          isAsync: definition.isAsync,\n          isPolymorphic: definition.isPolymorphic,\n          field: field,\n          identifier: this.identifier,\n          links: doc.links || null,\n          meta: doc.meta || null\n        });\n        this._manyArrayCache[name] = manyArray;\n      }\n      return manyArray;\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error('hasMany only works with the JSONAPICache');\n      }\n    })() : {};\n  }\n  fetchAsyncHasMany(key, relationship, manyArray, options) {\n    const name = getRealFieldName(this, key);\n    if (this.graph) {\n      let loadingPromise = this._relationshipPromisesCache[name];\n      if (loadingPromise) {\n        return loadingPromise;\n      }\n      const jsonApi = this.cache.getRelationship(this.identifier, name);\n      const promise = this._findHasManyByJsonApiResource(jsonApi, this.identifier, relationship, options);\n      if (!promise) {\n        manyArray.isLoaded = true;\n        return Promise.resolve(manyArray);\n      }\n      loadingPromise = promise.then(() => handleCompletedRelationshipRequest(this, name, relationship, manyArray), e => handleCompletedRelationshipRequest(this, name, relationship, manyArray, e));\n      this._relationshipPromisesCache[name] = loadingPromise;\n      return loadingPromise;\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error('hasMany only works with the JSONAPICache');\n      }\n    })() : {};\n  }\n  reloadHasMany(key, options) {\n    const name = getRealFieldName(this, key);\n    if (this.graph) {\n      const loadingPromise = this._relationshipPromisesCache[name];\n      if (loadingPromise) {\n        return loadingPromise;\n      }\n      const relationship = this.graph.get(this.identifier, name);\n      const {\n        definition,\n        state\n      } = relationship;\n      state.hasFailedLoadAttempt = false;\n      state.shouldForceReload = true;\n      const manyArray = this.getManyArray(name, definition);\n      const promise = this.fetchAsyncHasMany(name, relationship, manyArray, options);\n      if (this._relationshipProxyCache[name]) {\n        return this._updatePromiseProxyFor('hasMany', name, {\n          promise\n        });\n      }\n      return promise;\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`hasMany only works with the JSONAPICache`);\n      }\n    })() : {};\n  }\n  getHasMany(key, options) {\n    const name = getRealFieldName(this, key);\n    if (this.graph) {\n      const relationship = this.graph.get(this.identifier, name);\n      const {\n        definition,\n        state\n      } = relationship;\n      const manyArray = this.getManyArray(name, definition);\n      if (definition.isAsync) {\n        if (state.hasFailedLoadAttempt) {\n          return this._relationshipProxyCache[name];\n        }\n        const promise = this.fetchAsyncHasMany(name, relationship, manyArray, options);\n        return this._updatePromiseProxyFor('hasMany', name, {\n          promise,\n          content: manyArray\n        });\n      } else {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`You looked up the '${key === name ? name : `${key} (source: ${name})`}' relationship on a '${this.identifier.type}' with id ${this.identifier.id || 'null'} but some of the associated records were not loaded. Either make sure they are all loaded together with the parent record, or specify that the relationship is async ('hasMany(<type>, { async: true, inverse: <inverse> })')`);\n          }\n        })(!anyUnloaded(this.store, relationship)) : {};\n        return manyArray;\n      }\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`hasMany only works with the JSONAPICache`);\n      }\n    })() : {};\n  }\n  _updatePromiseProxyFor(kind, key, args) {\n    let promiseProxy = this._relationshipProxyCache[key];\n    if (kind === 'hasMany') {\n      const {\n        promise,\n        content\n      } = args;\n      if (promiseProxy) {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Expected a PromiseManyArray`);\n          }\n        })('_update' in promiseProxy) : {};\n        promiseProxy._update(promise, content);\n      } else {\n        promiseProxy = this._relationshipProxyCache[key] = new PromiseManyArray(promise, content);\n      }\n      return promiseProxy;\n    }\n    if (promiseProxy) {\n      const {\n        promise,\n        content\n      } = args;\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected a PromiseBelongsTo`);\n        }\n      })('_belongsToState' in promiseProxy) : {};\n      if (content !== undefined) {\n        promiseProxy.set('content', content);\n      }\n      void promiseProxy.set('promise', promise);\n    } else {\n      promiseProxy = PromiseBelongsTo.create(args);\n      this._relationshipProxyCache[key] = promiseProxy;\n    }\n    return promiseProxy;\n  }\n  referenceFor(kind, key) {\n    const name = getRealFieldName(this, key);\n    let reference = this.references[name];\n    if (!reference) {\n      if (!this.graph) {\n        // TODO @runspired while this feels odd, it is not a regression in capability because we do\n        // not today support references pulling from RecordDatas other than our own\n        // because of the intimate API access involved. This is something we will need to redesign.\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          {\n            throw new Error(`snapshot.belongsTo only supported when using the JSONAPICache`);\n          }\n        })() : {};\n      }\n      const {\n        graph,\n        identifier\n      } = this;\n      const relationship = graph.get(identifier, name);\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        if (kind) {\n          const modelName = identifier.type;\n          const actualRelationshipKind = relationship.definition.kind;\n          macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n            if (!test) {\n              throw new Error(`You tried to get the '${key === name ? name : `${key} (source: ${name})`}' relationship on a '${modelName}' via record.${kind}('${key}'), but the relationship is of kind '${actualRelationshipKind}'. Use record.${actualRelationshipKind}('${key}') instead.`);\n            }\n          })(actualRelationshipKind === kind) : {};\n        }\n      }\n      const relationshipKind = relationship.definition.kind;\n      if (relationshipKind === 'belongsTo') {\n        reference = new BelongsToReference(this.store, graph, identifier, relationship, key);\n      } else if (relationshipKind === 'hasMany') {\n        reference = new HasManyReference(this.store, graph, identifier, relationship, key);\n      }\n      this.references[name] = reference;\n    }\n    return reference;\n  }\n  _findHasManyByJsonApiResource(resource, parentIdentifier, relationship, options = {}) {\n    if (this.graph) {\n      if (!resource) {\n        return;\n      }\n      const {\n        definition,\n        state\n      } = relationship;\n      upgradeStore(this.store);\n      const adapter = this.store.adapterFor?.(definition.type);\n      const {\n        isStale,\n        hasDematerializedInverse,\n        hasReceivedData,\n        isEmpty,\n        shouldForceReload\n      } = state;\n      const allInverseRecordsAreLoaded = areAllInverseRecordsLoaded(this.store, resource);\n      const identifiers = resource.data;\n      const shouldFindViaLink = resource.links && resource.links.related && (typeof adapter?.findHasMany === 'function' || typeof identifiers === 'undefined') && (shouldForceReload || hasDematerializedInverse || isStale || !allInverseRecordsAreLoaded && !isEmpty);\n      const field = this.store.schema.fields({\n        type: definition.inverseType\n      }).get(definition.key);\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected a hasMany field definition for ${definition.inverseType}.${definition.key}`);\n        }\n      })(field && field.kind === 'hasMany') : {};\n      const request = {\n        useLink: shouldFindViaLink,\n        field,\n        links: resource.links,\n        meta: resource.meta,\n        options,\n        record: parentIdentifier\n      };\n\n      // fetch via link\n      if (shouldFindViaLink) {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Expected collection to be an array`);\n          }\n        })(!identifiers || Array.isArray(identifiers)) : {};\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Expected stable identifiers`);\n          }\n        })(!identifiers || identifiers.every(isResourceKey)) : {};\n        const req = field.options.linksMode ? {\n          url: getRelatedLink(resource),\n          op: 'findHasMany',\n          method: 'GET',\n          records: identifiers || [],\n          data: request,\n          [EnableHydration]: false\n        } : {\n          op: 'findHasMany',\n          records: identifiers || [],\n          data: request,\n          cacheOptions: {\n            [Symbol.for('wd:skip-cache')]: true\n          }\n        };\n        return this.store.request(req);\n      }\n      const preferLocalCache = hasReceivedData && !isEmpty;\n      const hasLocalPartialData = hasDematerializedInverse || isEmpty && Array.isArray(identifiers) && identifiers.length > 0;\n      const attemptLocalCache = !shouldForceReload && !isStale && (preferLocalCache || hasLocalPartialData);\n      if (attemptLocalCache && allInverseRecordsAreLoaded) {\n        return;\n      }\n      const hasData = hasReceivedData && !isEmpty;\n      if (attemptLocalCache || hasData || hasLocalPartialData) {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Expected collection to be an array`);\n          }\n        })(Array.isArray(identifiers)) : {};\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Expected stable identifiers`);\n          }\n        })(identifiers.every(isResourceKey)) : {};\n        options.reload = options.reload || !attemptLocalCache || undefined;\n        return this.store.request({\n          op: 'findHasMany',\n          records: identifiers,\n          data: request,\n          cacheOptions: {\n            [Symbol.for('wd:skip-cache')]: true\n          }\n        });\n      }\n\n      // we were explicitly told we have no data and no links.\n      //   TODO if the relationshipIsStale, should we hit the adapter anyway?\n      return;\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`hasMany only works with the JSONAPICache`);\n      }\n    })() : {};\n  }\n  _findBelongsToByJsonApiResource(resource, parentIdentifier, relationship, options = {}) {\n    if (!resource) {\n      return Promise.resolve(null);\n    }\n    const key = relationship.definition.key;\n    const name = getRealFieldName(this, key);\n\n    // interleaved promises mean that we MUST cache this here\n    // in order to prevent infinite re-render if the request\n    // fails.\n    if (this._pending[name]) {\n      return this._pending[name];\n    }\n    const identifier = resource.data ? resource.data : null;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected a stable identifier`);\n      }\n    })(!identifier || isResourceKey(identifier)) : {};\n    const {\n      isStale,\n      hasDematerializedInverse,\n      hasReceivedData,\n      isEmpty,\n      shouldForceReload\n    } = relationship.state;\n    const allInverseRecordsAreLoaded = areAllInverseRecordsLoaded(this.store, resource);\n    const shouldFindViaLink = resource.links?.related && (shouldForceReload || hasDematerializedInverse || isStale || !allInverseRecordsAreLoaded && !isEmpty);\n    const field = this.store.schema.fields(this.identifier).get(relationship.definition.key);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to access a belongsTo relationship but no definition exists for it`);\n      }\n    })(field && field.kind === 'belongsTo') : {};\n    const request = {\n      useLink: shouldFindViaLink,\n      field,\n      links: resource.links,\n      meta: resource.meta,\n      options,\n      record: parentIdentifier\n    };\n\n    // fetch via link\n    if (shouldFindViaLink) {\n      const req = field.options.linksMode ? {\n        url: getRelatedLink(resource),\n        op: 'findBelongsTo',\n        method: 'GET',\n        records: identifier ? [identifier] : [],\n        data: request,\n        [EnableHydration]: false\n      } : {\n        op: 'findBelongsTo',\n        records: identifier ? [identifier] : [],\n        data: request,\n        cacheOptions: {\n          [Symbol.for('wd:skip-cache')]: true\n        }\n      };\n      const future = this.store.request(req);\n      this._pending[name] = future.then(doc => field.options.linksMode ? doc.content.data : doc.content).finally(() => {\n        this._pending[name] = undefined;\n      });\n      return this._pending[name];\n    }\n    const preferLocalCache = hasReceivedData && allInverseRecordsAreLoaded && !isEmpty;\n    const hasLocalPartialData = hasDematerializedInverse || isEmpty && resource.data;\n    // null is explicit empty, undefined is \"we don't know anything\"\n    const localDataIsEmpty = !identifier;\n    const attemptLocalCache = !shouldForceReload && !isStale && (preferLocalCache || hasLocalPartialData);\n\n    // we dont need to fetch and are empty\n    if (attemptLocalCache && localDataIsEmpty) {\n      return Promise.resolve(null);\n    }\n\n    // we dont need to fetch because we are local state\n    const resourceIsLocal = identifier?.id === null;\n    if (attemptLocalCache && allInverseRecordsAreLoaded || resourceIsLocal) {\n      return Promise.resolve(identifier);\n    }\n\n    // we may need to fetch\n    if (identifier) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Cannot fetch belongs-to relationship with no information`);\n        }\n      })(identifier) : {};\n      options.reload = options.reload || !attemptLocalCache || undefined;\n      this._pending[name] = this.store.request({\n        op: 'findBelongsTo',\n        records: [identifier],\n        data: request,\n        cacheOptions: {\n          [Symbol.for('wd:skip-cache')]: true\n        }\n      }).then(doc => doc.content).finally(() => {\n        this._pending[name] = undefined;\n      });\n      return this._pending[name];\n    }\n\n    // we were explicitly told we have no data and no links.\n    //   TODO if the relationshipIsStale, should we hit the adapter anyway?\n    return Promise.resolve(null);\n  }\n  destroy() {\n    this.isDestroying = true;\n    let cache = this._manyArrayCache;\n    this._manyArrayCache = Object.create(null);\n    Object.keys(cache).forEach(key => {\n      cache[key].destroy();\n    });\n    cache = this._relationshipProxyCache;\n    this._relationshipProxyCache = Object.create(null);\n    Object.keys(cache).forEach(key => {\n      const proxy = cache[key];\n      if (proxy.destroy) {\n        proxy.destroy();\n      }\n    });\n    cache = this.references;\n    this.references = Object.create(null);\n    Object.keys(cache).forEach(key => {\n      cache[key].destroy();\n    });\n    this.isDestroyed = true;\n  }\n}\nfunction getRelatedLink(resource) {\n  const related = resource.links?.related;\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected a related link`);\n    }\n  })(related) : {};\n  return typeof related === 'object' ? related.href : related;\n}\nfunction handleCompletedRelationshipRequest(recordExt, key, relationship, value, error) {\n  delete recordExt._relationshipPromisesCache[key];\n  relationship.state.shouldForceReload = false;\n  const isHasMany = relationship.definition.kind === 'hasMany';\n  if (isHasMany) {\n    // we don't notify the record property here to avoid refetch\n    // only the many array\n    notifyInternalSignal(value[Context].signal);\n  }\n  if (error) {\n    relationship.state.hasFailedLoadAttempt = true;\n    const proxy = recordExt._relationshipProxyCache[key];\n    // belongsTo relationships are sometimes unloaded\n    // when a load fails, in this case we need\n    // to make sure that we aren't proxying\n    // to destroyed content\n    // for the sync belongsTo reload case there will be no proxy\n    // for the async reload case there will be no proxy if the ui\n    // has never been accessed\n    if (proxy && !isHasMany) {\n      // @ts-expect-error unsure why this is not resolving the boolean but async belongsTo is weird\n      if (proxy.content && proxy.content.isDestroying) {\n        proxy.set('content', null);\n      }\n      recordExt.store.notifications._flush();\n    }\n    throw error;\n  }\n  if (isHasMany) {\n    value.isLoaded = true;\n  } else {\n    recordExt.store.notifications._flush();\n  }\n  relationship.state.hasFailedLoadAttempt = false;\n  // only set to not stale if no error is thrown\n  relationship.state.isStale = false;\n  return isHasMany || !value ? value : recordExt.store.peekRecord(value);\n}\nfunction extractIdentifierFromRecord(record) {\n  if (!record) {\n    return null;\n  }\n  return recordIdentifierFor(record);\n}\nfunction anyUnloaded(store, relationship) {\n  assertPrivateStore(store);\n  const graph = store._graph;\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected a Graph instance to be available`);\n    }\n  })(graph) : {};\n  const relationshipData = graph.getData(relationship.identifier, relationship.definition.key);\n  const state = relationshipData.data;\n  const cache = store._instanceCache;\n  const unloaded = state?.find(s => {\n    const isLoaded = cache.recordIsLoaded(s, true);\n    return !isLoaded;\n  });\n  return unloaded || false;\n}\nfunction areAllInverseRecordsLoaded(store, resource) {\n  assertPrivateStore(store);\n  const instanceCache = store._instanceCache;\n  const identifiers = resource.data;\n  if (Array.isArray(identifiers)) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected stable identifiers`);\n      }\n    })(identifiers.every(isResourceKey)) : {};\n    // treat as collection\n    // check for unloaded records\n    return identifiers.every(identifier => instanceCache.recordIsLoaded(identifier));\n  }\n\n  // treat as single resource\n  if (!identifiers) return true;\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected stable identifiers`);\n    }\n  })(isResourceKey(identifiers)) : {};\n  return instanceCache.recordIsLoaded(identifiers);\n}\nfunction isBelongsTo(relationship) {\n  return relationship.definition.kind === 'belongsTo';\n}\nfunction getField(context, key) {\n  const {\n    identifier,\n    store\n  } = context;\n  return store.schema.fields(identifier).get(key) ?? store.schema.cacheFields?.(identifier).get(key);\n}\nfunction getRealFieldName(context, key) {\n  const field = getField(context, key);\n  return field ? field.sourceKey ?? field.name : key;\n}\n\n// we force the type here to our own construct because mixin and extend patterns\n// lose generic signatures. We also do this because we need to Omit `clear` from\n// the type of ArrayProxy as we override it's signature.\nconst ArrayProxyWithCustomOverrides = ArrayProxy;\n\n/**\n  Holds validation errors for a given record, organized by attribute names.\n\n  This class is not directly instantiable.\n\n  Every `Model` has an `errors` property that is an instance of\n  `Errors`. This can be used to display validation error\n  messages returned from the server when a `record.save()` rejects.\n\n  For Example, if you had a `User` model that looked like this:\n\n  ```js [app/models/user.js]\n  import { Model, attr } from '@warp-drive/legacy/model';\n\n  export default class UserModel extends Model {\n    @attr('string') username;\n    @attr('string') email;\n  }\n  ```\n  And you attempted to save a record that did not validate on the backend:\n\n  ```javascript\n  let user = store.createRecord('user', {\n    username: 'tomster',\n    email: 'invalidEmail'\n  });\n  user.save();\n  ```\n\n  Your backend would be expected to return an error response that described\n  the problem, so that error messages can be generated on the app.\n\n  API responses will be translated into instances of `Errors` differently,\n  depending on the specific combination of adapter and serializer used. You\n  may want to check the documentation or the source code of the libraries\n  that you are using, to know how they expect errors to be communicated.\n\n  Errors can be displayed to the user by accessing their property name\n  to get an array of all the error objects for that property. Each\n  error object is a JavaScript object with two keys:\n\n  - `message` A string containing the error message from the backend\n  - `attribute` The name of the property associated with this error message\n\n  ```handlebars\n  <label>Username: <Input @value={{@model.username}} /> </label>\n  {{#each @model.errors.username as |error|}}\n    <div class=\"error\">\n      {{error.message}}\n    </div>\n  {{/each}}\n\n  <label>Email: <Input @value={{@model.email}} /> </label>\n  {{#each @model.errors.email as |error|}}\n    <div class=\"error\">\n      {{error.message}}\n    </div>\n  {{/each}}\n  ```\n\n  You can also access the special `messages` property on the error\n  object to get an array of all the error strings.\n\n  ```handlebars\n  {{#each @model.errors.messages as |message|}}\n    <div class=\"error\">\n      {{message}}\n    </div>\n  {{/each}}\n  ```\n\n  @class Errors\n  @public\n */\nclass Errors extends ArrayProxyWithCustomOverrides {\n  /**\n    @property errorsByAttributeName\n    @type {MapWithDefault}\n    @private\n  */\n  get errorsByAttributeName() {\n    return new Map();\n  }\n\n  /**\n    Returns errors for a given attribute\n     ```javascript\n    let user = store.createRecord('user', {\n      username: 'tomster',\n      email: 'invalidEmail'\n    });\n    user.save().catch(function(){\n      user.errors.errorsFor('email'); // returns:\n      // [{attribute: \"email\", message: \"Doesn't look like a valid email.\"}]\n    });\n    ```\n     @public\n    @param {String} attribute\n    @return {Array}\n  */\n  static {\n    decorateMethodV2(this.prototype, \"errorsByAttributeName\", [computed()]);\n  }\n  errorsFor(attribute) {\n    const map = this.errorsByAttributeName;\n    let errors = map.get(attribute);\n    if (errors === undefined) {\n      errors = A();\n      map.set(attribute, errors);\n    }\n\n    // Errors may be a native array with extensions turned on. Since we access\n    // the array via a method, and not a computed or using `Ember.get`, it does\n    // not entangle properly with autotracking, so we entangle manually by\n    // getting the `[]` property.\n    get(errors, '[]');\n    return errors;\n  }\n\n  /**\n    An array containing all of the error messages for this\n    record. This is useful for displaying all errors to the user.\n     ```handlebars\n    {{#each @model.errors.messages as |message|}}\n      <div class=\"error\">\n        {{message}}\n      </div>\n    {{/each}}\n    ```\n     @property messages\n    @public\n    @type {Array}\n  */\n  static {\n    decorateFieldV2(this.prototype, \"messages\", [mapBy('content', 'message')]);\n  }\n  #messages = (initializeDeferredDecorator(this, \"messages\"), void 0);\n  /**\n    @property content\n    @type {Array}\n    @private\n  */\n  get content() {\n    return A();\n  }\n\n  /**\n    @private\n  */\n  static {\n    decorateMethodV2(this.prototype, \"content\", [computed()]);\n  }\n  unknownProperty(attribute) {\n    const errors = this.errorsFor(attribute);\n    if (errors.length === 0) {\n      return undefined;\n    }\n    return errors;\n  }\n\n  /**\n    Total number of errors.\n     @property length\n    @type {Number}\n    @public\n    @readonly\n  */\n\n  /**\n    `true` if we have no errors.\n     @property isEmpty\n    @type {Boolean}\n    @public\n    @readonly\n  */\n  static {\n    decorateFieldV2(this.prototype, \"isEmpty\", [not('length')]);\n  }\n  #isEmpty = (initializeDeferredDecorator(this, \"isEmpty\"), void 0);\n  /**\n   Manually adds errors to the record. This will trigger the `becameInvalid` event/ lifecycle method on\n    the record and transition the record into an `invalid` state.\n    Example\n   ```javascript\n    let errors = user.errors;\n     // add multiple errors\n    errors.add('password', [\n      'Must be at least 12 characters',\n      'Must contain at least one symbol',\n      'Cannot contain your name'\n    ]);\n     errors.errorsFor('password');\n    // =>\n    // [\n    //   { attribute: 'password', message: 'Must be at least 12 characters' },\n    //   { attribute: 'password', message: 'Must contain at least one symbol' },\n    //   { attribute: 'password', message: 'Cannot contain your name' },\n    // ]\n     // add a single error\n    errors.add('username', 'This field is required');\n     errors.errorsFor('username');\n    // =>\n    // [\n    //   { attribute: 'username', message: 'This field is required' },\n    // ]\n   ```\n    @public\n    @param {String} attribute - the property name of an attribute or relationship\n    @param {string[]|string} messages - an error message or array of error messages for the attribute\n   */\n  add(attribute, messages) {\n    const errors = this._findOrCreateMessages(attribute, messages);\n    this.addObjects(errors);\n    this.errorsFor(attribute).addObjects(errors);\n    this.__record.currentState.notify('isValid');\n    this.notifyPropertyChange(attribute);\n  }\n\n  /**\n    @private\n  */\n  _findOrCreateMessages(attribute, messages) {\n    const errors = this.errorsFor(attribute);\n    const messagesArray = Array.isArray(messages) ? messages : [messages];\n    const _messages = new Array(messagesArray.length);\n    for (let i = 0; i < messagesArray.length; i++) {\n      const message = messagesArray[i];\n      const err = errors.findBy('message', message);\n      if (err) {\n        _messages[i] = err;\n      } else {\n        _messages[i] = {\n          attribute: attribute,\n          message\n        };\n      }\n    }\n    return _messages;\n  }\n\n  /**\n   Manually removes all errors for a given member from the record.\n     This will transition the record into a `valid` state, and\n    triggers the `becameValid` event and lifecycle method.\n    Example:\n    ```javascript\n    let errors = user.errors;\n    errors.add('phone', ['error-1', 'error-2']);\n     errors.errorsFor('phone');\n    // =>\n    // [\n    //   { attribute: 'phone', message: 'error-1' },\n    //   { attribute: 'phone', message: 'error-2' },\n    // ]\n     errors.remove('phone');\n     errors.errorsFor('phone');\n    // => undefined\n   ```\n    @public\n   @param {String} member - the property name of an attribute or relationship\n   */\n  remove(attribute) {\n    if (this.isEmpty) {\n      return;\n    }\n    const content = this.rejectBy('attribute', attribute);\n    this.content.setObjects(content);\n\n    // Although errorsByAttributeName.delete is technically enough to sync errors state, we also\n    // must mutate the array as well for autotracking\n    const errors = this.errorsFor(attribute);\n    for (let i = 0; i < errors.length; i++) {\n      if (errors[i].attribute === attribute) {\n        // .replace from Ember.NativeArray is necessary. JS splice will not work.\n        errors.replace(i, 1);\n      }\n    }\n    this.errorsByAttributeName.delete(attribute);\n    this.__record.currentState.notify('isValid');\n    this.notifyPropertyChange(attribute);\n    this.notifyPropertyChange('length');\n  }\n\n  /**\n   Manually clears all errors for the record.\n     This will transition the record into a `valid` state, and\n     will trigger the `becameValid` event and lifecycle method.\n   Example:\n    ```javascript\n   let errors = user.errors;\n   errors.add('username', ['error-a']);\n   errors.add('phone', ['error-1', 'error-2']);\n    errors.errorsFor('username');\n   // =>\n   // [\n   //   { attribute: 'username', message: 'error-a' },\n   // ]\n    errors.errorsFor('phone');\n   // =>\n   // [\n   //   { attribute: 'phone', message: 'error-1' },\n   //   { attribute: 'phone', message: 'error-2' },\n   // ]\n    errors.clear();\n    errors.errorsFor('username');\n   // => undefined\n    errors.errorsFor('phone');\n   // => undefined\n    errors.messages\n   // => []\n   ```\n   @public\n   */\n  clear() {\n    if (this.isEmpty) {\n      return;\n    }\n    const errorsByAttributeName = this.errorsByAttributeName;\n    const attributes = [];\n    errorsByAttributeName.forEach(function (_, attribute) {\n      attributes.push(attribute);\n    });\n    errorsByAttributeName.clear();\n    attributes.forEach(attribute => {\n      this.notifyPropertyChange(attribute);\n    });\n    this.__record.currentState.notify('isValid');\n    super.clear();\n  }\n\n  /**\n    Checks if there are error messages for the given attribute.\n     ```js [app/controllers/user/edit.js]\n    export default class UserEditController extends Controller {\n      @action\n      save(user) {\n        if (user.errors.has('email')) {\n          return alert('Please update your email before attempting to save.');\n        }\n        user.save();\n      }\n    }\n    ```\n     @public\n    @param {String} attribute\n    @return {Boolean} true if there some errors on given attribute\n  */\n  has(attribute) {\n    return this.errorsFor(attribute).length > 0;\n  }\n}\nexport { Errors as E, LEGACY_SUPPORT as L, PromiseBelongsTo as P, PromiseManyArray as a, lookupLegacySupport as l };","import { getOwner } from '@ember/application';\nimport { deprecate } from '@ember/debug';\nimport EmberObject from '@ember/object';\nimport { recordIdentifierFor, storeFor } from '@warp-drive/core';\nimport { notifyInternalSignal, peekInternalSignal, withSignalStore, gate, memoized, defineSignal, entangleSignal, defineGate } from '@warp-drive/core/signals/-leaked';\nimport { assertPrivateStore, recordIdentifierFor as recordIdentifierFor$1, coerceId } from '@warp-drive/core/store/-private';\nimport { RecordStore } from '@warp-drive/core/types/symbols';\nimport { l as lookupLegacySupport, L as LEGACY_SUPPORT, E as Errors } from \"./errors-Cz5KrzBk.js\";\nimport { u as upgradeStore, F as FetchManager } from \"./-private-BG3bMiKp.js\";\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nimport { cacheFor } from '@ember/object/internals';\nimport { Context } from '@warp-drive/core/reactive/-private';\nimport { d as decorateMethodV2 } from \"./runtime-BPCpkOf1-BKOwiRJp.js\";\nimport { n as normalizeModelName } from \"./util-Dul6TZts.js\";\nfunction rollbackAttributes() {\n  const {\n    currentState\n  } = this;\n  const {\n    isNew\n  } = currentState;\n  const store = this[RecordStore];\n  assertPrivateStore(store);\n  store._join(() => {\n    store.cache.rollbackAttrs(recordIdentifierFor(this));\n    this.errors.clear();\n    currentState.cleanErrorRequests();\n    if (isNew) {\n      this.unloadRecord();\n    }\n  });\n}\nfunction unloadRecord() {\n  if (this.currentState.isNew && (this.isDestroyed || this.isDestroying)) {\n    return;\n  }\n  this[RecordStore].unloadRecord(this);\n}\nfunction belongsTo(prop) {\n  return lookupLegacySupport(this).referenceFor('belongsTo', prop);\n}\nfunction hasMany(prop) {\n  return lookupLegacySupport(this).referenceFor('hasMany', prop);\n}\nfunction reload(options = {}) {\n  if (macroCondition(!getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_REQUEST_METHODS)) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`You cannot use reload() on a record when ENABLE_LEGACY_REQUEST_METHODS is false.`);\n      }\n    })() : {};\n  } else {\n    deprecate(`record.reload is deprecated, please use store.request to initiate a request instead.`, false, {\n      id: 'warp-drive:deprecate-legacy-request-methods',\n      until: '6.0',\n      for: '@warp-drive/core',\n      url: 'https://docs.warp-drive.io/api/@warp-drive/core/build-config/deprecations/variables/ENABLE_LEGACY_REQUEST_METHODS',\n      since: {\n        enabled: '5.7',\n        available: '5.7'\n      }\n    });\n    return _reload.call(this, options);\n  }\n}\nfunction _reload(options = {}) {\n  options.isReloading = true;\n  options.reload = true;\n  const identifier = recordIdentifierFor(this);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You cannot reload a record without an ID`);\n    }\n  })(identifier.id) : {};\n  this.isReloading = true;\n  const promise = this[RecordStore].request({\n    op: 'findRecord',\n    data: {\n      options,\n      record: identifier\n    },\n    cacheOptions: {\n      [Symbol.for('wd:skip-cache')]: true\n    }\n  }).then(() => this).finally(() => {\n    this.isReloading = false;\n  });\n  return promise;\n}\nfunction changedAttributes() {\n  return this[RecordStore].cache.changedAttrs(recordIdentifierFor(this));\n}\nfunction serialize(options) {\n  upgradeStore(this[RecordStore]);\n  return this[RecordStore].serializeRecord(this, options);\n}\nfunction deleteRecord() {\n  // ensure we've populated currentState prior to deleting a new record\n  if (this.currentState) {\n    this[RecordStore].deleteRecord(this);\n  }\n}\nfunction save(options) {\n  if (macroCondition(!getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_REQUEST_METHODS)) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`You cannot use save() on a record when ENABLE_LEGACY_REQUEST_METHODS is false.`);\n      }\n    })() : {};\n  } else {\n    deprecate(`record.save is deprecated, please use store.request to initiate a request instead.`, false, {\n      id: 'warp-drive:deprecate-legacy-request-methods',\n      until: '6.0',\n      for: '@warp-drive/core',\n      url: 'https://docs.warp-drive.io/api/@warp-drive/core/build-config/deprecations/variables/ENABLE_LEGACY_REQUEST_METHODS',\n      since: {\n        enabled: '5.7',\n        available: '5.7'\n      }\n    });\n    return _save.call(this, options);\n  }\n}\nfunction _save(options) {\n  let promise;\n  if (this.currentState.isNew && this.currentState.isDeleted) {\n    promise = Promise.resolve(this);\n  } else {\n    this.errors.clear();\n    promise = this[RecordStore].saveRecord(this, options);\n  }\n  return promise;\n}\nfunction destroyRecord(options) {\n  if (macroCondition(!getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_REQUEST_METHODS)) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`You cannot use destroyRecord() on a record when ENABLE_LEGACY_REQUEST_METHODS is false.`);\n      }\n    })() : {};\n  } else {\n    deprecate(`record.destroyRecord is deprecated, please use store.request to initiate a request instead.`, false, {\n      id: 'warp-drive:deprecate-legacy-request-methods',\n      until: '6.0',\n      for: '@warp-drive/core',\n      url: 'https://docs.warp-drive.io/api/@warp-drive/core/build-config/deprecations/variables/ENABLE_LEGACY_REQUEST_METHODS',\n      since: {\n        enabled: '5.7',\n        available: '5.7'\n      }\n    });\n    return _destroyRecord.call(this, options);\n  }\n}\nfunction _destroyRecord(options) {\n  const {\n    isNew\n  } = this.currentState;\n  this.deleteRecord();\n  if (isNew) {\n    return Promise.resolve(this);\n  }\n  return this.save(options).then(_ => {\n    this.unloadRecord();\n    return this;\n  });\n}\nfunction createSnapshot() {\n  const store = this[RecordStore];\n  if (!store._fetchManager) {\n    store._fetchManager = new FetchManager(store);\n  }\n\n  // @ts-expect-error Typescript isn't able to curry narrowed args that are divorced from each other.\n  return store._fetchManager.createSnapshot(recordIdentifierFor(this));\n}\nfunction notifyChanges(identifier, value, key, record, store) {\n  switch (value) {\n    case 'added':\n    case 'attributes':\n      if (key) {\n        notifyAttribute(store, identifier, key, record);\n      } else {\n        record.eachAttribute(name => {\n          notifyAttribute(store, identifier, name, record);\n        });\n      }\n      break;\n    case 'relationships':\n      if (key) {\n        const meta = record.constructor.relationshipsByName.get(key);\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Expected to find a relationship for ${key} on ${identifier.type}`);\n          }\n        })(meta) : {};\n        notifyRelationship(identifier, key, record, meta);\n      } else {\n        record.eachRelationship((name, meta) => {\n          notifyRelationship(identifier, name, record, meta);\n        });\n      }\n      break;\n    case 'identity':\n      notifyInternalSignal(peekInternalSignal(withSignalStore(record), 'id'));\n      break;\n  }\n}\nfunction notifyRelationship(identifier, key, record, meta) {\n  if (meta.kind === 'belongsTo') {\n    record.notifyPropertyChange(key);\n  } else if (meta.kind === 'hasMany') {\n    const support = LEGACY_SUPPORT.get(identifier);\n    const manyArray = support && support._manyArrayCache[key];\n    const hasPromise = support && support._relationshipPromisesCache[key];\n    if (manyArray && hasPromise) {\n      // do nothing, we will notify the ManyArray directly\n      // once the fetch has completed.\n      return;\n    }\n    if (manyArray) {\n      notifyInternalSignal(manyArray[Context].signal);\n\n      //We need to notifyPropertyChange in the adding case because we need to make sure\n      //we fetch the newly added record in case it is unloaded\n      //TODO(Igor): Consider whether we could do this only if the record state is unloaded\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected options to exist on relationship meta`);\n        }\n      })(meta.options) : {};\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected async to exist on relationship meta options`);\n        }\n      })('async' in meta.options) : {};\n      if (meta.options.async) {\n        record.notifyPropertyChange(key);\n      }\n    }\n  }\n}\nfunction notifyAttribute(store, identifier, key, record) {\n  const currentValue = cacheFor(record, key);\n  const cache = store.cache;\n  if (currentValue !== cache.getAttr(identifier, key)) {\n    record.notifyPropertyChange(key);\n  }\n}\nconst SOURCE_POINTER_REGEXP = /^\\/?data\\/(attributes|relationships)\\/(.*)/;\nconst SOURCE_POINTER_PRIMARY_REGEXP = /^\\/?data/;\nconst PRIMARY_ATTRIBUTE_KEY = 'base';\nfunction isInvalidError(error) {\n  return !!error && error instanceof Error && 'isAdapterError' in error && error.isAdapterError === true && 'code' in error && error.code === 'InvalidError';\n}\n\n/**\nHistorically WarpDrive managed a state machine\nfor each record, the localState for which\nwas reflected onto Model.\n\nThis implements the flags and stateName for backwards compat\nwith the state tree that used to be possible (listed below).\n\nstateName and dirtyType are candidates for deprecation.\n\nroot\n  empty\n    deleted    // hidden from stateName\n    preloaded  // hidden from stateName\n\n  loading\n     empty     // hidden from stateName\n     preloaded // hidden from stateName\n\n  loaded\n    saved\n    updated\n      uncommitted\n      invalid\n      inFlight\n    created\n      uncommitted\n      invalid\n      inFlight\n\n  deleted\n    saved\n      new      // hidden from stateName\n    uncommitted\n    invalid\n    inFlight\n\n  @hideconstructor\n  @private\n*/\nclass RecordState {\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  constructor(record) {\n    const store = storeFor(record, false);\n    const identity = recordIdentifierFor$1(record);\n    this.identifier = identity;\n    this.record = record;\n    this.cache = store.cache;\n    this.pendingCount = 0;\n    this.fulfilledCount = 0;\n    this.rejectedCount = 0;\n    this._errorRequests = [];\n    this._lastError = null;\n    const requests = store.getRequestStateService();\n    const notifications = store.notifications;\n    const handleRequest = req => {\n      if (req.type === 'mutation') {\n        switch (req.state) {\n          case 'pending':\n            this.isSaving = true;\n            break;\n          case 'rejected':\n            this.isSaving = false;\n            this._lastError = req;\n            if (!(req.response && isInvalidError(req.response.data))) {\n              this._errorRequests.push(req);\n            }\n            notifyErrorsStateChanged(this);\n            break;\n          case 'fulfilled':\n            this._errorRequests = [];\n            this._lastError = null;\n            this.isSaving = false;\n            this.notify('isDirty');\n            notifyErrorsStateChanged(this);\n            break;\n        }\n      } else {\n        switch (req.state) {\n          case 'pending':\n            this.pendingCount++;\n            this.notify('isLoading');\n            break;\n          case 'rejected':\n            this.pendingCount--;\n            this._lastError = req;\n            if (!(req.response && isInvalidError(req.response.data))) {\n              this._errorRequests.push(req);\n            }\n            this.notify('isLoading');\n            notifyErrorsStateChanged(this);\n            break;\n          case 'fulfilled':\n            this.pendingCount--;\n            this.fulfilledCount++;\n            this.notify('isLoading');\n            this.notify('isDirty');\n            notifyErrorsStateChanged(this);\n            this._errorRequests = [];\n            this._lastError = null;\n            break;\n        }\n      }\n    };\n    requests.subscribeForRecord(identity, handleRequest);\n\n    // we instantiate lazily\n    // so we grab anything we don't have yet\n    const lastRequest = requests.getLastRequestForRecord(identity);\n    if (lastRequest) {\n      handleRequest(lastRequest);\n    }\n    this.handler = notifications.subscribe(identity, (identifier, type, key) => {\n      switch (type) {\n        case 'state':\n          this.notify('isSaved');\n          this.notify('isNew');\n          this.notify('isDeleted');\n          this.notify('isDirty');\n          break;\n        case 'attributes':\n          this.notify('isEmpty');\n          this.notify('isDirty');\n          break;\n        case 'errors':\n          this.updateInvalidErrors(this.record.errors);\n          this.notify('isValid');\n          break;\n      }\n    });\n  }\n\n  /** @internal */\n  destroy() {\n    storeFor(this.record, false).notifications.unsubscribe(this.handler);\n  }\n\n  /** @internal */\n  notify(key) {\n    const signals = withSignalStore(this);\n    const signal = peekInternalSignal(signals, key);\n    if (signal) {\n      notifyInternalSignal(signal);\n    }\n  }\n\n  /** @internal */\n  updateInvalidErrors(errors) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected the Cache instance for ${this.identifier.lid}  to implement getErrors(identifier)`);\n      }\n    })(typeof this.cache.getErrors === 'function') : {};\n    const jsonApiErrors = this.cache.getErrors(this.identifier);\n    errors.clear();\n    for (let i = 0; i < jsonApiErrors.length; i++) {\n      const error = jsonApiErrors[i];\n      if (error.source && error.source.pointer) {\n        const keyMatch = error.source.pointer.match(SOURCE_POINTER_REGEXP);\n        let key;\n        if (keyMatch) {\n          key = keyMatch[2];\n        } else if (error.source.pointer.search(SOURCE_POINTER_PRIMARY_REGEXP) !== -1) {\n          key = PRIMARY_ATTRIBUTE_KEY;\n        }\n        if (key) {\n          const errMsg = error.detail || error.title;\n          macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n            if (!test) {\n              throw new Error(`Expected field error to have a detail or title to use as the message`);\n            }\n          })(errMsg) : {};\n          errors.add(key, errMsg);\n        }\n      }\n    }\n  }\n\n  /** @internal */\n  cleanErrorRequests() {\n    this.notify('isValid');\n    this.notify('isError');\n    this.notify('adapterError');\n    this._errorRequests = [];\n    this._lastError = null;\n  }\n  get isLoading() {\n    return !this.isLoaded && this.pendingCount > 0 && this.fulfilledCount === 0;\n  }\n  static {\n    decorateMethodV2(this.prototype, \"isLoading\", [gate]);\n  }\n  get isLoaded() {\n    if (this.isNew) {\n      return true;\n    }\n    return this.fulfilledCount > 0 || !this.isEmpty;\n  }\n  static {\n    decorateMethodV2(this.prototype, \"isLoaded\", [gate]);\n  }\n  get isSaved() {\n    const rd = this.cache;\n    if (this.isDeleted) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected Cache to implement isDeletionCommitted()`);\n        }\n      })(typeof rd.isDeletionCommitted === 'function') : {};\n      return rd.isDeletionCommitted(this.identifier);\n    }\n    if (this.isNew || this.isEmpty || !this.isValid || this.isDirty || this.isLoading) {\n      return false;\n    }\n    return true;\n  }\n  static {\n    decorateMethodV2(this.prototype, \"isSaved\", [gate]);\n  }\n  get isEmpty() {\n    const rd = this.cache;\n    // TODO this is not actually an RFC'd concept. Determine the\n    // correct heuristic to replace this with.\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected Cache to implement isEmpty()`);\n      }\n    })(typeof rd.isEmpty === 'function') : {};\n    return !this.isNew && rd.isEmpty(this.identifier);\n  }\n  static {\n    decorateMethodV2(this.prototype, \"isEmpty\", [gate]);\n  }\n  get isNew() {\n    const rd = this.cache;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected Cache to implement isNew()`);\n      }\n    })(typeof rd.isNew === 'function') : {};\n    return rd.isNew(this.identifier);\n  }\n  static {\n    decorateMethodV2(this.prototype, \"isNew\", [gate]);\n  }\n  get isDeleted() {\n    const rd = this.cache;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected Cache to implement isDeleted()`);\n      }\n    })(typeof rd.isDeleted === 'function') : {};\n    return rd.isDeleted(this.identifier);\n  }\n  static {\n    decorateMethodV2(this.prototype, \"isDeleted\", [gate]);\n  }\n  get isValid() {\n    return this.record.errors.length === 0;\n  }\n  static {\n    decorateMethodV2(this.prototype, \"isValid\", [gate]);\n  }\n  get isDirty() {\n    const rd = this.cache;\n    if (this.isEmpty || rd.isDeletionCommitted(this.identifier) || this.isDeleted && this.isNew) {\n      return false;\n    }\n    return this.isDeleted || this.isNew || rd.hasChangedAttrs(this.identifier);\n  }\n  static {\n    decorateMethodV2(this.prototype, \"isDirty\", [gate]);\n  }\n  get isError() {\n    const errorReq = this._errorRequests[this._errorRequests.length - 1];\n    if (!errorReq) {\n      return false;\n    } else {\n      return true;\n    }\n  }\n  static {\n    decorateMethodV2(this.prototype, \"isError\", [gate]);\n  }\n  get adapterError() {\n    const request = this._lastError;\n    if (!request) {\n      return null;\n    }\n    return request.state === 'rejected' && request.response.data;\n  }\n  static {\n    decorateMethodV2(this.prototype, \"adapterError\", [gate]);\n  }\n  get isPreloaded() {\n    return !this.isEmpty && this.isLoading;\n  }\n  static {\n    decorateMethodV2(this.prototype, \"isPreloaded\", [memoized]);\n  }\n  get stateName() {\n    // we might be empty while loading so check this first\n    if (this.isLoading) {\n      return 'root.loading';\n\n      // got nothing yet or were unloaded\n    } else if (this.isEmpty) {\n      return 'root.empty';\n\n      // deleted substates\n    } else if (this.isDeleted) {\n      if (this.isSaving) {\n        return 'root.deleted.inFlight';\n      } else if (this.isSaved) {\n        // TODO ensure isSaved isn't true from previous requests\n        return 'root.deleted.saved';\n      } else if (!this.isValid) {\n        return 'root.deleted.invalid';\n      } else {\n        return 'root.deleted.uncommitted';\n      }\n\n      // loaded.created substates\n    } else if (this.isNew) {\n      if (this.isSaving) {\n        return 'root.loaded.created.inFlight';\n      } else if (!this.isValid) {\n        return 'root.loaded.created.invalid';\n      }\n      return 'root.loaded.created.uncommitted';\n\n      // loaded.updated substates\n    } else if (this.isSaving) {\n      return 'root.loaded.updated.inFlight';\n    } else if (!this.isValid) {\n      return 'root.loaded.updated.invalid';\n    } else if (this.isDirty) {\n      return 'root.loaded.updated.uncommitted';\n\n      // if nothing remains, we are loaded saved!\n    } else {\n      return 'root.loaded.saved';\n    }\n  }\n  static {\n    decorateMethodV2(this.prototype, \"stateName\", [memoized]);\n  }\n  get dirtyType() {\n    // we might be empty while loading so check this first\n    if (this.isLoading || this.isEmpty) {\n      return '';\n\n      // deleted substates\n    } else if (this.isDirty && this.isDeleted) {\n      return 'deleted';\n\n      // loaded.created substates\n    } else if (this.isNew) {\n      return 'created';\n\n      // loaded.updated substates\n    } else if (this.isSaving || !this.isValid || this.isDirty) {\n      return 'updated';\n\n      // if nothing remains, we are loaded saved!\n    } else {\n      return '';\n    }\n  }\n  static {\n    decorateMethodV2(this.prototype, \"dirtyType\", [memoized]);\n  }\n}\ndefineSignal(RecordState.prototype, 'isSaving', false);\nfunction notifyErrorsStateChanged(state) {\n  state.notify('isValid');\n  state.notify('isError');\n  state.notify('adapterError');\n}\n\n/*\n * This decorator allows us to lazily compute\n * an expensive getter on first-access and thereafter\n * never recompute it.\n */\nfunction computeOnce(target, propertyName, desc) {\n  const cache = new WeakMap();\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  const getter = desc.get;\n  desc.get = function () {\n    let meta = cache.get(this);\n    if (!meta) {\n      meta = {\n        hasComputed: false,\n        value: undefined\n      };\n      cache.set(this, meta);\n    }\n    if (!meta.hasComputed) {\n      meta.value = getter.call(this);\n      meta.hasComputed = true;\n    }\n    return meta.value;\n  };\n  return desc;\n}\n/**\n * Base class from which Models can be defined.\n *\n * ::: code-group\n *\n * ```js [app/models/user.js]\n * import { Model, attr, belongsTo, hasMany } from '@warp-drive/legacy/model';\n *\n * export default class User extends Model {\n *   @attr name;\n *   @attr('number') age;\n *   @hasMany('post', { async: true, inverse: null }) posts;\n *   @belongsTo('group', { async: false, inverse: 'users' }) group;\n * }\n * ```\n *\n * ```ts [app/models/user.ts]\n * import { Model, attr, belongsTo, hasMany, type AsyncHasMany } from '@warp-drive/legacy/model';\n * import type { NumberTransform } from '@ember-data/serializer/transform';\n * import type Group from './group';\n * import type Post from './post';\n *\n * export default class User extends Model {\n *   @attr declare name: string;\n *\n *   @attr<NumberTransform>('number')\n *   declare age: number;\n *\n *   @hasMany('post', { async: true, inverse: null })\n *   declare posts: AsyncHasMany<Post>;\n *\n *   @belongsTo('group', { async: false, inverse: 'users' })\n *   declare group: Group | null;\n * }\n * ```\n *\n * :::\n *\n * Models both define the schema for a resource type and provide\n * the class to use as the reactive object for data of resource\n * of that type.\n *\n * @public\n * @noInheritDoc\n * @hideconstructor\n * @legacy\n */\nclass Model extends EmberObject {\n  /** @internal */\n  init(options) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      if (!options?._secretInit && !options?._createProps) {\n        throw new Error('You should not call `create` on a model. Instead, call `store.createRecord` with the attributes you would like to set.');\n      }\n    }\n    const createProps = options._createProps;\n    const _secretInit = options._secretInit;\n    options._createProps = null;\n    options._secretInit = null;\n    const store = this.store = _secretInit.store;\n    super.init(options);\n    this[RecordStore] = store;\n    const identity = _secretInit.identifier;\n    _secretInit.cb(this, identity, _secretInit.store);\n    this.___recordState = macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? new RecordState(this) : null;\n    this.setProperties(createProps);\n    const notifications = store.notifications;\n    this.___private_notifications = notifications.subscribe(identity, (identifier, type, field) => {\n      notifyChanges(identifier, type, field, this, store);\n    });\n  }\n\n  /** @private */\n  // @ts-expect-error destroy should not return a value, but ember's types force it to\n  destroy() {\n    const identifier = recordIdentifierFor(this);\n    this.___recordState?.destroy();\n    const store = storeFor(this, false);\n    store.notifications.unsubscribe(this.___private_notifications);\n    const support = LEGACY_SUPPORT.get(identifier);\n    if (support) {\n      support.destroy();\n      LEGACY_SUPPORT.delete(identifier);\n    }\n    super.destroy();\n  }\n\n  /**\n    If this property is `true` the record is in the `empty`\n    state. Empty is the first state all records enter after they have\n    been created. Most records created by the store will quickly\n    transition to the `loading` state if data needs to be fetched from\n    the server or the `created` state if the record is created on the\n    client. A record can also enter the empty state if the adapter is\n    unable to locate the record.\n     @public\n  */\n  get isEmpty() {\n    return this.currentState.isEmpty;\n  }\n\n  /**\n    If this property is `true` the record is in the `loading` state. A\n    record enters this state when the store asks the adapter for its\n    data. It remains in this state until the adapter provides the\n    requested data.\n     @public\n  */\n  static {\n    decorateMethodV2(this.prototype, \"isEmpty\", [memoized]);\n  }\n  get isLoading() {\n    return this.currentState.isLoading;\n  }\n\n  /**\n    If this property is `true` the record is in the `loaded` state. A\n    record enters this state when its data is populated. Most of a\n    record's lifecycle is spent inside substates of the `loaded`\n    state.\n     Example\n     ```javascript\n    let record = store.createRecord('model');\n    record.isLoaded; // true\n     const { content: { data: model } } = await store.request(findRecord({ type: 'model', id: '1' }));\n    model.isLoaded;\n    ```\n     @public\n  */\n  static {\n    decorateMethodV2(this.prototype, \"isLoading\", [memoized]);\n  }\n  get isLoaded() {\n    return this.currentState.isLoaded;\n  }\n\n  /**\n    If this property is `true` the record is in the `dirty` state. The\n    record has local changes that have not yet been saved by the\n    adapter. This includes records that have been created (but not yet\n    saved) or deleted.\n     Example\n     ```javascript\n    let record = store.createRecord('model');\n    record.hasDirtyAttributes; // true\n     const { content: { data: model } } = await store.request(findRecord({ type: 'model', id: '1' }));\n     model.hasDirtyAttributes; // false\n    model.foo = 'some value';\n    model.hasDirtyAttributes; // true\n    ```\n     @since 1.13.0\n    @public\n  */\n  static {\n    decorateMethodV2(this.prototype, \"isLoaded\", [memoized]);\n  }\n  get hasDirtyAttributes() {\n    return this.currentState.isDirty;\n  }\n\n  /**\n    If this property is `true` the record is in the `saving` state. A\n    record enters the saving state when `save` is called, but the\n    adapter has not yet acknowledged that the changes have been\n    persisted to the backend.\n     Example\n     ```javascript\n    let record = store.createRecord('model');\n    record.isSaving; // false\n    let promise = record.save();\n    record.isSaving; // true\n    promise.then(function() {\n      record.isSaving; // false\n    });\n    ```\n     @public\n  */\n  static {\n    decorateMethodV2(this.prototype, \"hasDirtyAttributes\", [memoized]);\n  }\n  get isSaving() {\n    return this.currentState.isSaving;\n  }\n\n  /**\n    If this property is `true` the record is in the `deleted` state\n    and has been marked for deletion. When `isDeleted` is true and\n    `hasDirtyAttributes` is true, the record is deleted locally but the deletion\n    was not yet persisted. When `isSaving` is true, the change is\n    in-flight. When both `hasDirtyAttributes` and `isSaving` are false, the\n    change has persisted.\n     Example\n     ```javascript\n    let record = store.createRecord('model');\n    record.isDeleted;    // false\n    record.deleteRecord();\n     // Locally deleted\n    record.isDeleted;           // true\n    record.hasDirtyAttributes;  // true\n    record.isSaving;            // false\n     // Persisting the deletion\n    let promise = record.save();\n    record.isDeleted;    // true\n    record.isSaving;     // true\n     // Deletion Persisted\n    promise.then(function() {\n      record.isDeleted;          // true\n      record.isSaving;           // false\n      record.hasDirtyAttributes; // false\n    });\n    ```\n     @public\n  */\n  static {\n    decorateMethodV2(this.prototype, \"isSaving\", [memoized]);\n  }\n  get isDeleted() {\n    return this.currentState.isDeleted;\n  }\n\n  /**\n    If this property is `true` the record is in the `new` state. A\n    record will be in the `new` state when it has been created on the\n    client and the adapter has not yet report that it was successfully\n    saved.\n     Example\n     ```javascript\n    let record = store.createRecord('model');\n    record.isNew; // true\n     record.save().then(function(model) {\n      model.isNew; // false\n    });\n    ```\n     @public\n  */\n  static {\n    decorateMethodV2(this.prototype, \"isDeleted\", [memoized]);\n  }\n  get isNew() {\n    return this.currentState.isNew;\n  }\n\n  /**\n    If this property is `true` the record is in the `valid` state.\n     A record will be in the `valid` state when the adapter did not report any\n    server-side validation failures.\n     @public\n  */\n  static {\n    decorateMethodV2(this.prototype, \"isNew\", [memoized]);\n  }\n  get isValid() {\n    return this.currentState.isValid;\n  }\n\n  /**\n    If the record is in the dirty state this property will report what\n    kind of change has caused it to move into the dirty\n    state. Possible values are:\n     - `created` The record has been created by the client and not yet saved to the adapter.\n    - `updated` The record has been updated by the client and not yet saved to the adapter.\n    - `deleted` The record has been deleted by the client and not yet saved to the adapter.\n     Example\n     ```javascript\n    let record = store.createRecord('model');\n    record.dirtyType; // 'created'\n    ```\n     @public\n  */\n  static {\n    decorateMethodV2(this.prototype, \"isValid\", [memoized]);\n  }\n  get dirtyType() {\n    return this.currentState.dirtyType;\n  }\n\n  /**\n    If `true` the adapter reported that it was unable to save local\n    changes to the backend for any reason other than a server-side\n    validation error.\n     Example\n     ```javascript\n    record.isError; // false\n    record.set('foo', 'valid value');\n    record.save().then(null, function() {\n      record.isError; // true\n    });\n    ```\n     @public\n  */\n  static {\n    decorateMethodV2(this.prototype, \"dirtyType\", [memoized]);\n  }\n  get isError() {\n    return this.currentState.isError;\n  }\n  static {\n    decorateMethodV2(this.prototype, \"isError\", [memoized]);\n  }\n  set isError(v) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      throw new Error(`isError is not directly settable`);\n    }\n  }\n\n  /**\n    If `true` the store is attempting to reload the record from the adapter.\n     Example\n     ```javascript\n    record.isReloading; // false\n    record.reload();\n    record.isReloading; // true\n    ```\n     @public\n  */\n\n  /**\n    All ember models have an id property. This is an identifier\n    managed by an external source. These are always coerced to be\n    strings before being used internally. Note when declaring the\n    attributes for a model it is an error to declare an id\n    attribute.\n     ```javascript\n    let record = store.createRecord('model');\n    record.id; // null\n     const { content: { data: model } } = await store.request(findRecord({ type: 'model', id: '1' }));\n    model.id; // '1'\n    ```\n     @public\n  */\n  get id() {\n    // this guard exists, because some dev-only deprecation code\n    // (addListener via validatePropertyInjections) invokes toString before the\n    // object is real.\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      try {\n        return recordIdentifierFor(this).id;\n      } catch {\n        return null;\n      }\n    }\n    return recordIdentifierFor(this).id;\n  }\n  static {\n    decorateMethodV2(this.prototype, \"id\", [gate]);\n  }\n  set id(id) {\n    const normalizedId = coerceId(id);\n    const identifier = recordIdentifierFor(this);\n    const didChange = normalizedId !== identifier.id;\n    assertPrivateStore(this.store);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot set ${identifier.type} record's id to ${id}, because id is already ${identifier.id}`);\n      }\n    })(!didChange || identifier.id === null) : {};\n    if (normalizedId !== null && didChange) {\n      this.store._instanceCache.setRecordId(identifier, normalizedId);\n      this.store.notifications.notify(identifier, 'identity', null);\n    }\n  }\n  toString() {\n    return `<model::${this.constructor.modelName}:${this.id}>`;\n  }\n\n  /**\n    @private\n  */\n  // TODO we can probably make this a computeOnce\n  // we likely do not need to notify the currentState root anymore\n  get currentState() {\n    // descriptors are called with the wrong `this` context during mergeMixins\n    // when using legacy/classic ember classes. Basically: lazy in prod and eager in dev.\n    // so we do this to try to steer folks to the nicer \"dont user currentState\"\n    // error.\n    if (macroCondition(!getGlobalConfig().WarpDrive.env.DEBUG)) {\n      if (!this.___recordState) {\n        this.___recordState = new RecordState(this);\n      }\n    }\n    return this.___recordState;\n  }\n  static {\n    decorateMethodV2(this.prototype, \"currentState\", [gate]);\n  }\n  set currentState(_v) {\n    throw new Error('cannot set currentState');\n  }\n\n  /**\n    The store service instance which created this record instance\n     @public\n   */\n\n  /**\n    When the record is in the `invalid` state this object will contain\n    any errors returned by the adapter. When present the errors hash\n    contains keys corresponding to the invalid property names\n    and values which are arrays of Javascript objects with two keys:\n     - `message` A string containing the error message from the backend\n    - `attribute` The name of the property associated with this error message\n     ```javascript\n    record.errors.length; // 0\n    record.set('foo', 'invalid value');\n    record.save().catch(function() {\n      record.errors.foo;\n      // [{message: 'foo should be a number.', attribute: 'foo'}]\n    });\n    ```\n     The `errors` property is useful for displaying error messages to\n    the user.\n     ```handlebars\n    <label>Username: <Input @value={{@model.username}} /> </label>\n    {{#each @model.errors.username as |error|}}\n      <div class=\"error\">\n        {{error.message}}\n      </div>\n    {{/each}}\n    <label>Email: <Input @value={{@model.email}} /> </label>\n    {{#each @model.errors.email as |error|}}\n      <div class=\"error\">\n        {{error.message}}\n      </div>\n    {{/each}}\n    ```\n      You can also access the special `messages` property on the error\n    object to get an array of all the error strings.\n     ```handlebars\n    {{#each @model.errors.messages as |message|}}\n      <div class=\"error\">\n        {{message}}\n      </div>\n    {{/each}}\n    ```\n     @public\n  */\n  get errors() {\n    const errors = Errors.create({\n      __record: this\n    });\n    this.currentState.updateInvalidErrors(errors);\n    return errors;\n  }\n\n  /**\n    This property holds the `AdapterError` object with which\n    last adapter operation was rejected.\n     @public\n  */\n  static {\n    decorateMethodV2(this.prototype, \"errors\", [computeOnce]);\n  }\n  get adapterError() {\n    return this.currentState.adapterError;\n  }\n  static {\n    decorateMethodV2(this.prototype, \"adapterError\", [memoized]);\n  }\n  set adapterError(v) {\n    throw new Error(`adapterError is not directly settable`);\n  }\n\n  /*\n    We hook the default implementation to ensure\n    our tagged properties are properly notified\n    as well. We still super for everything because\n    sync observers require a direct call occuring\n    to trigger their flush. We wouldn't need to\n    super in 4.0+ where sync observers are removed.\n   */\n  // @ts-expect-error no return is necessary, but Ember's types are forcing it\n  notifyPropertyChange(prop) {\n    const signals = withSignalStore(this);\n    entangleSignal(signals, this, prop, undefined);\n    super.notifyPropertyChange(prop);\n  }\n\n  /** @internal */\n  attr() {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error('The `attr` method is not available on Model, a Snapshot was probably expected. Are you passing a Model instead of a Snapshot to your serializer?');\n      }\n    })() : {};\n  }\n\n  /**\n   Given a callback, iterates over each of the relationships in the model,\n   invoking the callback with the name of each relationship and its relationship\n   descriptor.\n     The callback method you provide should have the following signature (all\n   parameters are optional):\n    ```javascript\n   function(name, descriptor);\n   ```\n    - `name` the name of the current property in the iteration\n   - `descriptor` the meta object that describes this relationship\n    The relationship descriptor argument is an object with the following properties.\n    - **name** <span class=\"type\">String</span> the name of this relationship on the Model\n   - **kind** <span class=\"type\">String</span> \"hasMany\" or \"belongsTo\"\n   - **options** <span class=\"type\">Object</span> the original options hash passed when the relationship was declared\n   - **parentType** <span class=\"type\">Model</span> the type of the Model that owns this relationship\n   - **type** <span class=\"type\">String</span> the type name of the related Model\n    Note that in addition to a callback, you can also pass an optional target\n   object that will be set as `this` on the context.\n    Example\n    ```js [app/serializers/application.js]\n   import JSONSerializer from '@ember-data/serializer/json';\n    export default class ApplicationSerializer extends JSONSerializer {\n      serialize(record, options) {\n      let json = {};\n       record.eachRelationship(function(name, descriptor) {\n        if (descriptor.kind === 'hasMany') {\n          let serializedHasManyName = name.toUpperCase() + '_IDS';\n          json[serializedHasManyName] = record.get(name).map(r => r.id);\n        }\n      });\n       return json;\n    }\n  }\n   ```\n    @public\n   @param callback the callback to invoke\n   @param binding the value to which the callback's `this` should be bound\n   */\n  eachRelationship(callback, binding) {\n    this.constructor.eachRelationship(callback, binding);\n  }\n  relationshipFor(name) {\n    return this.constructor.relationshipsByName.get(name);\n  }\n  inverseFor(name) {\n    return this.constructor.inverseFor(name, storeFor(this, false));\n  }\n  eachAttribute(callback, binding) {\n    this.constructor.eachAttribute(callback, binding);\n  }\n\n  /**\n   * @internal\n   */\n  static isModel = true;\n\n  /**\n   Represents the model's class name as a string. This can be used to look up the model's class name through\n   `Store`'s modelFor method.\n    `modelName` is generated for you by WarpDrive. It will be a lowercased, dasherized string.\n   For example:\n    ```javascript\n   store.modelFor('post').modelName; // 'post'\n   store.modelFor('blog-post').modelName; // 'blog-post'\n   ```\n    The most common place you'll want to access `modelName` is in your serializer's `payloadKeyFromModelName` method. For example, to change payload\n   keys to underscore (instead of dasherized), you might use the following code:\n    ```javascript\n   import RESTSerializer from '@ember-data/serializer/rest';\n   import { underscore } from '<app-name>/utils/string-utils';\n    export default const PostSerializer = RESTSerializer.extend({\n     payloadKeyFromModelName(modelName) {\n       return underscore(modelName);\n     }\n   });\n   ```\n     @public\n  */\n  static modelName = null;\n\n  /*\n   These class methods below provide relationship\n   introspection abilities about relationships.\n    A note about the computed properties contained here:\n    **These properties are effectively sealed once called for the first time.**\n   To avoid repeatedly doing expensive iteration over a model's fields, these\n   values are computed once and then cached for the remainder of the runtime of\n   your application.\n    If your application needs to modify a class after its initial definition\n   (for example, using `reopen()` to add additional attributes), make sure you\n   do it before using your model with the store, which uses these properties\n   extensively.\n   */\n\n  /**\n   For a given relationship name, returns the model type of the relationship.\n    For example, if you define a model like this:\n    ```js [app/models/post.js]\n   import { Model, hasMany } from '@warp-drive/legacy/model';\n    export default class PostModel extends Model {\n     @hasMany('comment') comments;\n   }\n   ```\n    Calling `store.modelFor('post').typeForRelationship('comments', store)` will return `Comment`.\n     @public\n   @param name the name of the relationship\n   @param store an instance of Store\n   @return the type of the relationship, or undefined\n   */\n  static typeForRelationship(name, store) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Accessing schema information on Models without looking up the model via the store is disallowed.`);\n      }\n    })(this.modelName) : {};\n    const relationship = this.relationshipsByName.get(name);\n    return relationship && store.modelFor(relationship.type);\n  }\n  static get inverseMap() {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Accessing schema information on Models without looking up the model via the store is disallowed.`);\n      }\n    })(this.modelName) : {};\n    return Object.create(null);\n  }\n\n  /**\n   Find the relationship which is the inverse of the one asked for.\n    For example, if you define models like this:\n    ```js [app/models/post.js]\n   import { Model, hasMany } from '@warp-drive/legacy/model';\n    export default class PostModel extends Model {\n      @hasMany('message') comments;\n    }\n   ```\n    ```js [app/models/message.js]\n   import { Model, belongsTo } from '@warp-drive/legacy/model';\n    export default class MessageModel extends Model {\n      @belongsTo('post') owner;\n    }\n   ```\n    ``` js\n   store.modelFor('post').inverseFor('comments', store) // { type: 'message', name: 'owner', kind: 'belongsTo' }\n   store.modelFor('message').inverseFor('owner', store) // { type: 'post', name: 'comments', kind: 'hasMany' }\n   ```\n     @public\n   @param name the name of the relationship\n   @param store\n   @return the inverse relationship, or null\n   */\n  static {\n    decorateMethodV2(this, \"inverseMap\", [computeOnce]);\n  }\n  static inverseFor(name, store) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Accessing schema information on Models without looking up the model via the store is disallowed.`);\n      }\n    })(this.modelName) : {};\n    const inverseMap = this.inverseMap;\n    if (inverseMap[name]) {\n      return inverseMap[name];\n    } else {\n      const inverse = this._findInverseFor(name, store);\n      inverseMap[name] = inverse;\n      return inverse;\n    }\n  }\n\n  //Calculate the inverse, ignoring the cache\n  static _findInverseFor(name, store) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Accessing schema information on Models without looking up the model via the store is disallowed.`);\n      }\n    })(this.modelName) : {};\n    const relationship = this.relationshipsByName.get(name);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`No relationship named '${name}' on '${this.modelName}' exists.`);\n      }\n    })(relationship) : {};\n    if (!relationship) {\n      return null;\n    }\n    const {\n      options\n    } = relationship;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected the relationship ${name} on ${this.modelName} to define an inverse.`);\n      }\n    })(options.inverse === null || typeof options.inverse === 'string' && options.inverse.length > 0) : {};\n    if (options.inverse === null) {\n      return null;\n    }\n    const schemaExists = store.schema.hasResource(relationship);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`No associated schema found for '${relationship.type}' while calculating the inverse of ${name} on ${this.modelName}`);\n      }\n    })(schemaExists) : {};\n    if (!schemaExists) {\n      return null;\n    }\n    const inverseField = store.schema.fields(relationship).get(options.inverse);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`No inverse relationship found for '${name}' on '${this.modelName}'`);\n      }\n    })(inverseField && (inverseField.kind === 'belongsTo' || inverseField.kind === 'hasMany')) : {};\n    return inverseField || null;\n  }\n\n  /**\n   The model's relationships as a map, keyed on the type of the\n   relationship. The value of each entry is an array containing a descriptor\n   for each relationship with that type, describing the name of the relationship\n   as well as the type.\n    For example, given the following model definition:\n    ```js [app/models/blog.js]\n   import { Model, belongsTo, hasMany } from '@warp-drive/legacy/model';\n    export default class BlogModel extends Model {\n      @hasMany('user') users;\n      @belongsTo('user') owner;\n      @hasMany('post') posts;\n    }\n   ```\n    This computed property would return a map describing these\n   relationships, like this:\n    ```javascript\n   import Blog from 'app/models/blog';\n   import User from 'app/models/user';\n   import Post from 'app/models/post';\n    let relationships = Blog.relationships;\n   relationships.user;\n   //=> [ { name: 'users', kind: 'hasMany' },\n   //     { name: 'owner', kind: 'belongsTo' } ]\n   relationships.post;\n   //=> [ { name: 'posts', kind: 'hasMany' } ]\n   ```\n     @public\n   */\n  static get relationships() {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Accessing schema information on Models without looking up the model via the store is disallowed.`);\n      }\n    })(this.modelName) : {};\n    const map = new Map();\n    const relationshipsByName = this.relationshipsByName;\n\n    // Loop through each computed property on the class\n    relationshipsByName.forEach(desc => {\n      const {\n        type\n      } = desc;\n      if (!map.has(type)) {\n        map.set(type, []);\n      }\n      map.get(type).push(desc);\n    });\n    return map;\n  }\n\n  /**\n   A hash containing lists of the model's relationships, grouped\n   by the relationship kind. For example, given a model with this\n   definition:\n    ```js [app/models/blog.js]\n   import { Model, belongsTo, hasMany } from '@warp-drive/legacy/model';\n    export default class BlogModel extends Model {\n      @hasMany('user') users;\n      @belongsTo('user') owner;\n       @hasMany('post') posts;\n    }\n   ```\n    This property would contain the following:\n    ```javascript\n   import Blog from 'app/models/blog';\n    let relationshipNames = Blog.relationshipNames;\n   relationshipNames.hasMany;\n   //=> ['users', 'posts']\n   relationshipNames.belongsTo;\n   //=> ['owner']\n   ```\n     @public\n   */\n  static {\n    decorateMethodV2(this, \"relationships\", [computeOnce]);\n  }\n  static get relationshipNames() {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Accessing schema information on Models without looking up the model via the store is disallowed.`);\n      }\n    })(this.modelName) : {};\n    const names = {\n      hasMany: [],\n      belongsTo: []\n    };\n    this.eachComputedProperty((name, meta) => {\n      if (isRelationshipSchema(meta)) {\n        names[meta.kind].push(name);\n      }\n    });\n    return names;\n  }\n\n  /**\n   An array of types directly related to a model. Each type will be\n   included once, regardless of the number of relationships it has with\n   the model.\n    For example, given a model with this definition:\n    ```js [app/models/blog.js]\n   import { Model, belongsTo, hasMany } from '@warp-drive/legacy/model';\n    export default class BlogModel extends Model {\n      @hasMany('user') users;\n      @belongsTo('user') owner;\n       @hasMany('post') posts;\n    }\n   ```\n    This property would contain the following:\n    ```javascript\n   import Blog from 'app/models/blog';\n    let relatedTypes = Blog.relatedTypes');\n   //=> ['user', 'post']\n   ```\n    @public\n   */\n  static {\n    decorateMethodV2(this, \"relationshipNames\", [computeOnce]);\n  }\n  static get relatedTypes() {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Accessing schema information on Models without looking up the model via the store is disallowed.`);\n      }\n    })(this.modelName) : {};\n    const types = [];\n    const rels = this.relationshipsObject;\n    const relationships = Object.keys(rels);\n\n    // create an array of the unique types involved\n    // in relationships\n    for (let i = 0; i < relationships.length; i++) {\n      const name = relationships[i];\n      const meta = rels[name];\n      const modelName = meta.type;\n      if (!types.includes(modelName)) {\n        types.push(modelName);\n      }\n    }\n    return types;\n  }\n\n  /**\n   A map whose keys are the relationships of a model and whose values are\n   relationship descriptors.\n    For example, given a model with this\n   definition:\n    ```js [app/models/blog.js]\n   import { Model, belongsTo, hasMany } from '@warp-drive/legacy/model';\n    export default class BlogModel extends Model {\n      @hasMany('user') users;\n      @belongsTo('user') owner;\n       @hasMany('post') posts;\n    }\n   ```\n    This property would contain the following:\n    ```javascript\n   import Blog from 'app/models/blog';\n    let relationshipsByName = Blog.relationshipsByName;\n   relationshipsByName.users;\n   //=> { name: 'users', kind: 'hasMany', type: 'user', options: Object }\n   relationshipsByName.owner;\n   //=> { name: 'owner', kind: 'belongsTo', type: 'user', options: Object }\n   ```\n     @public\n   */\n  static {\n    decorateMethodV2(this, \"relatedTypes\", [computeOnce]);\n  }\n  static get relationshipsByName() {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Accessing schema information on Models without looking up the model via the store is disallowed.`);\n      }\n    })(this.modelName) : {};\n    const map = new Map();\n    const rels = this.relationshipsObject;\n    const relationships = Object.keys(rels);\n    for (let i = 0; i < relationships.length; i++) {\n      const name = relationships[i];\n      const value = rels[name];\n      map.set(value.name, value);\n    }\n    return map;\n  }\n  static {\n    decorateMethodV2(this, \"relationshipsByName\", [computeOnce]);\n  }\n  static get relationshipsObject() {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Accessing schema information on Models without looking up the model via the store is disallowed.`);\n      }\n    })(this.modelName) : {};\n    const relationships = Object.create(null);\n    const modelName = this.modelName;\n    this.eachComputedProperty((name, meta) => {\n      if (!isRelationshipSchema(meta)) {\n        return;\n      }\n      // TODO deprecate key being here\n      meta.key = name;\n      meta.name = name;\n      relationships[name] = meta;\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected options in meta`);\n        }\n      })(meta.options && typeof meta.options === 'object') : {};\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`You should not specify both options.as and options.inverse as null on ${modelName}.${meta.name}, as if there is no inverse field there is no abstract type to conform to. You may have intended for this relationship to be polymorphic, or you may have mistakenly set inverse to null.`);\n        }\n      })(!(meta.options.inverse === null && meta.options.as?.length)) : {};\n    });\n    return relationships;\n  }\n\n  /**\n   A map whose keys are the fields of the model and whose values are strings\n   describing the kind of the field. A model's fields are the union of all of its\n   attributes and relationships.\n    For example:\n    ```js [app/models/blog.js]\n   import { Model, attr, belongsTo, hasMany } from '@warp-drive/legacy/model';\n    export default class BlogModel extends Model {\n      @hasMany('user') users;\n      @belongsTo('user') owner;\n       @hasMany('post') posts;\n       @attr('string') title;\n    }\n   ```\n    ```js\n   import Blog from 'app/models/blog'\n    let fields = Blog.fields;\n   fields.forEach(function(kind, field) {\n      // do thing\n    });\n    // prints:\n   // users, hasMany\n   // owner, belongsTo\n   // posts, hasMany\n   // title, attribute\n   ```\n     @public\n   */\n  static {\n    decorateMethodV2(this, \"relationshipsObject\", [computeOnce]);\n  }\n  static get fields() {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Accessing schema information on Models without looking up the model via the store is disallowed.`);\n      }\n    })(this.modelName) : {};\n    const map = new Map();\n    this.eachComputedProperty((name, meta) => {\n      if (isRelationshipSchema(meta)) {\n        map.set(name, meta.kind);\n      } else if (isAttributeSchema(meta)) {\n        map.set(name, 'attribute');\n      }\n    });\n    return map;\n  }\n\n  /**\n   Given a callback, iterates over each of the relationships in the model,\n   invoking the callback with the name of each relationship and its relationship\n   descriptor.\n     @public\n   @param callback the callback to invoke\n   @param binding the value to which the callback's `this` should be bound\n   */\n  static {\n    decorateMethodV2(this, \"fields\", [computeOnce]);\n  }\n  static eachRelationship(callback, binding) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Accessing schema information on Models without looking up the model via the store is disallowed.`);\n      }\n    })(this.modelName) : {};\n    this.relationshipsByName.forEach((relationship, name) => {\n      callback.call(binding, name, relationship);\n    });\n  }\n\n  /**\n   Given a callback, iterates over each of the types related to a model,\n   invoking the callback with the related type's class. Each type will be\n   returned just once, regardless of how many different relationships it has\n   with a model.\n     @public\n   @param callback the callback to invoke\n   @param binding the value to which the callback's `this` should be bound\n   */\n  static eachRelatedType(callback, binding) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Accessing schema information on Models without looking up the model via the store is disallowed.`);\n      }\n    })(this.modelName) : {};\n    const relationshipTypes = this.relatedTypes;\n    for (let i = 0; i < relationshipTypes.length; i++) {\n      const type = relationshipTypes[i];\n      callback.call(binding, type);\n    }\n  }\n\n  /**\n   *\n   * @private\n   * @deprecated\n   */\n  static determineRelationshipType(knownSide, store) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Accessing schema information on Models without looking up the model via the store is disallowed.`);\n      }\n    })(this.modelName) : {};\n    const knownKey = knownSide.name;\n    const knownKind = knownSide.kind;\n    const inverse = this.inverseFor(knownKey, store);\n    // let key;\n\n    if (!inverse) {\n      return knownKind === 'belongsTo' ? 'oneToNone' : 'manyToNone';\n    }\n\n    // key = inverse.name;\n    const otherKind = inverse.kind;\n    if (otherKind === 'belongsTo') {\n      return knownKind === 'belongsTo' ? 'oneToOne' : 'manyToOne';\n    } else {\n      return knownKind === 'belongsTo' ? 'oneToMany' : 'manyToMany';\n    }\n  }\n\n  /**\n   A map whose keys are the attributes of the model (properties\n   described by attr) and whose values are the meta object for the\n   property.\n    Example\n    ```js [app/models/person.js]\n   import { Model, attr } from '@warp-drive/legacy/model';\n    export default class PersonModel extends Model {\n      @attr('string') firstName;\n      @attr('string') lastName;\n      @attr('date') birthday;\n    }\n   ```\n    ```javascript\n   import Person from 'app/models/person'\n    let attributes = Person.attributes\n    attributes.forEach(function(meta, name) {\n      // do thing\n    });\n    // prints:\n   // firstName {type: \"string\", kind: 'attribute', options: Object, parentType: function, name: \"firstName\"}\n   // lastName {type: \"string\", kind: 'attribute', options: Object, parentType: function, name: \"lastName\"}\n   // birthday {type: \"date\", kind: 'attribute', options: Object, parentType: function, name: \"birthday\"}\n   ```\n     @public\n   */\n  static get attributes() {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Accessing schema information on Models without looking up the model via the store is disallowed.`);\n      }\n    })(this.modelName) : {};\n    const map = new Map();\n    this.eachComputedProperty((name, meta) => {\n      if (isAttributeSchema(meta)) {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(\"You may not set 'id' as an attribute on your model. Please remove any lines that look like: `id: attr('<type>')` from \" + this.toString());\n          }\n        })(name !== 'id') : {};\n\n        // TODO deprecate key being here\n        meta.key = name;\n        meta.name = name;\n        map.set(name, meta);\n      }\n    });\n    return map;\n  }\n\n  /**\n   A map whose keys are the attributes of the model (properties\n   described by attr) and whose values are type of transformation\n   applied to each attribute. This map does not include any\n   attributes that do not have an transformation type.\n    Example\n    ```js [app/models/person.js]\n   import { Model, attr } from '@warp-drive/legacy/model';\n    export default class PersonModel extends Model {\n      @attr firstName;\n      @attr('string') lastName;\n      @attr('date') birthday;\n    }\n   ```\n    ```javascript\n   import Person from 'app/models/person';\n    let transformedAttributes = Person.transformedAttributes\n    transformedAttributes.forEach(function(field, type) {\n      // do thing\n    });\n    // prints:\n   // lastName string\n   // birthday date\n   ```\n     @public\n   */\n  static {\n    decorateMethodV2(this, \"attributes\", [computeOnce]);\n  }\n  static get transformedAttributes() {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Accessing schema information on Models without looking up the model via the store is disallowed.`);\n      }\n    })(this.modelName) : {};\n    const map = new Map();\n    this.eachAttribute((name, meta) => {\n      if (meta.type) {\n        map.set(name, meta.type);\n      }\n    });\n    return map;\n  }\n\n  /**\n   Iterates through the attributes of the model, calling the passed function on each\n   attribute.\n    The callback method you provide should have the following signature (all\n   parameters are optional):\n    ```javascript\n   function(name, meta);\n   ```\n    - `name` the name of the current property in the iteration\n   - `meta` the meta object for the attribute property in the iteration\n    Note that in addition to a callback, you can also pass an optional target\n   object that will be set as `this` on the context.\n    Example\n    ```javascript\n   import { Model, attr } from '@warp-drive/legacy/model';\n    class PersonModel extends Model {\n      @attr('string') firstName;\n      @attr('string') lastName;\n      @attr('date') birthday;\n    }\n    PersonModel.eachAttribute(function(name, meta) {\n      // do thing\n    });\n    // prints:\n   // firstName {type: \"string\", kind: 'attribute', options: Object, parentType: function, name: \"firstName\"}\n   // lastName {type: \"string\", kind: 'attribute', options: Object, parentType: function, name: \"lastName\"}\n   // birthday {type: \"date\", kind: 'attribute', options: Object, parentType: function, name: \"birthday\"}\n   ```\n     @public\n   @param callback The callback to execute\n   @param binding [optional] the value to which the callback's `this` should be bound\n   */\n  static {\n    decorateMethodV2(this, \"transformedAttributes\", [computeOnce]);\n  }\n  static eachAttribute(callback, binding) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Accessing schema information on Models without looking up the model via the store is disallowed.`);\n      }\n    })(this.modelName) : {};\n    this.attributes.forEach((meta, name) => {\n      callback.call(binding, name, meta);\n    });\n  }\n\n  /**\n   Iterates through the transformedAttributes of the model, calling\n   the passed function on each attribute. Note the callback will not be\n   called for any attributes that do not have an transformation type.\n    The callback method you provide should have the following signature (all\n   parameters are optional):\n    ```javascript\n   function(name, type);\n   ```\n    - `name` the name of the current property in the iteration\n   - `type` a string containing the name of the type of transformed\n   applied to the attribute\n    Note that in addition to a callback, you can also pass an optional target\n   object that will be set as `this` on the context.\n    Example\n    ```javascript\n   import { Model, attr } from '@warp-drive/legacy/model';\n    let Person = Model.extend({\n      firstName: attr(),\n      lastName: attr('string'),\n      birthday: attr('date')\n    });\n    Person.eachTransformedAttribute(function(name, type) {\n      // do thing\n    });\n    // prints:\n   // lastName string\n   // birthday date\n   ```\n     @public\n   @param callback The callback to execute\n   @param binding [optional] the value to which the callback's `this` should be bound\n   */\n  static eachTransformedAttribute(callback, binding) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Accessing schema information on Models without looking up the model via the store is disallowed.`);\n      }\n    })(this.modelName) : {};\n    this.transformedAttributes.forEach((type, name) => {\n      callback.call(binding, name, type);\n    });\n  }\n\n  /**\n   Returns the name of the model class.\n     @public\n   */\n  static toString() {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Accessing schema information on Models without looking up the model via the store is disallowed.`);\n      }\n    })(this.modelName) : {};\n    return `model:${this.modelName}`;\n  }\n}\n\n// @ts-expect-error TS doesn't know how to do `this` function overloads\nModel.prototype.save = save;\n// @ts-expect-error TS doesn't know how to do `this` function overloads\nModel.prototype.destroyRecord = destroyRecord;\nModel.prototype.unloadRecord = unloadRecord;\nModel.prototype.hasMany = hasMany;\nModel.prototype.belongsTo = belongsTo;\nModel.prototype.serialize = serialize;\nModel.prototype._createSnapshot = createSnapshot;\nModel.prototype.deleteRecord = deleteRecord;\nModel.prototype.changedAttributes = changedAttributes;\nModel.prototype.rollbackAttributes = rollbackAttributes;\nModel.prototype.reload = reload;\ndefineGate(Model.prototype, 'isReloading', {\n  get() {\n    deprecate(`record.isReloading is deprecated, please use store.request and either <Request> or getRequuestState to keep track of the request state instead.`, false, {\n      id: 'warp-drive:deprecate-legacy-request-methods',\n      until: '6.0',\n      for: '@warp-drive/core',\n      url: 'https://docs.warp-drive.io/api/@warp-drive/core/build-config/deprecations/variables/ENABLE_LEGACY_REQUEST_METHODS',\n      since: {\n        enabled: '5.7',\n        available: '5.7'\n      }\n    });\n    return this._isReloading ?? false;\n  },\n  set(v) {\n    this._isReloading = v;\n  },\n  configurable: true,\n  // @ts-expect-error specially handled prop\n  isLocal: true\n});\nfunction restoreDeprecatedModelRequestBehaviors(ModelKlass) {\n  // @ts-expect-error TS doesn't know how to do `this` function overloads\n  ModelKlass.prototype.save = _save;\n  // @ts-expect-error TS doesn't know how to do `this` function overloads\n  ModelKlass.prototype.destroyRecord = _destroyRecord;\n  ModelKlass.prototype.reload = _reload;\n  defineGate(Model.prototype, 'isReloading', {\n    get() {\n      return this._isReloading ?? false;\n    },\n    set(v) {\n      this._isReloading = v;\n    },\n    // @ts-expect-error specially handled prop\n    isLocal: true\n  });\n}\n\n// this is required to prevent `init` from passing\n// the values initialized during create to `setUnknownProperty`\nModel.prototype._createProps = null;\nModel.prototype._secretInit = null;\nif (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n  const lookupDescriptor = function lookupDescriptor(obj, keyName) {\n    let current = obj;\n    do {\n      const descriptor = Object.getOwnPropertyDescriptor(current, keyName);\n      if (descriptor !== undefined) {\n        return descriptor;\n      }\n      current = Object.getPrototypeOf(current);\n    } while (current !== null);\n    return null;\n  };\n\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  const init = Model.prototype.init;\n  Model.prototype.init = function (createArgs) {\n    init.call(this, createArgs);\n    const ourDescriptor = lookupDescriptor(Model.prototype, 'currentState');\n    const theirDescriptor = lookupDescriptor(this, 'currentState');\n    if (!ourDescriptor || !theirDescriptor) {\n      throw new Error(`Unable to determine if 'currentState' is a reserved property name on instances of classes extending Model. Please ensure that 'currentState' is not defined as a property on ${this.constructor.toString()}`);\n    }\n    const realState = this.___recordState;\n    if (ourDescriptor.get !== theirDescriptor.get || realState !== this.currentState) {\n      throw new Error(`'currentState' is a reserved property name on instances of classes extending Model. Please choose a different property name for ${this.constructor.toString()}`);\n    }\n    const ID_DESCRIPTOR = lookupDescriptor(Model.prototype, 'id');\n    const idDesc = lookupDescriptor(this, 'id');\n    if (!ID_DESCRIPTOR || !idDesc) {\n      throw new Error(`Unable to determine if 'id' is a reserved property name on instances of classes extending Model. Please ensure that 'id' is not defined as a property on ${this.constructor.toString()}`);\n    }\n    if (idDesc.get !== ID_DESCRIPTOR.get) {\n      throw new Error(`You may not set 'id' as an attribute on your model. Please remove any lines that look like: \\`id: attr('<type>')\\` from ${this.constructor.toString()}`);\n    }\n  };\n  delete Model.reopen;\n  delete Model.reopenClass;\n}\nfunction isRelationshipSchema(meta) {\n  const hasKind = typeof meta === 'object' && meta !== null && 'kind' in meta && 'options' in meta;\n  return hasKind && (meta.kind === 'hasMany' || meta.kind === 'belongsTo');\n}\nfunction isAttributeSchema(meta) {\n  return typeof meta === 'object' && meta !== null && 'kind' in meta && meta.kind === 'attribute';\n}\n\n/*\n    In case someone defined a relationship to a mixin, for example:\n    ```ts\n      class CommentModel extends Model {\n        @belongsTo('commentable', { polymorphic: true }) owner;\n      }\n\n      let Commentable = Mixin.create({\n        @hasMany('comment') comments;\n      });\n    ```\n    we want to look up a Commentable class which has all the necessary\n    relationship meta data. Thus, we look up the mixin and create a mock\n    Model, so we can access the relationship CPs of the mixin (`comments`)\n    in this case\n  */\nfunction modelForMixin(store, normalizedModelName) {\n  const owner = getOwner(store);\n  const MaybeMixin = owner.factoryFor(`mixin:${normalizedModelName}`);\n  const mixin = MaybeMixin && MaybeMixin.class;\n  if (mixin) {\n    const ModelForMixin = Model.extend(mixin);\n    ModelForMixin.__isMixin = true;\n    ModelForMixin.__mixin = mixin;\n    //Cache the class as a model\n    owner.register(`model:${normalizedModelName}`, ModelForMixin);\n  }\n  return owner.factoryFor(`model:${normalizedModelName}`);\n}\nclass ModelSchemaProvider {\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  constructor(store) {\n    this.store = store;\n    this._schemas = new Map();\n    this._typeMisses = new Set();\n  }\n  resourceTypes() {\n    return Array.from(this._schemas.keys());\n  }\n  hasTrait(type) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`hasTrait is not available with @warp-drive/legacy/model's SchemaService`);\n      }\n    })() : {};\n    return false;\n  }\n  resourceHasTrait(resource, trait) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`resourceHasTrait is not available with @warp-drive/legacy/model's SchemaService`);\n      }\n    })() : {};\n    return false;\n  }\n  transformation(field) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`transformation is not available with @warp-drive/legacy/model's SchemaService`);\n      }\n    })() : {};\n  }\n  derivation(field) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`derivation is not available with @warp-drive/legacy/model's SchemaService`);\n      }\n    })() : {};\n  }\n  hashFn(field) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`hashFn is not available with @warp-drive/legacy/model's SchemaService`);\n      }\n    })() : {};\n  }\n  resource(resource) {\n    const type = normalizeModelName(resource.type);\n    if (!this._schemas.has(type)) {\n      this._loadModelSchema(type);\n    }\n    return this._schemas.get(type).schema;\n  }\n  registerResources(schemas) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`registerResources is not available with @warp-drive/legacy/model's SchemaService`);\n      }\n    })() : {};\n  }\n  registerResource(schema) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`registerResource is not available with @warp-drive/legacy/model's SchemaService`);\n      }\n    })() : {};\n  }\n  registerTransformation(transform) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`registerTransformation is not available with @warp-drive/legacy/model's SchemaService`);\n      }\n    })() : {};\n  }\n  registerDerivation(derivation) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`registerDerivation is not available with @warp-drive/legacy/model's SchemaService`);\n      }\n    })() : {};\n  }\n  registerHashFn(hashFn) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`registerHashFn is not available with @warp-drive/legacy/model's SchemaService`);\n      }\n    })() : {};\n  }\n  /** @internal */\n  _loadModelSchema(type) {\n    const modelClass = this.store.modelFor(type);\n    const attributeMap = modelClass.attributes;\n    const attributes = Object.create(null);\n    attributeMap.forEach((meta, name) => attributes[name] = meta);\n    const relationships = modelClass.relationshipsObject || null;\n    const fields = new Map();\n    for (const attr of Object.values(attributes)) {\n      fields.set(attr.name, attr);\n    }\n    for (const rel of Object.values(relationships)) {\n      fields.set(rel.name, rel);\n    }\n    const schema = {\n      legacy: true,\n      identity: {\n        name: 'id',\n        kind: '@id'\n      },\n      type,\n      fields: Array.from(fields.values())\n    };\n    const internalSchema = {\n      schema,\n      attributes,\n      relationships,\n      fields\n    };\n    this._schemas.set(type, internalSchema);\n    return internalSchema;\n  }\n  fields(resource) {\n    const type = normalizeModelName(resource.type);\n    if (!this._schemas.has(type)) {\n      this._loadModelSchema(type);\n    }\n    return this._schemas.get(type).fields;\n  }\n  hasResource(resource) {\n    const type = normalizeModelName(resource.type);\n    if (this._schemas.has(type)) {\n      return true;\n    }\n    if (this._typeMisses.has(type)) {\n      return false;\n    }\n    const factory = getModelFactory(this.store, type);\n    const exists = factory !== null;\n    if (!exists) {\n      this._typeMisses.add(type);\n      return false;\n    }\n    return true;\n  }\n}\nif (macroCondition(getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_SCHEMA_SERVICE)) {\n  ModelSchemaProvider.prototype.doesTypeExist = function (type) {\n    deprecate(`Use \\`schema.hasResource({ type })\\` instead of \\`schema.doesTypeExist(type)\\``, false, {\n      id: 'ember-data:schema-service-updates',\n      until: '6.0',\n      for: 'ember-data',\n      since: {\n        available: '4.13',\n        enabled: '5.4'\n      }\n    });\n    return this.hasResource({\n      type\n    });\n  };\n  ModelSchemaProvider.prototype.attributesDefinitionFor = function (resource) {\n    deprecate(`Use \\`schema.fields({ type })\\` instead of \\`schema.attributesDefinitionFor({ type })\\``, false, {\n      id: 'ember-data:schema-service-updates',\n      until: '6.0',\n      for: 'ember-data',\n      since: {\n        available: '4.13',\n        enabled: '5.4'\n      }\n    });\n    const type = normalizeModelName(resource.type);\n\n    // @ts-expect-error intentional use of internal API\n    if (!this._schemas.has(type)) {\n      // @ts-expect-error intentional use of internal API\n      this._loadModelSchema(type);\n    }\n\n    // @ts-expect-error intentional use of internal API\n    return this._schemas.get(type).attributes;\n  };\n  ModelSchemaProvider.prototype.relationshipsDefinitionFor = function (resource) {\n    deprecate(`Use \\`schema.fields({ type })\\` instead of \\`schema.relationshipsDefinitionFor({ type })\\``, false, {\n      id: 'ember-data:schema-service-updates',\n      until: '6.0',\n      for: 'ember-data',\n      since: {\n        available: '4.13',\n        enabled: '5.4'\n      }\n    });\n    const type = normalizeModelName(resource.type);\n\n    // @ts-expect-error intentional use of internal API\n    if (!this._schemas.has(type)) {\n      // @ts-expect-error intentional use of internal API\n      this._loadModelSchema(type);\n    }\n\n    // @ts-expect-error intentional use of internal API\n    return this._schemas.get(type).relationships;\n  };\n}\nfunction buildSchema(store) {\n  return new ModelSchemaProvider(store);\n}\nfunction getModelFactory(store, type) {\n  if (!store._modelFactoryCache) {\n    store._modelFactoryCache = Object.create(null);\n  }\n  const cache = store._modelFactoryCache;\n  let factory = cache[type];\n  if (!factory) {\n    const owner = getOwner(store);\n    factory = owner.factoryFor(`model:${type}`);\n    if (!factory) {\n      //Support looking up mixins as base types for polymorphic relationships\n      factory = modelForMixin(store, type);\n    }\n    if (!factory) {\n      // we don't cache misses in case someone wants to register a missing model\n      return null;\n    }\n    const klass = factory.class;\n    if (klass.isModel) {\n      const hasOwnModelNameSet = klass.modelName && Object.prototype.hasOwnProperty.call(klass, 'modelName');\n      if (!hasOwnModelNameSet) {\n        Object.defineProperty(klass, 'modelName', {\n          value: type\n        });\n      }\n    }\n    cache[type] = factory;\n  }\n  return factory;\n}\nexport { Model as M, RecordState as R, _save as _, save as a, buildSchema as b, _reload as c, reload as d, _destroyRecord as e, destroyRecord as f, getModelFactory as g, hasMany as h, deleteRecord as i, changedAttributes as j, belongsTo as k, createSnapshot as l, restoreDeprecatedModelRequestBehaviors as m, rollbackAttributes as r, serialize as s, unloadRecord as u };","import { setOwner, getOwner } from '@ember/application';\nimport { assertPrivateStore, setRecordIdentifier, StoreMap } from '@warp-drive/core/store/-private';\nimport { g as getModelFactory } from \"./schema-provider-DJCV_6AF.js\";\nimport { n as normalizeModelName } from \"./util-Dul6TZts.js\";\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nfunction instantiateRecord(identifier, createRecordArgs) {\n  const type = identifier.type;\n\n  // TODO deprecate allowing unknown args setting\n  const createOptions = {\n    _createProps: createRecordArgs ?? {},\n    // TODO @deprecate consider deprecating accessing record properties during init which the below is necessary for\n    _secretInit: {\n      identifier,\n      store: this,\n      cb: secretInit\n    }\n  };\n\n  // ensure that `getOwner(this)` works inside a model instance\n  setOwner(createOptions, getOwner(this));\n  const factory = getModelFactory(this, type);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`No model was found for '${type}'`);\n    }\n  })(factory) : {};\n  return factory.class.create(createOptions);\n}\nfunction teardownRecord(record) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`expected to receive an instance of Model from @ember-data/model. If using a custom model make sure you implement teardownRecord`);\n    }\n  })('destroy' in record) : {};\n  record.destroy();\n}\nfunction modelFor(modelName) {\n  assertPrivateStore(this);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Attempted to call store.modelFor(), but the store instance has already been destroyed.`);\n    }\n  })(!this.isDestroyed && !this.isDestroying) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You need to pass a model name to the store's modelFor method`);\n    }\n  })(modelName) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Please pass a proper model name to the store's modelFor method`);\n    }\n  })(typeof modelName === 'string' && modelName.length) : {};\n  const type = normalizeModelName(modelName);\n  const maybeFactory = getModelFactory(this, type);\n  const klass = maybeFactory && maybeFactory.class ? maybeFactory.class : null;\n  const ignoreType = !klass || !klass.isModel || this._forceShim;\n  if (!ignoreType) {\n    return klass;\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`No model was found for '${type}' and no schema handles the type`);\n    }\n  })(this.schema.hasResource({\n    type\n  })) : {};\n}\nfunction secretInit(record, identifier, store) {\n  setRecordIdentifier(record, identifier);\n  StoreMap.set(record, store);\n}\nexport { instantiateRecord as i, modelFor as m, teardownRecord as t };","import { computed } from '@ember/object';\nimport { recordIdentifierFor } from '@warp-drive/core';\nimport { RecordStore } from '@warp-drive/core/types/symbols';\nimport { i as isElementDescriptor, n as normalizeModelName } from \"./util-Dul6TZts.js\";\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nimport { warn, deprecate } from '@ember/debug';\nimport { assertPrivateStore } from '@warp-drive/core/store/-private';\nimport { l as lookupLegacySupport } from \"./errors-Cz5KrzBk.js\";\nimport { singularize, dasherize } from '@warp-drive/utilities/string';\nexport { M as Model, b as buildSchema, M as default, m as restoreDeprecatedModelRequestBehaviors } from \"./schema-provider-DJCV_6AF.js\";\nexport { i as instantiateRecord, m as modelFor, t as teardownRecord } from \"./hooks-D6diaM34.js\";\nfunction _attr(type, options) {\n  if (typeof type === 'object') {\n    options = type;\n    type = undefined;\n  } else {\n    options = options || {};\n  }\n  const meta = {\n    type: type,\n    kind: 'attribute',\n    isAttribute: true,\n    options: options,\n    key: null\n  };\n  return computed({\n    get(key) {\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        if (['currentState'].includes(key)) {\n          throw new Error(`'${key}' is a reserved property name on instances of classes extending Model. Please choose a different property name for your attr on ${this.constructor.toString()}`);\n        }\n      }\n      if (this.isDestroyed || this.isDestroying) {\n        return;\n      }\n      const cache = this[RecordStore].cache;\n      return cache.getAttr(recordIdentifierFor(this), key);\n    },\n    set(key, value) {\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        if (['currentState'].includes(key)) {\n          throw new Error(`'${key}' is a reserved property name on instances of classes extending Model. Please choose a different property name for your attr on ${this.constructor.toString()}`);\n        }\n      }\n      const identifier = recordIdentifierFor(this);\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Attempted to set '${key}' on the deleted record ${identifier.type}:${identifier.id} (${identifier.lid})`);\n        }\n      })(!this.currentState.isDeleted) : {};\n      const cache = this[RecordStore].cache;\n      const currentValue = cache.getAttr(identifier, key);\n      if (currentValue !== value) {\n        cache.setAttr(identifier, key, value);\n        if (!this.isValid) {\n          const {\n            errors\n          } = this;\n          if (errors.get(key)) {\n            errors.remove(key);\n            this.currentState.cleanErrorRequests();\n          }\n        }\n      }\n      return value;\n    }\n  }).meta(meta);\n}\n\n// NOTE: Usage of Explicit ANY\n// -------------------------------------------------------------------\n// any is required here because we are the maximal not the minimal\n// subset of options allowed. If we used unknown, object, or\n// Record<string, unknown> we would get type errors when we try to\n// assert against a more specific implementation with precise options.\n// -------------------------------------------------------------------\n\n// see note on Explicit ANY above\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n/**\n * The return type of `void` is a lie to appease TypeScript. The actual return type\n * is a descriptor, but typescript incorrectly insists that decorator functions return\n * `void` or `any`.\n *\n */\n\n/**\n  `attr` defines an attribute on a {@link Model}.\n  By default, attributes are passed through as-is, however you can specify an\n  optional type to have the value automatically transformed.\n  WarpDrive ships with four basic transform types: `string`, `number`,\n  `boolean` and `date`. You can define your own transforms by subclassing\n  {@link Transform}.\n\n  Note that you cannot use `attr` to define an attribute of `id`.\n\n  `attr` takes an optional hash as a second parameter, currently\n  supported options are:\n\n  - `defaultValue`: Pass a string or a function to be called to set the attribute\n  to a default value if and only if the key is absent from the payload response.\n\n  Example\n\n  ```js [app/models/user.js]\n  import { Model, attr } from '@warp-drive/legacy/model';\n\n  export default class UserModel extends Model {\n    @attr('string') username;\n    @attr('string') email;\n    @attr('boolean', { defaultValue: false }) verified;\n  }\n  ```\n\n  Default value can also be a function. This is useful it you want to return\n  a new object for each attribute.\n\n  ```js [app/models/user.js]\n  import { Model, attr } from '@warp-drive/legacy/model';\n\n  export default class UserModel extends Model {\n    @attr('string') username;\n    @attr('string') email;\n\n    @attr({\n      defaultValue() {\n        return {};\n      }\n    })\n    settings;\n  }\n  ```\n\n  The `options` hash is passed as second argument to a transforms'\n  `serialize` and `deserialize` method. This allows to configure a\n  transformation and adapt the corresponding value, based on the config:\n\n  ```js [app/models/post.js]\n  import { Model, attr } from '@warp-drive/legacy/model';\n\n  export default class PostModel extends Model {\n    @attr('text', {\n      uppercase: true\n    })\n    text;\n  }\n  ```\n\n  ```js [app/transforms/text.js]\n  export default class TextTransform {\n    serialize(value, options) {\n      if (options.uppercase) {\n        return value.toUpperCase();\n      }\n\n      return value;\n    }\n\n    deserialize(value) {\n      return value;\n    }\n\n    static create() {\n      return new this();\n    }\n  }\n  ```\n\n  @public\n  @param type the attribute type\n  @param options a hash of options\n*/\n\n// see note on DataDecorator for why void\nfunction attr(type, options, desc) {\n  const args = [type, options, desc];\n  // see note on DataDecorator for why void\n  return isElementDescriptor(args) ? _attr()(...args) : _attr(type, options);\n}\n\n//   get: () => getT;\n//   // set: (value: Awaited<getT>) => void;\n//   set: (value: getT) => void;\n//   // init: () => getT;\n// };\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n// BelongsToDecoratorObject<getT>;\n\nfunction _belongsTo(type, options) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected options.async from @belongsTo('${type}', options) to be a boolean`);\n    }\n  })(options && typeof options.async === 'boolean') : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected options.inverse from @belongsTo('${type}', options) to be either null or the string type of the related resource.`);\n    }\n  })(options.inverse === null || typeof options.inverse === 'string' && options.inverse.length > 0) : {};\n  const meta = {\n    type: normalizeModelName(type),\n    options: options,\n    kind: 'belongsTo',\n    name: '<Unknown BelongsTo>'\n  };\n  return computed({\n    get(key) {\n      // this is a legacy behavior we may not carry into a new model setup\n      // it's better to error on disconnected records so users find errors\n      // in their logic.\n      if (this.isDestroying || this.isDestroyed) {\n        return null;\n      }\n      const support = lookupLegacySupport(this);\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        if (['currentState'].includes(key)) {\n          throw new Error(`'${key}' is a reserved property name on instances of classes extending Model. Please choose a different property name for your belongsTo on ${this.constructor.toString()}`);\n        }\n        if (Object.prototype.hasOwnProperty.call(options, 'serialize')) {\n          warn(`You provided a serialize option on the \"${key}\" property in the \"${support.identifier.type}\" class, this belongs in the serializer. See Serializer and it's implementations https://api.emberjs.com/ember-data/release/classes/Serializer`, false, {\n            id: 'ds.model.serialize-option-in-belongs-to'\n          });\n        }\n        if (Object.prototype.hasOwnProperty.call(options, 'embedded')) {\n          warn(`You provided an embedded option on the \"${key}\" property in the \"${support.identifier.type}\" class, this belongs in the serializer. See EmbeddedRecordsMixin https://api.emberjs.com/ember-data/release/classes/EmbeddedRecordsMixin`, false, {\n            id: 'ds.model.embedded-option-in-belongs-to'\n          });\n        }\n      }\n      return support.getBelongsTo(key);\n    },\n    set(key, value) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Cannot set belongsTo relationship ${key} on a destroyed record`);\n        }\n      })(!this.isDestroying && !this.isDestroyed) : {};\n      if (this.isDestroying || this.isDestroyed) {\n        return null;\n      }\n      const support = lookupLegacySupport(this);\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        if (['currentState'].includes(key)) {\n          throw new Error(`'${key}' is a reserved property name on instances of classes extending Model. Please choose a different property name for your belongsTo on ${this.constructor.toString()}`);\n        }\n      }\n      assertPrivateStore(this[RecordStore]);\n      this[RecordStore]._join(() => {\n        support.setDirtyBelongsTo(key, value);\n      });\n      return support.getBelongsTo(key);\n    }\n  }).meta(meta);\n}\n\n/**\n  `belongsTo` is used to define One-To-One and One-To-Many, and One-To-None\n  relationships on a {@link Model}.\n\n  `belongsTo` takes a configuration hash as a second parameter, currently\n  supported options are:\n\n  - `async`: (*required*) A boolean value used to declare whether this is a sync (false) or async (true) relationship.\n  - `inverse`: (*required*)  A string used to identify the inverse property on a related model, or `null`.\n  - `polymorphic`: (*optional*) A boolean value to mark the relationship as polymorphic\n  - `as`: (*optional*) A string used to declare the abstract type \"this\" record satisfies for polymorphism.\n\n  ### Examples\n\n  To declare a **one-to-many** (or many-to-many) relationship, use\n  `belongsTo` in combination with `hasMany`:\n\n  ```js\n  // app/models/comment.js\n  import { Model, belongsTo } from '@warp-drive/legacy/model';\n\n  export default class Comment extends Model {\n    @belongsTo('post', { async: false, inverse: 'comments' }) post;\n  }\n\n  // app/models/post.js\n  import { Model, hasMany } from '@warp-drive/legacy/model';\n\n  export default class Post extends Model {\n    @hasMany('comment', { async: false, inverse: 'post' }) comments;\n  }\n  ```\n\n  To declare a **one-to-one** relationship with managed inverses, use `belongsTo` for both sides:\n\n  ```js\n  // app/models/author.js\n  import { Model, belongsTo } from '@warp-drive/legacy/model';\n\n  export default class Author extends Model {\n    @belongsTo('address', { async: true, inverse: 'owner' }) address;\n  }\n\n  // app/models/address.js\n  import { Model, belongsTo } from '@warp-drive/legacy/model';\n\n  export default class Address extends Model {\n    @belongsTo('author', { async: true, inverse: 'address' }) owner;\n  }\n  ```\n\n  To declare a **one-to-one** relationship without managed inverses, use `belongsTo` for both sides\n  with `null` as the inverse:\n\n  ```js\n  // app/models/author.js\n  import { Model, belongsTo } from '@warp-drive/legacy/model';\n\n  export default class Author extends Model {\n    @belongsTo('address', { async: true, inverse: null }) address;\n  }\n\n  // app/models/address.js\n  import { Model, belongsTo } from '@warp-drive/legacy/model';\n\n  export default class Address extends Model {\n    @belongsTo('author', { async: true, inverse: null }) owner;\n  }\n  ```\n\n  To declare a one-to-none relationship between two models, use\n  `belongsTo` with inverse set to `null` on just one side::\n\n  ```js\n  // app/models/person.js\n  import { Model, belongsTo } from '@warp-drive/legacy/model';\n\n  export default class Person extends Model {\n    @belongsTo('person', { async: false, inverse: null }) bestFriend;\n  }\n  ```\n\n  #### Sync vs Async Relationships\n\n  WarpDrive fulfills relationships using resource data available in\n  the cache.\n\n  Sync relationships point directly to the known related resources.\n\n  When a relationship is declared as async, if any of the known related\n  resources have not been loaded, they will be fetched. The property\n  on the record when accessed provides a promise that resolves once\n  all resources are loaded.\n\n  Async relationships may take advantage of links. On access, if the related\n  link has not been loaded, or if any known resources are not available in\n  the cache, the fresh state will be fetched using the link.\n\n  In contrast to async relationship, accessing a sync relationship\n  will error on access when any of the known related resources have\n  not been loaded.\n\n  If you are using `links` with sync relationships, you have to use\n  the BelongsTo reference API to fetch or refresh related resources\n  that aren't loaded. For instance, for a `bestFriend` relationship:\n\n  ```js\n  person.belongsTo('bestFriend').reload();\n  ```\n\n  #### Polymorphic Relationships\n\n  To declare a polymorphic relationship, use `hasMany` with the `polymorphic`\n  option set to `true`:\n\n  ```js\n  // app/models/comment.js\n  import { Model, belongsTo } from '@warp-drive/legacy/model';\n\n  export default class Comment extends Model {\n    @belongsTo('commentable', { async: false, inverse: 'comments', polymorphic: true }) parent;\n  }\n  ```\n\n  `'commentable'` here is referred to as the \"abstract type\" for the polymorphic\n  relationship.\n\n  Polymorphic relationships with `inverse: null` will accept any type of record as their content.\n  Polymorphic relationships with `inverse` set to a string will only accept records with a matching\n  inverse relationships declaring itself as satisfying the abstract type.\n\n  Below, 'as' is used to declare the that 'post' record satisfies the abstract type 'commentable'\n  for this relationship.\n\n  ```js\n  // app/models/post.js\n  import { Model, hasMany } from '@warp-drive/legacy/model';\n\n  export default class Post extends Model {\n    @hasMany('comment', { async: false, inverse: 'parent', as: 'commentable' }) comments;\n  }\n  ```\n\n  Note: every Model that declares an inverse to a polymorphic relationship must\n  declare itself exactly the same. This is because polymorphism is based on structural\n  traits.\n\n  Polymorphic to polymorphic relationships are supported. Both sides of the relationship\n  must be declared as polymorphic, and the `as` option must be used to declare the abstract\n  type each record satisfies on both sides.\n\n  @public\n  @param type the name of the related resource\n  @param options a hash of options\n*/\n\n// export function belongsTo<K extends Promise<unknown>, T extends Awaited<K> = Awaited<K>>(\n//   type: TypeFromInstance<NoNull<T>>,\n//   options: RelationshipOptions<T, true>\n// ): RelationshipDecorator<K>;\n\nfunction belongsTo(type, options) {\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`belongsTo must be invoked with a type and options. Did you mean \\`@belongsTo(${type}, { async: false, inverse: null })\\`?`);\n      }\n    })(!isElementDescriptor(arguments)) : {};\n  }\n  return _belongsTo(type, options);\n}\nfunction normalizeType(type) {\n  if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_NON_STRICT_TYPES)) {\n    const result = singularize(dasherize(type));\n    deprecate(`The resource type '${type}' is not normalized. Update your application code to use '${result}' instead of '${type}'.`, result === type, {\n      id: 'ember-data:deprecate-non-strict-types',\n      until: '6.0',\n      for: 'ember-data',\n      since: {\n        available: '4.13',\n        enabled: '5.3'\n      }\n    });\n    return result;\n  }\n  return type;\n}\nfunction _hasMany(type, options) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected hasMany options.async to be a boolean`);\n    }\n  })(options && typeof options.async === 'boolean') : {};\n\n  // Metadata about relationships is stored on the meta of\n  // the relationship. This is used for introspection and\n  // serialization. Note that `key` is populated lazily\n  // the first time the CP is called.\n  const meta = {\n    type: normalizeType(type),\n    options,\n    kind: 'hasMany',\n    name: '<Unknown BelongsTo>'\n  };\n  return computed({\n    get(key) {\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        if (['currentState'].includes(key)) {\n          throw new Error(`'${key}' is a reserved property name on instances of classes extending Model. Please choose a different property name for your hasMany on ${this.constructor.toString()}`);\n        }\n      }\n      if (this.isDestroying || this.isDestroyed) {\n        return [];\n      }\n      return lookupLegacySupport(this).getHasMany(key);\n    },\n    set(key, records) {\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        if (['currentState'].includes(key)) {\n          throw new Error(`'${key}' is a reserved property name on instances of classes extending Model. Please choose a different property name for your hasMany on ${this.constructor.toString()}`);\n        }\n      }\n      const support = lookupLegacySupport(this);\n      const manyArray = support.getManyArray(key);\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`You must pass an array of records to set a hasMany relationship`);\n        }\n      })(Array.isArray(records)) : {};\n      assertPrivateStore(this[RecordStore]);\n      this[RecordStore]._join(() => {\n        manyArray.splice(0, manyArray.length, ...records);\n      });\n      return support.getHasMany(key);\n    }\n  }).meta(meta);\n}\n\n/**\n  `hasMany` is used to define Many-To-One and Many-To-Many, and Many-To-None\n  relationships on a {@link Model}.\n\n  `hasMany` takes a configuration hash as a second parameter, currently\n  supported options are:\n\n  - `async`: (*required*) A boolean value used to declare whether this is a sync (false) or async (true) relationship.\n  - `inverse`: (*required*)  A string used to identify the inverse property on a related model, or `null`.\n  - `polymorphic`: (*optional*) A boolean value to mark the relationship as polymorphic\n  - `as`: (*optional*) A string used to declare the abstract type \"this\" record satisfies for polymorphism.\n\n  ### Examples\n\n  To declare a **many-to-one** (or one-to-many) relationship, use\n  `belongsTo` in combination with `hasMany`:\n\n  ```js\n  // app/models/post.js\n  import { Model, hasMany } from '@warp-drive/legacy/model';\n\n  export default class Post extends Model {\n    @hasMany('comment', { async: false, inverse: 'post' }) comments;\n  }\n\n\n  // app/models/comment.js\n  import { Model, belongsTo } from '@warp-drive/legacy/model';\n\n  export default class Comment extends Model {\n    @belongsTo('post', { async: false, inverse: 'comments' }) post;\n  }\n  ```\n\n  To declare a **many-to-many** relationship with managed inverses, use `hasMany` for both sides:\n\n  ```js\n  // app/models/post.js\n  import { Model, hasMany } from '@warp-drive/legacy/model';\n\n  export default class Post extends Model {\n    @hasMany('tag', { async: true, inverse: 'posts' }) tags;\n  }\n\n  // app/models/tag.js\n  import { Model, hasMany } from '@warp-drive/legacy/model';\n\n  export default class Tag extends Model {\n    @hasMany('post', { async: true, inverse: 'tags' }) posts;\n  }\n  ```\n\n  To declare a **many-to-many** relationship without managed inverses, use `hasMany` for both sides\n  with `null` as the inverse:\n\n  ```js\n  // app/models/post.js\n  import { Model, hasMany } from '@warp-drive/legacy/model';\n\n  export default class Post extends Model {\n    @hasMany('tag', { async: true, inverse: null }) tags;\n  }\n\n  // app/models/tag.js\n  import { Model, hasMany } from '@warp-drive/legacy/model';\n\n  export default class Tag extends Model {\n    @hasMany('post', { async: true, inverse: null }) posts;\n  }\n  ```\n\n  To declare a many-to-none relationship between two models, use\n  `hasMany` with inverse set to `null` on just one side::\n\n  ```js\n  // app/models/post.js\n  import { Model, hasMany } from '@warp-drive/legacy/model';\n\n  export default class Post extends Model {\n    @hasMany('category', { async: true, inverse: null }) categories;\n  }\n  ```\n\n  #### Sync vs Async Relationships\n\n  WarpDrive fulfills relationships using resource data available in\n  the cache.\n\n  Sync relationships point directly to the known related resources.\n\n  When a relationship is declared as async, if any of the known related\n  resources have not been loaded, they will be fetched. The property\n  on the record when accessed provides a promise that resolves once\n  all resources are loaded.\n\n  Async relationships may take advantage of links. On access, if the related\n  link has not been loaded, or if any known resources are not available in\n  the cache, the fresh state will be fetched using the link.\n\n  In contrast to async relationship, accessing a sync relationship\n  will error on access when any of the known related resources have\n  not been loaded.\n\n  If you are using `links` with sync relationships, you have to use\n  the HasMany reference API to fetch or refresh related resources\n  that aren't loaded. For instance, for a `comments` relationship:\n\n  ```js\n  post.hasMany('comments').reload();\n  ```\n\n  #### Polymorphic Relationships\n\n  To declare a polymorphic relationship, use `hasMany` with the `polymorphic`\n  option set to `true`:\n\n  ```js\n  // app/models/comment.js\n  import { Model, belongsTo } from '@warp-drive/legacy/model';\n\n  export default class Comment extends Model {\n    @belongsTo('commentable', { async: false, inverse: 'comments', polymorphic: true }) parent;\n  }\n  ```\n\n  `'commentable'` here is referred to as the \"abstract type\" for the polymorphic\n  relationship.\n\n  Polymorphic relationships with `inverse: null` will accept any type of record as their content.\n  Polymorphic relationships with `inverse` set to a string will only accept records with a matching\n  inverse relationships declaring itself as satisfying the abstract type.\n\n  Below, 'as' is used to declare the that 'post' record satisfies the abstract type 'commentable'\n  for this relationship.\n\n  ```js\n  // app/models/post.js\n  import { Model, hasMany } from '@warp-drive/legacy/model';\n\n  export default class Post extends Model {\n    @hasMany('comment', { async: false, inverse: 'parent', as: 'commentable' }) comments;\n  }\n  ```\n\n  Note: every Model that declares an inverse to a polymorphic relationship must\n  declare itself exactly the same. This is because polymorphism is based on structural\n  traits.\n\n  Polymorphic to polymorphic relationships are supported. Both sides of the relationship\n  must be declared as polymorphic, and the `as` option must be used to declare the abstract\n  type each record satisfies on both sides.\n\n  @public\n  @param type the name of the related resource\n  @param options a hash of options\n*/\n\n// export function hasMany<K extends Promise<unknown>, T extends Awaited<K> = Awaited<K>>(\n//   type: TypeFromInstance<NoNull<T>>,\n//   options: RelationshipOptions<T, true>\n// ): RelationshipDecorator<K>;\n\nfunction hasMany(type, options) {\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`hasMany must be invoked with a type and options. Did you mean \\`@hasMany(${type}, { async: false, inverse: null })\\`?`);\n      }\n    })(!isElementDescriptor(arguments)) : {};\n  }\n  return _hasMany(type, options);\n}\nexport { attr, belongsTo, hasMany };","const defaultRules = {\n  plurals: [[/$/, 's'], [/s$/i, 's'], [/^(ax|test)is$/i, '$1es'], [/(octop|vir)us$/i, '$1i'], [/(octop|vir)i$/i, '$1i'], [/(alias|status|bonus)$/i, '$1es'], [/(bu)s$/i, '$1ses'], [/(buffal|tomat)o$/i, '$1oes'], [/([ti])um$/i, '$1a'], [/([ti])a$/i, '$1a'], [/sis$/i, 'ses'], [/(?:([^f])fe|([lr])f)$/i, '$1$2ves'], [/(hive)$/i, '$1s'], [/([^aeiouy]|qu)y$/i, '$1ies'], [/(x|ch|ss|sh)$/i, '$1es'], [/(matr|vert|ind)(?:ix|ex)$/i, '$1ices'], [/^(m|l)ouse$/i, '$1ice'], [/^(m|l)ice$/i, '$1ice'], [/^(ox)$/i, '$1en'], [/^(oxen)$/i, '$1'], [/(quiz)$/i, '$1zes']],\n  singular: [[/s$/i, ''], [/(ss)$/i, '$1'], [/(n)ews$/i, '$1ews'], [/([ti])a$/i, '$1um'], [/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(sis|ses)$/i, '$1sis'], [/(^analy)(sis|ses)$/i, '$1sis'], [/([^f])ves$/i, '$1fe'], [/(hive)s$/i, '$1'], [/(tive)s$/i, '$1'], [/([lr])ves$/i, '$1f'], [/([^aeiouy]|qu)ies$/i, '$1y'], [/(s)eries$/i, '$1eries'], [/(m)ovies$/i, '$1ovie'], [/(x|ch|ss|sh)es$/i, '$1'], [/^(m|l)ice$/i, '$1ouse'], [/(bus)(es)?$/i, '$1'], [/(o)es$/i, '$1'], [/(shoe)s$/i, '$1'], [/(cris|test)(is|es)$/i, '$1is'], [/^(a)x[ie]s$/i, '$1xis'], [/(octop|vir)(us|i)$/i, '$1us'], [/(alias|status|bonus)(es)?$/i, '$1'], [/^(ox)en/i, '$1'], [/(vert|ind)ices$/i, '$1ex'], [/(matr)ices$/i, '$1ix'], [/(quiz)zes$/i, '$1'], [/(database)s$/i, '$1']],\n  irregularPairs: [['person', 'people'], ['man', 'men'], ['child', 'children'], ['sex', 'sexes'], ['move', 'moves'], ['cow', 'kine'], ['zombie', 'zombies']],\n  uncountable: ['equipment', 'information', 'rice', 'money', 'species', 'series', 'fish', 'sheep', 'jeans', 'police']\n};\nexport { defaultRules as InflectionRuleDefaults };","import { deprecate } from '@ember/debug';\nimport { macroCondition, getGlobalConfig, dependencySatisfies, importSync } from '@embroider/macros';\nimport { InflectionRuleDefaults } from '@warp-drive/utilities/-private';\nimport { plural, singular, irregular, uncountable } from '@warp-drive/utilities/string';\n\nif (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_EMBER_INFLECTOR)) {\n  if (macroCondition(dependencySatisfies('ember-inflector', '*'))) {\n    const Inflector = importSync('ember-inflector').default;\n    const {\n      inflector\n    } = Inflector;\n\n    // eslint-disable-next-line @typescript-eslint/unbound-method\n    const originalPlural = inflector.plural;\n    // eslint-disable-next-line @typescript-eslint/unbound-method\n    const originalSingular = inflector.singular;\n    // eslint-disable-next-line @typescript-eslint/unbound-method\n    const originalIrregular = inflector.irregular;\n    // eslint-disable-next-line @typescript-eslint/unbound-method\n    const originalUncountable = inflector.uncountable;\n\n    // copy over any already registered rules\n\n    // ember-inflector mutates the default rules arrays\n    // with user supplied rules, so we keep track of what\n    // is default via our own list.\n    const defaultPluralKeys = new Set();\n    const defaultSingularKeys = new Set();\n    InflectionRuleDefaults.plurals.forEach(([regex]) => {\n      defaultPluralKeys.add(regex.toString());\n    });\n    InflectionRuleDefaults.singular.forEach(([regex]) => {\n      defaultSingularKeys.add(regex.toString());\n    });\n    const {\n      defaultRules\n    } = Inflector;\n    const {\n      rules\n    } = inflector;\n    const irregularMap = new Map();\n    const toIgnore = new Set();\n    const uncountableSet = new Set(defaultRules.uncountable);\n    defaultRules.irregularPairs.forEach(([single, plur]) => {\n      irregularMap.set(single.toLowerCase(), plur);\n      toIgnore.add(plur.toLowerCase());\n    });\n    const irregularLookups = new Map();\n    Object.keys(rules.irregular).forEach(single => {\n      const plur = rules.irregular[single];\n      irregularLookups.set(single, plur);\n    });\n\n    // load plurals\n    rules.plurals.forEach(([regex, replacement]) => {\n      if (defaultPluralKeys.has(regex.toString())) {\n        return;\n      }\n      plural(regex, replacement);\n      deprecate(`WarpDrive/EmberData no longer uses ember-inflector for pluralization.\\nPlease \\`import { plural } from '@ember-data/request-utils/string';\\` instead to register a custom pluralization rule for use with EmberData.`, false, {\n        id: 'warp-drive.ember-inflector',\n        until: '6.0.0',\n        for: 'warp-drive',\n        since: {\n          enabled: '5.3.4',\n          available: '4.13'\n        },\n        url: 'https://deprecations.emberjs.com/id/warp-drive.ember-inflector'\n      });\n    });\n\n    // load singulars\n    rules.singular.forEach(([regex, replacement]) => {\n      if (defaultSingularKeys.has(regex.toString())) {\n        return;\n      }\n      singular(regex, replacement);\n      deprecate(`WarpDrive/EmberData no longer uses ember-inflector for singularization.\\nPlease \\`import { singular } from '@ember-data/request-utils/string';\\` instead to register a custom singularization rule for use with EmberData.`, false, {\n        id: 'warp-drive.ember-inflector',\n        until: '6.0.0',\n        for: 'warp-drive',\n        since: {\n          enabled: '5.3.4',\n          available: '4.13'\n        },\n        url: 'https://deprecations.emberjs.com/id/warp-drive.ember-inflector'\n      });\n    });\n\n    // load irregulars\n    Object.keys(rules.irregular).forEach(single => {\n      const plur = rules.irregular[single];\n      const defaultPlur = irregularMap.get(single);\n      if (defaultPlur && defaultPlur === plur) {\n        return;\n      }\n      if (toIgnore.has(single)) {\n        return;\n      }\n      const actualSingle = irregularLookups.get(plur.toLowerCase()) || single;\n      toIgnore.add(plur.toLowerCase());\n      irregular(actualSingle, plur);\n      deprecate(`WarpDrive/EmberData no longer uses ember-inflector for irregular rules.\\nPlease \\`import { irregular } from '@ember-data/request-utils/string';\\` instead to register a custom irregular rule for use with EmberData for '${actualSingle}' <=> '${plur}'.`, false, {\n        id: 'warp-drive.ember-inflector',\n        until: '6.0.0',\n        for: 'warp-drive',\n        since: {\n          enabled: '5.3.4',\n          available: '4.13'\n        },\n        url: 'https://deprecations.emberjs.com/id/warp-drive.ember-inflector'\n      });\n    });\n\n    // load uncountables\n    Object.keys(rules.uncountable).forEach(word => {\n      if (uncountableSet.has(word) || rules.uncountable[word] !== true) {\n        return;\n      }\n      uncountable(word);\n      deprecate(`WarpDrive/EmberData no longer uses ember-inflector for uncountable rules.\\nPlease \\`import { uncountable } from '@ember-data/request-utils/string';\\` instead to register a custom uncountable rule for '${word}' for use with EmberData.`, false, {\n        id: 'warp-drive.ember-inflector',\n        until: '6.0.0',\n        for: 'warp-drive',\n        since: {\n          enabled: '5.3.4',\n          available: '4.13'\n        },\n        url: 'https://deprecations.emberjs.com/id/warp-drive.ember-inflector'\n      });\n    });\n    inflector.plural = function (...args) {\n      plural(...args);\n      deprecate(`WarpDrive/EmberData no longer uses ember-inflector for pluralization.\\nPlease \\`import { plural } from '@ember-data/request-utils/string';\\` instead to register a custom pluralization rule for use with EmberData.`, false, {\n        id: 'warp-drive.ember-inflector',\n        until: '6.0.0',\n        for: 'warp-drive',\n        since: {\n          enabled: '5.3.4',\n          available: '4.13'\n        },\n        url: 'https://deprecations.emberjs.com/id/warp-drive.ember-inflector'\n      });\n      return originalPlural.apply(inflector, args);\n    };\n    inflector.singular = function (...args) {\n      singular(...args);\n      deprecate(`WarpDrive/EmberData no longer uses ember-inflector for singularization.\\nPlease \\`import { singular } from '@ember-data/request-utils/string';\\` instead to register a custom singularization rule for use with EmberData.`, false, {\n        id: 'warp-drive.ember-inflector',\n        until: '6.0.0',\n        for: 'warp-drive',\n        since: {\n          enabled: '5.3.4',\n          available: '4.13'\n        },\n        url: 'https://deprecations.emberjs.com/id/warp-drive.ember-inflector'\n      });\n      return originalSingular.apply(inflector, args);\n    };\n    inflector.irregular = function (...args) {\n      irregular(...args);\n      deprecate(`WarpDrive/EmberData no longer uses ember-inflector for irregular rules.\\nPlease \\`import { irregular } from '@ember-data/request-utils/string';\\` instead to register a custom irregular rule for use with EmberData.`, false, {\n        id: 'warp-drive.ember-inflector',\n        until: '6.0.0',\n        for: 'warp-drive',\n        since: {\n          enabled: '5.3.4',\n          available: '4.13'\n        },\n        url: 'https://deprecations.emberjs.com/id/warp-drive.ember-inflector'\n      });\n      return originalIrregular.apply(inflector, args);\n    };\n    inflector.uncountable = function (...args) {\n      uncountable(...args);\n      deprecate(`WarpDrive/EmberData no longer uses ember-inflector for uncountable rules.\\nPlease \\`import { uncountable } from '@ember-data/request-utils/string';\\` instead to register a custom uncountable rule for use with EmberData.`, false, {\n        id: 'warp-drive.ember-inflector',\n        until: '6.0.0',\n        for: 'warp-drive',\n        since: {\n          enabled: '5.3.4',\n          available: '4.13'\n        },\n        url: 'https://deprecations.emberjs.com/id/warp-drive.ember-inflector'\n      });\n      return originalUncountable.apply(inflector, args);\n    };\n  }\n}\n","import EmberObject from '@ember/object';\nimport * as s from '@ember/service';\nimport { a as decorateFieldV2, i as initializeDeferredDecorator } from \"./runtime-BPCpkOf1-BKOwiRJp.js\";\n\n/**\n  ## Overview\n\n  :::danger\n    ⚠️ **This is LEGACY documentation** for a feature that is no longer encouraged to be used.\n    If starting a new app or thinking of implementing a new serializer, consider writing a\n    {@link Handler} instead to be used with the {@link RequestManager}\n  :::\n\n  In order to properly manage and present your data, WarpDrive\n  needs to understand the structure of data it receives.\n\n  `Serializers` convert data between the server's API format and\n  the format WarpDrive understands.\n\n  Data received from an API response is **normalized** into\n  [{json:api}](https://jsonapi.org/) (the format used internally\n  by WarpDrive), while data sent to an API is **serialized**\n  into the format the API expects.\n\n  ### Implementing a Serializer\n\n  There are only two required serializer methods, one for\n  normalizing data from the server API format into {json:api}, and\n  another for serializing records via `Snapshots` into the expected\n  server API format.\n\n  To implement a serializer, export a class that conforms to the structure\n  described by {@link MinimumSerializerInterface}\n  from the `app/serializers/` directory. An example is below.\n\n  ```ts\n  import EmberObject from '@ember/object';\n\n  export default class ApplicationSerializer extends EmberObject {\n    normalizeResponse(store, schema, rawPayload) {\n      return rawPayload;\n    }\n\n    serialize(snapshot, options) {\n      const serializedResource = {\n        id: snapshot.id,\n        type: snapshot.modelName,\n        attributes: snapshot.attributes()\n      };\n\n      return serializedResource;\n    }\n  }\n ```\n\n\n  ### Serializer Resolution\n\n  `store.serializerFor(name)` will lookup serializers defined in\n  `app/serializers/` and return an instance. If no serializer is found, an\n  error will be thrown.\n\n  `serializerFor` first attempts to find a serializer with an exact match on `name`,\n  then falls back to checking for the presence of a serializer named `application`.\n\n  ```ts\n  store.serializerFor('author');\n\n  // lookup paths (in order) =>\n  //   app/serializers/author.js\n  //   app/serializers/application.js\n  ```\n\n  Most requests in `@warp-drive/legacy` are made with respect to a particular `type` (or `modelName`)\n  (e.g., \"get me the full collection of **books**\" or \"get me the **employee** whose id is 37\"). We\n  refer to this as the **primary** resource `type`.\n\n  Typically `serializerFor` will be used to find a serializer with a name matching that of the primary\n  resource `type` for the request, falling back to the `application` serializer for those types that\n  do not have a defined serializer. This is often described as a `per-model` or `per-type` strategy\n  for defining serializers. However, because APIs rarely format payloads per-type but rather\n  per-API-version, this may not be a desired strategy.\n\n  It is recommended that applications define only a single `application` adapter and serializer\n  where possible.\n\n  If you have multiple API formats and the per-type strategy is not viable, one strategy is to\n  write an `application` adapter and serializer that make use of `options` to specify the desired\n  format when making a request.\n\n  ### Using a Serializer\n\n  Any serializer in `app/serializers/` can be looked up by `name` using `store.serializerFor(name)`.\n\n  ### Default Serializers\n\n  For applications whose APIs are *very close to* or *exactly* the **REST** format or **JSON:API**\n  format the `@warp-drive/legacy/serializer` package contains implementations these applications can\n  extend. It also contains a simple `JSONSerializer` for serializing to/from very basic JSON objects.\n\n  Many applications will find writing their own serializer to be more performant and less\n  complex than extending these classes even when their API format is very close to that expected\n  by these serializers.\n\n  It is recommended that apps write their own serializer to best suit the needs of their API and\n  application.\n\n  @module\n*/\nconst service = s.service ?? s.inject;\n\n/**\n  > ⚠️ CAUTION you likely want the docs for {@link MinimumSerializerInterface}\n  > as extending this abstract class is unnecessary.\n\n  `Serializer` is an abstract base class that you may override in your\n  application to customize it for your backend. The minimum set of methods\n  that you should implement is:\n\n    * `normalizeResponse()`\n    * `serialize()`\n\n  And you can optionally override the following methods:\n\n    * `normalize()`\n\n  For an example implementation, see the included {@link JSONSerializer}.\n\n  @class Serializer\n  @public\n*/\n\nclass Serializer extends EmberObject {\n  static {\n    decorateFieldV2(this.prototype, \"store\", [service]);\n  }\n  #store = (initializeDeferredDecorator(this, \"store\"), void 0);\n  /**\n    The `store` property is the application's `store` that contains\n    all records. It can be used to look up serializers for other model\n    types that may be nested inside the payload response.\n     Example:\n     ```js\n    Serializer.extend({\n      extractRelationship(relationshipModelName, relationshipHash) {\n        let modelClass = this.store.modelFor(relationshipModelName);\n        let relationshipSerializer = this.store.serializerFor(relationshipModelName);\n        return relationshipSerializer.normalize(modelClass, relationshipHash);\n      }\n    });\n    ```\n     @property store\n    @type {Store}\n    @public\n  */\n\n  /**\n    The `normalizeResponse` method is used to normalize a payload from the\n    server to a JSON-API Document.\n     http://jsonapi.org/format/#document-structure\n     Example:\n     ```js\n    Serializer.extend({\n      normalizeResponse(store, primaryModelClass, payload, id, requestType) {\n        if (requestType === 'findRecord') {\n          return this.normalize(primaryModelClass, payload);\n        } else {\n          return payload.reduce(function(documentHash, item) {\n            let { data, included } = this.normalize(primaryModelClass, item);\n            documentHash.included.push(...included);\n            documentHash.data.push(data);\n            return documentHash;\n          }, { data: [], included: [] })\n        }\n      }\n    });\n    ```\n     @since 1.13.0\n    @public\n    @param {Store} store\n    @param {Model} primaryModelClass\n    @param {Object} payload\n    @param {String|Number} id\n    @param {String} requestType\n    @return {Object} JSON-API Document\n  */\n\n  /**\n    The `serialize` method is used when a record is saved in order to convert\n    the record into the form that your external data source expects.\n     `serialize` takes an optional `options` hash with a single option:\n     - `includeId`: If this is `true`, `serialize` should include the ID\n      in the serialized object it builds.\n     Example:\n     ```js\n    Serializer.extend({\n      serialize(snapshot, options) {\n        let json = {\n          id: snapshot.id\n        };\n         snapshot.eachAttribute((key, attribute) => {\n          json[key] = snapshot.attr(key);\n        });\n         snapshot.eachRelationship((key, relationship) => {\n          if (relationship.kind === 'belongsTo') {\n            json[key] = snapshot.belongsTo(key, { id: true });\n          } else if (relationship.kind === 'hasMany') {\n            json[key] = snapshot.hasMany(key, { ids: true });\n          }\n        });\n         return json;\n      },\n    });\n    ```\n     @public\n    @param {Snapshot} snapshot\n    @param {Object} [options]\n    @return {Object}\n  */\n\n  /**\n    The `normalize` method is used to convert a payload received from your\n    external data source into the normalized form `store.push()` expects. You\n    should override this method, munge the hash and return the normalized\n    payload.\n     Example:\n     ```js\n    Serializer.extend({\n      normalize(modelClass, resourceHash) {\n        let data = {\n          id:            resourceHash.id,\n          type:          modelClass.modelName,\n          attributes:    resourceHash\n        };\n        return { data: data };\n      }\n    })\n    ```\n     @public\n    @param {Model} typeClass\n    @param {Object} hash\n    @return {Object}\n  */\n  normalize(_typeClass, hash) {\n    return hash;\n  }\n}\nexport { Serializer };","import { getOwner } from '@ember/application';\nimport { warn } from '@ember/debug';\nimport { dasherize, singularize } from '@warp-drive/utilities/string';\nimport { Serializer } from './serializer.js';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nfunction coerceId(id) {\n  if (id === null || id === undefined || id === '') {\n    return null;\n  } else if (typeof id === 'string') {\n    return id;\n  } else if (typeof id === 'symbol') {\n    return id.toString();\n  } else {\n    return String(id);\n  }\n}\n\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint-disable @typescript-eslint/no-unsafe-call */\n/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nconst SOURCE_POINTER_REGEXP = /^\\/?data\\/(attributes|relationships)\\/(.*)/;\nconst SOURCE_POINTER_PRIMARY_REGEXP = /^\\/?data/;\nconst PRIMARY_ATTRIBUTE_KEY = 'base';\n\n/**\n * :::danger\n    ⚠️ **This is LEGACY documentation** for a feature that is no longer encouraged to be used.\n    If starting a new app or thinking of implementing a new adapter, consider writing a\n    {@link Handler} instead to be used with the {@link RequestManager}\n  :::\n\n  In WarpDrive a Serializer is used to serialize and deserialize\n  records when they are transferred in and out of an external source.\n  This process involves normalizing property names, transforming\n  attribute values and serializing relationships.\n\n  By default, WarpDrive uses and recommends the `JSONAPISerializer`.\n\n  `JSONSerializer` is useful for simpler or legacy backends that may\n  not support the http://jsonapi.org/ spec.\n\n  For example, given the following `User` model and JSON payload:\n\n  ```js [app/models/user.js]\n  import Model, { attr, belongsTo, hasMany } from '@warp-drive/legacy/model';\n\n  export default class UserModel extends Model {\n    @hasMany('user') friends;\n    @belongsTo('location') house;\n\n    @attr('string') name;\n  }\n  ```\n\n  ```js\n  {\n    id: 1,\n    name: 'Sebastian',\n    friends: [3, 4],\n    links: {\n      house: '/houses/lefkada'\n    }\n  }\n  ```\n\n  `JSONSerializer` will normalize the JSON payload to the {json:api} format that the\n  JSONAPICache uses to cache data in the Store.\n\n  You can customize how JSONSerializer processes its payload by passing options in\n  the `attrs` hash or by subclassing the `JSONSerializer` and overriding hooks:\n\n    - To customize how a single record is normalized, use the `normalize` hook.\n    - To customize how `JSONSerializer` normalizes the whole server response, use the\n      `normalizeResponse` hook.\n    - To customize how `JSONSerializer` normalizes a specific response from the server,\n      use one of the many specific `normalizeResponse` hooks.\n    - To customize how `JSONSerializer` normalizes your id, attributes or relationships,\n      use the `extractId`, `extractAttributes` and `extractRelationships` hooks.\n\n  The `JSONSerializer` normalization process follows these steps:\n\n    1. `normalizeResponse`\n        - entry method to the serializer.\n    2. `normalizeCreateRecordResponse`\n        - a `normalizeResponse` for a specific operation is called.\n    3. `normalizeSingleResponse`|`normalizeArrayResponse`\n        - for methods like `createRecord` we expect a single record back, while for methods like `findAll` we expect multiple records back.\n    4. `normalize`\n        - `normalizeArrayResponse` iterates and calls `normalize` for each of its records while `normalizeSingle`\n          calls it once. This is the method you most likely want to subclass.\n    5. `extractId` | `extractAttributes` | `extractRelationships`\n        - `normalize` delegates to these methods to\n          turn the record payload into the JSON API format.\n\n  @class JSONSerializer\n  @public\n*/\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst JSONSerializer = Serializer.extend({\n  /**\n    The `primaryKey` is used when serializing and deserializing\n    data. WarpDrive always uses the `id` property to store the id of\n    the record. The external source may not always follow this\n    convention. In these cases it is useful to override the\n    `primaryKey` property to match the `primaryKey` of your external\n    store.\n     Example\n     ```js [app/serializers/application.js]\n    import { JSONSerializer } from '@warp-drive/legacy/serializer/json';\n     export default class ApplicationSerializer extends JSONSerializer {\n      primaryKey = '_id'\n    }\n    ```\n     @public\n    @default 'id'\n  */\n  primaryKey: 'id',\n  /**\n    The `attrs` object can be used to declare a simple mapping between\n    property names on `Model` records and payload keys in the\n    serialized JSON object representing the record. An object with the\n    property `key` can also be used to designate the attribute's key on\n    the response payload.\n     Example\n     ```js [app/models/person.js]\n    import Model, { attr } from '@warp-drive/legacy/model';\n     export default class PersonModel extends Model {\n      @attr('string') firstName;\n      @attr('string') lastName;\n      @attr('string') occupation;\n      @attr('boolean') admin;\n    }\n    ```\n     ```js [app/serializers/person.js]\n    import { JSONSerializer } from '@warp-drive/legacy/serializer/json';\n     export default class PersonSerializer extends JSONSerializer {\n      attrs = {\n        admin: 'is_admin',\n        occupation: { key: 'career' }\n      }\n    }\n    ```\n     You can also remove attributes and relationships by setting the `serialize`\n    key to `false` in your mapping object.\n     Example\n     ```js [app/serializers/person.js]\n    import { JSONSerializer } from '@warp-drive/legacy/serializer/json';\n     export default class PostSerializer extends JSONSerializer {\n      attrs = {\n        admin: { serialize: false },\n        occupation: { key: 'career' }\n      }\n    }\n    ```\n     When serialized:\n     ```js\n    {\n      \"firstName\": \"Harry\",\n      \"lastName\": \"Houdini\",\n      \"career\": \"magician\"\n    }\n    ```\n     Note that the `admin` is now not included in the payload.\n     Setting `serialize` to `true` enforces serialization for hasMany\n    relationships even if it's neither a many-to-many nor many-to-none\n    relationship.\n     @public\n  */\n  mergedProperties: ['attrs'],\n  /**\n   Given a subclass of `Model` and a JSON object this method will\n   iterate through each attribute of the `Model` and invoke the\n   `Transform#deserialize` method on the matching property of the\n   JSON object.  This method is typically called after the\n   serializer's `normalize` method.\n    @private\n  */\n  applyTransforms(typeClass, data) {\n    const attributes = typeClass.attributes;\n    typeClass.eachTransformedAttribute((key, type) => {\n      if (data[key] === undefined) {\n        return;\n      }\n      const transform = this.transformFor(type);\n      const transformMeta = attributes.get(key);\n      data[key] = transform.deserialize(data[key], transformMeta.options);\n    });\n    return data;\n  },\n  /**\n    The `normalizeResponse` method is used to normalize a payload from the\n    server to a JSON-API Document.\n     http://jsonapi.org/format/#document-structure\n     This method delegates to a more specific normalize method based on\n    the `requestType`.\n     To override this method with a custom one, make sure to call\n    `return super.normalizeResponse(store, primaryModelClass, payload, id, requestType)` with your\n    pre-processed data.\n     Here's an example of using `normalizeResponse` manually:\n     ```javascript\n    socket.on('message', function(message) {\n      let data = message.data;\n      let modelClass = store.modelFor(data.modelName);\n      let serializer = store.serializerFor(data.modelName);\n      let normalized = serializer.normalizeSingleResponse(store, modelClass, data, data.id);\n       store.push(normalized);\n    });\n    ```\n     @since 1.13.0\n    @public\n  */\n  normalizeResponse(store, primaryModelClass, payload, id, requestType) {\n    switch (requestType) {\n      case 'findRecord':\n        // @ts-expect-error\n        return this.normalizeFindRecordResponse(...arguments);\n      case 'queryRecord':\n        // @ts-expect-error\n        return this.normalizeQueryRecordResponse(...arguments);\n      case 'findAll':\n        // @ts-expect-error\n        return this.normalizeFindAllResponse(...arguments);\n      case 'findBelongsTo':\n        // @ts-expect-error\n        return this.normalizeFindBelongsToResponse(...arguments);\n      case 'findHasMany':\n        // @ts-expect-error\n        return this.normalizeFindHasManyResponse(...arguments);\n      case 'findMany':\n        // @ts-expect-error\n        return this.normalizeFindManyResponse(...arguments);\n      case 'query':\n        // @ts-expect-error\n        return this.normalizeQueryResponse(...arguments);\n      case 'createRecord':\n        // @ts-expect-error\n        return this.normalizeCreateRecordResponse(...arguments);\n      case 'deleteRecord':\n        // @ts-expect-error\n        return this.normalizeDeleteRecordResponse(...arguments);\n      case 'updateRecord':\n        // @ts-expect-error\n        return this.normalizeUpdateRecordResponse(...arguments);\n    }\n  },\n  /**\n    Called by the default normalizeResponse implementation when the\n    type of request is `findRecord`\n     @since 1.13.0\n    @public\n  */\n  normalizeFindRecordResponse(store, primaryModelClass, payload, id, requestType) {\n    // @ts-expect-error\n    return this.normalizeSingleResponse(...arguments);\n  },\n  /**\n    Called by the default normalizeResponse implementation when the\n    type of request is `queryRecord`\n     @since 1.13.0\n    @public\n  */\n  normalizeQueryRecordResponse(store, primaryModelClass, payload, id, requestType) {\n    // @ts-expect-error\n    return this.normalizeSingleResponse(...arguments);\n  },\n  /**\n    Called by the default normalizeResponse implementation when the\n    type of request is `findAll`\n     @since 1.13.0\n    @public\n  */\n  normalizeFindAllResponse(store, primaryModelClass, payload, id, requestType) {\n    // @ts-expect-error\n    return this.normalizeArrayResponse(...arguments);\n  },\n  /**\n    Called by the default normalizeResponse implementation when the\n    type of request is `findBelongsTo`\n     @since 1.13.0\n    @public\n  */\n  normalizeFindBelongsToResponse(store, primaryModelClass, payload, id, requestType) {\n    // @ts-expect-error\n    return this.normalizeSingleResponse(...arguments);\n  },\n  /**\n    Called by the default normalizeResponse implementation when the\n    type of request is `findHasMany`\n     @since 1.13.0\n    @public\n  */\n  normalizeFindHasManyResponse(store, primaryModelClass, payload, id, requestType) {\n    // @ts-expect-error\n    return this.normalizeArrayResponse(...arguments);\n  },\n  /**\n    Called by the default normalizeResponse implementation when the\n    type of request is `findMany`\n     @since 1.13.0\n    @public\n  */\n  normalizeFindManyResponse(store, primaryModelClass, payload, id, requestType) {\n    // @ts-expect-error\n    return this.normalizeArrayResponse(...arguments);\n  },\n  /**\n    Called by the default normalizeResponse implementation when the\n    type of request is `query`\n     @since 1.13.0\n    @public\n  */\n  normalizeQueryResponse(store, primaryModelClass, payload, id, requestType) {\n    // @ts-expect-error\n    return this.normalizeArrayResponse(...arguments);\n  },\n  /**\n    Called by the default normalizeResponse implementation when the\n    type of request is `createRecord`\n     @since 1.13.0\n    @public\n  */\n  normalizeCreateRecordResponse(store, primaryModelClass, payload, id, requestType) {\n    // @ts-expect-error\n    return this.normalizeSaveResponse(...arguments);\n  },\n  /**\n    Called by the default normalizeResponse implementation when the\n    type of request is `deleteRecord`\n     @since 1.13.0\n    @public\n  */\n  normalizeDeleteRecordResponse(store, primaryModelClass, payload, id, requestType) {\n    // @ts-expect-error\n    return this.normalizeSaveResponse(...arguments);\n  },\n  /**\n    Called by the default normalizeResponse implementation when the\n    type of request is `updateRecord`\n     @since 1.13.0\n    @public\n  */\n  normalizeUpdateRecordResponse(store, primaryModelClass, payload, id, requestType) {\n    // @ts-expect-error\n    return this.normalizeSaveResponse(...arguments);\n  },\n  /**\n    normalizeUpdateRecordResponse, normalizeCreateRecordResponse and\n    normalizeDeleteRecordResponse delegate to this method by default.\n     @since 1.13.0\n    @public\n  */\n  normalizeSaveResponse(store, primaryModelClass, payload, id, requestType) {\n    // @ts-expect-error\n    return this.normalizeSingleResponse(...arguments);\n  },\n  /**\n    normalizeQueryResponse and normalizeFindRecordResponse delegate to this\n    method by default.\n     @since 1.13.0\n    @public\n  */\n  normalizeSingleResponse(store, primaryModelClass, payload, id, requestType) {\n    return this._normalizeResponse(store, primaryModelClass, payload, id, requestType, true);\n  },\n  /**\n    normalizeQueryResponse, normalizeFindManyResponse, and normalizeFindHasManyResponse delegate\n    to this method by default.\n     @since 1.13.0\n    @public\n  */\n  normalizeArrayResponse(store, primaryModelClass, payload, id, requestType) {\n    return this._normalizeResponse(store, primaryModelClass, payload, id, requestType, false);\n  },\n  /**\n    @private\n  */\n  _normalizeResponse(store, primaryModelClass, payload, id, requestType, isSingle) {\n    const documentHash = {\n      data: null,\n      included: []\n    };\n    const meta = this.extractMeta(store, primaryModelClass, payload);\n    if (meta) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error('The `meta` returned from `extractMeta` has to be an object, not \"' + typeof meta + '\".');\n        }\n      })(typeof meta === 'object') : {};\n      // @ts-expect-error untyped\n      documentHash.meta = meta;\n    }\n    if (isSingle) {\n      // @ts-expect-error untyped\n      const {\n        data,\n        included\n      } = this.normalize(primaryModelClass, payload);\n      documentHash.data = data;\n      if (included) {\n        documentHash.included = included;\n      }\n    } else {\n      // @ts-expect-error untyped\n      const ret = new Array(payload.length);\n      // @ts-expect-error untyped\n      for (let i = 0, l = payload.length; i < l; i++) {\n        const item = payload[i];\n        // @ts-expect-error untyped\n        const {\n          data,\n          included\n        } = this.normalize(primaryModelClass, item);\n        if (included) {\n          documentHash.included = documentHash.included.concat(included);\n        }\n        ret[i] = data;\n      }\n\n      // @ts-expect-error untyped\n      documentHash.data = ret;\n    }\n    return documentHash;\n  },\n  /**\n    Normalizes a part of the JSON payload returned by\n    the server. You should override this method, munge the hash\n    and call super if you have generic normalization to do.\n     It takes the type of the record that is being normalized\n    (as a Model class), the property where the hash was\n    originally found, and the hash to normalize.\n     You can use this method, for example, to normalize underscored keys to camelized\n    or other general-purpose normalizations.\n     Example\n     ```js [app/serializers/application.js]\n    import { JSONSerializer } from '@warp-drive/legacy/serializer/json';\n    import { underscore } from '<app-name>/utils/string-utils';\n    import { get } from '@ember/object';\n     export default class ApplicationSerializer extends JSONSerializer {\n      normalize(typeClass, hash) {\n        let fields = typeClass.fields;\n         fields.forEach(function(type, field) {\n          let payloadField = underscore(field);\n          if (field === payloadField) { return; }\n           hash[field] = hash[payloadField];\n          delete hash[payloadField];\n        });\n         return super.normalize(...arguments);\n      }\n    }\n    ```\n     @public\n  */\n  normalize(modelClass, resourceHash) {\n    let data = null;\n    if (resourceHash) {\n      this.normalizeUsingDeclaredMapping(modelClass, resourceHash);\n      // @ts-expect-error untyped\n      if (typeof resourceHash.links === 'object') {\n        // @ts-expect-error untyped\n        this.normalizeUsingDeclaredMapping(modelClass, resourceHash.links);\n      }\n\n      // @ts-expect-error untyped\n      data = {\n        id: this.extractId(modelClass, resourceHash),\n        type: modelClass.modelName,\n        attributes: this.extractAttributes(modelClass, resourceHash),\n        relationships: this.extractRelationships(modelClass, resourceHash)\n      };\n\n      // @ts-expect-error untyped\n      if (resourceHash.lid) {\n        // @ts-expect-error untyped\n        data.lid = resourceHash.lid;\n      }\n\n      // @ts-expect-error untyped\n      this.applyTransforms(modelClass, data.attributes);\n    }\n    return {\n      data\n    };\n  },\n  /**\n    Returns the resource's ID.\n     @public\n  */\n  extractId(modelClass, resourceHash) {\n    const primaryKey = this.primaryKey;\n    const id = resourceHash[primaryKey];\n    return coerceId(id);\n  },\n  /**\n    Returns the resource's attributes formatted as a JSON-API \"attributes object\".\n     http://jsonapi.org/format/#document-resource-object-attributes\n     @public\n  */\n  extractAttributes(modelClass, resourceHash) {\n    let attributeKey;\n    const attributes = {};\n    modelClass.eachAttribute(key => {\n      attributeKey = this.keyForAttribute(key, 'deserialize');\n      if (resourceHash[attributeKey] !== undefined) {\n        attributes[key] = resourceHash[attributeKey];\n      }\n    });\n    return attributes;\n  },\n  /**\n    Returns a relationship formatted as a JSON-API \"relationship object\".\n     http://jsonapi.org/format/#document-resource-object-relationships\n     @public\n  */\n  extractRelationship(relationshipModelName, relationshipHash) {\n    if (!relationshipHash) {\n      return null;\n    }\n    /*\n      When `relationshipHash` is an object it usually means that the relationship\n      is polymorphic. It could however also be embedded resources that the\n      EmbeddedRecordsMixin has be able to process.\n    */\n    if (relationshipHash && typeof relationshipHash === 'object' && !Array.isArray(relationshipHash)) {\n      // @ts-expect-error untyped\n      if (relationshipHash.id) {\n        // @ts-expect-error untyped\n        relationshipHash.id = coerceId(relationshipHash.id);\n      }\n\n      // @ts-expect-error store is dynamically injected\n      const modelClass = this.store.modelFor(relationshipModelName);\n      // @ts-expect-error untyped\n      if (relationshipHash.type && !modelClass.fields.has('type')) {\n        // @ts-expect-error untyped\n        relationshipHash.type = this.modelNameFromPayloadKey(relationshipHash.type);\n      }\n      return relationshipHash;\n    }\n    return {\n      id: coerceId(relationshipHash),\n      type: dasherize(singularize(relationshipModelName))\n    };\n  },\n  /**\n    Returns a polymorphic relationship formatted as a JSON-API \"relationship object\".\n     http://jsonapi.org/format/#document-resource-object-relationships\n     `relationshipOptions` is a hash which contains more information about the\n    polymorphic relationship which should be extracted:\n      - `resourceHash` complete hash of the resource the relationship should be\n        extracted from\n      - `relationshipKey` key under which the value for the relationship is\n        extracted from the resourceHash\n      - `relationshipMeta` meta information about the relationship\n     @public\n  */\n  extractPolymorphicRelationship(relationshipModelName, relationshipHash, relationshipOptions) {\n    return this.extractRelationship(relationshipModelName, relationshipHash);\n  },\n  /**\n    Returns the resource's relationships formatted as a JSON-API \"relationships object\".\n     http://jsonapi.org/format/#document-resource-object-relationships\n     @public\n  */\n  extractRelationships(modelClass, resourceHash) {\n    const relationships = {};\n    modelClass.eachRelationship((key, relationshipMeta) => {\n      let relationship = null;\n      const relationshipKey = this.keyForRelationship(key, relationshipMeta.kind, 'deserialize');\n      if (resourceHash[relationshipKey] !== undefined) {\n        let data = null;\n        const relationshipHash = resourceHash[relationshipKey];\n        if (relationshipMeta.kind === 'belongsTo') {\n          if (relationshipMeta.options.polymorphic) {\n            // extracting a polymorphic belongsTo may need more information\n            // than the type and the hash (which might only be an id) for the\n            // relationship, hence we pass the key, resource and\n            // relationshipMeta too\n            // @ts-expect-error untyped\n            data = this.extractPolymorphicRelationship(relationshipMeta.type, relationshipHash, {\n              key,\n              resourceHash,\n              relationshipMeta\n            });\n          } else {\n            // @ts-expect-error untyped\n            data = this.extractRelationship(relationshipMeta.type, relationshipHash);\n          }\n        } else if (relationshipMeta.kind === 'hasMany') {\n          if (relationshipHash) {\n            // @ts-expect-error untyped\n            data = new Array(relationshipHash.length);\n            if (relationshipMeta.options.polymorphic) {\n              for (let i = 0, l = relationshipHash.length; i < l; i++) {\n                const item = relationshipHash[i];\n                // @ts-expect-error untyped\n                data[i] = this.extractPolymorphicRelationship(relationshipMeta.type, item, {\n                  key,\n                  resourceHash,\n                  relationshipMeta\n                });\n              }\n            } else {\n              for (let i = 0, l = relationshipHash.length; i < l; i++) {\n                const item = relationshipHash[i];\n                // @ts-expect-error untyped\n                data[i] = this.extractRelationship(relationshipMeta.type, item);\n              }\n            }\n          }\n        }\n        // @ts-expect-error untyped\n        relationship = {\n          data\n        };\n      }\n      const linkKey = this.keyForLink(key, relationshipMeta.kind);\n      // @ts-expect-error untyped\n      if (resourceHash.links && resourceHash.links[linkKey] !== undefined) {\n        // @ts-expect-error untyped\n        const related = resourceHash.links[linkKey];\n        // @ts-expect-error untyped\n        relationship = relationship || {};\n        // @ts-expect-error untyped\n        relationship.links = {\n          related\n        };\n      }\n      if (relationship) {\n        relationships[key] = relationship;\n      }\n    });\n    return relationships;\n  },\n  /**\n    Dasherizes the model name in the payload\n     @public\n    @return the model's modelName\n  */\n  modelNameFromPayloadKey(key) {\n    return dasherize(singularize(key));\n  },\n  /**\n    @private\n  */\n  normalizeRelationships(typeClass, hash) {\n    let payloadKey;\n    if (this.keyForRelationship) {\n      typeClass.eachRelationship((key, relationship) => {\n        payloadKey = this.keyForRelationship(key, relationship.kind, 'deserialize');\n        if (key === payloadKey) {\n          return;\n        }\n        if (hash[payloadKey] === undefined) {\n          return;\n        }\n        hash[key] = hash[payloadKey];\n        delete hash[payloadKey];\n      });\n    }\n  },\n  /**\n    @private\n  */\n  normalizeUsingDeclaredMapping(modelClass, hash) {\n    // @ts-expect-error attrs is dynamically injected\n    const attrs = this.attrs;\n    let normalizedKey;\n    let payloadKey;\n    if (attrs) {\n      for (const key in attrs) {\n        normalizedKey = payloadKey = this._getMappedKey(key, modelClass);\n        if (hash[payloadKey] === undefined) {\n          continue;\n        }\n        if (modelClass.attributes.has(key)) {\n          normalizedKey = this.keyForAttribute(key, 'deserialize');\n        }\n        if (modelClass.relationshipsByName.has(key)) {\n          normalizedKey = this.keyForRelationship(key, modelClass, 'deserialize');\n        }\n        if (payloadKey !== normalizedKey) {\n          hash[normalizedKey] = hash[payloadKey];\n          delete hash[payloadKey];\n        }\n      }\n    }\n  },\n  /**\n    Looks up the property key that was set by the custom `attr` mapping\n    passed to the serializer.\n     @private\n  */\n  _getMappedKey(key, modelClass) {\n    warn('There is no attribute or relationship with the name `' + key + '` on `' + modelClass.modelName + '`. Check your serializers attrs hash.', modelClass.attributes.has(key) || modelClass.relationshipsByName.has(key), {\n      id: 'ds.serializer.no-mapped-attrs-key'\n    });\n    // @ts-expect-error attrs is dynamically injected\n    const attrs = this.attrs;\n    let mappedKey;\n    if (attrs && attrs[key]) {\n      mappedKey = attrs[key];\n      //We need to account for both the { title: 'post_title' } and\n      //{ title: { key: 'post_title' }} forms\n      if (mappedKey.key) {\n        mappedKey = mappedKey.key;\n      }\n      if (typeof mappedKey === 'string') {\n        key = mappedKey;\n      }\n    }\n    return key;\n  },\n  /**\n    Check attrs.key.serialize property to inform if the `key`\n    can be serialized\n     @private\n    @return true if the key can be serialized\n  */\n  _canSerialize(key) {\n    // @ts-expect-error no idea what attrs is here\n    const attrs = this.attrs;\n    return !attrs || !attrs[key] || attrs[key].serialize !== false;\n  },\n  /**\n    When attrs.key.serialize is set to true then\n    it takes priority over the other checks and the related\n    attribute/relationship will be serialized\n     @private\n    @return true if the key must be serialized\n  */\n  _mustSerialize(key) {\n    // @ts-expect-error no idea what attrs is here\n    const attrs = this.attrs;\n    return attrs && attrs[key] && attrs[key].serialize === true;\n  },\n  /**\n    Check if the given hasMany relationship should be serialized\n     By default only many-to-many and many-to-none relationships are serialized.\n    This could be configured per relationship by Serializer's `attrs` object.\n     @public\n    @return true if the hasMany relationship should be serialized\n  */\n  shouldSerializeHasMany(snapshot, key, relationship) {\n    // @ts-expect-error store is dynamically injected\n    const schema = this.store.modelFor(snapshot.modelName);\n    // @ts-expect-error store is dynamically injected\n    const relationshipType = schema.determineRelationshipType(relationship, this.store);\n    if (this._mustSerialize(key)) {\n      return true;\n    }\n    return this._canSerialize(key) && (relationshipType === 'manyToNone' || relationshipType === 'manyToMany');\n  },\n  // SERIALIZE\n  /**\n    Called when a record is saved in order to convert the\n    record into JSON.\n     By default, it creates a JSON object with a key for\n    each attribute and belongsTo relationship.\n     For example, consider this model:\n     ```js [app/models/comment.js]\n    import Model, { attr, belongsTo } from '@warp-drive/legacy/model';\n     export default class CommentModel extends Model {\n      @attr title;\n      @attr body;\n       @belongsTo('user') author;\n    }\n    ```\n     The default serialization would create a JSON object like:\n     ```javascript\n    {\n      \"title\": \"Rails is unagi\",\n      \"body\": \"Rails? Omakase? O_O\",\n      \"author\": 12\n    }\n    ```\n     By default, attributes are passed through as-is, unless\n    you specified an attribute type (`attr('date')`). If\n    you specify a transform, the JavaScript value will be\n    serialized when inserted into the JSON hash.\n     By default, belongs-to relationships are converted into\n    IDs when inserted into the JSON hash.\n     ## IDs\n     `serialize` takes an options hash with a single option:\n    `includeId`. If this option is `true`, `serialize` will,\n    by default include the ID in the JSON object it builds.\n     The adapter passes in `includeId: true` when serializing\n    a record for `createRecord`, but not for `updateRecord`.\n     ## Customization\n     Your server may expect a different JSON format than the\n    built-in serialization format.\n     In that case, you can implement `serialize` yourself and\n    return a JSON hash of your choosing.\n     ```js [app/serializers/post.js]\n    import { JSONSerializer } from '@warp-drive/legacy/serializer/json';\n     export default class PostSerializer extends JSONSerializer {\n      serialize(snapshot, options) {\n        let json = {\n          POST_TTL: snapshot.attr('title'),\n          POST_BDY: snapshot.attr('body'),\n          POST_CMS: snapshot.hasMany('comments', { ids: true })\n        };\n         if (options.includeId) {\n          json.POST_ID_ = snapshot.id;\n        }\n         return json;\n      }\n    }\n    ```\n     ## Customizing an App-Wide Serializer\n     If you want to define a serializer for your entire\n    application, you'll probably want to use `eachAttribute`\n    and `eachRelationship` on the record.\n     ```js [app/serializers/application.js]\n    import { JSONSerializer } from '@warp-drive/legacy/serializer/json';\n    import { singularize } from '<app-name>/utils/string-utils';\n     export default class ApplicationSerializer extends JSONSerializer {\n      serialize(snapshot, options) {\n        let json = {};\n         snapshot.eachAttribute((name) => {\n          json[serverAttributeName(name)] = snapshot.attr(name);\n        });\n         snapshot.eachRelationship((name, relationship) => {\n          if (relationship.kind === 'hasMany') {\n            json[serverHasManyName(name)] = snapshot.hasMany(name, { ids: true });\n          }\n        });\n         if (options.includeId) {\n          json.ID_ = snapshot.id;\n        }\n         return json;\n      }\n    }\n     function serverAttributeName(attribute) {\n      return attribute.underscore().toUpperCase();\n    }\n     function serverHasManyName(name) {\n      return serverAttributeName(singularize(name)) + \"_IDS\";\n    }\n    ```\n     This serializer will generate JSON that looks like this:\n     ```javascript\n    {\n      \"TITLE\": \"Rails is omakase\",\n      \"BODY\": \"Yep. Omakase.\",\n      \"COMMENT_IDS\": [ \"1\", \"2\", \"3\" ]\n    }\n    ```\n     ## Tweaking the Default JSON\n     If you just want to do some small tweaks on the default JSON,\n    you can call `super.serialize` first and make the tweaks on\n    the returned JSON.\n     ```js [app/serializers/post.js]\n    import { JSONSerializer } from '@warp-drive/legacy/serializer/json';\n     export default class PostSerializer extends JSONSerializer {\n      serialize(snapshot, options) {\n        let json = super.serialize(...arguments);\n         json.subject = json.title;\n        delete json.title;\n         return json;\n      }\n    }\n    ```\n     @public\n  */\n  serialize(snapshot, options) {\n    const json = {};\n\n    // @ts-expect-error super loose typing here right now\n    if (options && options.includeId) {\n      const id = snapshot.id;\n      if (id) {\n        json[this.primaryKey] = id;\n      }\n    }\n    snapshot.eachAttribute((key, attribute) => {\n      this.serializeAttribute(snapshot, json, key, attribute);\n    });\n    snapshot.eachRelationship((key, relationship) => {\n      if (relationship.kind === 'belongsTo') {\n        this.serializeBelongsTo(snapshot, json, relationship);\n      } else if (relationship.kind === 'hasMany') {\n        this.serializeHasMany(snapshot, json, relationship);\n      }\n    });\n    return json;\n  },\n  /**\n    You can use this method to customize how a serialized record is added to the complete\n    JSON hash to be sent to the server. By default the JSON Serializer does not namespace\n    the payload and just sends the raw serialized JSON object.\n    If your server expects namespaced keys, you should consider using the RESTSerializer.\n    Otherwise you can override this method to customize how the record is added to the hash.\n    The hash property should be modified by reference.\n     For example, your server may expect underscored root objects.\n     ```js [app/serializers/application.js]\n    import RESTSerializer from '@warp-drive/legacy/serializer/rest';\n    import { underscoren} from '<app-name>/utils/string-utils';\n     export default class ApplicationSerializer extends RESTSerializer {\n      serializeIntoHash(data, type, snapshot, options) {\n        let root = underscore(type.modelName);\n        data[root] = this.serialize(snapshot, options);\n      }\n    }\n    ```\n     @public\n  */\n  serializeIntoHash(hash, typeClass, snapshot, options) {\n    Object.assign(hash, this.serialize(snapshot, options));\n  },\n  /**\n    `serializeAttribute` can be used to customize how `attr`\n    properties are serialized\n     For example if you wanted to ensure all your attributes were always\n    serialized as properties on an `attributes` object you could\n    write:\n     ```js [app/serializers/application.js]\n    import { JSONSerializer } from '@warp-drive/legacy/serializer/json';\n     export default class ApplicationSerializer extends JSONSerializer {\n      serializeAttribute(snapshot, json, key, attributes) {\n        json.attributes = json.attributes || {};\n        super.serializeAttribute(snapshot, json.attributes, key, attributes);\n      }\n    }\n    ```\n     @public\n  */\n  serializeAttribute(snapshot, json, key, attribute) {\n    if (this._canSerialize(key)) {\n      const type = attribute.type;\n      // @ts-expect-error we don't know what is on the snapshot\n      let value = snapshot.attr(key);\n      if (type) {\n        const transform = this.transformFor(type);\n        value = transform.serialize(value, attribute.options);\n      }\n\n      // if provided, use the mapping provided by `attrs` in\n      // the serializer\n      // @ts-expect-error store added dynamically\n      const schema = this.store.modelFor(snapshot.modelName);\n      let payloadKey = this._getMappedKey(key, schema);\n      if (payloadKey === key && this.keyForAttribute) {\n        payloadKey = this.keyForAttribute(key, 'serialize');\n      }\n      json[payloadKey] = value;\n    }\n  },\n  /**\n    `serializeBelongsTo` can be used to customize how `belongsTo`\n    properties are serialized.\n     Example\n     ```js [app/serializers/post.js]\n    import { JSONSerializer } from '@warp-drive/legacy/serializer/json';\n     export default class PostSerializer extends JSONSerializer {\n      serializeBelongsTo(snapshot, json, relationship) {\n        let key = relationship.name;\n        let belongsTo = snapshot.belongsTo(key);\n         key = this.keyForRelationship ? this.keyForRelationship(key, \"belongsTo\", \"serialize\") : key;\n         json[key] = !belongsTo ? null : belongsTo.record.toJSON();\n      }\n    }\n    ```\n     @public\n  */\n  serializeBelongsTo(snapshot, json, relationship) {\n    const name = relationship.name;\n    if (this._canSerialize(name)) {\n      const belongsToId = snapshot.belongsTo(name, {\n        id: true\n      });\n\n      // if provided, use the mapping provided by `attrs` in\n      // the serializer\n      // @ts-expect-error store added dynamically\n      const schema = this.store.modelFor(snapshot.modelName);\n      let payloadKey = this._getMappedKey(name, schema);\n      if (payloadKey === name && this.keyForRelationship) {\n        payloadKey = this.keyForRelationship(name, 'belongsTo', 'serialize');\n      }\n\n      //Need to check whether the id is there for new&async records\n      if (!belongsToId) {\n        json[payloadKey] = null;\n      } else {\n        json[payloadKey] = belongsToId;\n      }\n      if (relationship.options.polymorphic) {\n        this.serializePolymorphicType(snapshot, json, relationship);\n      }\n    }\n  },\n  /**\n   `serializeHasMany` can be used to customize how `hasMany`\n   properties are serialized.\n    Example\n    ```js [app/serializers/post.js]\n   import { JSONSerializer } from '@warp-drive/legacy/serializer/json';\n    export default class PostSerializer extends JSONSerializer {\n     serializeHasMany(snapshot, json, relationship) {\n       let key = relationship.name;\n       if (key === 'comments') {\n         return;\n       } else {\n         super.serializeHasMany(...arguments);\n       }\n     }\n   }\n   ```\n     @public\n  */\n  serializeHasMany(snapshot, json, relationship) {\n    const name = relationship.name;\n    if (this.shouldSerializeHasMany(snapshot, name, relationship)) {\n      const hasMany = snapshot.hasMany(name, {\n        ids: true\n      });\n      if (hasMany !== undefined) {\n        // if provided, use the mapping provided by `attrs` in\n        // the serializer\n        // @ts-expect-error store added dynamically\n        const schema = this.store.modelFor(snapshot.modelName);\n        let payloadKey = this._getMappedKey(name, schema);\n        if (payloadKey === name && this.keyForRelationship) {\n          payloadKey = this.keyForRelationship(name, 'hasMany', 'serialize');\n        }\n        json[payloadKey] = hasMany;\n        // TODO support for polymorphic manyToNone and manyToMany relationships\n      }\n    }\n  },\n  /**\n    You can use this method to customize how polymorphic objects are\n    serialized. Objects are considered to be polymorphic if\n    `{ polymorphic: true }` is pass as the second argument to the\n    `belongsTo` function.\n     Example\n     ```js [app/serializers/comment.js]\n    import { JSONSerializer } from '@warp-drive/legacy/serializer/json';\n     export default class CommentSerializer extends JSONSerializer {\n      serializePolymorphicType(snapshot, json, relationship) {\n        let key = relationship.name;\n        let belongsTo = snapshot.belongsTo(key);\n         key = this.keyForAttribute ? this.keyForAttribute(key, 'serialize') : key;\n         if (!belongsTo) {\n          json[key + '_type'] = null;\n        } else {\n          json[key + '_type'] = belongsTo.modelName;\n        }\n      }\n    }\n    ```\n     @public\n  */\n  serializePolymorphicType(snapshot, json, relationship) {},\n  /**\n    `extractMeta` is used to deserialize any meta information in the\n    adapter payload. By default Ember Data expects meta information to\n    be located on the `meta` property of the payload object.\n     Example\n     ```js [app/serializers/post.js]\n    import { JSONSerializer } from '@warp-drive/legacy/serializer/json';\n     export default class PostSerializer extends JSONSerializer {\n      extractMeta(store, typeClass, payload) {\n        if (payload && payload.hasOwnProperty('_pagination')) {\n          let meta = payload._pagination;\n          delete payload._pagination;\n          return meta;\n        }\n      }\n    }\n    ```\n     @public\n  */\n  extractMeta(store, modelClass, payload) {\n    if (payload && payload['meta'] !== undefined) {\n      // @ts-expect-error\n      const meta = payload.meta;\n      // @ts-expect-error\n      delete payload.meta;\n      return meta;\n    }\n  },\n  /**\n    `extractErrors` is used to extract model errors when a call\n    to `Model#save` fails with an `InvalidError`. By default\n    Ember Data expects error information to be located on the `errors`\n    property of the payload object.\n     This serializer expects this `errors` object to be an Array similar\n    to the following, compliant with the https://jsonapi.org/format/#errors specification:\n     ```js\n    {\n      \"errors\": [\n        {\n          \"detail\": \"This username is already taken!\",\n          \"source\": {\n            \"pointer\": \"data/attributes/username\"\n          }\n        }, {\n          \"detail\": \"Doesn't look like a valid email.\",\n          \"source\": {\n            \"pointer\": \"data/attributes/email\"\n          }\n        }\n      ]\n    }\n    ```\n     The key `detail` provides a textual description of the problem.\n    Alternatively, the key `title` can be used for the same purpose.\n     The nested keys `source.pointer` detail which specific element\n    of the request data was invalid.\n     Note that JSON-API also allows for object-level errors to be placed\n    in an object with pointer `data`, signifying that the problem\n    cannot be traced to a specific attribute:\n     ```javascript\n    {\n      \"errors\": [\n        {\n          \"detail\": \"Some generic non property error message\",\n          \"source\": {\n            \"pointer\": \"data\"\n          }\n        }\n      ]\n    }\n    ```\n     When turn into a `Errors` object, you can read these errors\n    through the property `base`:\n     ```handlebars\n    {{#each @model.errors.base as |error|}}\n      <div class=\"error\">\n        {{error.message}}\n      </div>\n    {{/each}}\n    ```\n     Example of alternative implementation, overriding the default\n    behavior to deal with a different format of errors:\n     ```js [app/serializers/post.js]\n    import { JSONSerializer } from '@warp-drive/legacy/serializer/json';\n     export default class PostSerializer extends JSONSerializer {\n      extractErrors(store, typeClass, payload, id) {\n        if (payload && typeof payload === 'object' && payload._problems) {\n          payload = payload._problems;\n          this.normalizeErrors(typeClass, payload);\n        }\n        return payload;\n      }\n    }\n    ```\n     @public\n    @return json The deserialized errors\n  */\n  extractErrors(store, typeClass, payload, id) {\n    // @ts-expect-error\n    if (payload && typeof payload === 'object' && payload.errors) {\n      // the default assumption is that errors is already in JSON:API format\n      const extracted = {};\n\n      // @ts-expect-error\n      payload.errors.forEach(error => {\n        if (error.source && error.source.pointer) {\n          let key = error.source.pointer.match(SOURCE_POINTER_REGEXP);\n          if (key) {\n            key = key[2];\n          } else if (error.source.pointer.search(SOURCE_POINTER_PRIMARY_REGEXP) !== -1) {\n            key = PRIMARY_ATTRIBUTE_KEY;\n          }\n          if (key) {\n            extracted[key] = extracted[key] || [];\n            extracted[key].push(error.detail || error.title);\n          }\n        }\n      });\n\n      // if the user has an attrs hash, convert keys using it\n      this.normalizeUsingDeclaredMapping(typeClass, extracted);\n\n      // for each attr and relationship, make sure that we use\n      // the normalized key\n      typeClass.eachAttribute(name => {\n        const key = this.keyForAttribute(name, 'deserialize');\n        if (key !== name && extracted[key] !== undefined) {\n          extracted[name] = extracted[key];\n          delete extracted[key];\n        }\n      });\n      typeClass.eachRelationship(name => {\n        const key = this.keyForRelationship(name, 'deserialize');\n        if (key !== name && extracted[key] !== undefined) {\n          extracted[name] = extracted[key];\n          delete extracted[key];\n        }\n      });\n      return extracted;\n    }\n    return payload;\n  },\n  /**\n    `keyForAttribute` can be used to define rules for how to convert an\n    attribute name in your model to a key in your JSON.\n     Example\n     ```js [app/serializers/application.js]\n    import { JSONSerializer } from '@warp-drive/legacy/serializer/json';\n    import { underscore } from '<app-name>/utils/string-utils';\n     export default class ApplicationSerializer extends JSONSerializer {\n      keyForAttribute(attr, method) {\n        return underscore(attr).toUpperCase();\n      }\n    }\n    ```\n     @public\n  */\n  keyForAttribute(key, method) {\n    return key;\n  },\n  /**\n    `keyForRelationship` can be used to define a custom key when\n    serializing and deserializing relationship properties. By default\n    `JSONSerializer` does not provide an implementation of this method.\n     Example\n       ```js [app/serializers/post.js]\n      import { JSONSerializer } from '@warp-drive/legacy/serializer/json';\n      import { underscore } from '<app-name>/utils/string-utils';\n       export default class PostSerializer extends JSONSerializer {\n        keyForRelationship(key, relationship, method) {\n          return `rel_${underscore(key)}`;\n        }\n      }\n      ```\n     @public\n  */\n  keyForRelationship(key, typeClass, method) {\n    return key;\n  },\n  /**\n   `keyForLink` can be used to define a custom key when deserializing link\n   properties.\n     @public\n  */\n  keyForLink(key, kind) {\n    return key;\n  },\n  // HELPERS\n\n  /**\n   @private\n  */\n  transformFor(attributeType, skipAssertion) {\n    const transform = getOwner(this).lookup(`transform:${attributeType}`);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Unable to find the transform for \\`attr('${attributeType}')\\``);\n      }\n    })(skipAssertion || !!transform) : {};\n    return transform;\n  }\n});\nexport { JSONSerializer as J, coerceId as c };","import { warn } from '@ember/debug';\nimport { camelize, dasherize, singularize } from '@warp-drive/utilities/string';\nimport { J as JSONSerializer, c as coerceId } from \"../json-ChdEfB0X.js\";\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nimport Mixin from '@ember/object/mixin';\n\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint-disable @typescript-eslint/no-unsafe-call */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n\n/**\n  ## Using Embedded Records\n\n  `EmbeddedRecordsMixin` supports serializing embedded records.\n\n  To set up embedded records, include the mixin when extending a serializer,\n  then define and configure embedded (model) relationships.\n\n  Note that embedded records will serialize with the serializer for their model instead of the serializer in which they are defined.\n\n  Note also that this mixin does not work with JSONAPISerializer because the JSON:API specification does not describe how to format embedded resources.\n\n  Below is an example of a per-type serializer (`post` type).\n\n  ```js [app/serializers/post.js]\n  import RESTSerializer, { EmbeddedRecordsMixin } from '@warp-drive/legacy/serializer/rest';\n\n  export default class PostSerializer extends RESTSerializer.extend(EmbeddedRecordsMixin) {\n    attrs = {\n      author: { embedded: 'always' },\n      comments: { serialize: 'ids' }\n    }\n  }\n  ```\n  Note that this use of `{ embedded: 'always' }` is unrelated to\n  the `{ embedded: 'always' }` that is defined as an option on `attr` as part of\n  defining a model while working with the `ActiveModelSerializer`.  Nevertheless,\n  using `{ embedded: 'always' }` as an option to `attr` is not a valid way to set up\n  embedded records.\n\n  The `attrs` option for a resource `{ embedded: 'always' }` is shorthand for:\n\n  ```js\n  {\n    serialize: 'records',\n    deserialize: 'records'\n  }\n  ```\n\n  ### Configuring Attrs\n\n  A resource's `attrs` option may be set to use `ids`, `records` or false for the\n  `serialize`  and `deserialize` settings.\n\n  The `attrs` property can be set on the `ApplicationSerializer` or a per-type\n  serializer.\n\n  In the case where embedded JSON is expected while extracting a payload (reading)\n  the setting is `deserialize: 'records'`, there is no need to use `ids` when\n  extracting as that is the default behaviour without this mixin if you are using\n  the vanilla `EmbeddedRecordsMixin`. Likewise, to embed JSON in the payload while\n  serializing `serialize: 'records'` is the setting to use. There is an option of\n  not embedding JSON in the serialized payload by using `serialize: 'ids'`. If you\n  do not want the relationship sent at all, you can use `serialize: false`.\n\n\n  ### EmbeddedRecordsMixin defaults\n  If you do not overwrite `attrs` for a specific relationship, the `EmbeddedRecordsMixin`\n  will behave in the following way:\n\n  BelongsTo: `{ serialize: 'id', deserialize: 'id' }`\n  HasMany:   `{ serialize: false, deserialize: 'ids' }`\n\n  ### Model Relationships\n\n  Embedded records must have a model defined to be extracted and serialized. Note that\n  when defining any relationships on your model such as `belongsTo` and `hasMany`, you\n  should not both specify `async: true` and also indicate through the serializer's\n  `attrs` attribute that the related model should be embedded for deserialization.\n  If a model is declared embedded for deserialization (`embedded: 'always'` or `deserialize: 'records'`),\n  then do not use `async: true`.\n\n  To successfully extract and serialize embedded records the model relationships\n  must be set up correctly. See the\n  [defining relationships](https://guides.emberjs.com/current/models/relationships)\n  section of the **Defining Models** guide page.\n\n  Records without an `id` property are not considered embedded records, model\n  instances must have an `id` property to be used with Ember Data.\n\n  ### Example JSON payloads, Models and Serializers\n\n  **When customizing a serializer it is important to grok what the customizations\n  are. Please read the docs for the methods this mixin provides, in case you need\n  to modify it to fit your specific needs.**\n\n  @class EmbeddedRecordsMixin\n  @public\n*/\nconst EmbeddedRecordsMixin = Mixin.create({\n  /**\n    Normalize the record and recursively normalize/extract all the embedded records\n    while pushing them into the store as they are encountered\n     A payload with an attr configured for embedded records needs to be extracted:\n     ```js\n    {\n      \"post\": {\n        \"id\": \"1\"\n        \"title\": \"Rails is omakase\",\n        \"comments\": [{\n          \"id\": \"1\",\n          \"body\": \"Rails is unagi\"\n        }, {\n          \"id\": \"2\",\n          \"body\": \"Omakase O_o\"\n        }]\n      }\n    }\n    ```\n    @public\n   @param {Model} typeClass\n   @param {Object} hash to be normalized\n   @param {String} prop the hash has been referenced by\n   @return {Object} the normalized hash\n  **/\n  normalize(typeClass, hash, prop) {\n    const normalizedHash = this._super(typeClass, hash, prop);\n    return this._extractEmbeddedRecords(this, this.store, typeClass, normalizedHash);\n  },\n  keyForRelationship(key, typeClass, method) {\n    if (method === 'serialize' && this.hasSerializeRecordsOption(key) || method === 'deserialize' && this.hasDeserializeRecordsOption(key)) {\n      return this.keyForAttribute(key, method);\n    } else {\n      return this._super(key, typeClass, method) || key;\n    }\n  },\n  /**\n    Serialize `belongsTo` relationship when it is configured as an embedded object.\n     This example of an author model belongs to a post model:\n     ```js\n    import Model, { attr, belongsTo } from '@warp-drive/legacy/model';\n     Post = Model.extend({\n      title:    attr('string'),\n      body:     attr('string'),\n      author:   belongsTo('author')\n    });\n     Author = Model.extend({\n      name:     attr('string'),\n      post:     belongsTo('post')\n    });\n    ```\n     Use a custom (type) serializer for the post model to configure embedded author\n     ```js [app/serializers/post.js]\n    import RESTSerializer, { EmbeddedRecordsMixin } from '@warp-drive/legacy/serializer/rest';\n     export default class PostSerializer extends RESTSerializer.extend(EmbeddedRecordsMixin) {\n      attrs = {\n        author: { embedded: 'always' }\n      }\n    }\n    ```\n     A payload with an attribute configured for embedded records can serialize\n    the records together under the root attribute's payload:\n     ```js\n    {\n      \"post\": {\n        \"id\": \"1\"\n        \"title\": \"Rails is omakase\",\n        \"author\": {\n          \"id\": \"2\"\n          \"name\": \"dhh\"\n        }\n      }\n    }\n    ```\n     @public\n    @param {Snapshot} snapshot\n    @param {Object} json\n    @param {Object} relationship\n  */\n  serializeBelongsTo(snapshot, json, relationship) {\n    const attr = relationship.name;\n    if (this.noSerializeOptionSpecified(attr)) {\n      this._super(snapshot, json, relationship);\n      return;\n    }\n    const includeIds = this.hasSerializeIdsOption(attr);\n    const includeRecords = this.hasSerializeRecordsOption(attr);\n    const embeddedSnapshot = snapshot.belongsTo(attr);\n    if (includeIds) {\n      const schema = this.store.modelFor(snapshot.modelName);\n      let serializedKey = this._getMappedKey(relationship.name, schema);\n      if (serializedKey === relationship.name && this.keyForRelationship) {\n        serializedKey = this.keyForRelationship(relationship.name, relationship.kind, 'serialize');\n      }\n      if (!embeddedSnapshot) {\n        json[serializedKey] = null;\n      } else {\n        json[serializedKey] = embeddedSnapshot.id;\n        if (relationship.options.polymorphic) {\n          this.serializePolymorphicType(snapshot, json, relationship);\n        }\n      }\n    } else if (includeRecords) {\n      this._serializeEmbeddedBelongsTo(snapshot, json, relationship);\n    }\n  },\n  _serializeEmbeddedBelongsTo(snapshot, json, relationship) {\n    const embeddedSnapshot = snapshot.belongsTo(relationship.name);\n    const schema = this.store.modelFor(snapshot.modelName);\n    let serializedKey = this._getMappedKey(relationship.name, schema);\n    if (serializedKey === relationship.name && this.keyForRelationship) {\n      serializedKey = this.keyForRelationship(relationship.name, relationship.kind, 'serialize');\n    }\n    if (!embeddedSnapshot) {\n      json[serializedKey] = null;\n    } else {\n      json[serializedKey] = embeddedSnapshot.serialize({\n        includeId: true\n      });\n      this.removeEmbeddedForeignKey(snapshot, embeddedSnapshot, relationship, json[serializedKey]);\n      if (relationship.options.polymorphic) {\n        this.serializePolymorphicType(snapshot, json, relationship);\n      }\n    }\n  },\n  /**\n    Serializes `hasMany` relationships when it is configured as embedded objects.\n     This example of a post model has many comments:\n     ```js\n    import Model, { attr, belongsTo, hasMany } from '@warp-drive/legacy/model';\n     Post = Model.extend({\n      title:    attr('string'),\n      body:     attr('string'),\n      comments: hasMany('comment')\n    });\n     Comment = Model.extend({\n      body:     attr('string'),\n      post:     belongsTo('post')\n    });\n    ```\n     Use a custom (type) serializer for the post model to configure embedded comments\n     ```js [app/serializers/post.js]\n    import RESTSerializer, { EmbeddedRecordsMixin } from '@warp-drive/legacy/serializer/rest';\n     export default class PostSerializer extends RESTSerializer.extend(EmbeddedRecordsMixin) {\n      attrs = {\n        comments: { embedded: 'always' }\n      }\n    }\n    ```\n     A payload with an attribute configured for embedded records can serialize\n    the records together under the root attribute's payload:\n     ```js\n    {\n      \"post\": {\n        \"id\": \"1\"\n        \"title\": \"Rails is omakase\",\n        \"body\": \"I want this for my ORM, I want that for my template language...\"\n        \"comments\": [{\n          \"id\": \"1\",\n          \"body\": \"Rails is unagi\"\n        }, {\n          \"id\": \"2\",\n          \"body\": \"Omakase O_o\"\n        }]\n      }\n    }\n    ```\n     The attrs options object can use more specific instruction for extracting and\n    serializing. When serializing, an option to embed `ids`, `ids-and-types` or `records` can be set.\n    When extracting the only option is `records`.\n     So `{ embedded: 'always' }` is shorthand for:\n    `{ serialize: 'records', deserialize: 'records' }`\n     To embed the `ids` for a related object (using a hasMany relationship):\n     ```js [app/serializers/post.js]\n    import RESTSerializer, { EmbeddedRecordsMixin } from '@warp-drive/legacy/serializer/rest';\n     export default class PostSerializer extends RESTSerializer.extend(EmbeddedRecordsMixin) {\n      attrs = {\n        comments: { serialize: 'ids', deserialize: 'records' }\n      }\n    }\n    ```\n     ```js\n    {\n      \"post\": {\n        \"id\": \"1\"\n        \"title\": \"Rails is omakase\",\n        \"body\": \"I want this for my ORM, I want that for my template language...\"\n        \"comments\": [\"1\", \"2\"]\n      }\n    }\n    ```\n     To embed the relationship as a collection of objects with `id` and `type` keys, set\n    `ids-and-types` for the related object.\n     This is particularly useful for polymorphic relationships where records don't share\n    the same table and the `id` is not enough information.\n     For example having a user that has many pets:\n     ```js\n    User = Model.extend({\n      name: attr('string'),\n      pets: hasMany('pet', { polymorphic: true })\n    });\n     Pet = Model.extend({\n      name: attr('string'),\n    });\n     Cat = Pet.extend({\n      // ...\n    });\n     Parrot = Pet.extend({\n      // ...\n    });\n    ```\n     ```js [app/serializers/user.js]\n    import RESTSerializer, { EmbeddedRecordsMixin } from '@warp-drive/legacy/serializer/rest';\n     export default class UserSerializer extends RESTSerializer.extend(EmbeddedRecordsMixin) {\n      attrs = {\n        pets: { serialize: 'ids-and-types', deserialize: 'records' }\n      }\n    }\n    ```\n     ```js\n    {\n      \"user\": {\n        \"id\": \"1\"\n        \"name\": \"Bertin Osborne\",\n        \"pets\": [\n          { \"id\": \"1\", \"type\": \"Cat\" },\n          { \"id\": \"1\", \"type\": \"Parrot\"}\n        ]\n      }\n    }\n    ```\n     @public\n    @param {Snapshot} snapshot\n    @param {Object} json\n    @param {Object} relationship\n  */\n  serializeHasMany(snapshot, json, relationship) {\n    const attr = relationship.name;\n    if (this.noSerializeOptionSpecified(attr)) {\n      this._super(snapshot, json, relationship);\n      return;\n    }\n    if (this.hasSerializeIdsOption(attr)) {\n      const schema = this.store.modelFor(snapshot.modelName);\n      let serializedKey = this._getMappedKey(relationship.name, schema);\n      if (serializedKey === relationship.name && this.keyForRelationship) {\n        serializedKey = this.keyForRelationship(relationship.name, relationship.kind, 'serialize');\n      }\n      json[serializedKey] = snapshot.hasMany(attr, {\n        ids: true\n      });\n    } else if (this.hasSerializeRecordsOption(attr)) {\n      this._serializeEmbeddedHasMany(snapshot, json, relationship);\n    } else {\n      if (this.hasSerializeIdsAndTypesOption(attr)) {\n        this._serializeHasManyAsIdsAndTypes(snapshot, json, relationship);\n      }\n    }\n  },\n  /*\n    Serializes a hasMany relationship as an array of objects containing only `id` and `type`\n    keys.\n    This has its use case on polymorphic hasMany relationships where the server is not storing\n    all records in the same table using STI, and therefore the `id` is not enough information\n     TODO: Make the default in Ember-data 3.0??\n  */\n  _serializeHasManyAsIdsAndTypes(snapshot, json, relationship) {\n    const serializedKey = this.keyForAttribute(relationship.name, 'serialize');\n    const hasMany = snapshot.hasMany(relationship.name) || [];\n    json[serializedKey] = hasMany.map(function (recordSnapshot) {\n      //\n      // I'm sure I'm being utterly naive here. Probably id is a configurable property and\n      // type too, and the modelName has to be normalized somehow.\n      //\n      return {\n        id: recordSnapshot.id,\n        type: recordSnapshot.modelName\n      };\n    });\n  },\n  _serializeEmbeddedHasMany(snapshot, json, relationship) {\n    const schema = this.store.modelFor(snapshot.modelName);\n    let serializedKey = this._getMappedKey(relationship.name, schema);\n    if (serializedKey === relationship.name && this.keyForRelationship) {\n      serializedKey = this.keyForRelationship(relationship.name, relationship.kind, 'serialize');\n    }\n    warn(`The embedded relationship '${serializedKey}' is undefined for '${snapshot.modelName}' with id '${snapshot.id}'. Please include it in your original payload.`, typeof snapshot.hasMany(relationship.name) !== 'undefined', {\n      id: 'ds.serializer.embedded-relationship-undefined'\n    });\n    json[serializedKey] = this._generateSerializedHasMany(snapshot, relationship);\n  },\n  /*\n    Returns an array of embedded records serialized to JSON\n  */\n  _generateSerializedHasMany(snapshot, relationship) {\n    const hasMany = snapshot.hasMany(relationship.name) || [];\n    const ret = new Array(hasMany.length);\n    for (let i = 0; i < hasMany.length; i++) {\n      const embeddedSnapshot = hasMany[i];\n      const embeddedJson = embeddedSnapshot.serialize({\n        includeId: true\n      });\n      this.removeEmbeddedForeignKey(snapshot, embeddedSnapshot, relationship, embeddedJson);\n      ret[i] = embeddedJson;\n    }\n    return ret;\n  },\n  /**\n    When serializing an embedded record, modify the property (in the `JSON` payload)\n    that refers to the parent record (foreign key for the relationship).\n     Serializing a `belongsTo` relationship removes the property that refers to the\n    parent record\n     Serializing a `hasMany` relationship does not remove the property that refers to\n    the parent record.\n     @public\n    @param {Snapshot} snapshot\n    @param {Snapshot} embeddedSnapshot\n    @param {Object} relationship\n    @param {Object} json\n  */\n  removeEmbeddedForeignKey(snapshot, embeddedSnapshot, relationship, json) {\n    if (relationship.kind === 'belongsTo') {\n      const schema = this.store.modelFor(snapshot.modelName);\n      const parentRecord = schema.inverseFor(relationship.name, this.store);\n      if (parentRecord) {\n        const name = parentRecord.name;\n        const embeddedSerializer = this.store.serializerFor(embeddedSnapshot.modelName);\n        const parentKey = embeddedSerializer.keyForRelationship(name, parentRecord.kind, 'deserialize');\n        if (parentKey) {\n          delete json[parentKey];\n        }\n      }\n    } /*else if (relationship.kind === 'hasMany') {\n      return;\n      }*/\n  },\n  // checks config for attrs option to embedded (always) - serialize and deserialize\n  hasEmbeddedAlwaysOption(attr) {\n    const option = this.attrsOption(attr);\n    return option && option.embedded === 'always';\n  },\n  // checks config for attrs option to serialize ids\n  hasSerializeRecordsOption(attr) {\n    const alwaysEmbed = this.hasEmbeddedAlwaysOption(attr);\n    const option = this.attrsOption(attr);\n    return alwaysEmbed || option && option.serialize === 'records';\n  },\n  // checks config for attrs option to serialize records\n  hasSerializeIdsOption(attr) {\n    const option = this.attrsOption(attr);\n    return option && (option.serialize === 'ids' || option.serialize === 'id');\n  },\n  // checks config for attrs option to serialize records as objects containing id and types\n  hasSerializeIdsAndTypesOption(attr) {\n    const option = this.attrsOption(attr);\n    return option && (option.serialize === 'ids-and-types' || option.serialize === 'id-and-type');\n  },\n  // checks config for attrs option to serialize records\n  noSerializeOptionSpecified(attr) {\n    const option = this.attrsOption(attr);\n    return !(option && (option.serialize || option.embedded));\n  },\n  // checks config for attrs option to deserialize records\n  // a defined option object for a resource is treated the same as\n  // `deserialize: 'records'`\n  hasDeserializeRecordsOption(attr) {\n    const alwaysEmbed = this.hasEmbeddedAlwaysOption(attr);\n    const option = this.attrsOption(attr);\n    return alwaysEmbed || option && option.deserialize === 'records';\n  },\n  attrsOption(attr) {\n    const attrs = this.attrs;\n    return attrs && (attrs[camelize(attr)] || attrs[attr]);\n  },\n  /**\n   @private\n  */\n  _extractEmbeddedRecords(serializer, store, typeClass, partial) {\n    typeClass.eachRelationship((key, relationship) => {\n      if (serializer.hasDeserializeRecordsOption(key)) {\n        if (relationship.kind === 'hasMany') {\n          this._extractEmbeddedHasMany(store, key, partial, relationship);\n        }\n        if (relationship.kind === 'belongsTo') {\n          this._extractEmbeddedBelongsTo(store, key, partial, relationship);\n        }\n      }\n    });\n    return partial;\n  },\n  /**\n   @private\n  */\n  _extractEmbeddedHasMany(store, key, hash, relationshipMeta) {\n    const relationshipHash = hash.data?.relationships?.[key]?.data;\n    if (!relationshipHash) {\n      return;\n    }\n    const hasMany = new Array(relationshipHash.length);\n    for (let i = 0; i < relationshipHash.length; i++) {\n      const item = relationshipHash[i];\n      const {\n        data,\n        included\n      } = this._normalizeEmbeddedRelationship(store, relationshipMeta, item);\n      hash.included = hash.included || [];\n      hash.included.push(data);\n      if (included) {\n        hash.included = hash.included.concat(included);\n      }\n      hasMany[i] = {\n        id: data.id,\n        type: data.type\n      };\n      if (data.lid) {\n        hasMany[i].lid = data.lid;\n      }\n    }\n    const relationship = {\n      data: hasMany\n    };\n    hash.data.relationships[key] = relationship;\n  },\n  /**\n   @private\n  */\n  _extractEmbeddedBelongsTo(store, key, hash, relationshipMeta) {\n    const relationshipHash = hash.data?.relationships?.[key]?.data;\n    if (!relationshipHash) {\n      return;\n    }\n    const {\n      data,\n      included\n    } = this._normalizeEmbeddedRelationship(store, relationshipMeta, relationshipHash);\n    hash.included = hash.included || [];\n    hash.included.push(data);\n    if (included) {\n      hash.included = hash.included.concat(included);\n    }\n    const belongsTo = {\n      id: data.id,\n      type: data.type\n    };\n    const relationship = {\n      data: belongsTo\n    };\n    if (data.lid) {\n      // @ts-expect-error\n      belongsTo.lid = data.lid;\n    }\n    hash.data.relationships[key] = relationship;\n  },\n  /**\n   @private\n  */\n  _normalizeEmbeddedRelationship(store, relationshipMeta, relationshipHash) {\n    let modelName = relationshipMeta.type;\n    if (relationshipMeta.options.polymorphic) {\n      modelName = relationshipHash.type;\n    }\n    const modelClass = store.modelFor(modelName);\n    const serializer = store.serializerFor(modelName);\n    return serializer.normalize(modelClass, relationshipHash, null);\n  },\n  isEmbeddedRecordsMixin: true\n});\n\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-call */\n/* eslint-disable @typescript-eslint/no-unsafe-return */\nfunction makeArray(value) {\n  return Array.isArray(value) ? value : [value];\n}\n\n/**\n * :::danger\n    ⚠️ **This is LEGACY documentation** for a feature that is no longer encouraged to be used.\n    If starting a new app or thinking of implementing a new adapter, consider writing a\n    {@link Handler} instead to be used with the {@link RequestManager}\n  :::\n\n  Normally, applications will use the `RESTSerializer` by implementing\n  the `normalize` method.\n\n  This allows you to do whatever kind of munging you need and is\n  especially useful if your server is inconsistent and you need to\n  do munging differently for many different kinds of responses.\n\n  See the `normalize` documentation for more information.\n\n  ## Across the Board Normalization\n\n  There are also a number of hooks that you might find useful to define\n  across-the-board rules for your payload. These rules will be useful\n  if your server is consistent, or if you're building an adapter for\n  an infrastructure service, like Firebase, and want to encode service\n  conventions.\n\n  For example, if all of your keys are underscored and all-caps, but\n  otherwise consistent with the names you use in your models, you\n  can implement across-the-board rules for how to convert an attribute\n  name in your model to a key in your JSON.\n\n  ```js [app/serializers/application.js]\n  import { RESTSerializer } from '@warp-drive/legacy/serializer/rest';\n  import { underscore } from '<app-name>/utils/string-utils';\n\n  export default class ApplicationSerializer extends RESTSerializer {\n    keyForAttribute(attr, method) {\n      return underscore(attr).toUpperCase();\n    }\n  }\n  ```\n\n  You can also implement `keyForRelationship`, which takes the name\n  of the relationship as the first parameter, the kind of\n  relationship (`hasMany` or `belongsTo`) as the second parameter, and\n  the method (`serialize` or `deserialize`) as the third parameter.\n\n  @class RESTSerializer\n  @public\n*/\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst RESTSerializer = JSONSerializer.extend({\n  /**\n   `keyForPolymorphicType` can be used to define a custom key when\n   serializing and deserializing a polymorphic type. By default, the\n   returned key is `${key}Type`.\n    Example\n     ```js [app/serializers/post.js]\n    import { RESTSerializer } from '@warp-drive/legacy/serializer/rest';\n     export default class ApplicationSerializer extends RESTSerializer {\n      keyForPolymorphicType(key, relationship) {\n        let relationshipKey = this.keyForRelationship(key);\n         return 'type-' + relationshipKey;\n      }\n    }\n    ```\n     @public\n  */\n  keyForPolymorphicType(key, type, method) {\n    // @ts-expect-error\n    const relationshipKey = this.keyForRelationship(key);\n    return `${relationshipKey}Type`;\n  },\n  /**\n    Normalizes a part of the JSON payload returned by\n    the server. You should override this method, munge the hash\n    and call super if you have generic normalization to do.\n     It takes the type of the record that is being normalized\n    (as a Model class), the property where the hash was\n    originally found, and the hash to normalize.\n     For example, if you have a payload that looks like this:\n     ```js\n    {\n      \"post\": {\n        \"id\": 1,\n        \"title\": \"Rails is omakase\",\n        \"comments\": [ 1, 2 ]\n      },\n      \"comments\": [{\n        \"id\": 1,\n        \"body\": \"FIRST\"\n      }, {\n        \"id\": 2,\n        \"body\": \"Rails is unagi\"\n      }]\n    }\n    ```\n     The `normalize` method will be called three times:\n     * With `App.Post`, `\"posts\"` and `{ id: 1, title: \"Rails is omakase\", ... }`\n    * With `App.Comment`, `\"comments\"` and `{ id: 1, body: \"FIRST\" }`\n    * With `App.Comment`, `\"comments\"` and `{ id: 2, body: \"Rails is unagi\" }`\n     You can use this method, for example, to normalize underscored keys to camelized\n    or other general-purpose normalizations. You will only need to implement\n    `normalize` and manipulate the payload as desired.\n     For example, if the `IDs` under `\"comments\"` are provided as `_id` instead of\n    `id`, you can specify how to normalize just the comments:\n     ```js [app/serializers/post.js]\n    import { RESTSerializer } from '@warp-drive/legacy/serializer/rest';\n     export default class ApplicationSerializer extends RESTSerializer {\n      normalize(model, hash, prop) {\n        if (prop === 'comments') {\n          hash.id = hash._id;\n          delete hash._id;\n        }\n         return super.normalize(...arguments);\n      }\n    }\n    ```\n     On each call to the `normalize` method, the third parameter (`prop`) is always\n    one of the keys that were in the original payload or in the result of another\n    normalization as `normalizeResponse`.\n     @public\n    @param {Model} modelClass\n    @param {Object} resourceHash\n    @param {String} prop\n    @return {Object}\n  */\n\n  /**\n    Normalizes an array of resource payloads and returns a JSON-API Document\n    with primary data and, if any, included data as `{ data, included }`.\n     @private\n  */\n  _normalizeArray(store, modelName, arrayHash, prop) {\n    const documentHash = {\n      data: [],\n      included: []\n    };\n    const modelClass = store.modelFor(modelName);\n    const serializer = store.serializerFor(modelName);\n    makeArray(arrayHash).forEach(hash => {\n      // @ts-expect-error\n      const {\n        data,\n        included\n      } = this._normalizePolymorphicRecord(store, hash, prop, modelClass, serializer);\n      // @ts-expect-error\n      documentHash.data.push(data);\n      if (included) {\n        documentHash.included = documentHash.included.concat(included);\n      }\n    });\n    return documentHash;\n  },\n  _normalizePolymorphicRecord(store, hash, prop, primaryModelClass, primarySerializer) {\n    let serializer = primarySerializer;\n    let modelClass = primaryModelClass;\n    const primaryHasTypeAttribute = primaryModelClass.fields.has('type');\n\n    // @ts-expect-error all the errors\n    if (!primaryHasTypeAttribute && hash.type) {\n      // Support polymorphic records in async relationships\n      // @ts-expect-error all the errors\n      const type = this.modelNameFromPayloadKey(hash.type);\n      if (store.schema.hasResource({\n        type\n      })) {\n        serializer = store.serializerFor(type);\n        modelClass = store.modelFor(type);\n      }\n    }\n\n    // @ts-expect-error all the errors\n    return serializer.normalize(modelClass, hash, prop);\n  },\n  /**\n    @private\n  */\n  _normalizeResponse(store, primaryModelClass, payload, id, requestType, isSingle) {\n    const documentHash = {\n      data: null,\n      included: []\n    };\n    // @ts-expect-error\n    const meta = this.extractMeta(store, primaryModelClass, payload);\n    if (meta) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error('The `meta` returned from `extractMeta` has to be an object, not \"' + typeof meta + '\".');\n        }\n      })(typeof meta === 'object') : {}; // @ts-expect-error\n      documentHash.meta = meta;\n    }\n    const keys = Object.keys(payload);\n    for (let i = 0, length = keys.length; i < length; i++) {\n      const prop = keys[i];\n      let modelName = prop;\n      let forcedSecondary = false;\n\n      /*\n        If you want to provide sideloaded records of the same type that the\n        primary data you can do that by prefixing the key with `_`.\n         Example\n         ```\n        {\n          users: [\n            { id: 1, title: 'Tom', manager: 3 },\n            { id: 2, title: 'Yehuda', manager: 3 }\n          ],\n          _users: [\n            { id: 3, title: 'Tomster' }\n          ]\n        }\n        ```\n         This forces `_users` to be added to `included` instead of `data`.\n       */\n      if (prop.charAt(0) === '_') {\n        forcedSecondary = true;\n        modelName = prop.substr(1);\n      }\n      const type = this.modelNameFromPayloadKey(modelName);\n      if (!store.schema.hasResource({\n        type\n      })) {\n        if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n          // @ts-expect-error\n          warn(this.warnMessageNoModelForKey(modelName, type), false, {\n            id: 'ds.serializer.model-for-key-missing'\n          });\n        }\n        continue;\n      }\n\n      // eslint-disable-next-line no-var\n      var isPrimary = !forcedSecondary && this.isPrimaryType(store, type, primaryModelClass);\n      const value = payload[prop];\n      if (value === null) {\n        continue;\n      }\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error('The adapter returned an array for the primary data of a `queryRecord` response. `queryRecord` should return a single record.');\n        }\n      })(!(requestType === 'queryRecord' && isPrimary && Array.isArray(value))) : {};\n\n      /*\n        Support primary data as an object instead of an array.\n         Example\n         ```\n        {\n          user: { id: 1, title: 'Tom', manager: 3 }\n        }\n        ```\n       */\n      if (isPrimary && !Array.isArray(value)) {\n        // @ts-expect-error\n        const {\n          data,\n          included\n        } = this._normalizePolymorphicRecord(store, value, prop, primaryModelClass, this);\n        documentHash.data = data;\n        if (included) {\n          documentHash.included = documentHash.included.concat(included);\n        }\n        continue;\n      }\n      // @ts-expect-error\n      const {\n        data,\n        included\n      } = this._normalizeArray(store, type, value, prop);\n      if (included) {\n        documentHash.included = documentHash.included.concat(included);\n      }\n      if (isSingle) {\n        // eslint-disable-next-line @typescript-eslint/no-loop-func\n        data.forEach(resource => {\n          /*\n            Figures out if this is the primary record or not.\n             It's either:\n             1. The record with the same ID as the original request\n            2. If it's a newly created record without an ID, the first record\n               in the array\n           */\n          const isUpdatedRecord = isPrimary && coerceId(resource.id) === id;\n          const isFirstCreatedRecord = isPrimary && !id && !documentHash.data;\n          if (isFirstCreatedRecord || isUpdatedRecord) {\n            documentHash.data = resource;\n          } else {\n            // @ts-expect-error\n            documentHash.included.push(resource);\n          }\n        });\n      } else {\n        if (isPrimary) {\n          documentHash.data = data;\n        } else {\n          if (data) {\n            documentHash.included = documentHash.included.concat(data);\n          }\n        }\n      }\n    }\n    return documentHash;\n  },\n  isPrimaryType(store, modelName, primaryModelClass) {\n    return dasherize(modelName) === primaryModelClass.modelName;\n  },\n  /**\n    This method allows you to push a payload containing top-level\n    collections of records organized per type.\n     ```js\n    {\n      \"posts\": [{\n        \"id\": \"1\",\n        \"title\": \"Rails is omakase\",\n        \"author\", \"1\",\n        \"comments\": [ \"1\" ]\n      }],\n      \"comments\": [{\n        \"id\": \"1\",\n        \"body\": \"FIRST\"\n      }],\n      \"users\": [{\n        \"id\": \"1\",\n        \"name\": \"@d2h\"\n      }]\n    }\n    ```\n     It will first normalize the payload, so you can use this to push\n    in data streaming in from your server structured the same way\n    that fetches and saves are structured.\n     @public\n  */\n  pushPayload(store, payload) {\n    const documentHash = {\n      data: [],\n      included: []\n    };\n    for (const prop in payload) {\n      const type = this.modelNameFromPayloadKey(prop);\n      if (!store.schema.hasResource({\n        type\n      })) {\n        if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n          // @ts-expect-error\n          warn(this.warnMessageNoModelForKey(prop, type), false, {\n            id: 'ds.serializer.model-for-key-missing'\n          });\n        }\n        continue;\n      }\n      const ModelSchema = store.modelFor(type);\n      const typeSerializer = store.serializerFor(ModelSchema.modelName);\n      makeArray(payload[prop]).forEach(hash => {\n        const {\n          data,\n          included\n        } = typeSerializer.normalize(ModelSchema, hash, prop);\n        // @ts-expect-error\n        documentHash.data.push(data);\n        if (included) {\n          documentHash.included = documentHash.included.concat(included);\n        }\n      });\n    }\n    store.push(documentHash);\n  },\n  /**\n    This method is used to convert each JSON root key in the payload\n    into a modelName that it can use to look up the appropriate model for\n    that part of the payload.\n     For example, your server may send a model name that does not correspond with\n    the name of the model in your app. Let's take a look at an example model,\n    and an example payload:\n     ```js [app/models/post.js]\n    import Model from '@warp-drive/legacy/model';\n     export default class Post extends Model {}\n    ```\n     ```javascript\n      {\n        \"blog/post\": {\n          \"id\": \"1\n        }\n      }\n    ```\n     Ember Data is going to normalize the payload's root key for the modelName. As a result,\n    it will try to look up the \"blog/post\" model. Since we don't have a model called \"blog/post\"\n    (or a file called app/models/blog/post.js in ember-cli), Ember Data will throw an error\n    because it cannot find the \"blog/post\" model.\n     Since we want to remove this namespace, we can define a serializer for the application that will\n    remove \"blog/\" from the payload key whenver it's encountered by Ember Data:\n     ```js [app/serializers/application.js]\n    import { RESTSerializer } from '@warp-drive/legacy/serializer/rest';\n     export default class ApplicationSerializer extends RESTSerializer {\n      modelNameFromPayloadKey(payloadKey) {\n        if (payloadKey === 'blog/post') {\n          return super.modelNameFromPayloadKey(payloadKey.replace('blog/', ''));\n        } else {\n         return super.modelNameFromPayloadKey(payloadKey);\n        }\n      }\n    }\n    ```\n     After refreshing, Ember Data will appropriately look up the \"post\" model.\n     By default the modelName for a model is its\n    name in dasherized form. This means that a payload key like \"blogPost\" would be\n    normalized to \"blog-post\" when Ember Data looks up the model. Usually, Ember Data\n    can use the correct inflection to do this for you. Most of the time, you won't\n    need to override `modelNameFromPayloadKey` for this purpose.\n     @public\n    @return the model's modelName\n  */\n  modelNameFromPayloadKey(key) {\n    return dasherize(singularize(key));\n  },\n  // SERIALIZE\n\n  /**\n    Called when a record is saved in order to convert the\n    record into JSON.\n     By default, it creates a JSON object with a key for\n    each attribute and belongsTo relationship.\n     For example, consider this model:\n     ```js [app/models/comment.js]\n    import Model, { attr, belongsTo } from '@warp-drive/legacy/model';\n     export default class Comment extends Model {\n      @attr title\n      @attr body\n       @belongsTo('user') author\n    }\n    ```\n     The default serialization would create a JSON object like:\n     ```js\n    {\n      \"title\": \"Rails is unagi\",\n      \"body\": \"Rails? Omakase? O_O\",\n      \"author\": 12\n    }\n    ```\n     By default, attributes are passed through as-is, unless\n    you specified an attribute type (`attr('date')`). If\n    you specify a transform, the JavaScript value will be\n    serialized when inserted into the JSON hash.\n     By default, belongs-to relationships are converted into\n    IDs when inserted into the JSON hash.\n     ## IDs\n     `serialize` takes an options hash with a single option:\n    `includeId`. If this option is `true`, `serialize` will,\n    by default include the ID in the JSON object it builds.\n     The adapter passes in `includeId: true` when serializing\n    a record for `createRecord`, but not for `updateRecord`.\n     ## Customization\n     Your server may expect a different JSON format than the\n    built-in serialization format.\n     In that case, you can implement `serialize` yourself and\n    return a JSON hash of your choosing.\n     ```js [app/serializers/post.js]\n    import { RESTSerializer } from '@warp-drive/legacy/serializer/rest';\n     export default class ApplicationSerializer extends RESTSerializer {\n      serialize(snapshot, options) {\n        let json = {\n          POST_TTL: snapshot.attr('title'),\n          POST_BDY: snapshot.attr('body'),\n          POST_CMS: snapshot.hasMany('comments', { ids: true })\n        };\n         if (options.includeId) {\n          json.POST_ID_ = snapshot.id;\n        }\n         return json;\n      }\n    }\n    ```\n     ## Customizing an App-Wide Serializer\n     If you want to define a serializer for your entire\n    application, you'll probably want to use `eachAttribute`\n    and `eachRelationship` on the record.\n     ```js [app/serializers/application.js]\n    import { RESTSerializer } from '@warp-drive/legacy/serializer/rest';\n    import { pluralize } from '<app-name>/utils/string-utils';\n     export default class ApplicationSerializer extends RESTSerializer {\n      serialize(snapshot, options) {\n        let json = {};\n         snapshot.eachAttribute(function(name) {\n          json[serverAttributeName(name)] = snapshot.attr(name);\n        });\n         snapshot.eachRelationship(function(name, relationship) {\n          if (relationship.kind === 'hasMany') {\n            json[serverHasManyName(name)] = snapshot.hasMany(name, { ids: true });\n          }\n        });\n         if (options.includeId) {\n          json.ID_ = snapshot.id;\n        }\n         return json;\n      }\n    }\n     function serverAttributeName(attribute) {\n      return attribute.underscore().toUpperCase();\n    }\n     function serverHasManyName(name) {\n      return serverAttributeName(singularize(name)) + \"_IDS\";\n    }\n    ```\n     This serializer will generate JSON that looks like this:\n     ```js\n    {\n      \"TITLE\": \"Rails is omakase\",\n      \"BODY\": \"Yep. Omakase.\",\n      \"COMMENT_IDS\": [ 1, 2, 3 ]\n    }\n    ```\n     ## Tweaking the Default JSON\n     If you just want to do some small tweaks on the default JSON,\n    you can call super first and make the tweaks on the returned\n    JSON.\n     ```js [app/serializers/post.js]\n    import { RESTSerializer } from '@warp-drive/legacy/serializer/rest';\n     export default class ApplicationSerializer extends RESTSerializer {\n      serialize(snapshot, options) {\n        let json = super.serialize(snapshot, options);\n         json.subject = json.title;\n        delete json.title;\n         return json;\n      }\n    }\n    ```\n     @public\n  */\n  serialize(snapshot, options) {\n    // @ts-expect-error\n    return this._super(...arguments);\n  },\n  /**\n    You can use this method to customize the root keys serialized into the JSON.\n    The hash property should be modified by reference (possibly using something like _.extend)\n    By default the REST Serializer sends the modelName of a model, which is a camelized\n    version of the name.\n     For example, your server may expect underscored root objects.\n     ```js [app/serializers/application.js]\n    import { RESTSerializer } from '@warp-drive/legacy/serializer/rest';\n    import { underscore } from '<app-name>/utils/string-utils';\n     export default class ApplicationSerializer extends RESTSerializer {\n      serializeIntoHash(data, type, record, options) {\n        let root = underscore(type.modelName);\n        data[root] = this.serialize(record, options);\n      }\n    }\n    ```\n     @public\n  */\n  serializeIntoHash(hash, typeClass, snapshot, options) {\n    const normalizedRootKey = this.payloadKeyFromModelName(typeClass.modelName);\n    hash[normalizedRootKey] = this.serialize(snapshot, options);\n  },\n  /**\n    You can use `payloadKeyFromModelName` to override the root key for an outgoing\n    request. By default, the RESTSerializer returns a camelized version of the\n    model's name.\n     For a model called TacoParty, its `modelName` would be the string `taco-party`. The RESTSerializer\n    will send it to the server with `tacoParty` as the root key in the JSON payload:\n     ```js\n    {\n      \"tacoParty\": {\n        \"id\": \"1\",\n        \"location\": \"Matthew Beale's House\"\n      }\n    }\n    ```\n     For example, your server may expect dasherized root objects:\n     ```js [app/serializers/application.js]\n    import { RESTSerializer } from '@warp-drive/legacy/serializer/rest';\n    import { dasherize } from '<app-name>/utils/string-utils';\n     export default class ApplicationSerializer extends RESTSerializer {\n      payloadKeyFromModelName(modelName) {\n        return dasherize(modelName);\n      }\n    }\n    ```\n     Given a `TacoParty` model, calling `save` on it would produce an outgoing\n    request like:\n     ```js\n    {\n      \"taco-party\": {\n        \"id\": \"1\",\n        \"location\": \"Matthew Beale's House\"\n      }\n    }\n    ```\n     @public\n  */\n  payloadKeyFromModelName(modelName) {\n    return camelize(modelName);\n  },\n  /**\n    You can use this method to customize how polymorphic objects are serialized.\n    By default the REST Serializer creates the key by appending `Type` to\n    the attribute and value from the model's camelcased model name.\n     @public\n  */\n  serializePolymorphicType(snapshot, json, relationship) {\n    const name = relationship.name;\n    const typeKey = this.keyForPolymorphicType(name, relationship.type, 'serialize');\n    const belongsTo = snapshot.belongsTo(name);\n    if (!belongsTo) {\n      json[typeKey] = null;\n    } else {\n      // @ts-expect-error\n      json[typeKey] = camelize(belongsTo.modelName);\n    }\n  },\n  /**\n    You can use this method to customize how a polymorphic relationship should\n    be extracted.\n     @public\n    @param {Object} relationshipType\n    @param {Object} relationshipHash\n    @param {Object} relationshipOptions\n    @return {Object}\n   */\n  extractPolymorphicRelationship(relationshipType, relationshipHash, relationshipOptions) {\n    // @ts-expect-error\n    const {\n      key,\n      resourceHash,\n      relationshipMeta\n    } = relationshipOptions;\n\n    // A polymorphic belongsTo relationship can be present in the payload\n    // either in the form where the `id` and the `type` are given:\n    //\n    //   {\n    //     message: { id: 1, type: 'post' }\n    //   }\n    //\n    // or by the `id` and a `<relationship>Type` attribute:\n    //\n    //   {\n    //     message: 1,\n    //     messageType: 'post'\n    //   }\n    //\n    // The next code checks if the latter case is present and returns the\n    // corresponding JSON-API representation. The former case is handled within\n    // the base class JSONSerializer.\n    const isPolymorphic = relationshipMeta.options.polymorphic;\n    const typeProperty = this.keyForPolymorphicType(key, relationshipType, 'deserialize');\n    if (isPolymorphic && resourceHash[typeProperty] !== undefined && typeof relationshipHash !== 'object') {\n      const type = this.modelNameFromPayloadKey(resourceHash[typeProperty]);\n      return {\n        id: coerceId(relationshipHash),\n        type: type\n      };\n    }\n    // @ts-expect-error\n    return this._super(...arguments);\n  }\n});\nif (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n  RESTSerializer.reopen({\n    warnMessageNoModelForKey(prop, typeKey) {\n      return 'Encountered \"' + prop + '\" in payload, but no model was found for model name \"' + typeKey + '\" (resolved model name using ' + this.constructor.toString() + '.modelNameFromPayloadKey(\"' + prop + '\"))';\n    }\n  });\n}\nexport { EmbeddedRecordsMixin, RESTSerializer };","import EmberObject from '@ember/object';\n\n/**\n  The `Transform` class is used to serialize and deserialize model\n  attributes when they are saved or loaded from an\n  adapter. Subclassing `Transform` is useful for creating custom\n  attributes. All subclasses of `Transform` must implement a\n  `serialize` and a `deserialize` method.\n\n  Example\n\n  ```js [app/transforms/temperature.js]\n\n  // Converts centigrade in the JSON to fahrenheit in the app\n  export default class TemperatureTransform {\n    deserialize(serialized, options) {\n      return (serialized *  1.8) + 32;\n    }\n\n    serialize(deserialized, options) {\n      return (deserialized - 32) / 1.8;\n    }\n\n    static create() {\n      return new this();\n    }\n  }\n  ```\n\n  Usage\n\n  ```js [app/models/requirement.js]\n  import { Model, attr } from '@warp-drive/legacy/model';\n\n  export default class RequirementModel extends Model {\n    @attr('string') name;\n    @attr('temperature') temperature;\n  }\n  ```\n\n  The options passed into the `attr` function when the attribute is\n  declared on the model is also available in the transform.\n\n  ```js [app/models/post.js]\n  import { Model, attr } from '@warp-drive/legacy/model';\n\n  export default class PostModel extends Model {\n    @attr('string') title;\n    @attr('markdown', {\n      markdown: {\n        gfm: false,\n        sanitize: true\n      }\n    })\n    markdown;\n  }\n  ```\n\n  ```js [app/transforms/markdown.js]\n  export default class MarkdownTransform {\n    serialize(deserialized, options) {\n      return deserialized.raw;\n    }\n\n    deserialize(serialized, options) {\n      let markdownOptions = options.markdown || {};\n\n      return marked(serialized, markdownOptions);\n    }\n\n    static create() {\n      return new this();\n    }\n  }\n  ```\n\n  @class Transform\n  @public\n */\nconst Transform = EmberObject;\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n/**\n  The `BooleanTransform` class is used to serialize and deserialize\n  boolean attributes on Ember Data record objects. This transform is\n  used when `'boolean'` is passed as the type parameter to the\n  {@link attr}function.\n\n  Usage\n\n  ```js [app/models/user.js]\n  import { Model, attr } from '@warp-drive/legacy/model';\n\n  export default class UserModel extends Model {\n    @attr('boolean') isAdmin;\n    @attr('string') name;\n    @attr('string') email;\n  }\n  ```\n\n  By default, the boolean transform only allows for values of `true` or\n  `false`. You can opt into allowing `null` values for\n  boolean attributes via `attr('boolean', { allowNull: true })`\n\n  ```js [app/models/user.js]\n  import { Model, attr } from '@warp-drive/legacy/model';\n\n  export default class UserModel extends Model {\n    @attr('string') email;\n    @attr('string') username;\n    @attr('boolean', { allowNull: true }) wantsWeeklyEmail;\n  }\n  ```\n\n  @public\n */\nclass BooleanTransform {\n  deserialize(serialized, options) {\n    if ((serialized === null || serialized === undefined) && options?.allowNull === true) {\n      return null;\n    }\n    if (typeof serialized === 'boolean') {\n      return serialized;\n    } else if (typeof serialized === 'string') {\n      return /^(true|t|1)$/i.test(serialized);\n    } else if (typeof serialized === 'number') {\n      return serialized === 1;\n    } else {\n      return false;\n    }\n  }\n  serialize(deserialized, options) {\n    if ((deserialized === null || deserialized === undefined) && options?.allowNull === true) {\n      return null;\n    }\n    return Boolean(deserialized);\n  }\n  static create() {\n    return new this();\n  }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n/**\n The `DateTransform` class is used to serialize and deserialize\n date attributes on Ember Data record objects. This transform is used\n when `'date'` is passed as the type parameter to the\n {@link attr} function. It uses the [`ISO 8601`](https://en.wikipedia.org/wiki/ISO_8601)\n standard.\n\n ```js [app/models/score.js]\n import Model, { attr, belongsTo } from '@ember-data/model';\n\n export default class ScoreModel extends Model {\n    @attr('number') value;\n    @belongsTo('player') player;\n    @attr('date') date;\n  }\n ```\n\n  @public\n */\n\nclass DateTransform {\n  deserialize(serialized, _options) {\n    if (typeof serialized === 'string') {\n      let offset = serialized.indexOf('+');\n      if (offset !== -1 && serialized.length - 5 === offset) {\n        offset += 3;\n        return new Date(serialized.slice(0, offset) + ':' + serialized.slice(offset));\n      }\n      return new Date(serialized);\n    } else if (typeof serialized === 'number') {\n      return new Date(serialized);\n    } else if (serialized === null || serialized === undefined) {\n      // if the value is null return null\n      // if the value is not present in the data return undefined\n      return serialized;\n    } else {\n      return null;\n    }\n  }\n  serialize(date, _options) {\n    // @ts-expect-error isNaN accepts date as it is coercible\n    if (date instanceof Date && !isNaN(date)) {\n      return date.toISOString();\n    } else {\n      return null;\n    }\n  }\n  static create() {\n    return new this();\n  }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\nfunction isNumber(value) {\n  return value === value && value !== Infinity && value !== -Infinity;\n}\n/**\n  The `NumberTransform` class is used to serialize and deserialize\n  numeric attributes on Ember Data record objects. This transform is\n  used when `number` is passed as the type parameter to the\n  {@link attr} function.\n\n  Usage\n\n  ```js [app/models/score.js]\n  import Model, { attr, belongsTo } from '@ember-data/model';\n\n  export default class ScoreModel extends Model {\n    @attr('number') value;\n    @belongsTo('player') player;\n    @attr('date') date;\n  }\n  ```\n\n  @public\n */\nclass NumberTransform {\n  deserialize(serialized, _options) {\n    if (serialized === '' || serialized === null || serialized === undefined) {\n      return null;\n    } else {\n      const transformed = Number(serialized);\n      return isNumber(transformed) ? transformed : null;\n    }\n  }\n  serialize(deserialized, _options) {\n    if (deserialized === '' || deserialized === null || deserialized === undefined) {\n      return null;\n    } else {\n      const transformed = Number(deserialized);\n      return isNumber(transformed) ? transformed : null;\n    }\n  }\n  static create() {\n    return new this();\n  }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n/**\n  The `StringTransform` class is used to serialize and deserialize\n  string attributes on Ember Data record objects. This transform is\n  used when `string` is passed as the type parameter to the\n  {@link attr} function.\n\n  Usage\n\n  ```js [app/models/user.js]\n  import Model, { attr, belongsTo } from '@ember-data/model';\n\n  export default class UserModel extends Model {\n    @attr('boolean') isAdmin;\n    @attr('string') name;\n    @attr('string') email;\n  }\n  ```\n\n  @public\n */\nclass StringTransform {\n  deserialize(serialized, _options) {\n    return !serialized && serialized !== '' ? null : String(serialized);\n  }\n  serialize(deserialized, _options) {\n    return !deserialized && deserialized !== '' ? null : String(deserialized);\n  }\n  static create() {\n    return new this();\n  }\n}\nexport { BooleanTransform, DateTransform, NumberTransform, StringTransform, Transform };","import type { Resolver } from '@ember/owner';\nimport ApplicationInstance from '@ember/application/instance';\nimport Application from '@ember/application';\nimport EmberObject from '@ember/object';\nimport { Registry } from '@ember/-internals/container';\n\nimport type { FullName } from '@ember/owner';\n\nimport {\n  ContainerProxyMixin,\n  RegistryProxyMixin,\n} from '@ember/-internals/runtime';\n\n/**\n * Adds methods that are normally only on registry to the container. This is largely to support the legacy APIs\n * that are not using `owner` (but are still using `this.container`).\n *\n * @private\n * @param {Object} container  the container to modify\n */\nfunction exposeRegistryMethodsWithoutDeprecations(container: any) {\n  const methods = [\n    'register',\n    'unregister',\n    'resolve',\n    'normalize',\n    'typeInjection',\n    'injection',\n    'factoryInjection',\n    'factoryTypeInjection',\n    'has',\n    'options',\n    'optionsForType',\n  ];\n\n  for (let i = 0, l = methods.length; i < l; i++) {\n    const methodName = methods[i];\n\n    if (methodName && methodName in container) {\n      const knownMethod = methodName;\n      container[knownMethod] = function (...args: unknown[]) {\n        return container._registry[knownMethod](...args);\n      };\n    }\n  }\n}\n\n// NOTE: this is the same as what `EngineInstance`/`ApplicationInstance`\n// implement, and is thus a superset of the `InternalOwner` contract from Ember\n// itself.\ninterface Owner extends RegistryProxyMixin, ContainerProxyMixin {}\nconst Owner = EmberObject.extend(RegistryProxyMixin, ContainerProxyMixin, {\n  _emberTestHelpersMockOwner: true,\n\n  /* eslint-disable valid-jsdoc */\n  /**\n   * Unregister a factory and its instance.\n   *\n   * Overrides `RegistryProxy#unregister` in order to clear any cached instances\n   * of the unregistered factory.\n   *\n   * @param {string} fullName Name of the factory to unregister.\n   *\n   * @see {@link https://github.com/emberjs/ember.js/pull/12680}\n   * @see {@link https://github.com/emberjs/ember.js/blob/v4.5.0-alpha.5/packages/%40ember/engine/instance.ts#L152-L167}\n   */\n  /* eslint-enable valid-jsdoc */\n  unregister(this: Owner, fullName: FullName) {\n    // SAFETY: this is always present, but only the stable type definitions from\n    // Ember actually preserve it, since it is private API.\n    (this as any)['__container__'].reset(fullName);\n\n    // We overwrote this method from RegistryProxyMixin.\n    // SAFETY: this is always present, but only the stable type definitions from\n    // Ember actually preserve it, since it is private API.\n    (this as any)['__registry__'].unregister(fullName);\n  },\n});\n\n/**\n * @private\n * @param {Object} resolver the resolver to use with the registry\n * @returns {Object} owner, container, registry\n */\nexport default function buildRegistry(resolver: Resolver) {\n  const namespace = new Application();\n  // @ts-ignore: this is actually the correcct type, but there was a typo in\n  // Ember's docs for many years which meant that there was a matching problem\n  // in the types for Ember's definition of `Engine`. Once we require at least\n  // Ember 5.1 (in some future breaking change), this ts-ignore can be removed.\n  namespace.Resolver = {\n    create() {\n      return resolver;\n    },\n  };\n\n  // @ts-ignore: this is private API.\n  const fallbackRegistry = Application.buildRegistry(namespace);\n\n  const registry = new Registry({\n    fallback: fallbackRegistry,\n  });\n\n  // @ts-ignore: this is private API.\n  ApplicationInstance.setupRegistry(registry);\n\n  // these properties are set on the fallback registry by `buildRegistry`\n  // and on the primary registry within the ApplicationInstance constructor\n  // but we need to manually recreate them since ApplicationInstance's are not\n  // exposed externally\n  // @ts-ignore: this is private API.\n  registry.normalizeFullName = fallbackRegistry.normalizeFullName;\n  // @ts-ignore: this is private API.\n  registry.makeToString = fallbackRegistry.makeToString;\n  // @ts-ignore: this is private API.\n  registry.describe = fallbackRegistry.describe;\n\n  const owner = Owner.create({\n    // @ts-ignore -- we do not have type safety for `Object.extend` so the type\n    // of `Owner` here is just `EmberObject`, but we *do* constrain it to allow\n    // only types from the actual class, so these fields are not accepted.\n    // However, we can see that they are valid, based on the definition of\n    // `Owner` above given that it fulfills the `InternalOwner` contract and\n    // also extends it just as `EngineInstance` does internally.\n    //\n    // NOTE: we use an `ignore` directive rather than `expect-error` because in\n    // *some* versions of the types, we *do* have (at least some of) this\n    // safety, and maximal backwards compatibility means we have to account for\n    // that.\n    __registry__: registry,\n    __container__: null,\n  }) as unknown as Owner;\n\n  // @ts-ignore: this is private API.\n  const container = registry.container({ owner: owner });\n  // @ts-ignore: this is private API.\n  owner.__container__ = container;\n\n  exposeRegistryMethodsWithoutDeprecations(container);\n\n  return {\n    registry,\n    container,\n    owner,\n  };\n}\n","/* globals global */\n\nexport default (() => {\n  if (typeof self !== 'undefined') {\n    return self;\n  } else if (typeof window !== 'undefined') {\n    return window;\n    // @ts-ignore -- global does not exist\n  } else if (typeof global !== 'undefined') {\n    // @ts-ignore -- global does not exist\n    return global;\n  } else {\n    return Function('return this')();\n  }\n})();\n","import type { BaseContext } from './setup-context';\n\nclass TestMetadata {\n  [key: string]: any;\n  testName?: string;\n  setupTypes: string[];\n  usedHelpers: string[];\n\n  constructor() {\n    this.setupTypes = [];\n    this.usedHelpers = [];\n  }\n\n  get isRendering() {\n    return (\n      this.setupTypes.indexOf('setupRenderingContext') > -1 &&\n      this.usedHelpers.indexOf('render') > -1\n    );\n  }\n\n  get isApplication() {\n    return this.setupTypes.indexOf('setupApplicationContext') > -1;\n  }\n}\n\nexport {\n  // Exported only for testing purposes.\n  TestMetadata as __TestMetadata,\n};\n\n// Only export the type side of the item: this way the only way (it is legal) to\n// construct it is here, but users can still reference the type.\nexport type {\n  /**\n   * A non-user-constructible interface representing the metadata associated\n   * with a test, designed for test frameworks to use e.g. with their reporters.\n   */\n  TestMetadata,\n};\n\nconst TEST_METADATA = new WeakMap<BaseContext, TestMetadata>();\n\n/**\n * Gets the test metadata associated with the provided test context. Will create\n * a new test metadata object if one does not exist.\n *\n * @param {BaseContext} context the context to use\n * @returns {TestMetadata} the test metadata for the provided context\n */\nexport default function getTestMetadata(context: BaseContext): TestMetadata {\n  if (!TEST_METADATA.has(context)) {\n    TEST_METADATA.set(context, new TestMetadata());\n  }\n\n  return TEST_METADATA.get(context)!;\n}\n","import type { BaseContext } from '../setup-context';\nimport { registerDeprecationHandler } from '@ember/debug';\nimport isPromise from './is-promise.ts';\n\nexport interface DeprecationOptions {\n  id: string;\n  until: string;\n  for?: string;\n  since?: {\n    available: string;\n  };\n}\n\nexport interface DeprecationFailure {\n  message: string;\n  options?: DeprecationOptions;\n}\n\nconst DEPRECATIONS = new WeakMap<BaseContext, Array<DeprecationFailure>>();\n\n/**\n *\n * Provides the list of deprecation failures associated with a given base context;\n *\n * @private\n * @param {BaseContext} [context] the test context\n * @return {Array<DeprecationFailure>} the Deprecation Failures associated with the corresponding BaseContext;\n */\nexport function getDeprecationsForContext(\n  context: BaseContext,\n): Array<DeprecationFailure> {\n  if (!context) {\n    throw new TypeError(\n      `[@ember/test-helpers] could not get deprecations for an invalid test context: '${context}'`,\n    );\n  }\n\n  let deprecations = DEPRECATIONS.get(context);\n\n  if (!Array.isArray(deprecations)) {\n    deprecations = [];\n    DEPRECATIONS.set(context, deprecations);\n  }\n\n  return deprecations;\n}\n\n/**\n *\n * Provides the list of deprecation failures associated with a given base\n * context which occur while a callback is executed. This callback can be\n * synchronous, or it can be an async function.\n *\n * @private\n * @param {BaseContext} [context] the test context\n * @param {Function} [callback] The callback that when executed will have its DeprecationFailure recorded\n * @return {Array<DeprecationFailure>} The Deprecation Failures associated with the corresponding baseContext which occurred while the CallbackFunction was executed\n */\nexport function getDeprecationsDuringCallbackForContext(\n  context: BaseContext,\n  callback: () => void,\n): Array<DeprecationFailure> | Promise<Array<DeprecationFailure>> {\n  if (!context) {\n    throw new TypeError(\n      `[@ember/test-helpers] could not get deprecations for an invalid test context: '${context}'`,\n    );\n  }\n\n  const deprecations = getDeprecationsForContext(context);\n  const previousLength = deprecations.length;\n\n  const result = callback();\n\n  if (isPromise(result)) {\n    return Promise.resolve(result).then(() => {\n      return deprecations.slice(previousLength); // only return deprecations created as a result of the callback\n    });\n  } else {\n    return deprecations.slice(previousLength); // only return deprecations created as a result of the callback\n  }\n}\n\n// This provides (when the environment supports) queryParam support for deprecations:\n// * squelch deprecations by name via: `/tests/index.html?disabledDeprecations=this-property-fallback,some-other-thing`\n// * enable a debuggger when a deprecation by a specific name is encountered via: `/tests/index.html?debugDeprecations=some-other-thing` when the\nif (typeof URLSearchParams !== 'undefined') {\n  const queryParams = new URLSearchParams(\n    document.location.search.substring(1),\n  );\n  const disabledDeprecations = queryParams.get('disabledDeprecations');\n  const debugDeprecations = queryParams.get('debugDeprecations');\n\n  // When using `/tests/index.html?disabledDeprecations=this-property-fallback,some-other-thing`\n  // those deprecations will be squelched\n  if (disabledDeprecations) {\n    registerDeprecationHandler((message, options, next) => {\n      if (!options || !disabledDeprecations.includes(options.id)) {\n        next.apply(null, [message, options]);\n      }\n    });\n  }\n\n  // When using `/tests/index.html?debugDeprecations=some-other-thing` when the\n  // `some-other-thing` deprecation is triggered, this `debugger` will be hit`\n  if (debugDeprecations) {\n    registerDeprecationHandler((message, options, next) => {\n      if (options && debugDeprecations.includes(options.id)) {\n        debugger; // eslint-disable-line no-debugger\n      }\n\n      next.apply(null, [message, options]);\n    });\n  }\n}\n","import type { BaseContext } from '../setup-context';\nimport { registerWarnHandler } from '@ember/debug';\nimport isPromise from './is-promise.ts';\n\nexport interface WarningOptions {\n  id?: string;\n}\n\nexport interface Warning {\n  message: string;\n  options?: WarningOptions;\n}\n\n// the WARNINGS data structure which is used to weakly associated warnings with\n// the test context their occurred within\nconst WARNINGS = new WeakMap<BaseContext, Array<Warning>>();\n\n/**\n *\n * Provides the list of warnings associated with a given base context;\n *\n * @private\n * @param {BaseContext} [context] the test context\n * @return {Array<Warning>} the warnings associated with the corresponding BaseContext;\n */\nexport function getWarningsForContext(context: BaseContext): Array<Warning> {\n  if (!context) {\n    throw new TypeError(\n      `[@ember/test-helpers] could not get warnings for an invalid test context: '${context}'`,\n    );\n  }\n\n  let warnings = WARNINGS.get(context);\n\n  if (!Array.isArray(warnings)) {\n    warnings = [];\n    WARNINGS.set(context, warnings);\n  }\n\n  return warnings;\n}\n\n/**\n *\n * Provides the list of warnings associated with a given test context which\n * occurred only while a the provided callback is executed. This callback can be\n * synchronous, or it can be an async function.\n *\n * @private\n * @param {BaseContext} [context] the test context\n * @param {Function} [callback] The callback that when executed will have its warnings recorded\n * @return {Array<Warning>} The warnings associated with the corresponding baseContext which occurred while the CallbackFunction was executed\n */\nexport function getWarningsDuringCallbackForContext(\n  context: BaseContext,\n  callback: () => void,\n): Array<Warning> | Promise<Array<Warning>> {\n  if (!context) {\n    throw new TypeError(\n      `[@ember/test-helpers] could not get warnings for an invalid test context: '${context}'`,\n    );\n  }\n\n  const warnings = getWarningsForContext(context);\n  const previousLength = warnings.length;\n\n  const result = callback();\n\n  if (isPromise(result)) {\n    return Promise.resolve(result).then(() => {\n      return warnings.slice(previousLength); // only return warnings created as a result of the callback\n    });\n  } else {\n    return warnings.slice(previousLength); // only return warnings created as a result of the callback\n  }\n}\n\n// This provides (when the environment supports) queryParam support for warnings:\n// * squelch warnings by name via: `/tests/index.html?disabledWarnings=this-property-fallback,some-other-thing`\n// * enable a debuggger when a warning by a specific name is encountered via: `/tests/index.html?debugWarnings=some-other-thing` when the\nif (typeof URLSearchParams !== 'undefined') {\n  const queryParams = new URLSearchParams(\n    document.location.search.substring(1),\n  );\n  const disabledWarnings = queryParams.get('disabledWarnings');\n  const debugWarnings = queryParams.get('debugWarnings');\n\n  // When using `/tests/index.html?disabledWarnings=this-property-fallback,some-other-thing`\n  // those warnings will be squelched\n  if (disabledWarnings) {\n    registerWarnHandler((message, options, next) => {\n      if (!options || !disabledWarnings.includes(options.id)) {\n        next.apply(null, [message, options]);\n      }\n    });\n  }\n\n  // When using `/tests/index.html?debugWarnings=some-other-thing` when the\n  // `some-other-thing` warning is triggered, this `debugger` will be hit`\n  if (debugWarnings) {\n    registerWarnHandler((message, options, next) => {\n      if (options && debugWarnings.includes(options.id)) {\n        debugger; // eslint-disable-line no-debugger\n      }\n\n      next.apply(null, [message, options]);\n    });\n  }\n}\n","// @ts-ignore\nimport { VERSION } from '@ember/version';\n\n/**\n  Checks if the currently running Ember version is greater than or equal to the\n  specified major and minor version numbers.\n\n  @private\n  @param {number} major the major version number to compare\n  @param {number} minor the minor version number to compare\n  @returns {boolean} true if the Ember version is >= MAJOR.MINOR specified, false otherwise\n*/\nexport default function hasEmberVersion(major: number, minor: number): boolean {\n  const numbers = VERSION.split('-')[0]?.split('.');\n\n  if (!numbers || !numbers[0] || !numbers[1]) {\n    throw new Error('`Ember.VERSION` is not set.');\n  }\n\n  const actualMajor = parseInt(numbers[0], 10);\n  const actualMinor = parseInt(numbers[1], 10);\n  return actualMajor > major || (actualMajor === major && actualMinor >= minor);\n}\n","// @ts-ignore: this is private API. This import will work Ember 5.1+ since it\n// \"provides\" this public API, but does not for earlier versions. As a result,\n// this type will be `any`.\nimport { _backburner, run } from '@ember/runloop';\nimport { set, setProperties, get, getProperties } from '@ember/object';\nimport type { Resolver } from '@ember/owner';\nimport { setOwner } from '@ember/application';\n\nimport buildOwner, { type Owner } from './build-owner.ts';\nimport { _setupAJAXHooks } from './settled.ts';\nimport { _prepareOnerror } from './setup-onerror.ts';\nimport { setTesting } from '@ember/debug';\nimport {\n  assert,\n  registerDeprecationHandler,\n  registerWarnHandler,\n} from '@ember/debug';\nimport global from './global.ts';\nimport { getResolver } from './resolver.ts';\nimport { getApplication } from './application.ts';\nimport getTestMetadata from './test-metadata.ts';\nimport {\n  getDeprecationsForContext,\n  getDeprecationsDuringCallbackForContext,\n  type DeprecationFailure,\n} from './-internal/deprecations.ts';\nimport {\n  getWarningsForContext,\n  getWarningsDuringCallbackForContext,\n  type Warning,\n} from './-internal/warnings.ts';\n\nexport interface SetupContextOptions {\n  resolver?: Resolver | undefined;\n}\n\n// This handler exists to provide the underlying data to enable the following methods:\n// * getDeprecations()\n// * getDeprecationsDuringCallback()\n// * getDeprecationsDuringCallbackForContext()\nregisterDeprecationHandler((message, options, next) => {\n  const context = getContext();\n  if (context === undefined) {\n    next.apply(null, [message, options]);\n    return;\n  }\n\n  getDeprecationsForContext(context).push({ message, options });\n  next.apply(null, [message, options]);\n});\n\n// This handler exists to provide the underlying data to enable the following methods:\n// * getWarnings()\n// * getWarningsDuringCallback()\n// * getWarningsDuringCallbackForContext()\nregisterWarnHandler((message, options, next) => {\n  const context = getContext();\n  if (context === undefined) {\n    next.apply(null, [message, options]);\n    return;\n  }\n\n  getWarningsForContext(context).push({ message, options });\n  next.apply(null, [message, options]);\n});\n\nexport type BaseContext = object;\n\n/**\n * The public API for the test context, which test authors can depend on being\n * available.\n *\n * Note: this is *not* user-constructible; it becomes available by calling\n * `setupContext()` with a base context object.\n */\nexport interface TestContext extends BaseContext {\n  owner: Owner;\n\n  set<T>(key: string, value: T): T;\n  setProperties<T extends Record<string, unknown>>(hash: T): T;\n  get(key: string): unknown;\n  getProperties(...args: string[]): Record<string, unknown>;\n\n  pauseTest(): Promise<void>;\n  resumeTest(): void;\n}\n\n// eslint-disable-next-line require-jsdoc\nexport function isTestContext(context: BaseContext): context is TestContext {\n  const maybeContext = context as Record<string, unknown>;\n  return (\n    typeof maybeContext['pauseTest'] === 'function' &&\n    typeof maybeContext['resumeTest'] === 'function'\n  );\n}\n\n/**\n  @private\n  @param {Object} it the global object to test\n  @returns {Boolean} it exists\n*/\nfunction check(it: any) {\n  // Math is known to exist as a global in every environment.\n  return it && it.Math === Math && it;\n}\n\nconst globalObject =\n  check(typeof globalThis == 'object' && globalThis) ||\n  check(typeof window === 'object' && window) ||\n  check(typeof self === 'object' && self) ||\n  // @ts-ignore -- global does not exist\n  check(typeof global === 'object' && global);\n\n/**\n  Stores the provided context as the \"global testing context\".\n\n  Generally setup automatically by `setupContext`.\n\n  @public\n  @param {Object} context the context to use\n*/\nexport function setContext(context: BaseContext): void {\n  globalObject.__test_context__ = context;\n}\n\n/**\n  Retrieve the \"global testing context\" as stored by `setContext`.\n\n  @public\n  @returns {Object} the previously stored testing context\n*/\nexport function getContext(): BaseContext | undefined {\n  return globalObject.__test_context__;\n}\n\n/**\n  Clear the \"global testing context\".\n\n  Generally invoked from `teardownContext`.\n\n  @public\n*/\nexport function unsetContext(): void {\n  globalObject.__test_context__ = undefined;\n}\n\n/**\n * Returns a promise to be used to pauses the current test (due to being\n * returned from the test itself).  This is useful for debugging while testing\n * or for test-driving.  It allows you to inspect the state of your application\n * at any point.\n *\n * The test framework wrapper (e.g. `ember-qunit` or `ember-mocha`) should\n * ensure that when `pauseTest()` is used, any framework specific test timeouts\n * are disabled.\n *\n * @public\n * @returns {Promise<void>} resolves _only_ when `resumeTest()` is invoked\n * @example <caption>Usage via ember-qunit</caption>\n *\n * import { setupRenderingTest } from 'ember-qunit';\n * import { render, click, pauseTest } from '@ember/test-helpers';\n *\n *\n * module('awesome-sauce', function(hooks) {\n *   setupRenderingTest(hooks);\n *\n *   test('does something awesome', async function(assert) {\n *     await render(hbs`{{awesome-sauce}}`);\n *\n *     // added here to visualize / interact with the DOM prior\n *     // to the interaction below\n *     await pauseTest();\n *\n *     click('.some-selector');\n *\n *     assert.equal(this.element.textContent, 'this sauce is awesome!');\n *   });\n * });\n */\nexport function pauseTest(): Promise<void> {\n  const context = getContext();\n\n  if (!context || !isTestContext(context)) {\n    throw new Error(\n      'Cannot call `pauseTest` without having first called `setupTest` or `setupRenderingTest`.',\n    );\n  }\n\n  return context.pauseTest();\n}\n\n/**\n  Resumes a test previously paused by `await pauseTest()`.\n\n  @public\n*/\nexport function resumeTest(): void {\n  const context = getContext();\n\n  if (!context || !isTestContext(context)) {\n    throw new Error(\n      'Cannot call `resumeTest` without having first called `setupTest` or `setupRenderingTest`.',\n    );\n  }\n\n  context.resumeTest();\n}\n\n/**\n * Returns deprecations which have occurred so far for a the current test context\n *\n * @public\n * @returns {Array<DeprecationFailure>} An array of deprecation messages\n * @example <caption>Usage via ember-qunit</caption>\n *\n * import { getDeprecations } from '@ember/test-helpers';\n *\n * module('awesome-sauce', function(hooks) {\n *   setupRenderingTest(hooks);\n *\n *   test('does something awesome', function(assert) {\n       const deprecations = getDeprecations() // => returns deprecations which have occurred so far in this test\n *   });\n * });\n */\nexport function getDeprecations(): Array<DeprecationFailure> {\n  const context = getContext();\n\n  if (!context) {\n    throw new Error(\n      '[@ember/test-helpers] could not get deprecations if no test context is currently active',\n    );\n  }\n\n  return getDeprecationsForContext(context);\n}\n\nexport type { DeprecationFailure };\n\n/**\n * Returns deprecations which have occurred so far for a the current test context\n *\n * @public\n * @param {Function} [callback] The callback that when executed will have its DeprecationFailure recorded\n * @returns {Array<DeprecationFailure> | Promise<Array<DeprecationFailure>>} An array of deprecation messages\n * @example <caption>Usage via ember-qunit</caption>\n *\n * import { getDeprecationsDuringCallback } from '@ember/test-helpers';\n *\n * module('awesome-sauce', function(hooks) {\n *   setupRenderingTest(hooks);\n *\n *   test('does something awesome', function(assert) {\n *     const deprecations = getDeprecationsDuringCallback(() => {\n *       // code that might emit some deprecations\n *\n *     }); // => returns deprecations which occurred while the callback was invoked\n *   });\n *\n *\n *   test('does something awesome', async function(assert) {\n *     const deprecations = await getDeprecationsDuringCallback(async () => {\n *       // awaited code that might emit some deprecations\n *     }); // => returns deprecations which occurred while the callback was invoked\n *   });\n * });\n */\nexport function getDeprecationsDuringCallback(\n  callback: () => void,\n): Array<DeprecationFailure> | Promise<Array<DeprecationFailure>> {\n  const context = getContext();\n\n  if (!context) {\n    throw new Error(\n      '[@ember/test-helpers] could not get deprecations if no test context is currently active',\n    );\n  }\n\n  return getDeprecationsDuringCallbackForContext(context, callback);\n}\n\n/**\n * Returns warnings which have occurred so far for a the current test context\n *\n * @public\n * @returns {Array<Warning>} An array of warnings\n * @example <caption>Usage via ember-qunit</caption>\n *\n * import { getWarnings } from '@ember/test-helpers';\n *\n * module('awesome-sauce', function(hooks) {\n *   setupRenderingTest(hooks);\n *\n *   test('does something awesome', function(assert) {\n       const warnings = getWarnings() // => returns warnings which have occurred so far in this test\n *   });\n * });\n */\nexport function getWarnings(): Array<Warning> {\n  const context = getContext();\n\n  if (!context) {\n    throw new Error(\n      '[@ember/test-helpers] could not get warnings if no test context is currently active',\n    );\n  }\n\n  return getWarningsForContext(context);\n}\n\nexport type { Warning };\n\n/**\n * Returns warnings which have occurred so far for a the current test context\n *\n * @public\n * @param {Function} [callback] The callback that when executed will have its warnings recorded\n * @returns {Array<Warning> | Promise<Array<Warning>>} An array of warnings information\n * @example <caption>Usage via ember-qunit</caption>\n *\n * import { getWarningsDuringCallback } from '@ember/test-helpers';\n * import { warn } from '@ember/debug';\n *\n * module('awesome-sauce', function(hooks) {\n *   setupRenderingTest(hooks);\n *\n *   test('does something awesome', function(assert) {\n *     const warnings = getWarningsDuringCallback(() => {\n *     warn('some warning');\n *\n *     }); // => returns warnings which occurred while the callback was invoked\n *   });\n *\n *   test('does something awesome', async function(assert) {\n *     warn('some warning');\n *\n *     const warnings = await getWarningsDuringCallback(async () => {\n *       warn('some other warning');\n *     }); // => returns warnings which occurred while the callback was invoked\n *   });\n * });\n */\nexport function getWarningsDuringCallback(\n  callback: () => void,\n): Array<Warning> | Promise<Array<Warning>> {\n  const context = getContext();\n\n  if (!context) {\n    throw new Error(\n      '[@ember/test-helpers] could not get warnings if no test context is currently active',\n    );\n  }\n\n  return getWarningsDuringCallbackForContext(context, callback);\n}\n\n/**\n  Used by test framework addons to setup the provided context for testing.\n\n  Responsible for:\n\n  - sets the \"global testing context\" to the provided context (`setContext`)\n  - create an owner object and set it on the provided context (e.g. `this.owner`)\n  - setup `this.set`, `this.setProperties`, `this.get`, and `this.getProperties` to the provided context\n  - setting up AJAX listeners\n  - setting up `pauseTest` (also available as `this.pauseTest()`) and `resumeTest` helpers\n\n  @public\n  @param {Object} base the context to setup\n  @param {Object} [options] options used to override defaults\n  @param {Resolver} [options.resolver] a resolver to use for customizing normal resolution\n  @returns {Promise<Object>} resolves with the context that was setup\n*/\nexport default function setupContext<T extends object>(\n  base: T,\n  options: SetupContextOptions = {},\n): Promise<T & TestContext> {\n  const context = base as T & TestContext;\n\n  // SAFETY: this is intimate API *designed* for us to override.\n  setTesting(true);\n  setContext(context);\n\n  const testMetadata = getTestMetadata(context);\n  testMetadata.setupTypes.push('setupContext');\n\n  _backburner.DEBUG = true;\n\n  _prepareOnerror(context);\n\n  return Promise.resolve()\n    .then(() => {\n      const application = getApplication();\n      if (application) {\n        return application.boot().then(() => {});\n      }\n      return;\n    })\n    .then(() => {\n      const { resolver } = options;\n\n      // This handles precedence, specifying a specific option of\n      // resolver always trumps whatever is auto-detected, then we fallback to\n      // the suite-wide registrations\n      //\n      // At some later time this can be extended to support specifying a custom\n      // engine or application...\n      if (resolver) {\n        return buildOwner(null, resolver);\n      }\n\n      return buildOwner(getApplication(), getResolver());\n    })\n    .then((owner) => {\n      Object.defineProperty(context, 'owner', {\n        configurable: true,\n        enumerable: true,\n        value: owner,\n        writable: false,\n      });\n      setOwner(context, owner);\n\n      Object.defineProperty(context, 'set', {\n        configurable: true,\n        enumerable: true,\n        // SAFETY: in all of these `defineProperty` calls, we can't actually guarantee any safety w.r.t. the corresponding field's type in `TestContext`\n        value(key: any, value: any): unknown {\n          const ret = run(function () {\n            return set(context, key, value);\n          });\n          return ret;\n        },\n        writable: false,\n      });\n\n      Object.defineProperty(context, 'setProperties', {\n        configurable: true,\n        enumerable: true,\n        // SAFETY: in all of these `defineProperty` calls, we can't actually guarantee any safety w.r.t. the corresponding field's type in `TestContext`\n        value(hash: any): unknown {\n          const ret = run(function () {\n            return setProperties(context, hash);\n          });\n\n          return ret;\n        },\n        writable: false,\n      });\n\n      Object.defineProperty(context, 'get', {\n        configurable: true,\n        enumerable: true,\n        value(key: string): any {\n          return get(context, key);\n        },\n        writable: false,\n      });\n\n      Object.defineProperty(context, 'getProperties', {\n        configurable: true,\n        enumerable: true,\n        // SAFETY: in all of these `defineProperty` calls, we can't actually guarantee any safety w.r.t. the corresponding field's type in `TestContext`\n        value(...args: any[]): Record<string, unknown> {\n          return getProperties(context, args);\n        },\n        writable: false,\n      });\n\n      let resume: ((value?: void | PromiseLike<void>) => void) | undefined;\n      context['resumeTest'] = function resumeTest() {\n        assert(\n          'Testing has not been paused. There is nothing to resume.',\n          !!resume,\n        );\n        resume();\n        global.resumeTest = resume = undefined;\n      };\n\n      context['pauseTest'] = function pauseTest() {\n        console.info('Testing paused. Use `resumeTest()` to continue.'); // eslint-disable-line no-console\n\n        return new Promise((resolve) => {\n          resume = resolve;\n          global.resumeTest = resumeTest;\n        });\n      };\n\n      _setupAJAXHooks();\n\n      return context;\n    });\n}\n","export type Hook = (...args: any[]) => void | Promise<void>;\nexport type HookLabel = 'start' | 'end' | 'targetFound';\nexport type HookUnregister = {\n  unregister: () => void;\n};\n\nconst registeredHooks = new Map<string, Set<Hook>>();\n\n/**\n * @private\n * @param {string} helperName The name of the test helper in which to run the hook.\n * @param {string} label A label to help identify the hook.\n * @returns {string} The compound key for the helper.\n */\nfunction getHelperKey(helperName: string, label: string): string {\n  return `${helperName}:${label}`;\n}\n\n/**\n * Registers a function to be run during the invocation of a test helper.\n *\n * @param {string} helperName The name of the test helper in which to run the hook.\n *                            Test helper names include `blur`, `click`, `doubleClick`, `fillIn`,\n *                            `fireEvent`, `focus`, `render`, `scrollTo`, `select`, `tab`, `tap`, `triggerEvent`,\n *                            `triggerKeyEvent`, `typeIn`, and `visit`.\n * @param {string} label A label to help identify the hook. Built-in labels include `start`, `end`,\n *                       and `targetFound`, the former designating either the start or end of\n *                       the helper invocation.\n * @param {Function} hook The hook function to run when the test helper is invoked.\n * @returns {HookUnregister} An object containing an `unregister` function that unregisters\n *                           the specific hook initially registered to the helper.\n * @example\n * <caption>\n *   Registering a hook for the `end` point of the `click` test helper invocation\n * </caption>\n *\n * const hook = registerHook('click', 'end', () => {\n *   console.log('Running `click:end` test helper hook');\n * });\n *\n * // Unregister the hook at some later point in time\n * hook.unregister();\n */\nexport function registerHook(\n  helperName: string,\n  label: HookLabel,\n  hook: Hook,\n): HookUnregister {\n  const helperKey = getHelperKey(helperName, label);\n  let hooksForHelper = registeredHooks.get(helperKey);\n\n  if (hooksForHelper === undefined) {\n    hooksForHelper = new Set<Hook>();\n    registeredHooks.set(helperKey, hooksForHelper);\n  }\n\n  hooksForHelper.add(hook);\n\n  return {\n    unregister() {\n      hooksForHelper!.delete(hook);\n    },\n  };\n}\n\n/**\n * Runs all hooks registered for a specific test helper.\n *\n * @param {string} helperName The name of the test helper in which to run the hook.\n *                            Test helper names include `blur`, `click`, `doubleClick`, `fillIn`,\n *                            `fireEvent`, `focus`, `render`, `scrollTo`, `select`, `tab`, `tap`, `triggerEvent`,\n *                            `triggerKeyEvent`, `typeIn`, and `visit`.\n * @param {string} label A label to help identify the hook. Built-in labels include `start`, `end`,\n *                       and `targetFound`, the former designating either the start or end of\n *                       the helper invocation.\n * @param {unknown[]} args Any arguments originally passed to the test helper.\n * @returns {Promise<void>} A promise representing the serial invocation of the hooks.\n */\nexport function runHooks(\n  helperName: string,\n  label: HookLabel,\n  ...args: unknown[]\n): Promise<void> {\n  const hooks =\n    registeredHooks.get(getHelperKey(helperName, label)) || new Set<Hook>();\n  const promises: Array<void | Promise<void>> = [];\n\n  hooks.forEach((hook) => {\n    const hookResult = hook(...args);\n\n    promises.push(hookResult);\n  });\n\n  return Promise.all(promises).then(() => {});\n}\n","export interface DebugInfoHelper {\n  name: string;\n  log: () => void;\n}\n\nexport const debugInfoHelpers = new Set<DebugInfoHelper>();\n\n/**\n * Registers a custom debug info helper to augment the output for test isolation validation.\n *\n * @public\n * @param {DebugInfoHelper} debugHelper a custom debug info helper\n * @example\n *\n * import { registerDebugInfoHelper } from '@ember/test-helpers';\n *\n * registerDebugInfoHelper({\n *   name: 'Date override detection',\n *   log() {\n *     if (dateIsOverridden()) {\n *       console.log(this.name);\n *       console.log('The date object has been overridden');\n *     }\n *   }\n * })\n */\nexport default function registerDebugInfoHelper(debugHelper: DebugInfoHelper) {\n  debugInfoHelpers.add(debugHelper);\n}\n","import {\n  type BaseContext,\n  getContext,\n  isTestContext,\n  type TestContext,\n} from './setup-context.ts';\nimport hasEmberVersion from './has-ember-version.ts';\nimport settled from './settled.ts';\nimport getTestMetadata from './test-metadata.ts';\nimport { runHooks } from './helper-hooks.ts';\nimport type Router from '@ember/routing/router';\nimport type RouterService from '@ember/routing/router-service';\nimport { assert } from '@ember/debug';\n\nexport interface ApplicationTestContext extends TestContext {\n  element?: Element | null;\n}\n\nconst CAN_USE_ROUTER_EVENTS = hasEmberVersion(3, 6);\nlet routerTransitionsPending: boolean | null = null;\nconst ROUTER = new WeakMap();\nconst HAS_SETUP_ROUTER = new WeakMap();\n\n// eslint-disable-next-line require-jsdoc\nexport function isApplicationTestContext(\n  context: BaseContext,\n): context is ApplicationTestContext {\n  return isTestContext(context);\n}\n\n/**\n  Determines if we have any pending router transitions (used to determine `settled` state)\n\n  @public\n  @returns {(boolean|null)} if there are pending transitions\n*/\nexport function hasPendingTransitions(): boolean | null {\n  if (CAN_USE_ROUTER_EVENTS) {\n    return routerTransitionsPending;\n  }\n\n  const context = getContext();\n\n  // there is no current context, we cannot check\n  if (context === undefined) {\n    return null;\n  }\n\n  const router = ROUTER.get(context);\n\n  if (router === undefined) {\n    // if there is no router (e.g. no `visit` calls made yet), we cannot\n    // check for pending transitions but this is explicitly not an error\n    // condition\n    return null;\n  }\n\n  const routerMicrolib = router._routerMicrolib || router.router;\n\n  if (routerMicrolib === undefined) {\n    return null;\n  }\n\n  return !!routerMicrolib.activeTransition;\n}\n\n/**\n  Setup the current router instance with settledness tracking. Generally speaking this\n  is done automatically (during a `visit('/some-url')` invocation), but under some\n  circumstances (e.g. a non-application test where you manually call `this.owner.setupRouter()`)\n  you may want to call it yourself.\n\n  @public\n */\nexport function setupRouterSettlednessTracking() {\n  const context = getContext();\n  if (context === undefined || !isTestContext(context)) {\n    throw new Error(\n      'Cannot setupRouterSettlednessTracking outside of a test context',\n    );\n  }\n\n  // avoid setting up many times for the same context\n  if (HAS_SETUP_ROUTER.get(context)) {\n    return;\n  }\n  HAS_SETUP_ROUTER.set(context, true);\n\n  const { owner } = context;\n  let router: Router | RouterService;\n  if (CAN_USE_ROUTER_EVENTS) {\n    // SAFETY: unfortunately we cannot `assert` here at present because the\n    // class is not exported, only the type, since it is not designed to be\n    // sub-classed. The most we can do at present is assert that it at least\n    // *exists* and assume that if it does exist, it is bound correctly.\n    const routerService = owner.lookup('service:router');\n    assert('router service is not set up correctly', !!routerService);\n    router = routerService as RouterService;\n\n    // track pending transitions via the public routeWillChange / routeDidChange APIs\n    // routeWillChange can fire many times and is only useful to know when we have _started_\n    // transitioning, we can then use routeDidChange to signal that the transition has settled\n    router.on('routeWillChange', () => (routerTransitionsPending = true));\n    router.on('routeDidChange', () => (routerTransitionsPending = false));\n  } else {\n    // SAFETY: similarly, this cast cannot be made safer because on the versions\n    // where we fall into this path, this is *also* not an exported class.\n    const mainRouter = owner.lookup('router:main');\n    assert('router:main is not available', !!mainRouter);\n    router = mainRouter as Router;\n    ROUTER.set(context, router);\n  }\n\n  // hook into teardown to reset local settledness state\n  const ORIGINAL_WILL_DESTROY = router.willDestroy;\n  router.willDestroy = function () {\n    routerTransitionsPending = null;\n\n    return ORIGINAL_WILL_DESTROY.call(this);\n  };\n}\n\n/**\n  Navigate the application to the provided URL.\n\n  @public\n  @param {string} url The URL to visit (e.g. `/posts`)\n  @param {object} options app boot options\n  @returns {Promise<void>} resolves when settled\n\n  @example\n  <caption>\n    Visiting the route for post 1.\n  </caption>\n  await visit('/posts/1');\n\n  @example\n  <caption>\n    Visiting the route for post 1 while also providing the `rootElement` app boot option.\n  </caption>\n  await visit('/', { rootElement: '#container' });\n*/\nexport function visit(\n  url: string,\n  options?: Record<string, unknown>,\n): Promise<void> {\n  const context = getContext();\n  if (!context || !isApplicationTestContext(context)) {\n    throw new Error(\n      'Cannot call `visit` without having first called `setupApplicationContext`.',\n    );\n  }\n\n  const { owner } = context;\n  const testMetadata = getTestMetadata(context);\n  testMetadata.usedHelpers.push('visit');\n\n  return Promise.resolve()\n    .then(() => {\n      return runHooks('visit', 'start', url, options);\n    })\n    .then(() => {\n      const visitResult = owner.visit(url, options);\n\n      setupRouterSettlednessTracking();\n\n      return visitResult;\n    })\n    .then(() => {\n      context.element = document.querySelector('#ember-testing');\n    })\n    .then(settled)\n    .then(() => {\n      return runHooks('visit', 'end', url, options);\n    });\n}\n\n/**\n  @public\n  @returns {string} the currently active route name\n*/\nexport function currentRouteName(): string {\n  const context = getContext();\n  if (!context || !isApplicationTestContext(context)) {\n    throw new Error(\n      'Cannot call `currentRouteName` without having first called `setupApplicationContext`.',\n    );\n  }\n\n  const router = context.owner.lookup('router:main') as any;\n  const currentRouteName = router.currentRouteName;\n  assert(\n    'currentRouteName should be a string',\n    typeof currentRouteName === 'string',\n  );\n  return currentRouteName;\n}\n\nconst HAS_CURRENT_URL_ON_ROUTER = hasEmberVersion(2, 13);\n\n/**\n  @public\n  @returns {string} the applications current url\n*/\nexport function currentURL(): string {\n  const context = getContext();\n  if (!context || !isApplicationTestContext(context)) {\n    throw new Error(\n      'Cannot call `currentURL` without having first called `setupApplicationContext`.',\n    );\n  }\n\n  const router = context.owner.lookup('router:main') as any;\n\n  if (HAS_CURRENT_URL_ON_ROUTER) {\n    const routerCurrentURL = router.currentURL;\n\n    // SAFETY: this path is a lie for the sake of the public-facing types. The\n    // framework itself sees this path, but users never do. A user who calls the\n    // API without calling `visit()` will see an `UnrecognizedURLError`, rather\n    // than getting back `null`.\n    if (routerCurrentURL === null) {\n      return routerCurrentURL as never as string;\n    }\n\n    assert(\n      `currentUrl should be a string, but was ${typeof routerCurrentURL}`,\n      typeof routerCurrentURL === 'string',\n    );\n\n    return routerCurrentURL;\n  } else {\n    // SAFETY: this is *positively ancient* and should probably be removed at\n    // some point; old routers which don't have `currentURL` *should* have a\n    // `location` with `getURL()` per the docs for 2.12.\n    return (router.location as any).getURL();\n  }\n}\n\n/**\n  Used by test framework addons to setup the provided context for working with\n  an application (e.g. routing).\n\n  `setupContext` must have been run on the provided context prior to calling\n  `setupApplicationContext`.\n\n  Sets up the basic framework used by application tests.\n\n  @public\n  @param {Object} context the context to setup\n  @returns {Promise<void>} resolves when the context is set up\n*/\nexport default function setupApplicationContext(\n  context: TestContext,\n): Promise<void> {\n  const testMetadata = getTestMetadata(context);\n  testMetadata.setupTypes.push('setupApplicationContext');\n\n  return Promise.resolve();\n}\n","// @ts-ignore: this is private API. This import will work Ember 5.1+ since it\n// \"provides\" this public API, but does not for earlier versions. As a result,\n// this type will be `any`.\nimport { _backburner } from '@ember/runloop';\nimport { Test } from 'ember-testing';\n\nimport { nextTick } from './-utils.ts';\nimport waitUntil from './wait-until.ts';\nimport { hasPendingTransitions } from './setup-application-context.ts';\nimport { hasPendingWaiters } from '@ember/test-waiters';\nimport type DebugInfo from './-internal/debug-info.ts';\nimport { TestDebugInfo } from './-internal/debug-info.ts';\n\nlet requests: XMLHttpRequest[];\nconst checkWaiters = Test.checkWaiters;\n\n/**\n  @private\n  @returns {number} the count of pending requests\n*/\nfunction pendingRequests() {\n  return requests !== undefined ? requests.length : 0;\n}\n\n/**\n  @private\n  @param {Event} event (unused)\n  @param {XMLHTTPRequest} xhr the XHR that has initiated a request\n*/\nfunction incrementAjaxPendingRequests(event: any, xhr: XMLHttpRequest): void {\n  requests.push(xhr);\n}\n\n/**\n  @private\n  @param {Event} event (unused)\n  @param {XMLHTTPRequest} xhr the XHR that has initiated a request\n*/\nfunction decrementAjaxPendingRequests(event: any, xhr: XMLHttpRequest): void {\n  // In most Ember versions to date (current version is 2.16) RSVP promises are\n  // configured to flush in the actions queue of the Ember run loop, however it\n  // is possible that in the future this changes to use \"true\" micro-task\n  // queues.\n  //\n  // The entire point here, is that _whenever_ promises are resolved will be\n  // before the next run of the JS event loop. Then in the next event loop this\n  // counter will decrement. In the specific case of AJAX, this means that any\n  // promises chained off of `$.ajax` will properly have their `.then` called\n  // _before_ this is decremented (and testing continues)\n  nextTick(() => {\n    for (let i = 0; i < requests.length; i++) {\n      if (xhr === requests[i]) {\n        requests.splice(i, 1);\n      }\n    }\n  });\n}\n\n/**\n  Clears listeners that were previously setup for `ajaxSend` and `ajaxComplete`.\n\n  @private\n*/\nexport function _teardownAJAXHooks() {\n  // jQuery will not invoke `ajaxComplete` if\n  //    1. `transport.send` throws synchronously and\n  //    2. it has an `error` option which also throws synchronously\n\n  // We can no longer handle any remaining requests\n  requests = [];\n\n  if (typeof (globalThis as any).jQuery === 'undefined') {\n    return;\n  }\n\n  (globalThis as any)\n    .jQuery(document)\n    .off('ajaxSend', incrementAjaxPendingRequests);\n  (globalThis as any)\n    .jQuery(document)\n    .off('ajaxComplete', decrementAjaxPendingRequests);\n}\n\n/**\n  Sets up listeners for `ajaxSend` and `ajaxComplete`.\n\n  @private\n*/\nexport function _setupAJAXHooks() {\n  requests = [];\n\n  if (typeof (globalThis as any).jQuery === 'undefined') {\n    return;\n  }\n\n  (globalThis as any)\n    .jQuery(document)\n    .on('ajaxSend', incrementAjaxPendingRequests);\n  (globalThis as any)\n    .jQuery(document)\n    .on('ajaxComplete', decrementAjaxPendingRequests);\n}\n\nexport interface SettledState {\n  hasRunLoop: boolean;\n  hasPendingTimers: boolean;\n  hasPendingWaiters: boolean;\n  hasPendingRequests: boolean;\n  hasPendingTransitions: boolean | null;\n  isRenderPending: boolean;\n  pendingRequestCount: number;\n  debugInfo: DebugInfo;\n}\n\n/**\n  Check various settledness metrics, and return an object with the following properties:\n\n  - `hasRunLoop` - Checks if a run-loop has been started. If it has, this will\n    be `true` otherwise it will be `false`.\n  - `hasPendingTimers` - Checks if there are scheduled timers in the run-loop.\n    These pending timers are primarily registered by `Ember.run.schedule`. If\n    there are pending timers, this will be `true`, otherwise `false`.\n  - `hasPendingWaiters` - Checks if any registered test waiters are still\n    pending (e.g. the waiter returns `true`). If there are pending waiters,\n    this will be `true`, otherwise `false`.\n  - `hasPendingRequests` - Checks if there are pending AJAX requests (based on\n    `ajaxSend` / `ajaxComplete` events triggered by `jQuery.ajax`). If there\n    are pending requests, this will be `true`, otherwise `false`.\n  - `hasPendingTransitions` - Checks if there are pending route transitions. If the\n    router has not been instantiated / setup for the test yet this will return `null`,\n    if there are pending transitions, this will be `true`, otherwise `false`.\n  - `pendingRequestCount` - The count of pending AJAX requests.\n  - `debugInfo` - Debug information that's combined with info return from backburner's\n    getDebugInfo method.\n  - `isRenderPending` - Checks if there are any pending render operations. This will be true as long\n    as there are tracked values in the template that have not been rerendered yet.\n\n  @public\n  @returns {Object} object with properties for each of the metrics used to determine settledness\n*/\nexport function getSettledState(): SettledState {\n  const hasPendingTimers = _backburner.hasTimers();\n  const hasRunLoop = Boolean(_backburner.currentInstance);\n  const hasPendingLegacyWaiters = checkWaiters();\n  const hasPendingTestWaiters = hasPendingWaiters();\n  const pendingRequestCount = pendingRequests();\n  const hasPendingRequests = pendingRequestCount > 0;\n  // TODO: Ideally we'd have a function in Ember itself that can synchronously identify whether\n  // or not there are any pending render operations, but this will have to suffice for now\n  const isRenderPending = !!hasRunLoop;\n\n  return {\n    hasPendingTimers,\n    hasRunLoop,\n    hasPendingWaiters: hasPendingLegacyWaiters || hasPendingTestWaiters,\n    hasPendingRequests,\n    hasPendingTransitions: hasPendingTransitions(),\n    isRenderPending,\n    pendingRequestCount,\n    debugInfo: new TestDebugInfo({\n      hasPendingTimers,\n      hasRunLoop,\n      hasPendingLegacyWaiters,\n      hasPendingTestWaiters,\n      hasPendingRequests,\n      isRenderPending,\n    }),\n  };\n}\n\n/**\n  Checks various settledness metrics (via `getSettledState()`) to determine if things are settled or not.\n\n  Settled generally means that there are no pending timers, no pending waiters,\n  no pending AJAX requests, and no current run loop. However, new settledness\n  metrics may be added and used as they become available.\n\n  @public\n  @returns {boolean} `true` if settled, `false` otherwise\n*/\nexport function isSettled(): boolean {\n  const {\n    hasPendingTimers,\n    hasRunLoop,\n    hasPendingRequests,\n    hasPendingWaiters,\n    hasPendingTransitions,\n    isRenderPending,\n  } = getSettledState();\n\n  if (\n    hasPendingTimers ||\n    hasRunLoop ||\n    hasPendingRequests ||\n    hasPendingWaiters ||\n    hasPendingTransitions ||\n    isRenderPending\n  ) {\n    return false;\n  }\n\n  return true;\n}\n\n/**\n  Returns a promise that resolves when in a settled state (see `isSettled` for\n  a definition of \"settled state\").\n\n  @public\n  @returns {Promise<void>} resolves when settled\n*/\nexport default function settled(): Promise<void> {\n  return waitUntil(isSettled, { timeout: Infinity }).then(() => {});\n}\n","import { getOnerror, setOnerror } from '@ember/-internals/error-handling';\nimport { type BaseContext, getContext } from './setup-context.ts';\n\nconst cachedOnerror: Map<BaseContext, ((error: Error) => void) | undefined> =\n  new Map();\n\n/**\n * Sets the `Ember.onerror` function for tests. This value is intended to be reset after\n * each test to ensure correct test isolation. To reset, you should simply call `setupOnerror`\n * without an `onError` argument.\n *\n * @public\n * @param {Function} onError the onError function to be set on Ember.onerror\n *\n * @example <caption>Example implementation for `ember-qunit` or `ember-mocha`</caption>\n *\n * import { setupOnerror } from '@ember/test-helpers';\n *\n * test('Ember.onerror is stubbed properly', function(assert) {\n *   setupOnerror(function(err) {\n *     assert.ok(err);\n *   });\n * });\n */\nexport default function setupOnerror(onError?: (error: Error) => void): void {\n  const context = getContext();\n\n  if (!context) {\n    throw new Error('Must setup test context before calling setupOnerror');\n  }\n\n  if (!cachedOnerror.has(context)) {\n    throw new Error(\n      '_cacheOriginalOnerror must be called before setupOnerror. Normally, this will happen as part of your test harness.',\n    );\n  }\n\n  if (typeof onError !== 'function') {\n    onError = cachedOnerror.get(context);\n  }\n\n  setOnerror(onError);\n}\n\n/**\n * Resets `Ember.onerror` to the value it originally was at the start of the test run.\n * If there is no context or cached value this is a no-op.\n *\n * @public\n *\n * @example\n *\n * import { resetOnerror } from '@ember/test-helpers';\n *\n * QUnit.testDone(function() {\n *   resetOnerror();\n * })\n */\nexport function resetOnerror(): void {\n  const context = getContext();\n\n  if (context && cachedOnerror.has(context)) {\n    setOnerror(cachedOnerror.get(context));\n  }\n}\n\n/**\n * Caches the current value of Ember.onerror. When `setupOnerror` is called without a value\n * or when `resetOnerror` is called the value will be set to what was cached here.\n *\n * @private\n * @param {BaseContext} context the text context\n */\nexport function _prepareOnerror(context: BaseContext) {\n  if (cachedOnerror.has(context)) {\n    throw new Error('_prepareOnerror should only be called once per-context');\n  }\n\n  // SAFETY: getOnerror doesn't have correct types\n  cachedOnerror.set(context, getOnerror() as any);\n}\n\n/**\n * Removes the cached value of Ember.onerror.\n *\n * @private\n * @param {BaseContext} context the text context\n */\nexport function _cleanupOnerror(context: BaseContext) {\n  resetOnerror();\n  cachedOnerror.delete(context);\n}\n","import { getContext, isTestContext } from '../setup-context.ts';\nimport { isDocument, isElement } from './-target.ts';\n\n/**\n  Get the root element of the application under test (usually `#ember-testing`)\n\n  @public\n  @returns {Element} the root element\n\n  @example\n  <caption>\n    Getting the root element of the application and checking that it is equal\n    to the element with id 'ember-testing'.\n  </caption>\n  assert.equal(getRootElement(), document.querySelector('#ember-testing'));\n*/\nexport default function getRootElement(): Element | Document {\n  const context = getContext();\n\n  if (!context || !isTestContext(context) || !context.owner) {\n    throw new Error(\n      'Must setup rendering context before attempting to interact with elements.',\n    );\n  }\n\n  const owner = context.owner;\n\n  let rootElement;\n  // When the host app uses `setApplication` (instead of `setResolver`) the owner has\n  // a `rootElement` set on it with the element or id to be used\n  if (owner && owner._emberTestHelpersMockOwner === undefined) {\n    rootElement = owner.rootElement;\n  } else {\n    rootElement = '#ember-testing';\n  }\n\n  if (rootElement instanceof Window) {\n    rootElement = rootElement.document;\n  }\n\n  if (isElement(rootElement) || isDocument(rootElement)) {\n    return rootElement;\n  } else if (typeof rootElement === 'string') {\n    const _rootElement = document.querySelector(rootElement);\n    if (_rootElement) {\n      return _rootElement;\n    }\n\n    throw new Error(`Application.rootElement (${rootElement}) not found`);\n  } else {\n    throw new Error(\n      'Application.rootElement must be an element or a selector string',\n    );\n  }\n}\n","import type { IDOMElementDescriptor } from 'dom-element-descriptors';\n\nexport type Target =\n  | string\n  | Element\n  | IDOMElementDescriptor\n  | Document\n  | Window;\n\nexport interface HTMLElementContentEditable extends HTMLElement {\n  isContentEditable: true;\n}\n\n// eslint-disable-next-line require-jsdoc\nexport function isElement(target: unknown): target is Element {\n  return (\n    target !== null &&\n    typeof target === 'object' &&\n    Reflect.get(target, 'nodeType') === Node.ELEMENT_NODE\n  );\n}\n\n// eslint-disable-next-line require-jsdoc\nexport function isWindow(target: Target): target is Window {\n  return target instanceof Window;\n}\n\n// eslint-disable-next-line require-jsdoc\nexport function isDocument(target: unknown): target is Document {\n  return (\n    target !== null &&\n    typeof target === 'object' &&\n    Reflect.get(target, 'nodeType') === Node.DOCUMENT_NODE\n  );\n}\n\n// eslint-disable-next-line require-jsdoc\nexport function isContentEditable(\n  element: Element,\n): element is HTMLElementContentEditable {\n  return (\n    'isContentEditable' in element && (element as HTMLElement).isContentEditable\n  );\n}\n","import type { PendingWaiterState, Waiter, WaiterName } from './types/index.ts';\n\ntype Indexable = Record<any, unknown>;\n\n// this ensures that if @ember/test-waiters exists in multiple places in the\n// build output we will still use a single map of waiters (there really should\n// only be one of them, or else `settled` will not work at all)\nconst WAITERS: Map<WaiterName, Waiter> = (function () {\n  const HAS_SYMBOL = typeof Symbol !== 'undefined';\n\n  const symbolName = 'TEST_WAITERS';\n  const symbol = HAS_SYMBOL ? (Symbol.for(symbolName) as any) : symbolName;\n\n  const global = getGlobal();\n\n  let waiters = global[symbol];\n  if (waiters === undefined) {\n    waiters = global[symbol] = new Map<WaiterName, Waiter>();\n  }\n\n  return waiters as Map<WaiterName, Waiter>;\n})();\n\nfunction indexable<T extends object>(input: T): T & Indexable {\n  return input as T & Indexable;\n}\n\nfunction getGlobal(): Indexable {\n  if (typeof globalThis !== 'undefined') return indexable(globalThis);\n  if (typeof self !== 'undefined') return indexable(self);\n  if (typeof window !== 'undefined') return indexable(window);\n\n  throw new Error('unable to locate global object');\n}\n\n/**\n * Registers a waiter.\n *\n * @public\n * @param waiter {Waiter} A test waiter instance\n */\nexport function register(waiter: Waiter): void {\n  WAITERS.set(waiter.name, waiter);\n}\n\n/**\n * Un-registers a waiter.\n *\n * @public\n * @param waiter {Waiter} A test waiter instance\n */\nexport function unregister(waiter: Waiter): void {\n  WAITERS.delete(waiter.name);\n}\n\n/**\n * Gets an array of all waiters current registered.\n *\n * @public\n * @returns {Waiter[]}\n */\nexport function getWaiters(): Waiter[] {\n  const result: Waiter[] = [];\n\n  WAITERS.forEach((value) => {\n    result.push(value);\n  });\n\n  return result;\n}\n\n/**\n * Clears all waiters.\n *\n * @private\n */\nexport function _reset(): void {\n  for (const waiter of getWaiters()) {\n    (waiter as any).isRegistered = false;\n  }\n\n  WAITERS.clear();\n}\n\n/**\n * Gets the current state of all waiters. Any waiters whose\n * `waitUntil` method returns false will be considered `pending`.\n *\n * @returns {PendingWaiterState} An object containing a count of all waiters\n * pending and a `waiters` object containing the name of all pending waiters\n * and their debug info.\n */\nexport function getPendingWaiterState(): PendingWaiterState {\n  const result: PendingWaiterState = {\n    pending: 0,\n    waiters: {},\n  };\n\n  WAITERS.forEach((waiter) => {\n    if (!waiter.waitUntil()) {\n      result.pending++;\n\n      const debugInfo = waiter.debugInfo();\n      result.waiters[waiter.name] = debugInfo || true;\n    }\n  });\n\n  return result;\n}\n\n/**\n * Determines if there are any pending waiters.\n *\n * @returns {boolean} `true` if there are pending waiters, otherwise `false`.\n */\nexport function hasPendingWaiters(): boolean {\n  const state = getPendingWaiterState();\n\n  return state.pending > 0;\n}\n","import type { Primitive, TestWaiter, TestWaiterDebugInfo, WaiterName } from './types/index.ts';\nimport { macroCondition, isDevelopingApp } from '@embroider/macros';\nimport { warn } from '@ember/debug';\nimport Token from './token.ts';\nimport { register } from './waiter-manager.ts';\n\nconst WAITER_NAME_PATTERN = /^[^:]*:?.*/;\nlet WAITER_NAMES = macroCondition(isDevelopingApp()) ? new Set() : undefined;\n\nexport function _resetWaiterNames() {\n  WAITER_NAMES = new Set();\n}\n\nfunction getNextToken(): Token {\n  return new Token();\n}\n\nclass TestWaiterImpl<T extends object | Primitive = Token> implements TestWaiter<T> {\n  public name: WaiterName;\n  private nextToken: () => T;\n  private isRegistered = false;\n\n  items = new Map<T, TestWaiterDebugInfo>();\n  completedOperationsForTokens = new WeakMap<Token, boolean>();\n  completedOperationsForPrimitives = new Map<Primitive, boolean>();\n\n  constructor(name: WaiterName, nextToken?: () => T) {\n    this.name = name;\n    // @ts-ignore\n    this.nextToken = nextToken || getNextToken;\n  }\n\n  beginAsync(token: T = this.nextToken(), label?: string): T {\n    this._register();\n\n    if (this.items.has(token)) {\n      // SAFETY: force stringification of a potential symbol\n      throw new Error(`beginAsync called for ${token as string} but it is already pending.`);\n    }\n\n    const error = new Error();\n\n    this.items.set(token, {\n      get stack() {\n        return error.stack;\n      },\n      label,\n    });\n\n    return token;\n  }\n\n  endAsync(token: T): void {\n    if (!this.items.has(token) && !this._getCompletedOperations(token).has(token)) {\n      throw new Error(\n        `testWaiter.endAsync called with no preceding testWaiter.beginAsync call.\n        Test waiter calls should always be paired. This can occur when a test waiter's paired calls are invoked in a non-deterministic order.\n\n        See https://github.com/emberjs/ember-test-waiters#keep-beginasyncendasync-in-same-block-scope for more information.`\n      );\n    }\n\n    this.items.delete(token);\n    // Mark when a waiter operation has completed so we can distinguish\n    // whether endAsync is being called before a prior beginAsync call above.\n    this._getCompletedOperations(token).set(token, true);\n  }\n\n  waitUntil(): boolean {\n    return this.items.size === 0;\n  }\n\n  debugInfo(): TestWaiterDebugInfo[] {\n    const result: TestWaiterDebugInfo[] = [];\n\n    this.items.forEach((value) => {\n      result.push(value);\n    });\n\n    return result;\n  }\n\n  reset(): void {\n    this.items.clear();\n  }\n\n  private _register(): void {\n    if (!this.isRegistered) {\n      register(this);\n      this.isRegistered = true;\n    }\n  }\n\n  private _getCompletedOperations(token: T) {\n    const type = typeof token;\n\n    const isFunction = type === 'function';\n    const isObject = token !== null && type === 'object';\n    const isPrimitive = !isFunction && !isObject;\n\n    return isPrimitive ? this.completedOperationsForPrimitives : this.completedOperationsForTokens;\n  }\n}\n\nclass NoopTestWaiter implements TestWaiter {\n  name: string;\n  constructor(name: string) {\n    this.name = name;\n  }\n\n  beginAsync(): Token {\n    return this;\n  }\n\n  endAsync(): void {}\n\n  waitUntil(): boolean {\n    return true;\n  }\n\n  debugInfo(): TestWaiterDebugInfo[] {\n    return [];\n  }\n\n  reset(): void {}\n}\n\n/**\n * Builds and returns a test waiter. The type of the\n * returned waiter is dependent on whether the app or\n * addon is in `isDevelopingApp()` mode or not.\n *\n * @public\n *\n * @param name {string} The name of the test waiter\n * @returns {TestWaiter}\n *\n * @example\n *\n * import Component from '@ember/component';\n * import { buildWaiter } from '@ember/test-waiters';\n *\n * if (macroCondition(isDevelopingApp())) {\n *   let waiter = buildWaiter('friend-waiter');\n * }\n *\n * export default class Friendz extends Component {\n *   didInsertElement() {\n *     let token = waiter.beginAsync(this);\n *\n *     someAsyncWork().then(() => {\n *       waiter.endAsync(token);\n *     });\n *   }\n * }\n */\nexport default function buildWaiter(name: string): TestWaiter {\n  if (macroCondition(isDevelopingApp())) {\n    warn(`The waiter name '${name}' is already in use`, !WAITER_NAMES!.has(name), {\n      id: '@ember/test-waiters.duplicate-waiter-name',\n    });\n    WAITER_NAMES!.add(name);\n  }\n\n  if (macroCondition(!isDevelopingApp())) {\n    return new NoopTestWaiter(name);\n  } else {\n    warn(\n      `You must provide a name that contains a descriptive prefix separated by a colon.\n\n        Example: ember-fictitious-addon:some-file\n\n        You passed: ${name}`,\n      WAITER_NAME_PATTERN.test(name),\n      { id: '@ember/test-waiters.invalid-waiter-name' }\n    );\n\n    return new TestWaiterImpl(name);\n  }\n}\n","import { macroCondition, isDevelopingApp } from '@embroider/macros';\nimport buildWaiter from './build-waiter.ts';\n\nimport type { PromiseType, Thenable } from './types/index.ts';\n\nconst PROMISE_WAITER = buildWaiter('@ember/test-waiters:promise-waiter');\n\n/**\n * A convenient utility function to simplify waiting for a promise.\n *\n * @public\n * @param promise {Promise<T> | RSVP.Promise<T>} The promise to track async operations for\n * @param label {string} An optional string to identify the promise\n *\n * @example\n *\n * import Component from '@ember/component';\n * import { waitForPromise } from '@ember/test-waiters';\n *\n * export default class Friendz extends Component {\n *   didInsertElement() {\n *     waitForPromise(new Promise(resolve => {\n *       doSomeWork();\n *       resolve();\n *     }));\n *   }\n * }\n */\nexport default function waitForPromise<T, KindOfPromise extends PromiseType<T>>(\n  promise: KindOfPromise,\n  label?: string\n): KindOfPromise {\n  let result = promise;\n\n  if (macroCondition(isDevelopingApp())) {\n    PROMISE_WAITER.beginAsync(promise, label);\n\n    result = (promise as unknown as Thenable<T, KindOfPromise>).then(\n      (value: T) => {\n        PROMISE_WAITER.endAsync(promise);\n        return value;\n      },\n      (error: Error) => {\n        PROMISE_WAITER.endAsync(promise);\n        throw error;\n      }\n    );\n  }\n\n  return result;\n}\n","import { macroCondition, isDevelopingApp } from '@embroider/macros';\nimport waitForPromise from './wait-for-promise.ts';\nimport buildWaiter from './build-waiter.ts';\nimport type { PromiseType } from './types/index.ts';\n\ntype AsyncFunction<A extends Array<any>, PromiseReturn> = (...args: A) => Promise<PromiseReturn>;\ntype AsyncFunctionArguments = [AsyncFunction<any[], any>, string?];\n\ntype CoroutineGenerator<T> = Generator<any, T, any>;\ntype CoroutineFunction<A extends Array<any>, T> = (...args: A) => CoroutineGenerator<T>;\ntype CoroutineFunctionArguments = [CoroutineFunction<any[], any>, string?];\n\ntype DecoratorArguments = [object, string, PropertyDescriptor, string?];\n\n/**\n * A convenient utility function to simplify waiting for async. Can be used\n * in both decorator and function form. When applied to an async function, it\n * will cause tests to wait until the returned promise has resolves. When\n * applied to a generator function, it will cause tests to wait until the\n * returned iterator has run to completion, which is useful for wrapping\n * ember-concurrency task functions.\n *\n *\n * @public\n * @param promise {Function} An async function or a generator function\n * @param label {string} An optional string to identify the promise\n *\n * @example\n *\n * import Component from '@ember/component';\n * import { waitFor } from '@ember/test-waiters';\n *\n * export default Component.extend({\n *   doAsyncStuff: waitFor(async function doAsyncStuff() {\n *     await somethingAsync();\n *   }\n * });\n *\n * @example\n *\n * import Component from '@ember/component';\n * import { waitFor } from '@ember/test-waiters';\n *\n * export default class Friendz extends Component {\n *   @waitFor\n *   async doAsyncStuff() {\n *     await somethingAsync();\n *   }\n * }\n *\n */\nexport default function waitFor<A extends Array<any>, PromiseReturn>(\n  fn: AsyncFunction<A, PromiseReturn>,\n  label?: string\n): AsyncFunction<A, PromiseReturn>;\nexport default function waitFor<A extends Array<any>, T>(\n  fn: CoroutineFunction<A, T>,\n  label?: string\n): CoroutineFunction<A, T>;\nexport default function waitFor(\n  target: object,\n  _key: string,\n  descriptor: PropertyDescriptor,\n  label?: string\n): PropertyDescriptor;\nexport default function waitFor(\n  ...args: AsyncFunctionArguments | CoroutineFunctionArguments | DecoratorArguments\n): PropertyDescriptor | Function | CoroutineFunction<any[], any> {\n  const isFunction = args.length < 3;\n\n  if (isFunction) {\n    const [fn, label] = args as AsyncFunctionArguments | CoroutineFunctionArguments;\n\n    return wrapFunction(fn, label);\n  } else {\n    const [, , descriptor, label] = args as DecoratorArguments;\n\n    if (macroCondition(!isDevelopingApp())) {\n      return descriptor;\n    }\n\n    const fn = descriptor.value;\n\n    descriptor.value = wrapFunction(fn, label);\n\n    return descriptor;\n  }\n}\n\nfunction wrapFunction(fn: Function, label?: string) {\n  if (macroCondition(!isDevelopingApp())) {\n    return fn;\n  }\n\n  return function (this: any, ...args: any[]) {\n    const result = fn.call(this, ...args);\n\n    if (isThenable(result)) {\n      return waitForPromise(result, label);\n    } else if (isGenerator(result)) {\n      return waitForGenerator(result, label);\n    } else {\n      return result;\n    }\n  };\n}\n\nfunction isThenable(\n  maybePromise: any | PromiseType<unknown>\n): maybePromise is PromiseType<unknown> {\n  const type = typeof maybePromise;\n\n  return (\n    ((maybePromise !== null && type === 'object') || type === 'function') &&\n    typeof maybePromise.then === 'function'\n  );\n}\n\nfunction isGenerator(\n  maybeGenerator: any | CoroutineGenerator<unknown>\n): maybeGenerator is CoroutineGenerator<unknown> {\n  // Because we don't have Symbol.iterator in IE11\n  return (\n    typeof maybeGenerator.next === 'function' &&\n    typeof maybeGenerator.return === 'function' &&\n    typeof maybeGenerator.throw === 'function'\n  );\n}\n\nconst GENERATOR_WAITER = buildWaiter('@ember/test-waiters:generator-waiter');\n\nfunction waitForGenerator<T>(\n  generator: CoroutineGenerator<T>,\n  label?: string\n): CoroutineGenerator<T> {\n  GENERATOR_WAITER.beginAsync(generator, label);\n\n  let isWaiting = true;\n  function stopWaiting() {\n    if (isWaiting) {\n      GENERATOR_WAITER.endAsync(generator);\n      isWaiting = false;\n    }\n  }\n\n  return {\n    next(...args) {\n      let hasErrored = true;\n      try {\n        const val = generator.next(...args);\n        hasErrored = false;\n\n        if (val.done) {\n          stopWaiting();\n        }\n        return val;\n      } finally {\n        // If generator.next() throws, we need to stop waiting. But if we catch\n        // and re-throw exceptions, it could move the location from which the\n        // uncaught exception is thrown, interfering with the developer\n        // debugging experience if they have break-on-exceptions enabled. So we\n        // use a boolean flag and a finally block to emulate a catch block.\n        if (hasErrored) {\n          stopWaiting();\n        }\n      }\n    },\n    return(...args) {\n      stopWaiting();\n      return generator.return(...args);\n    },\n    throw(...args) {\n      stopWaiting();\n      return generator.throw(...args);\n    },\n  } as CoroutineGenerator<T>;\n}\n","import { default as waitForPromise } from './wait-for-promise.ts';\n\nconst props = [\n  'body',\n  'bodyUsed',\n  'headers',\n  'ok',\n  'redirected',\n  'status',\n  'statusText',\n  'type',\n  'url',\n] as const satisfies (keyof Response)[];\ntype ResponseProp = (typeof props)[number];\nfunction isResponseProperty(maybeProp: string): maybeProp is ResponseProp {\n  return props.some((prop) => maybeProp === prop);\n}\n\nconst fns = [\n  'arrayBuffer',\n  'blob',\n  'bytes',\n  'clone',\n  'formData',\n  'json',\n  'text',\n] as const satisfies (keyof Response)[];\ntype ResponseFn = (typeof fns)[number];\nfunction isResponseFn(maybeFn: string): maybeFn is ResponseFn {\n  return fns.some((fn) => maybeFn === fn);\n}\n\n/**\n * Wraps the fetch promise in a test waiter, and also wraps the returned promises' async functions (like json()) in a\n * test waiter.\n */\nexport async function waitForFetch(fetchPromise: ReturnType<typeof fetch>) {\n  const response = await waitForPromise(fetchPromise);\n\n  return new Proxy(response, {\n    get(target, prop, receiver) {\n      /* Depending on the stack, Response is often already a Proxy. Reflect.get() will error for property values, when\n       * using a Proxy as the _receiver_ arg, so just return the value the normal way to avoid that issue. */\n      if (typeof prop === 'string' && isResponseProperty(prop)) {\n        return target[prop];\n      }\n      const original = Reflect.get(target, prop, receiver);\n\n      // Wrap Response functions in test waiter\n      if (typeof prop === 'string' && isResponseFn(prop)) {\n        // clone() is sync, no need to wrap in test-waiter\n        if (prop === 'clone') {\n          return (...args: unknown[]) => {\n            return original.call(target, ...args);\n          };\n        }\n        return (...args: unknown[]) => {\n          return waitForPromise(original.call(target, ...args));\n        };\n      }\n      // return the Reflect.get() result for anything else\n      return original;\n    },\n  });\n}\n","export default function esCompat(m) {\n  return m?.__esModule ? m : { default: m, ...m };\n}\n","import Component from '@glimmer/component';\nimport {\n  icon,\n  parse,\n  toHtml,\n  type AbstractElement,\n  type FaSymbol,\n  type FlipProp,\n  type IconDefinition,\n  type IconLookup,\n  type IconName,\n  type IconParams,\n  type IconPrefix,\n  type PullProp,\n  type RotateProp,\n  type SizeProp,\n  type Transform,\n} from '@fortawesome/fontawesome-svg-core';\nimport { htmlSafe, type SafeString } from '@ember/template';\nimport { getOwner } from '@ember/application';\nimport { get } from '@ember/helper';\nimport { dependencySatisfies, macroCondition } from '@embroider/macros';\n\nfunction objectWithKey(\n  key: string,\n  value: string[] | IconLookup | Transform | null,\n): {\n  [x: string]: string[] | IconLookup | Transform | null;\n} {\n  return (Array.isArray(value) && value.length > 0) ||\n    (!Array.isArray(value) && value)\n    ? { [key]: value }\n    : {};\n}\n\ninterface FaIconSignature {\n  Element: SVGElement;\n  Args: {\n    icon: IconName | IconLookup | IconDefinition;\n    prefix?: IconPrefix;\n    flip?: FlipProp;\n    spin?: boolean;\n    pulse?: boolean;\n    fixedWidth?: boolean;\n    border?: boolean;\n    listItem?: boolean;\n    size?: SizeProp;\n    rotation?: RotateProp;\n    pull?: PullProp;\n    transform?: Transform | string;\n    symbol?: FaSymbol;\n    // Note: Title is only supported for FA 5 + 6... for FA 7+ pass title as aria-label https://docs.fontawesome.com/upgrade/whats-changed#simpler-accessibility\n    title?: string;\n    mask?: IconName | IconLookup | IconDefinition;\n  };\n}\n\nexport default class FaIconComponent extends Component<FaIconSignature> {\n  get content(): SafeString {\n    const children = this.abstractIcon?.children ?? [];\n    const html = children.reduce((acc, cur) => {\n      return `${acc}${toHtml(cur)}`;\n    }, '');\n\n    return htmlSafe(html);\n  }\n\n  get safeStyle(): SafeString | undefined {\n    return this.iconAttributes['style']\n      ? htmlSafe(`${this.iconAttributes['style']}`)\n      : undefined;\n  }\n\n  get iconExists(): boolean {\n    return Boolean(this.abstractIcon);\n  }\n\n  get flipHorizontal(): boolean {\n    return this.args.flip === 'horizontal' || this.args.flip === 'both';\n  }\n\n  get flipVertical(): boolean {\n    return this.args.flip === 'vertical' || this.args.flip === 'both';\n  }\n\n  get classList(): string[] {\n    const classes = {\n      'fa-spin': this.args.spin,\n      'fa-pulse': this.args.pulse,\n      'fa-fw': this.args.fixedWidth,\n      'fa-border': this.args.border,\n      'fa-li': this.args.listItem,\n      'fa-flip-horizontal': this.flipHorizontal,\n      'fa-flip-vertical': this.flipVertical,\n      [`fa-${this.args.size}`]: this.args.size,\n      [`fa-rotate-${this.args.rotation}`]: this.args.rotation,\n      [`fa-pull-${this.args.pull}`]: this.args.pull,\n    };\n\n    return Object.keys(classes).filter((key) => classes[key]);\n  }\n\n  get abstractIcon(): AbstractElement | null {\n    if (\n      macroCondition(\n        dependencySatisfies('@fortawesome/fontawesome-svg-core', '>=7.0.0'),\n      )\n    ) {\n      if (this.args.title !== undefined) {\n        throw new Error(\n          '@title has no effect in Font Awesome 7+. If you want to keep this behavior, use aria-label instead. For more details, see: https://docs.fontawesome.com/upgrade/whats-changed#simpler-accessibility',\n        );\n      }\n    }\n\n    const iconLookup = this.normalizeIconArgs(this.args.icon, this.args.prefix);\n    if (!iconLookup) {\n      console.warn(\n        'Could not find icon: Icon argument was passed empty, undefined or null!',\n      );\n      return null;\n    }\n    const classes = objectWithKey('classes', this.classList);\n    const transform = objectWithKey(\n      'transform',\n      typeof this.args.transform === 'string'\n        ? parse.transform(this.args.transform)\n        : (this.args.transform ?? {}),\n    );\n    const mask = objectWithKey(\n      'mask',\n      this.args.mask ? this.normalizeIconArgs(this.args.mask) : null,\n    );\n    const symbol = this.args.symbol ?? false;\n    // Title is only supported for FA 5 + 6... for FA 7+ pass title as aria-label https://docs.fontawesome.com/upgrade/whats-changed#simpler-accessibility\n    const title = this.args.title ? `${this.args.title}` : null;\n\n    const o = Object.assign({}, classes, transform, mask, {\n      symbol,\n      title,\n    }) as IconParams;\n\n    const renderedIcon = icon(iconLookup, o);\n    if (!renderedIcon) {\n      console.warn(\n        `Could not find icon: iconName=${iconLookup.iconName}, prefix=${iconLookup.prefix}. You may need to add it to your font-awesome.js/ts.`,\n      );\n      return null;\n    }\n\n    return renderedIcon.abstract[0] ?? null;\n  }\n\n  get iconAttributes(): Record<string, string> {\n    return (this.abstractIcon?.attributes as Record<string, string>) ?? {};\n  }\n\n  get dataPrefix(): string {\n    return this.iconAttributes['data-prefix'] ?? '';\n  }\n\n  get dataIcon(): string {\n    return this.iconAttributes['data-icon'] ?? '';\n  }\n\n  get dataFaTransform(): string {\n    return this.iconAttributes['data-fa-transform'] ?? '';\n  }\n\n  get dataFaMask(): string {\n    return this.iconAttributes['data-fa-mask'] ?? '';\n  }\n\n  get dataFaProcessed(): string {\n    return this.iconAttributes['data-fa-processed'] ?? '';\n  }\n\n  get ariaHidden(): string {\n    return this.iconAttributes['aria-hidden'] ?? '';\n  }\n\n  get ariaLabelledBy(): string {\n    return this.iconAttributes['aria-labelledby'] ?? '';\n  }\n\n  get viewBox(): string {\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n    return (this.abstractIcon?.attributes?.viewBox as string) ?? '0 0 448 512';\n  }\n\n  private normalizeIconArgs(\n    icon: IconName | IconLookup | IconDefinition,\n    prefix?: IconPrefix,\n  ): IconLookup | null {\n    // @ts-expect-error Property 'resolveRegistration' does not exist on type 'Owner'.\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n    const appConfig = getOwner(this).resolveRegistration(\n      'config:environment',\n    ) as {\n      fontawesome?: {\n        defaultPrefix?: IconPrefix;\n      };\n    };\n\n    const defaultPrefix: IconPrefix =\n      appConfig?.fontawesome?.defaultPrefix ?? 'fas';\n\n    if (!icon) {\n      return null;\n    }\n\n    if (typeof icon === 'object' && icon.prefix && icon.iconName) {\n      return icon;\n    }\n\n    if (parse.icon) {\n      if (typeof prefix === 'string' && typeof icon === 'string') {\n        return parse.icon({ prefix: prefix, iconName: icon });\n      }\n\n      if (typeof icon === 'string') {\n        return parse.icon({ prefix: defaultPrefix, iconName: icon });\n      }\n    }\n\n    if (typeof prefix === 'string' && typeof icon === 'string') {\n      return { prefix: prefix, iconName: icon };\n    }\n\n    if (typeof icon === 'string') {\n      return { prefix: defaultPrefix, iconName: icon };\n    }\n\n    return null;\n  }\n\n  <template>\n    {{~#if this.iconExists~}}\n      <svg\n        style={{this.safeStyle}}\n        class={{get this.iconAttributes \"class\"}}\n        data-prefix={{this.dataPrefix}}\n        data-icon={{this.dataIcon}}\n        data-fa-transform={{this.dataFaTransform}}\n        data-fa-mask={{this.dataFaMask}}\n        data-fa-processed={{this.dataFaProcessed}}\n        aria-hidden={{this.ariaHidden}}\n        aria-labelledby={{this.ariaLabelledBy}}\n        focusable={{get this.iconAttributes \"focusable\"}}\n        role={{get this.iconAttributes \"role\"}}\n        xmlns={{get this.iconAttributes \"xmlns\"}}\n        viewBox={{this.viewBox}}\n        ...attributes\n      >\n        {{this.content}}\n      </svg>\n    {{~/if~}}\n  </template>\n}\n","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'buffer';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f837';\nvar svgPathData = 'M427.84 380.67l-196.5 97.82a18.6 18.6 0 0 1-14.67 0L20.16 380.67c-4-2-4-5.28 0-7.29L67.22 350a18.65 18.65 0 0 1 14.69 0l134.76 67a18.51 18.51 0 0 0 14.67 0l134.76-67a18.62 18.62 0 0 1 14.68 0l47.06 23.43c4.05 1.96 4.05 5.24 0 7.24zm0-136.53l-47.06-23.43a18.62 18.62 0 0 0-14.68 0l-134.76 67.08a18.68 18.68 0 0 1-14.67 0L81.91 220.71a18.65 18.65 0 0 0-14.69 0l-47.06 23.43c-4 2-4 5.29 0 7.31l196.51 97.8a18.6 18.6 0 0 0 14.67 0l196.5-97.8c4.05-2.02 4.05-5.3 0-7.31zM20.16 130.42l196.5 90.29a20.08 20.08 0 0 0 14.67 0l196.51-90.29c4-1.86 4-4.89 0-6.74L231.33 33.4a19.88 19.88 0 0 0-14.67 0l-196.5 90.28c-4.05 1.85-4.05 4.88 0 6.74z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faBuffer = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'css';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'e6a2';\nvar svgPathData = 'M376.3 32L0 32 0 408.3c0 19 7.6 37.2 21 50.7s31.7 21 50.7 21l304.6 0c19 0 37.2-7.6 50.7-21s21-31.7 21-50.7l0-304.6c0-19-7.6-37.2-21-50.7s-31.7-21-50.7-21zM332.4 431.4c-7.7-8.5-11.7-20.7-12-36.6l31.3 0c.2 14.1 5.1 21.1 14.8 21.1c4.9 0 8.4-1.6 10.5-4.7c2-3.1 3-8 3-14.8c0-5.4-1.3-9.9-4-13.4c-3.5-4.2-8.1-7.5-13.2-9.5L351.2 368c-10.3-4.9-17.8-10.8-22.5-17.6c-4.5-6.8-6.7-16.3-6.7-28.4c0-13.6 4-24.6 11.8-33.1c8.1-8.5 19.1-12.7 33.2-12.7c13.6 0 24.1 4.2 31.5 12.5c7.5 8.4 11.5 20.3 11.8 35.9l-30.1 0c.2-5.1-.9-10.2-3-14.8c-1.7-3.4-5-5.1-10-5.1c-8.8 0-13.2 5.2-13.2 15.7c0 5.3 1.1 9.4 3.2 12.6c3.1 3.5 7 6.2 11.4 7.8l11.1 4.9c11.5 5.3 19.7 11.7 24.8 19.4c5.1 7.7 7.6 18 7.6 31c0 15.5-4 27.4-12.3 35.7c-8.2 8.3-19.5 12.5-34.1 12.5s-25.6-4.2-33.4-12.7zm-101 0c-7.7-8.5-11.7-20.7-12-36.6l31.3 0c.2 14.1 5.1 21.1 14.8 21.1c4.9 0 8.4-1.6 10.4-4.7c2-3.1 3-8 3-14.8c0-5.4-1.3-9.9-3.9-13.4c-3.5-4.2-8.1-7.5-13.2-9.5L250.2 368c-10.3-4.9-17.8-10.8-22.5-17.6c-4.5-6.8-6.7-16.3-6.7-28.4c0-13.6 4-24.6 11.8-33.1c8.1-8.5 19.1-12.7 33.2-12.7c13.6 0 24.1 4.2 31.4 12.5c7.6 8.4 11.5 20.3 11.9 35.9l-30.1 0c.2-5.1-.9-10.2-3-14.8c-1.7-3.4-5-5.1-10-5.1c-8.8 0-13.2 5.2-13.2 15.7c0 5.3 1.1 9.4 3.2 12.6c3.1 3.5 7 6.2 11.4 7.8l11.1 4.9c11.5 5.3 19.7 11.7 24.8 19.4c5.1 7.7 7.6 18 7.6 31c0 15.5-4.1 27.4-12.3 35.7s-19.5 12.5-34.1 12.5s-25.6-4.2-33.4-12.7zm-105.6 1.1c-8.4-7.7-12.5-19.2-12.5-34.5l0-75.4c0-15.2 4.4-26.7 13.2-34.6c8.9-7.8 20.7-11.8 35.2-11.8c14.1 0 25.2 4 33.4 12c8.3 8 12.5 20 12.5 35.9l0 6-33.1 0 0-5.8c0-6.1-1.3-10.7-4-13.6c-1.1-1.5-2.6-2.7-4.3-3.5s-3.5-1.2-5.4-1.1c-5.4 0-9.2 1.8-11.4 5.6c-2.3 5.2-3.3 10.8-3 16.4l0 65.5c0 13.7 4.8 20.6 14.4 20.8c4.5 0 7.9-1.6 10.2-4.8c2.5-4.1 3.7-8.8 3.5-13.6l0-4.9 33.1 0 0 5.1c0 10.6-2.1 19.5-6.2 26.6c-4 6.9-9.9 12.5-17.1 16c-7.7 3.7-16.1 5.5-24.6 5.3c-14.2 0-25.5-3.9-33.8-11.6z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCss = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'ember';\nvar width = 640;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f423';\nvar svgPathData = 'M639.9 254.6c-1.1-10.7-10.7-6.8-10.7-6.8s-15.6 12.1-29.3 10.7c-13.7-1.3-9.4-32-9.4-32s3-28.1-5.1-30.4c-8.1-2.4-18 7.3-18 7.3s-12.4 13.7-18.3 31.2l-1.6.5s1.9-30.6-.3-37.6c-1.6-3.5-16.4-3.2-18.8 3s-14.2 49.2-15 67.2c0 0-23.1 19.6-43.3 22.8s-25-9.4-25-9.4 54.8-15.3 52.9-59.1-44.2-27.6-49-24c-4.6 3.5-29.4 18.4-36.6 59.7-.2 1.4-.7 7.5-.7 7.5s-21.2 14.2-33 18c0 0 33-55.6-7.3-80.9-11.4-6.8-21.3-.5-27.2 5.3 13.6-17.3 46.4-64.2 36.9-105.2-5.8-24.4-18-27.1-29.2-23.1-17 6.7-23.5 16.7-23.5 16.7s-22 32-27.1 79.5-12.6 105.1-12.6 105.1-10.5 10.2-20.2 10.7-5.4-28.7-5.4-28.7 7.5-44.6 7-52.1-1.1-11.6-9.9-14.2c-8.9-2.7-18.5 8.6-18.5 8.6s-25.5 38.7-27.7 44.6l-1.3 2.4-1.3-1.6s18-52.7.8-53.5-28.5 18.8-28.5 18.8-19.6 32.8-20.4 36.5l-1.3-1.6s8.1-38.2 6.4-47.6c-1.6-9.4-10.5-7.5-10.5-7.5s-11.3-1.3-14.2 5.9-13.7 55.3-15 70.7c0 0-28.2 20.2-46.8 20.4-18.5.3-16.7-11.8-16.7-11.8s68-23.3 49.4-69.2c-8.3-11.8-18-15.5-31.7-15.3-13.7.3-30.3 8.6-41.3 33.3-5.3 11.8-6.8 23-7.8 31.5 0 0-12.3 2.4-18.8-2.9s-10 0-10 0-11.2 14-.1 18.3 28.1 6.1 28.1 6.1c1.6 7.5 6.2 19.5 19.6 29.7 20.2 15.3 58.8-1.3 58.8-1.3l15.9-8.8s.5 14.6 12.1 16.7 16.4 1 36.5-47.9c11.8-25 12.6-23.6 12.6-23.6l1.3-.3s-9.1 46.8-5.6 59.7C187.7 319.4 203 318 203 318s8.3 2.4 15-21.2 19.6-49.9 19.6-49.9h1.6s-5.6 48.1 3 63.7 30.9 5.3 30.9 5.3 15.6-7.8 18-10.2c0 0 18.5 15.8 44.6 12.9 58.3-11.5 79.1-25.9 79.1-25.9s10 24.4 41.1 26.7c35.5 2.7 54.8-18.6 54.8-18.6s-.3 13.5 12.1 18.6 20.7-22.8 20.7-22.8l20.7-57.2h1.9s1.1 37.3 21.5 43.2 47-13.7 47-13.7 6.4-3.5 5.3-14.3zm-578 5.3c.8-32 21.8-45.9 29-39 7.3 7 4.6 22-9.1 31.4-13.7 9.5-19.9 7.6-19.9 7.6zm272.8-123.8s19.1-49.7 23.6-25.5-40 96.2-40 96.2c.5-16.2 16.4-70.7 16.4-70.7zm22.8 138.4c-12.6 33-43.3 19.6-43.3 19.6s-3.5-11.8 6.4-44.9 33.3-20.2 33.3-20.2 16.2 12.4 3.6 45.5zm84.6-14.6s-3-10.5 8.1-30.6c11-20.2 19.6-9.1 19.6-9.1s9.4 10.2-1.3 25.5-26.4 14.2-26.4 14.2z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faEmber = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'facebook';\nvar width = 512;\nvar height = 512;\nvar aliases = [62000];\nvar unicode = 'f09a';\nvar svgPathData = 'M512 256C512 114.6 397.4 0 256 0S0 114.6 0 256C0 376 82.7 476.8 194.2 504.5V334.2H141.4V256h52.8V222.3c0-87.1 39.4-127.5 125-127.5c16.2 0 44.2 3.2 55.7 6.4V172c-6-.6-16.5-1-29.6-1c-42 0-58.2 15.9-58.2 57.2V256h83.6l-14.4 78.2H287V510.1C413.8 494.8 512 386.9 512 256h0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFacebook = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'facebook-f';\nvar width = 320;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f39e';\nvar svgPathData = 'M80 299.3V512H196V299.3h86.5l18-97.8H196V166.9c0-51.7 20.3-71.5 72.7-71.5c16.3 0 29.4 .4 37 1.2V7.9C291.4 4 256.4 0 236.2 0C129.3 0 80 50.5 80 159.4v42.1H14v97.8H80z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFacebookF = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'github';\nvar width = 496;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f09b';\nvar svgPathData = 'M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faGithub = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'google';\nvar width = 488;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f1a0';\nvar svgPathData = 'M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faGoogle = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'instagram';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f16d';\nvar svgPathData = 'M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faInstagram = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'js';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f3b8';\nvar svgPathData = 'M0 32v448h448V32H0zm243.8 349.4c0 43.6-25.6 63.5-62.9 63.5-33.7 0-53.2-17.4-63.2-38.5l34.3-20.7c6.6 11.7 12.6 21.6 27.1 21.6 13.8 0 22.6-5.4 22.6-26.5V237.7h42.1v143.7zm99.6 63.5c-39.1 0-64.4-18.6-76.7-43l34.3-19.8c9 14.7 20.8 25.6 41.5 25.6 17.4 0 28.6-8.7 28.6-20.8 0-14.4-11.4-19.5-30.7-28l-10.5-4.5c-30.4-12.9-50.5-29.2-50.5-63.5 0-31.6 24.1-55.6 61.6-55.6 26.8 0 46 9.3 59.8 33.7L368 290c-7.2-12.9-15-18-27.1-18-12.3 0-20.1 7.8-20.1 18 0 12.6 7.8 17.7 25.9 25.6l10.5 4.5c35.8 15.3 55.9 31 55.9 66.2 0 37.8-29.8 58.6-69.7 58.6z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faJs = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'line';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f3c0';\nvar svgPathData = 'M311 196.8v81.3c0 2.1-1.6 3.7-3.7 3.7h-13c-1.3 0-2.4-.7-3-1.5l-37.3-50.3v48.2c0 2.1-1.6 3.7-3.7 3.7h-13c-2.1 0-3.7-1.6-3.7-3.7V196.9c0-2.1 1.6-3.7 3.7-3.7h12.9c1.1 0 2.4 .6 3 1.6l37.3 50.3V196.9c0-2.1 1.6-3.7 3.7-3.7h13c2.1-.1 3.8 1.6 3.8 3.5zm-93.7-3.7h-13c-2.1 0-3.7 1.6-3.7 3.7v81.3c0 2.1 1.6 3.7 3.7 3.7h13c2.1 0 3.7-1.6 3.7-3.7V196.8c0-1.9-1.6-3.7-3.7-3.7zm-31.4 68.1H150.3V196.8c0-2.1-1.6-3.7-3.7-3.7h-13c-2.1 0-3.7 1.6-3.7 3.7v81.3c0 1 .3 1.8 1 2.5c.7 .6 1.5 1 2.5 1h52.2c2.1 0 3.7-1.6 3.7-3.7v-13c0-1.9-1.6-3.7-3.5-3.7zm193.7-68.1H327.3c-1.9 0-3.7 1.6-3.7 3.7v81.3c0 1.9 1.6 3.7 3.7 3.7h52.2c2.1 0 3.7-1.6 3.7-3.7V265c0-2.1-1.6-3.7-3.7-3.7H344V247.7h35.5c2.1 0 3.7-1.6 3.7-3.7V230.9c0-2.1-1.6-3.7-3.7-3.7H344V213.5h35.5c2.1 0 3.7-1.6 3.7-3.7v-13c-.1-1.9-1.7-3.7-3.7-3.7zM512 93.4V419.4c-.1 51.2-42.1 92.7-93.4 92.6H92.6C41.4 511.9-.1 469.8 0 418.6V92.6C.1 41.4 42.2-.1 93.4 0H419.4c51.2 .1 92.7 42.1 92.6 93.4zM441.6 233.5c0-83.4-83.7-151.3-186.4-151.3s-186.4 67.9-186.4 151.3c0 74.7 66.3 137.4 155.9 149.3c21.8 4.7 19.3 12.7 14.4 42.1c-.8 4.7-3.8 18.4 16.1 10.1s107.3-63.2 146.5-108.2c27-29.7 39.9-59.8 39.9-93.1z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faLine = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'linkedin';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f08c';\nvar svgPathData = 'M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faLinkedin = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'linkedin-in';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f0e1';\nvar svgPathData = 'M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faLinkedinIn = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'mailchimp';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f59e';\nvar svgPathData = 'M330.61 243.52a36.15 36.15 0 0 1 9.3 0c1.66-3.83 1.95-10.43.45-17.61-2.23-10.67-5.25-17.14-11.48-16.13s-6.47 8.74-4.24 19.42c1.26 6 3.49 11.14 6 14.32zM277.05 252c4.47 2 7.2 3.26 8.28 2.13 1.89-1.94-3.48-9.39-12.12-13.09a31.44 31.44 0 0 0-30.61 3.68c-3 2.18-5.81 5.22-5.41 7.06.85 3.74 10-2.71 22.6-3.48 7-.44 12.8 1.75 17.26 3.71zm-9 5.13c-9.07 1.42-15 6.53-13.47 10.1.9.34 1.17.81 5.21-.81a37 37 0 0 1 18.72-1.95c2.92.34 4.31.52 4.94-.49 1.46-2.22-5.71-8-15.39-6.85zm54.17 17.1c3.38-6.87-10.9-13.93-14.3-7s10.92 13.88 14.32 6.97zm15.66-20.47c-7.66-.13-7.95 15.8-.26 15.93s7.98-15.81.28-15.96zm-218.79 78.9c-1.32.31-6 1.45-8.47-2.35-5.2-8 11.11-20.38 3-35.77-9.1-17.47-27.82-13.54-35.05-5.54-8.71 9.6-8.72 23.54-5 24.08 4.27.57 4.08-6.47 7.38-11.63a12.83 12.83 0 0 1 17.85-3.72c11.59 7.59 1.37 17.76 2.28 28.62 1.39 16.68 18.42 16.37 21.58 9a2.08 2.08 0 0 0-.2-2.33c.03.89.68-1.3-3.35-.39zm299.72-17.07c-3.35-11.73-2.57-9.22-6.78-20.52 2.45-3.67 15.29-24-3.07-43.25-10.4-10.92-33.9-16.54-41.1-18.54-1.5-11.39 4.65-58.7-21.52-83 20.79-21.55 33.76-45.29 33.73-65.65-.06-39.16-48.15-51-107.42-26.47l-12.55 5.33c-.06-.05-22.71-22.27-23.05-22.57C169.5-18-41.77 216.81 25.78 273.85l14.76 12.51a72.49 72.49 0 0 0-4.1 33.5c3.36 33.4 36 60.42 67.53 60.38 57.73 133.06 267.9 133.28 322.29 3 1.74-4.47 9.11-24.61 9.11-42.38s-10.09-25.27-16.53-25.27zm-316 48.16c-22.82-.61-47.46-21.15-49.91-45.51-6.17-61.31 74.26-75.27 84-12.33 4.54 29.64-4.67 58.49-34.12 57.81zM84.3 249.55C69.14 252.5 55.78 261.09 47.6 273c-4.88-4.07-14-12-15.59-15-13.01-24.85 14.24-73 33.3-100.21C112.42 90.56 186.19 39.68 220.36 48.91c5.55 1.57 23.94 22.89 23.94 22.89s-34.15 18.94-65.8 45.35c-42.66 32.85-74.89 80.59-94.2 132.4zM323.18 350.7s-35.74 5.3-69.51-7.07c6.21-20.16 27 6.1 96.4-13.81 15.29-4.38 35.37-13 51-25.35a102.85 102.85 0 0 1 7.12 24.28c3.66-.66 14.25-.52 11.44 18.1-3.29 19.87-11.73 36-25.93 50.84A106.86 106.86 0 0 1 362.55 421a132.45 132.45 0 0 1-20.34 8.58c-53.51 17.48-108.3-1.74-126-43a66.33 66.33 0 0 1-3.55-9.74c-7.53-27.2-1.14-59.83 18.84-80.37 1.23-1.31 2.48-2.85 2.48-4.79a8.45 8.45 0 0 0-1.92-4.54c-7-10.13-31.19-27.4-26.33-60.83 3.5-24 24.49-40.91 44.07-39.91l5 .29c8.48.5 15.89 1.59 22.88 1.88 11.69.5 22.2-1.19 34.64-11.56 4.2-3.5 7.57-6.54 13.26-7.51a17.45 17.45 0 0 1 13.6 2.24c10 6.64 11.4 22.73 11.92 34.49.29 6.72 1.1 23 1.38 27.63.63 10.67 3.43 12.17 9.11 14 3.19 1.05 6.15 1.83 10.51 3.06 13.21 3.71 21 7.48 26 12.31a16.38 16.38 0 0 1 4.74 9.29c1.56 11.37-8.82 25.4-36.31 38.16-46.71 21.68-93.68 14.45-100.48 13.68-20.15-2.71-31.63 23.32-19.55 41.15 22.64 33.41 122.4 20 151.37-21.35.69-1 .12-1.59-.73-1-41.77 28.58-97.06 38.21-128.46 26-4.77-1.85-14.73-6.44-15.94-16.67 43.6 13.49 71 .74 71 .74s2.03-2.79-.56-2.53zm-68.47-5.7zm-83.4-187.5c16.74-19.35 37.36-36.18 55.83-45.63a.73.73 0 0 1 1 1c-1.46 2.66-4.29 8.34-5.19 12.65a.75.75 0 0 0 1.16.79c11.49-7.83 31.48-16.22 49-17.3a.77.77 0 0 1 .52 1.38 41.86 41.86 0 0 0-7.71 7.74.75.75 0 0 0 .59 1.19c12.31.09 29.66 4.4 41 10.74.76.43.22 1.91-.64 1.72-69.55-15.94-123.08 18.53-134.5 26.83a.76.76 0 0 1-1-1.12z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faMailchimp = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'medium';\nvar width = 640;\nvar height = 512;\nvar aliases = [62407,\"medium-m\"];\nvar unicode = 'f23a';\nvar svgPathData = 'M180.5,74.262C80.813,74.262,0,155.633,0,256S80.819,437.738,180.5,437.738,361,356.373,361,256,280.191,74.262,180.5,74.262Zm288.25,10.646c-49.845,0-90.245,76.619-90.245,171.095s40.406,171.1,90.251,171.1,90.251-76.619,90.251-171.1H559C559,161.5,518.6,84.908,468.752,84.908Zm139.506,17.821c-17.526,0-31.735,68.628-31.735,153.274s14.2,153.274,31.735,153.274S640,340.631,640,256C640,171.351,625.785,102.729,608.258,102.729Z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faMedium = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'meta';\nvar width = 640;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'e49b';\nvar svgPathData = 'M640 317.9C640 409.2 600.6 466.4 529.7 466.4C467.1 466.4 433.9 431.8 372.8 329.8L341.4 277.2C333.1 264.7 326.9 253 320.2 242.2C300.1 276 273.1 325.2 273.1 325.2C206.1 441.8 168.5 466.4 116.2 466.4C43.42 466.4 0 409.1 0 320.5C0 177.5 79.78 42.4 183.9 42.4C234.1 42.4 277.7 67.08 328.7 131.9C365.8 81.8 406.8 42.4 459.3 42.4C558.4 42.4 640 168.1 640 317.9H640zM287.4 192.2C244.5 130.1 216.5 111.7 183 111.7C121.1 111.7 69.22 217.8 69.22 321.7C69.22 370.2 87.7 397.4 118.8 397.4C149 397.4 167.8 378.4 222 293.6C222 293.6 246.7 254.5 287.4 192.2V192.2zM531.2 397.4C563.4 397.4 578.1 369.9 578.1 322.5C578.1 198.3 523.8 97.08 454.9 97.08C421.7 97.08 393.8 123 360 175.1C369.4 188.9 379.1 204.1 389.3 220.5L426.8 282.9C485.5 377 500.3 397.4 531.2 397.4L531.2 397.4z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faMeta = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'pinterest';\nvar width = 496;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f0d2';\nvar svgPathData = 'M496 256c0 137-111 248-248 248-25.6 0-50.2-3.9-73.4-11.1 10.1-16.5 25.2-43.5 30.8-65 3-11.6 15.4-59 15.4-59 8.1 15.4 31.7 28.5 56.8 28.5 74.8 0 128.7-68.8 128.7-154.3 0-81.9-66.9-143.2-152.9-143.2-107 0-163.9 71.8-163.9 150.1 0 36.4 19.4 81.7 50.3 96.1 4.7 2.2 7.2 1.2 8.3-3.3.8-3.4 5-20.3 6.9-28.1.6-2.5.3-4.7-1.7-7.1-10.1-12.5-18.3-35.3-18.3-56.6 0-54.7 41.4-107.6 112-107.6 60.9 0 103.6 41.5 103.6 100.9 0 67.1-33.9 113.6-78 113.6-24.3 0-42.6-20.1-36.7-44.8 7-29.5 20.5-61.3 20.5-82.6 0-19-10.2-34.9-31.4-34.9-24.9 0-44.9 25.7-44.9 60.2 0 22 7.4 36.8 7.4 36.8s-24.5 103.8-29 123.2c-5 21.4-3 51.6-.9 71.2C65.4 450.9 0 361.1 0 256 0 119 111 8 248 8s248 111 248 248z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faPinterest = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'snapchat';\nvar width = 512;\nvar height = 512;\nvar aliases = [62124,\"snapchat-ghost\"];\nvar unicode = 'f2ab';\nvar svgPathData = 'M496.926,366.6c-3.373-9.176-9.8-14.086-17.112-18.153-1.376-.806-2.641-1.451-3.72-1.947-2.182-1.128-4.414-2.22-6.634-3.373-22.8-12.09-40.609-27.341-52.959-45.42a102.889,102.889,0,0,1-9.089-16.12c-1.054-3.013-1-4.724-.248-6.287a10.221,10.221,0,0,1,2.914-3.038c3.918-2.591,7.96-5.22,10.7-6.993,4.885-3.162,8.754-5.667,11.246-7.44,9.362-6.547,15.909-13.5,20-21.278a42.371,42.371,0,0,0,2.1-35.191c-6.2-16.318-21.613-26.449-40.287-26.449a55.543,55.543,0,0,0-11.718,1.24c-1.029.224-2.059.459-3.063.72.174-11.16-.074-22.94-1.066-34.534-3.522-40.758-17.794-62.123-32.674-79.16A130.167,130.167,0,0,0,332.1,36.443C309.515,23.547,283.91,17,256,17S202.6,23.547,180,36.443a129.735,129.735,0,0,0-33.281,26.783c-14.88,17.038-29.152,38.44-32.673,79.161-.992,11.594-1.24,23.435-1.079,34.533-1-.26-2.021-.5-3.051-.719a55.461,55.461,0,0,0-11.717-1.24c-18.687,0-34.125,10.131-40.3,26.449a42.423,42.423,0,0,0,2.046,35.228c4.105,7.774,10.652,14.731,20.014,21.278,2.48,1.736,6.361,4.24,11.246,7.44,2.641,1.711,6.5,4.216,10.28,6.72a11.054,11.054,0,0,1,3.3,3.311c.794,1.624.818,3.373-.36,6.6a102.02,102.02,0,0,1-8.94,15.785c-12.077,17.669-29.363,32.648-51.434,44.639C32.355,348.608,20.2,352.75,15.069,366.7c-3.868,10.528-1.339,22.506,8.494,32.6a49.137,49.137,0,0,0,12.4,9.387,134.337,134.337,0,0,0,30.342,12.139,20.024,20.024,0,0,1,6.126,2.741c3.583,3.137,3.075,7.861,7.849,14.78a34.468,34.468,0,0,0,8.977,9.127c10.019,6.919,21.278,7.353,33.207,7.811,10.776.41,22.989.881,36.939,5.481,5.778,1.91,11.78,5.605,18.736,9.92C194.842,480.951,217.707,495,255.973,495s61.292-14.123,78.118-24.428c6.907-4.24,12.872-7.9,18.489-9.758,13.949-4.613,26.163-5.072,36.939-5.481,11.928-.459,23.187-.893,33.206-7.812a34.584,34.584,0,0,0,10.218-11.16c3.434-5.84,3.348-9.919,6.572-12.771a18.971,18.971,0,0,1,5.753-2.629A134.893,134.893,0,0,0,476.02,408.71a48.344,48.344,0,0,0,13.019-10.193l.124-.149C498.389,388.5,500.708,376.867,496.926,366.6Zm-34.013,18.277c-20.745,11.458-34.533,10.23-45.259,17.137-9.114,5.865-3.72,18.513-10.342,23.076-8.134,5.617-32.177-.4-63.239,9.858-25.618,8.469-41.961,32.822-88.038,32.822s-62.036-24.3-88.076-32.884c-31-10.255-55.092-4.241-63.239-9.858-6.609-4.563-1.24-17.211-10.341-23.076-10.739-6.907-24.527-5.679-45.26-17.075-13.206-7.291-5.716-11.8-1.314-13.937,75.143-36.381,87.133-92.552,87.666-96.719.645-5.046,1.364-9.014-4.191-14.148-5.369-4.96-29.189-19.7-35.8-24.316-10.937-7.638-15.748-15.264-12.2-24.638,2.48-6.485,8.531-8.928,14.879-8.928a27.643,27.643,0,0,1,5.965.67c12,2.6,23.659,8.617,30.392,10.242a10.749,10.749,0,0,0,2.48.335c3.6,0,4.86-1.811,4.612-5.927-.768-13.132-2.628-38.725-.558-62.644,2.84-32.909,13.442-49.215,26.04-63.636,6.051-6.932,34.484-36.976,88.857-36.976s82.88,29.92,88.931,36.827c12.611,14.421,23.225,30.727,26.04,63.636,2.071,23.919.285,49.525-.558,62.644-.285,4.327,1.017,5.927,4.613,5.927a10.648,10.648,0,0,0,2.48-.335c6.745-1.624,18.4-7.638,30.4-10.242a27.641,27.641,0,0,1,5.964-.67c6.386,0,12.4,2.48,14.88,8.928,3.546,9.374-1.24,17-12.189,24.639-6.609,4.612-30.429,19.343-35.8,24.315-5.568,5.134-4.836,9.1-4.191,14.149.533,4.228,12.511,60.4,87.666,96.718C468.629,373.011,476.119,377.524,462.913,384.877Z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faSnapchat = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'stripe';\nvar width = 640;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f429';\nvar svgPathData = 'M165 144.7l-43.3 9.2-.2 142.4c0 26.3 19.8 43.3 46.1 43.3 14.6 0 25.3-2.7 31.2-5.9v-33.8c-5.7 2.3-33.7 10.5-33.7-15.7V221h33.7v-37.8h-33.7zm89.1 51.6l-2.7-13.1H213v153.2h44.3V233.3c10.5-13.8 28.2-11.1 33.9-9.3v-40.8c-6-2.1-26.7-6-37.1 13.1zm92.3-72.3l-44.6 9.5v36.2l44.6-9.5zM44.9 228.3c0-6.9 5.8-9.6 15.1-9.7 13.5 0 30.7 4.1 44.2 11.4v-41.8c-14.7-5.8-29.4-8.1-44.1-8.1-36 0-60 18.8-60 50.2 0 49.2 67.5 41.2 67.5 62.4 0 8.2-7.1 10.9-17 10.9-14.7 0-33.7-6.1-48.6-14.2v40c16.5 7.1 33.2 10.1 48.5 10.1 36.9 0 62.3-15.8 62.3-47.8 0-52.9-67.9-43.4-67.9-63.4zM640 261.6c0-45.5-22-81.4-64.2-81.4s-67.9 35.9-67.9 81.1c0 53.5 30.3 78.2 73.5 78.2 21.2 0 37.1-4.8 49.2-11.5v-33.4c-12.1 6.1-26 9.8-43.6 9.8-17.3 0-32.5-6.1-34.5-26.9h86.9c.2-2.3.6-11.6.6-15.9zm-87.9-16.8c0-20 12.3-28.4 23.4-28.4 10.9 0 22.5 8.4 22.5 28.4zm-112.9-64.6c-17.4 0-28.6 8.2-34.8 13.9l-2.3-11H363v204.8l44.4-9.4.1-50.2c6.4 4.7 15.9 11.2 31.4 11.2 31.8 0 60.8-23.2 60.8-79.6.1-51.6-29.3-79.7-60.5-79.7zm-10.6 122.5c-10.4 0-16.6-3.8-20.9-8.4l-.3-66c4.6-5.1 11-8.8 21.2-8.8 16.2 0 27.4 18.2 27.4 41.4.1 23.9-10.9 41.8-27.4 41.8zm-126.7 33.7h44.6V183.2h-44.6z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faStripe = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'telegram';\nvar width = 496;\nvar height = 512;\nvar aliases = [62462,\"telegram-plane\"];\nvar unicode = 'f2c6';\nvar svgPathData = 'M248,8C111.033,8,0,119.033,0,256S111.033,504,248,504,496,392.967,496,256,384.967,8,248,8ZM362.952,176.66c-3.732,39.215-19.881,134.378-28.1,178.3-3.476,18.584-10.322,24.816-16.948,25.425-14.4,1.326-25.338-9.517-39.287-18.661-21.827-14.308-34.158-23.215-55.346-37.177-24.485-16.135-8.612-25,5.342-39.5,3.652-3.793,67.107-61.51,68.335-66.746.153-.655.3-3.1-1.154-4.384s-3.59-.849-5.135-.5q-3.283.746-104.608,69.142-14.845,10.194-26.894,9.934c-8.855-.191-25.888-5.006-38.551-9.123-15.531-5.048-27.875-7.717-26.8-16.291q.84-6.7,18.45-13.7,108.446-47.248,144.628-62.3c68.872-28.647,83.183-33.623,92.511-33.789,2.052-.034,6.639.474,9.61,2.885a10.452,10.452,0,0,1,3.53,6.716A43.765,43.765,0,0,1,362.952,176.66Z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faTelegram = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'tiktok';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'e07b';\nvar svgPathData = 'M448,209.91a210.06,210.06,0,0,1-122.77-39.25V349.38A162.55,162.55,0,1,1,185,188.31V278.2a74.62,74.62,0,1,0,52.23,71.18V0l88,0a121.18,121.18,0,0,0,1.86,22.17h0A122.18,122.18,0,0,0,381,102.39a121.43,121.43,0,0,0,67,20.14Z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faTiktok = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'twitter';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f099';\nvar svgPathData = 'M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faTwitter = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'vimeo';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f40a';\nvar svgPathData = 'M403.2 32H44.8C20.1 32 0 52.1 0 76.8v358.4C0 459.9 20.1 480 44.8 480h358.4c24.7 0 44.8-20.1 44.8-44.8V76.8c0-24.7-20.1-44.8-44.8-44.8zM377 180.8c-1.4 31.5-23.4 74.7-66 129.4-44 57.2-81.3 85.8-111.7 85.8-18.9 0-34.8-17.4-47.9-52.3-25.5-93.3-36.4-148-57.4-148-2.4 0-10.9 5.1-25.4 15.2l-15.2-19.6c37.3-32.8 72.9-69.2 95.2-71.2 25.2-2.4 40.7 14.8 46.5 51.7 20.7 131.2 29.9 151 67.6 91.6 13.5-21.4 20.8-37.7 21.8-48.9 3.5-33.2-25.9-30.9-45.8-22.4 15.9-52.1 46.3-77.4 91.2-76 33.3.9 49 22.5 47.1 64.7z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faVimeo = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'whatsapp';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f232';\nvar svgPathData = 'M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faWhatsapp = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'windows';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f17a';\nvar svgPathData = 'M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faWindows = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fab';\nvar iconName = 'youtube';\nvar width = 576;\nvar height = 512;\nvar aliases = [61802];\nvar unicode = 'f167';\nvar svgPathData = 'M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faYoutube = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = '0';\nvar width = 320;\nvar height = 512;\nvar aliases = [];\nvar unicode = '30';\nvar svgPathData = 'M0 192C0 103.6 71.6 32 160 32s160 71.6 160 160l0 128c0 88.4-71.6 160-160 160S0 408.4 0 320L0 192zM160 96c-53 0-96 43-96 96l0 128c0 53 43 96 96 96s96-43 96-96l0-128c0-53-43-96-96-96z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.fa0 = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = '1';\nvar width = 256;\nvar height = 512;\nvar aliases = [];\nvar unicode = '31';\nvar svgPathData = 'M160 64c0-11.8-6.5-22.6-16.9-28.2s-23-5-32.8 1.6l-96 64C-.5 111.2-4.4 131 5.4 145.8s29.7 18.7 44.4 8.9L96 123.8 96 416l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0 96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-352z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.fa1 = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = '2';\nvar width = 320;\nvar height = 512;\nvar aliases = [];\nvar unicode = '32';\nvar svgPathData = 'M142.9 96c-21.5 0-42.2 8.5-57.4 23.8L54.6 150.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L40.2 74.5C67.5 47.3 104.4 32 142.9 32C223 32 288 97 288 177.1c0 38.5-15.3 75.4-42.5 102.6L109.3 416 288 416c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-12.9 0-24.6-7.8-29.6-19.8s-2.2-25.7 6.9-34.9L200.2 234.5c15.2-15.2 23.8-35.9 23.8-57.4c0-44.8-36.3-81.1-81.1-81.1z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.fa2 = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = '3';\nvar width = 320;\nvar height = 512;\nvar aliases = [];\nvar unicode = '33';\nvar svgPathData = 'M0 64C0 46.3 14.3 32 32 32l240 0c13.2 0 25 8.1 29.8 20.4s1.5 26.3-8.2 35.2L162.3 208l21.7 0c75.1 0 136 60.9 136 136s-60.9 136-136 136l-78.6 0C63 480 24.2 456 5.3 418.1l-1.9-3.8c-7.9-15.8-1.5-35 14.3-42.9s35-1.5 42.9 14.3l1.9 3.8c8.1 16.3 24.8 26.5 42.9 26.5l78.6 0c39.8 0 72-32.2 72-72s-32.2-72-72-72L80 272c-13.2 0-25-8.1-29.8-20.4s-1.5-26.3 8.2-35.2L189.7 96 32 96C14.3 96 0 81.7 0 64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.fa3 = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = '4';\nvar width = 384;\nvar height = 512;\nvar aliases = [];\nvar unicode = '34';\nvar svgPathData = 'M189 77.6c7.5-16 .7-35.1-15.3-42.6s-35.1-.7-42.6 15.3L3 322.4c-4.7 9.9-3.9 21.5 1.9 30.8S21 368 32 368l224 0 0 80c0 17.7 14.3 32 32 32s32-14.3 32-32l0-80 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0 0-144c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L82.4 304 189 77.6z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.fa4 = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = '5';\nvar width = 320;\nvar height = 512;\nvar aliases = [];\nvar unicode = '35';\nvar svgPathData = 'M32.5 58.3C35.3 43.1 48.5 32 64 32l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L90.7 96 70.3 208 184 208c75.1 0 136 60.9 136 136s-60.9 136-136 136l-83.5 0c-39.4 0-75.4-22.3-93-57.5l-4.1-8.2c-7.9-15.8-1.5-35 14.3-42.9s35-1.5 42.9 14.3l4.1 8.2c6.8 13.6 20.6 22.1 35.8 22.1l83.5 0c39.8 0 72-32.2 72-72s-32.2-72-72-72L32 272c-9.5 0-18.5-4.2-24.6-11.5s-8.6-16.9-6.9-26.2l32-176z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.fa5 = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = '6';\nvar width = 320;\nvar height = 512;\nvar aliases = [];\nvar unicode = '36';\nvar svgPathData = 'M232.4 84.7c11.4-13.5 9.7-33.7-3.8-45.1s-33.7-9.7-45.1 3.8L38.6 214.7C14.7 242.9 1.1 278.4 .1 315.2c0 1.4-.1 2.9-.1 4.3l0 .5c0 88.4 71.6 160 160 160s160-71.6 160-160c0-85.5-67.1-155.4-151.5-159.8l63.9-75.6zM256 320A96 96 0 1 1 64 320a96 96 0 1 1 192 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.fa6 = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = '7';\nvar width = 320;\nvar height = 512;\nvar aliases = [];\nvar unicode = '37';\nvar svgPathData = 'M0 64C0 46.3 14.3 32 32 32l256 0c11.5 0 22 6.1 27.7 16.1s5.7 22.2-.1 32.1l-224 384c-8.9 15.3-28.5 20.4-43.8 11.5s-20.4-28.5-11.5-43.8L232.3 96 32 96C14.3 96 0 81.7 0 64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.fa7 = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = '8';\nvar width = 320;\nvar height = 512;\nvar aliases = [];\nvar unicode = '38';\nvar svgPathData = 'M304 160c0-70.7-57.3-128-128-128l-32 0C73.3 32 16 89.3 16 160c0 34.6 13.7 66 36 89C20.5 272.3 0 309.8 0 352c0 70.7 57.3 128 128 128l64 0c70.7 0 128-57.3 128-128c0-42.2-20.5-79.7-52-103c22.3-23 36-54.4 36-89zM176.1 288l15.9 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-64 0c-35.3 0-64-28.7-64-64s28.7-64 64-64l15.9 0c0 0 .1 0 .1 0l32 0c0 0 .1 0 .1 0zm0-64c0 0 0 0 0 0l-32 0c0 0 0 0 0 0c-35.3 0-64-28.7-64-64c0-35.3 28.7-64 64-64l32 0c35.3 0 64 28.7 64 64c0 35.3-28.6 64-64 64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.fa8 = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = '9';\nvar width = 320;\nvar height = 512;\nvar aliases = [];\nvar unicode = '39';\nvar svgPathData = 'M64 192a96 96 0 1 0 192 0A96 96 0 1 0 64 192zm87.5 159.8C67.1 347.4 0 277.5 0 192C0 103.6 71.6 32 160 32s160 71.6 160 160c0 2.6-.1 5.3-.2 7.9c-1.7 35.7-15.2 70-38.4 97.4l-145 171.4c-11.4 13.5-31.6 15.2-45.1 3.8s-15.2-31.6-3.8-45.1l63.9-75.6z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.fa9 = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'a';\nvar width = 384;\nvar height = 512;\nvar aliases = [97];\nvar unicode = '41';\nvar svgPathData = 'M221.5 51.7C216.6 39.8 204.9 32 192 32s-24.6 7.8-29.5 19.7l-120 288-40 96c-6.8 16.3 .9 35 17.2 41.8s35-.9 41.8-17.2L93.3 384l197.3 0 31.8 76.3c6.8 16.3 25.5 24 41.8 17.2s24-25.5 17.2-41.8l-40-96-120-288zM264 320l-144 0 72-172.8L264 320z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faA = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'address-book';\nvar width = 512;\nvar height = 512;\nvar aliases = [62138,\"contact-book\"];\nvar unicode = 'f2b9';\nvar svgPathData = 'M96 0C60.7 0 32 28.7 32 64l0 384c0 35.3 28.7 64 64 64l288 0c35.3 0 64-28.7 64-64l0-384c0-35.3-28.7-64-64-64L96 0zM208 288l64 0c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16l-192 0c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80zm-32-96a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM512 80c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64zM496 192c-8.8 0-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64c0-8.8-7.2-16-16-16zm16 144c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 64c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faAddressBook = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'address-card';\nvar width = 576;\nvar height = 512;\nvar aliases = [62140,\"contact-card\",\"vcard\"];\nvar unicode = 'f2bb';\nvar svgPathData = 'M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm80 256l64 0c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16L80 384c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80zm-32-96a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zm256-32l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faAddressCard = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'arrow-down';\nvar width = 384;\nvar height = 512;\nvar aliases = [8595];\nvar unicode = 'f063';\nvar svgPathData = 'M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faArrowDown = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'arrow-down-a-z';\nvar width = 576;\nvar height = 512;\nvar aliases = [\"sort-alpha-asc\",\"sort-alpha-down\"];\nvar unicode = 'f15d';\nvar svgPathData = 'M183.6 469.6C177.5 476.2 169 480 160 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L128 365.7 128 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 301.7 32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 320c0-17.7 14.3-32 32-32l128 0c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9L429.3 416l50.7 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-128 0c-12.9 0-24.6-7.8-29.6-19.8s-2.2-25.7 6.9-34.9L402.7 352 352 352c-17.7 0-32-14.3-32-32zM416 32c12.1 0 23.2 6.8 28.6 17.7l64 128 16 32c7.9 15.8 1.5 35-14.3 42.9s-35 1.5-42.9-14.3L460.2 224l-88.4 0-7.2 14.3c-7.9 15.8-27.1 22.2-42.9 14.3s-22.2-27.1-14.3-42.9l16-32 64-128C392.8 38.8 403.9 32 416 32zM395.8 176l40.4 0L416 135.6 395.8 176z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faArrowDownAZ = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'arrow-down-up-across-line';\nvar width = 576;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'e4af';\nvar svgPathData = 'M137.4 502.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 402.7 192 288l352 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0 0-114.7 41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L384 109.3 384 224l-192 0-64 0-96 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0 0 114.7L86.6 361.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96zM128 192l64 0 0-128c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 128zM448 320l-64 0 0 128c0 17.7 14.3 32 32 32s32-14.3 32-32l0-128z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faArrowDownUpAcrossLine = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'arrow-left';\nvar width = 448;\nvar height = 512;\nvar aliases = [8592];\nvar unicode = 'f060';\nvar svgPathData = 'M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faArrowLeft = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'arrow-pointer';\nvar width = 320;\nvar height = 512;\nvar aliases = [\"mouse-pointer\"];\nvar unicode = 'f245';\nvar svgPathData = 'M0 55.2L0 426c0 12.2 9.9 22 22 22c6.3 0 12.4-2.7 16.6-7.5L121.2 346l58.1 116.3c7.9 15.8 27.1 22.2 42.9 14.3s22.2-27.1 14.3-42.9L179.8 320l118.1 0c12.2 0 22.1-9.9 22.1-22.1c0-6.3-2.7-12.3-7.4-16.5L38.6 37.9C34.3 34.1 28.9 32 23.2 32C10.4 32 0 42.4 0 55.2z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faArrowPointer = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'arrow-right';\nvar width = 448;\nvar height = 512;\nvar aliases = [8594];\nvar unicode = 'f061';\nvar svgPathData = 'M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faArrowRight = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'arrow-rotate-left';\nvar width = 512;\nvar height = 512;\nvar aliases = [8634,\"arrow-left-rotate\",\"arrow-rotate-back\",\"arrow-rotate-backward\",\"undo\"];\nvar unicode = 'f0e2';\nvar svgPathData = 'M125.7 160l50.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L48 224c-17.7 0-32-14.3-32-32L16 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faArrowRotateLeft = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'arrow-trend-up';\nvar width = 576;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'e098';\nvar svgPathData = 'M384 160c-17.7 0-32-14.3-32-32s14.3-32 32-32l160 0c17.7 0 32 14.3 32 32l0 160c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-82.7L342.6 374.6c-12.5 12.5-32.8 12.5-45.3 0L192 269.3 54.6 406.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160c12.5-12.5 32.8-12.5 45.3 0L320 306.7 466.7 160 384 160z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faArrowTrendUp = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'arrow-turn-down';\nvar width = 384;\nvar height = 512;\nvar aliases = [\"level-down\"];\nvar unicode = 'f149';\nvar svgPathData = 'M32 64C14.3 64 0 49.7 0 32S14.3 0 32 0l96 0c53 0 96 43 96 96l0 306.7 73.4-73.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3l-128 128c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 402.7 160 96c0-17.7-14.3-32-32-32L32 64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faArrowTurnDown = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'arrow-up';\nvar width = 384;\nvar height = 512;\nvar aliases = [8593];\nvar unicode = 'f062';\nvar svgPathData = 'M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2 160 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faArrowUp = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'arrow-up-right-from-square';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"external-link\"];\nvar unicode = 'f08e';\nvar svgPathData = 'M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l82.7 0L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3l0 82.7c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160c0-17.7-14.3-32-32-32L320 0zM80 32C35.8 32 0 67.8 0 112L0 432c0 44.2 35.8 80 80 80l320 0c44.2 0 80-35.8 80-80l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-320c0-8.8 7.2-16 16-16l112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faArrowUpRightFromSquare = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'arrows-left-right';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"arrows-h\"];\nvar unicode = 'f07e';\nvar svgPathData = 'M406.6 374.6l96-96c12.5-12.5 12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224l-293.5 0 41.4-41.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 288l293.5 0-41.4 41.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faArrowsLeftRight = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'arrows-rotate';\nvar width = 512;\nvar height = 512;\nvar aliases = [128472,\"refresh\",\"sync\"];\nvar unicode = 'f021';\nvar svgPathData = 'M105.1 202.6c7.7-21.8 20.2-42.3 37.8-59.8c62.5-62.5 163.8-62.5 226.3 0L386.3 160 352 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l111.5 0c0 0 0 0 0 0l.4 0c17.7 0 32-14.3 32-32l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 35.2L414.4 97.6c-87.5-87.5-229.3-87.5-316.8 0C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5zM39 289.3c-5 1.5-9.8 4.2-13.7 8.2c-4 4-6.7 8.8-8.1 14c-.3 1.2-.6 2.5-.8 3.8c-.3 1.7-.4 3.4-.4 5.1L16 432c0 17.7 14.3 32 32 32s32-14.3 32-32l0-35.1 17.6 17.5c0 0 0 0 0 0c87.5 87.4 229.3 87.4 316.7 0c24.4-24.4 42.1-53.1 52.9-83.8c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.5 62.5-163.8 62.5-226.3 0l-.1-.1L125.6 352l34.4 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L48.4 288c-1.6 0-3.2 .1-4.8 .3s-3.1 .5-4.6 1z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faArrowsRotate = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'asterisk';\nvar width = 384;\nvar height = 512;\nvar aliases = [10033,61545];\nvar unicode = '2a';\nvar svgPathData = 'M192 32c17.7 0 32 14.3 32 32l0 135.5 111.5-66.9c15.2-9.1 34.8-4.2 43.9 11s4.2 34.8-11 43.9L254.2 256l114.3 68.6c15.2 9.1 20.1 28.7 11 43.9s-28.7 20.1-43.9 11L224 312.5 224 448c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-135.5L48.5 379.4c-15.2 9.1-34.8 4.2-43.9-11s-4.2-34.8 11-43.9L129.8 256 15.5 187.4c-15.2-9.1-20.1-28.7-11-43.9s28.7-20.1 43.9-11L160 199.5 160 64c0-17.7 14.3-32 32-32z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faAsterisk = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'at';\nvar width = 512;\nvar height = 512;\nvar aliases = [61946];\nvar unicode = '40';\nvar svgPathData = 'M256 64C150 64 64 150 64 256s86 192 192 192c17.7 0 32 14.3 32 32s-14.3 32-32 32C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256l0 32c0 53-43 96-96 96c-29.3 0-55.6-13.2-73.2-33.9C320 371.1 289.5 384 256 384c-70.7 0-128-57.3-128-128s57.3-128 128-128c27.9 0 53.7 8.9 74.7 24.1c5.7-5 13.1-8.1 21.3-8.1c17.7 0 32 14.3 32 32l0 80 0 32c0 17.7 14.3 32 32 32s32-14.3 32-32l0-32c0-106-86-192-192-192zm64 192a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faAt = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'bag-shopping';\nvar width = 448;\nvar height = 512;\nvar aliases = [\"shopping-bag\"];\nvar unicode = 'f290';\nvar svgPathData = 'M160 112c0-35.3 28.7-64 64-64s64 28.7 64 64l0 48-128 0 0-48zm-48 48l-64 0c-26.5 0-48 21.5-48 48L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-208c0-26.5-21.5-48-48-48l-64 0 0-48C336 50.1 285.9 0 224 0S112 50.1 112 112l0 48zm24 48a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm152 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faBagShopping = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'ban';\nvar width = 512;\nvar height = 512;\nvar aliases = [128683,\"cancel\"];\nvar unicode = 'f05e';\nvar svgPathData = 'M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faBan = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'barcode';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f02a';\nvar svgPathData = 'M24 32C10.7 32 0 42.7 0 56L0 456c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24L64 56c0-13.3-10.7-24-24-24L24 32zm88 0c-8.8 0-16 7.2-16 16l0 416c0 8.8 7.2 16 16 16s16-7.2 16-16l0-416c0-8.8-7.2-16-16-16zm72 0c-13.3 0-24 10.7-24 24l0 400c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24l0-400c0-13.3-10.7-24-24-24l-16 0zm96 0c-13.3 0-24 10.7-24 24l0 400c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24l0-400c0-13.3-10.7-24-24-24l-16 0zM448 56l0 400c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24l0-400c0-13.3-10.7-24-24-24l-16 0c-13.3 0-24 10.7-24 24zm-64-8l0 416c0 8.8 7.2 16 16 16s16-7.2 16-16l0-416c0-8.8-7.2-16-16-16s-16 7.2-16 16z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faBarcode = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'bars';\nvar width = 448;\nvar height = 512;\nvar aliases = [\"navicon\"];\nvar unicode = 'f0c9';\nvar svgPathData = 'M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faBars = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'bars-staggered';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"reorder\",\"stream\"];\nvar unicode = 'f550';\nvar svgPathData = 'M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM64 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L96 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faBarsStaggered = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'blog';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f781';\nvar svgPathData = 'M192 32c0 17.7 14.3 32 32 32c123.7 0 224 100.3 224 224c0 17.7 14.3 32 32 32s32-14.3 32-32C512 128.9 383.1 0 224 0c-17.7 0-32 14.3-32 32zm0 96c0 17.7 14.3 32 32 32c70.7 0 128 57.3 128 128c0 17.7 14.3 32 32 32s32-14.3 32-32c0-106-86-192-192-192c-17.7 0-32 14.3-32 32zM96 144c0-26.5-21.5-48-48-48S0 117.5 0 144L0 368c0 79.5 64.5 144 144 144s144-64.5 144-144s-64.5-144-144-144l-16 0 0 96 16 0c26.5 0 48 21.5 48 48s-21.5 48-48 48s-48-21.5-48-48l0-224z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faBlog = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'bolt';\nvar width = 448;\nvar height = 512;\nvar aliases = [9889,\"zap\"];\nvar unicode = 'f0e7';\nvar svgPathData = 'M349.4 44.6c5.9-13.7 1.5-29.7-10.6-38.5s-28.6-8-39.9 1.8l-256 224c-10 8.8-13.6 22.9-8.9 35.3S50.7 288 64 288l111.5 0L98.6 467.4c-5.9 13.7-1.5 29.7 10.6 38.5s28.6 8 39.9-1.8l256-224c10-8.8 13.6-22.9 8.9-35.3s-16.6-20.7-30-20.7l-111.5 0L349.4 44.6z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faBolt = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'book-open';\nvar width = 576;\nvar height = 512;\nvar aliases = [128214,128366];\nvar unicode = 'f518';\nvar svgPathData = 'M249.6 471.5c10.8 3.8 22.4-4.1 22.4-15.5l0-377.4c0-4.2-1.6-8.4-5-11C247.4 52 202.4 32 144 32C93.5 32 46.3 45.3 18.1 56.1C6.8 60.5 0 71.7 0 83.8L0 454.1c0 11.9 12.8 20.2 24.1 16.5C55.6 460.1 105.5 448 144 448c33.9 0 79 14 105.6 23.5zm76.8 0C353 462 398.1 448 432 448c38.5 0 88.4 12.1 119.9 22.6c11.3 3.8 24.1-4.6 24.1-16.5l0-370.3c0-12.1-6.8-23.3-18.1-27.6C529.7 45.3 482.5 32 432 32c-58.4 0-103.4 20-123 35.6c-3.3 2.6-5 6.8-5 11L304 456c0 11.4 11.7 19.3 22.4 15.5z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faBookOpen = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'briefcase';\nvar width = 512;\nvar height = 512;\nvar aliases = [128188];\nvar unicode = 'f0b1';\nvar svgPathData = 'M184 48l144 0c4.4 0 8 3.6 8 8l0 40L176 96l0-40c0-4.4 3.6-8 8-8zm-56 8l0 40L64 96C28.7 96 0 124.7 0 160l0 96 192 0 128 0 192 0 0-96c0-35.3-28.7-64-64-64l-64 0 0-40c0-30.9-25.1-56-56-56L184 0c-30.9 0-56 25.1-56 56zM512 288l-192 0 0 32c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-32L0 288 0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-128z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faBriefcase = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'broom';\nvar width = 576;\nvar height = 512;\nvar aliases = [129529];\nvar unicode = 'f51a';\nvar svgPathData = 'M566.6 54.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192-34.7-34.7c-4.2-4.2-10-6.6-16-6.6c-12.5 0-22.6 10.1-22.6 22.6l0 29.1L364.3 320l29.1 0c12.5 0 22.6-10.1 22.6-22.6c0-6-2.4-11.8-6.6-16l-34.7-34.7 192-192zM341.1 353.4L222.6 234.9c-42.7-3.7-85.2 11.7-115.8 42.3l-8 8C76.5 307.5 64 337.7 64 369.2c0 6.8 7.1 11.2 13.2 8.2l51.1-25.5c5-2.5 9.5 4.1 5.4 7.9L7.3 473.4C2.7 477.6 0 483.6 0 489.9C0 502.1 9.9 512 22.1 512l173.3 0c38.8 0 75.9-15.4 103.4-42.8c30.6-30.6 45.9-73.1 42.3-115.8z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faBroom = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'building';\nvar width = 384;\nvar height = 512;\nvar aliases = [127970,61687];\nvar unicode = 'f1ad';\nvar svgPathData = 'M48 0C21.5 0 0 21.5 0 48L0 464c0 26.5 21.5 48 48 48l96 0 0-80c0-26.5 21.5-48 48-48s48 21.5 48 48l0 80 96 0c26.5 0 48-21.5 48-48l0-416c0-26.5-21.5-48-48-48L48 0zM64 240c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zm112-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM80 96l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16zm80 16c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32zM272 96l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faBuilding = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'building-columns';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"bank\",\"institution\",\"museum\",\"university\"];\nvar unicode = 'f19c';\nvar svgPathData = 'M243.4 2.6l-224 96c-14 6-21.8 21-18.7 35.8S16.8 160 32 160l0 8c0 13.3 10.7 24 24 24l400 0c13.3 0 24-10.7 24-24l0-8c15.2 0 28.3-10.7 31.3-25.6s-4.8-29.9-18.7-35.8l-224-96c-8-3.4-17.2-3.4-25.2 0zM128 224l-64 0 0 196.3c-.6 .3-1.2 .7-1.8 1.1l-48 32c-11.7 7.8-17 22.4-12.9 35.9S17.9 512 32 512l448 0c14.1 0 26.5-9.2 30.6-22.7s-1.1-28.1-12.9-35.9l-48-32c-.6-.4-1.2-.7-1.8-1.1L448 224l-64 0 0 192-40 0 0-192-64 0 0 192-48 0 0-192-64 0 0 192-40 0 0-192zM256 64a32 32 0 1 1 0 64 32 32 0 1 1 0-64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faBuildingColumns = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'bullseye';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f140';\nvar svgPathData = 'M448 256A192 192 0 1 0 64 256a192 192 0 1 0 384 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256 80a80 80 0 1 0 0-160 80 80 0 1 0 0 160zm0-224a144 144 0 1 1 0 288 144 144 0 1 1 0-288zM224 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faBullseye = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'calculator';\nvar width = 384;\nvar height = 512;\nvar aliases = [128425];\nvar unicode = 'f1ec';\nvar svgPathData = 'M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384c0-35.3-28.7-64-64-64L64 0zM96 64l192 0c17.7 0 32 14.3 32 32l0 32c0 17.7-14.3 32-32 32L96 160c-17.7 0-32-14.3-32-32l0-32c0-17.7 14.3-32 32-32zm32 160a32 32 0 1 1 -64 0 32 32 0 1 1 64 0zM96 352a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM64 416c0-17.7 14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32zM192 256a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm32 64a32 32 0 1 1 -64 0 32 32 0 1 1 64 0zm64-64a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm32 64a32 32 0 1 1 -64 0 32 32 0 1 1 64 0zM288 448a32 32 0 1 1 0-64 32 32 0 1 1 0 64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCalculator = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'calendar';\nvar width = 448;\nvar height = 512;\nvar aliases = [128197,128198];\nvar unicode = 'f133';\nvar svgPathData = 'M96 32l0 32L48 64C21.5 64 0 85.5 0 112l0 48 448 0 0-48c0-26.5-21.5-48-48-48l-48 0 0-32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 32L160 64l0-32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192L0 192 0 464c0 26.5 21.5 48 48 48l352 0c26.5 0 48-21.5 48-48l0-272z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCalendar = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'calendar-check';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f274';\nvar svgPathData = 'M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 48 0c26.5 0 48 21.5 48 48l0 48L0 160l0-48C0 85.5 21.5 64 48 64l48 0 0-32c0-17.7 14.3-32 32-32zM0 192l448 0 0 272c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 192zM329 305c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-95 95-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0L329 305z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCalendarCheck = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'calendar-days';\nvar width = 448;\nvar height = 512;\nvar aliases = [\"calendar-alt\"];\nvar unicode = 'f073';\nvar svgPathData = 'M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 48 0c26.5 0 48 21.5 48 48l0 48L0 160l0-48C0 85.5 21.5 64 48 64l48 0 0-32c0-17.7 14.3-32 32-32zM0 192l448 0 0 272c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 192zm64 80l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm128 0l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM64 400l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm112 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCalendarDays = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'camera';\nvar width = 512;\nvar height = 512;\nvar aliases = [62258,\"camera-alt\"];\nvar unicode = 'f030';\nvar svgPathData = 'M149.1 64.8L138.7 96 64 96C28.7 96 0 124.7 0 160L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64l-74.7 0L362.9 64.8C356.4 45.2 338.1 32 317.4 32L194.6 32c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCamera = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'caret-down';\nvar width = 320;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f0d7';\nvar svgPathData = 'M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCaretDown = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'cart-shopping';\nvar width = 576;\nvar height = 512;\nvar aliases = [128722,\"shopping-cart\"];\nvar unicode = 'f07a';\nvar svgPathData = 'M0 24C0 10.7 10.7 0 24 0L69.5 0c22 0 41.5 12.8 50.6 32l411 0c26.3 0 45.5 25 38.6 50.4l-41 152.3c-8.5 31.4-37 53.3-69.5 53.3l-288.5 0 5.4 28.5c2.2 11.3 12.1 19.5 23.6 19.5L488 336c13.3 0 24 10.7 24 24s-10.7 24-24 24l-288.3 0c-34.6 0-64.3-24.6-70.7-58.5L77.4 54.5c-.7-3.8-4-6.5-7.9-6.5L24 48C10.7 48 0 37.3 0 24zM128 464a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm336-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCartShopping = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'chart-bar';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"bar-chart\"];\nvar unicode = 'f080';\nvar svgPathData = 'M32 32c17.7 0 32 14.3 32 32l0 336c0 8.8 7.2 16 16 16l400 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L80 480c-44.2 0-80-35.8-80-80L0 64C0 46.3 14.3 32 32 32zm96 96c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32zm32 64l128 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 96l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faChartBar = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'chart-line';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"line-chart\"];\nvar unicode = 'f201';\nvar svgPathData = 'M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faChartLine = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'chart-pie';\nvar width = 576;\nvar height = 512;\nvar aliases = [\"pie-chart\"];\nvar unicode = 'f200';\nvar svgPathData = 'M304 240l0-223.4c0-9 7-16.6 16-16.6C443.7 0 544 100.3 544 224c0 9-7.6 16-16.6 16L304 240zM32 272C32 150.7 122.1 50.3 239 34.3c9.2-1.3 17 6.1 17 15.4L256 288 412.5 444.5c6.7 6.7 6.2 17.7-1.5 23.1C371.8 495.6 323.8 512 272 512C139.5 512 32 404.6 32 272zm526.4 16c9.3 0 16.6 7.8 15.4 17c-7.7 55.9-34.6 105.6-73.9 142.3c-6 5.6-15.4 5.2-21.2-.7L320 288l238.4 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faChartPie = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'chart-simple';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'e473';\nvar svgPathData = 'M160 80c0-26.5 21.5-48 48-48l32 0c26.5 0 48 21.5 48 48l0 352c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48l0-352zM0 272c0-26.5 21.5-48 48-48l32 0c26.5 0 48 21.5 48 48l0 160c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48L0 272zM368 96l32 0c26.5 0 48 21.5 48 48l0 288c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faChartSimple = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'check';\nvar width = 448;\nvar height = 512;\nvar aliases = [10003,10004];\nvar unicode = 'f00c';\nvar svgPathData = 'M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCheck = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'chevron-down';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f078';\nvar svgPathData = 'M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faChevronDown = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'chevron-up';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f077';\nvar svgPathData = 'M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faChevronUp = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'circle';\nvar width = 512;\nvar height = 512;\nvar aliases = [128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915];\nvar unicode = 'f111';\nvar svgPathData = 'M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCircle = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'circle-check';\nvar width = 512;\nvar height = 512;\nvar aliases = [61533,\"check-circle\"];\nvar unicode = 'f058';\nvar svgPathData = 'M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCircleCheck = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'circle-exclamation';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"exclamation-circle\"];\nvar unicode = 'f06a';\nvar svgPathData = 'M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCircleExclamation = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'circle-info';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"info-circle\"];\nvar unicode = 'f05a';\nvar svgPathData = 'M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCircleInfo = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'circle-question';\nvar width = 512;\nvar height = 512;\nvar aliases = [62108,\"question-circle\"];\nvar unicode = 'f059';\nvar svgPathData = 'M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3l58.3 0c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24l0-13.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1l-58.3 0c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCircleQuestion = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'circle-user';\nvar width = 512;\nvar height = 512;\nvar aliases = [62142,\"user-circle\"];\nvar unicode = 'f2bd';\nvar svgPathData = 'M399 384.2C376.9 345.8 335.4 320 288 320l-64 0c-47.4 0-88.9 25.8-111 64.2c35.2 39.2 86.2 63.8 143 63.8s107.8-24.7 143-63.8zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256 16a72 72 0 1 0 0-144 72 72 0 1 0 0 144z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCircleUser = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'circle-xmark';\nvar width = 512;\nvar height = 512;\nvar aliases = [61532,\"times-circle\",\"xmark-circle\"];\nvar unicode = 'f057';\nvar svgPathData = 'M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCircleXmark = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'city';\nvar width = 640;\nvar height = 512;\nvar aliases = [127961];\nvar unicode = 'f64f';\nvar svgPathData = 'M480 48c0-26.5-21.5-48-48-48L336 0c-26.5 0-48 21.5-48 48l0 48-64 0 0-72c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 72-64 0 0-72c0-13.3-10.7-24-24-24S64 10.7 64 24l0 72L48 96C21.5 96 0 117.5 0 144l0 96L0 464c0 26.5 21.5 48 48 48l256 0 32 0 96 0 160 0c26.5 0 48-21.5 48-48l0-224c0-26.5-21.5-48-48-48l-112 0 0-144zm96 320l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16zM240 416l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16zM128 400c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32zM560 256c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0zM256 176l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16zM112 160c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0zM256 304c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32zM112 320l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16zm304-48l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16zM400 64c8.8 0 16 7.2 16 16l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0zm16 112l0 32c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-32c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCity = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'clock';\nvar width = 512;\nvar height = 512;\nvar aliases = [128339,\"clock-four\"];\nvar unicode = 'f017';\nvar svgPathData = 'M256 0a256 256 0 1 1 0 512A256 256 0 1 1 256 0zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faClock = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'clock-rotate-left';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"history\"];\nvar unicode = 'f1da';\nvar svgPathData = 'M75 75L41 41C25.9 25.9 0 36.6 0 57.9L0 168c0 13.3 10.7 24 24 24l110.1 0c21.4 0 32.1-25.9 17-41l-30.8-30.8C155 85.5 203 64 256 64c106 0 192 86 192 192s-86 192-192 192c-40.8 0-78.6-12.7-109.7-34.4c-14.5-10.1-34.4-6.6-44.6 7.9s-6.6 34.4 7.9 44.6C151.2 495 201.7 512 256 512c141.4 0 256-114.6 256-256S397.4 0 256 0C185.3 0 121.3 28.7 75 75zm181 53c-13.3 0-24 10.7-24 24l0 104c0 6.4 2.5 12.5 7 17l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-65-65 0-94.1c0-13.3-10.7-24-24-24z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faClockRotateLeft = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'cloud-arrow-up';\nvar width = 640;\nvar height = 512;\nvar aliases = [62338,\"cloud-upload\",\"cloud-upload-alt\"];\nvar unicode = 'f0ee';\nvar svgPathData = 'M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128l-368 0zm79-217c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l39-39L296 392c0 13.3 10.7 24 24 24s24-10.7 24-24l0-134.1 39 39c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-80-80c-9.4-9.4-24.6-9.4-33.9 0l-80 80z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCloudArrowUp = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'clover';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'e139';\nvar svgPathData = 'M216.6 49.9C205.1 38.5 189.5 32 173.3 32C139.4 32 112 59.4 112 93.3l0 4.9c0 12 3.3 23.7 9.4 34l18.8 31.3c1.1 1.8 1.2 3.1 1 4.2c-.2 1.2-.8 2.5-2 3.6s-2.4 1.8-3.6 2c-1 .2-2.4 .1-4.2-1l-31.3-18.8c-10.3-6.2-22-9.4-34-9.4l-4.9 0C27.4 144 0 171.4 0 205.3c0 16.2 6.5 31.8 17.9 43.3l1.2 1.2c3.4 3.4 3.4 9 0 12.4l-1.2 1.2C6.5 274.9 0 290.5 0 306.7C0 340.6 27.4 368 61.3 368l4.9 0c12 0 23.7-3.3 34-9.4l31.3-18.8c1.8-1.1 3.1-1.2 4.2-1c1.2 .2 2.5 .8 3.6 2s1.8 2.4 2 3.6c.2 1 .1 2.4-1 4.2l-18.8 31.3c-6.2 10.3-9.4 22-9.4 34l0 4.9c0 33.8 27.4 61.3 61.3 61.3c16.2 0 31.8-6.5 43.3-17.9l1.2-1.2c3.4-3.4 9-3.4 12.4 0l1.2 1.2c11.5 11.5 27.1 17.9 43.3 17.9c33.8 0 61.3-27.4 61.3-61.3l0-4.9c0-12-3.3-23.7-9.4-34l-18.8-31.3c-1.1-1.8-1.2-3.1-1-4.2c.2-1.2 .8-2.5 2-3.6s2.4-1.8 3.6-2c1-.2 2.4-.1 4.2 1l31.3 18.8c10.3 6.2 22 9.4 34 9.4l4.9 0c33.8 0 61.3-27.4 61.3-61.3c0-16.2-6.5-31.8-17.9-43.3l-1.2-1.2c-3.4-3.4-3.4-9 0-12.4l1.2-1.2c11.5-11.5 17.9-27.1 17.9-43.3c0-33.8-27.4-61.3-61.3-61.3l-4.9 0c-12 0-23.7 3.3-34 9.4l-31.3 18.8c-1.8 1.1-3.1 1.2-4.2 1c-1.2-.2-2.5-.8-3.6-2s-1.8-2.4-2-3.6c-.2-1-.1-2.4 1-4.2l18.8-31.3c6.2-10.3 9.4-22 9.4-34l0-4.9C336 59.4 308.6 32 274.7 32c-16.2 0-31.8 6.5-43.3 17.9l-1.2 1.2c-3.4 3.4-9 3.4-12.4 0l-1.2-1.2z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faClover = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'code';\nvar width = 640;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f121';\nvar svgPathData = 'M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3L562.7 256l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCode = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'code-compare';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'e13a';\nvar svgPathData = 'M320 488c0 9.5-5.6 18.1-14.2 21.9s-18.8 2.3-25.8-4.1l-80-72c-5.1-4.6-7.9-11-7.9-17.8s2.9-13.3 7.9-17.8l80-72c7-6.3 17.2-7.9 25.8-4.1s14.2 12.4 14.2 21.9l0 40 16 0c35.3 0 64-28.7 64-64l0-166.7C371.7 141 352 112.8 352 80c0-44.2 35.8-80 80-80s80 35.8 80 80c0 32.8-19.7 61-48 73.3L464 320c0 70.7-57.3 128-128 128l-16 0 0 40zM456 80a24 24 0 1 0 -48 0 24 24 0 1 0 48 0zM192 24c0-9.5 5.6-18.1 14.2-21.9s18.8-2.3 25.8 4.1l80 72c5.1 4.6 7.9 11 7.9 17.8s-2.9 13.3-7.9 17.8l-80 72c-7 6.3-17.2 7.9-25.8 4.1s-14.2-12.4-14.2-21.9l0-40-16 0c-35.3 0-64 28.7-64 64l0 166.7c28.3 12.3 48 40.5 48 73.3c0 44.2-35.8 80-80 80s-80-35.8-80-80c0-32.8 19.7-61 48-73.3L48 192c0-70.7 57.3-128 128-128l16 0 0-40zM56 432a24 24 0 1 0 48 0 24 24 0 1 0 -48 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCodeCompare = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'comment';\nvar width = 512;\nvar height = 512;\nvar aliases = [128489,61669];\nvar unicode = 'f075';\nvar svgPathData = 'M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c0 0 0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faComment = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'comment-sms';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"sms\"];\nvar unicode = 'f7cd';\nvar svgPathData = 'M256 448c141.4 0 256-93.1 256-208S397.4 32 256 32S0 125.1 0 240c0 45.1 17.7 86.8 47.7 120.9c-1.9 24.5-11.4 46.3-21.4 62.9c-5.5 9.2-11.1 16.6-15.2 21.6c-2.1 2.5-3.7 4.4-4.9 5.7c-.6 .6-1 1.1-1.3 1.4l-.3 .3c0 0 0 0 0 0c0 0 0 0 0 0s0 0 0 0s0 0 0 0c-4.6 4.6-5.9 11.4-3.4 17.4c2.5 6 8.3 9.9 14.8 9.9c28.7 0 57.6-8.9 81.6-19.3c22.9-10 42.4-21.9 54.3-30.6c31.8 11.5 67 17.9 104.1 17.9zM96 212.8c0-20.3 16.5-36.8 36.8-36.8l19.2 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-19.2 0c-2.7 0-4.8 2.2-4.8 4.8c0 1.6 .8 3.1 2.2 4l29.4 19.6c10.3 6.8 16.4 18.3 16.4 30.7c0 20.3-16.5 36.8-36.8 36.8L112 304c-8.8 0-16-7.2-16-16s7.2-16 16-16l27.2 0c2.7 0 4.8-2.2 4.8-4.8c0-1.6-.8-3.1-2.2-4l-29.4-19.6C102.2 236.7 96 225.2 96 212.8zM372.8 176l19.2 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-19.2 0c-2.7 0-4.8 2.2-4.8 4.8c0 1.6 .8 3.1 2.2 4l29.4 19.6c10.2 6.8 16.4 18.3 16.4 30.7c0 20.3-16.5 36.8-36.8 36.8L352 304c-8.8 0-16-7.2-16-16s7.2-16 16-16l27.2 0c2.7 0 4.8-2.2 4.8-4.8c0-1.6-.8-3.1-2.2-4l-29.4-19.6c-10.2-6.8-16.4-18.3-16.4-30.7c0-20.3 16.5-36.8 36.8-36.8zm-152 6.4L256 229.3l35.2-46.9c4.1-5.5 11.3-7.8 17.9-5.6s10.9 8.3 10.9 15.2l0 96c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48-19.2 25.6c-3 4-7.8 6.4-12.8 6.4s-9.8-2.4-12.8-6.4L224 240l0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-96c0-6.9 4.4-13 10.9-15.2s13.7 .1 17.9 5.6z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCommentSms = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'compass-drafting';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"drafting-compass\"];\nvar unicode = 'f568';\nvar svgPathData = 'M352 96c0 14.3-3.1 27.9-8.8 40.2L396 227.4c-23.7 25.3-54.2 44.1-88.5 53.6L256 192c0 0 0 0 0 0s0 0 0 0l-68 117.5c21.5 6.8 44.3 10.5 68.1 10.5c70.7 0 133.8-32.7 174.9-84c11.1-13.8 31.2-16 45-5s16 31.2 5 45C428.1 341.8 347 384 256 384c-35.4 0-69.4-6.4-100.7-18.1L98.7 463.7C94 471.8 87 478.4 78.6 482.6L23.2 510.3c-5 2.5-10.9 2.2-15.6-.7S0 501.5 0 496l0-55.4c0-8.4 2.2-16.7 6.5-24.1l60-103.7C53.7 301.6 41.8 289.3 31.2 276c-11.1-13.8-8.8-33.9 5-45s33.9-8.8 45 5c5.7 7.1 11.8 13.8 18.2 20.1l69.4-119.9c-5.6-12.2-8.8-25.8-8.8-40.2c0-53 43-96 96-96s96 43 96 96zm21 297.9c32.6-12.8 62.5-30.8 88.9-52.9l43.7 75.5c4.2 7.3 6.5 15.6 6.5 24.1l0 55.4c0 5.5-2.9 10.7-7.6 13.6s-10.6 3.2-15.6 .7l-55.4-27.7c-8.4-4.2-15.4-10.8-20.1-18.9L373 393.9zM256 128a32 32 0 1 0 0-64 32 32 0 1 0 0 64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCompassDrafting = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'compress';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f066';\nvar svgPathData = 'M160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96zM32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM352 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 320c-17.7 0-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCompress = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'cookie';\nvar width = 512;\nvar height = 512;\nvar aliases = [127850];\nvar unicode = 'f563';\nvar svgPathData = 'M247.2 17c-22.1-3.1-44.6 .9-64.4 11.4l-74 39.5C89.1 78.4 73.2 94.9 63.4 115L26.7 190.6c-9.8 20.1-13 42.9-9.1 64.9l14.5 82.8c3.9 22.1 14.6 42.3 30.7 57.9l60.3 58.4c16.1 15.6 36.6 25.6 58.7 28.7l83 11.7c22.1 3.1 44.6-.9 64.4-11.4l74-39.5c19.7-10.5 35.6-27 45.4-47.2l36.7-75.5c9.8-20.1 13-42.9 9.1-64.9l-14.6-82.8c-3.9-22.1-14.6-42.3-30.7-57.9L388.9 57.5c-16.1-15.6-36.6-25.6-58.7-28.7L247.2 17zM208 144a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM144 336a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm224-64a32 32 0 1 1 0 64 32 32 0 1 1 0-64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCookie = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'copy';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f0c5';\nvar svgPathData = 'M208 0L332.1 0c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9L448 336c0 26.5-21.5 48-48 48l-192 0c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48zM48 128l80 0 0 64-64 0 0 256 192 0 0-32 64 0 0 48c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 176c0-26.5 21.5-48 48-48z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCopy = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'credit-card';\nvar width = 576;\nvar height = 512;\nvar aliases = [128179,62083,\"credit-card-alt\"];\nvar unicode = 'f09d';\nvar svgPathData = 'M64 32C28.7 32 0 60.7 0 96l0 32 576 0 0-32c0-35.3-28.7-64-64-64L64 32zM576 224L0 224 0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-192zM112 352l64 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm112 16c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCreditCard = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'crop';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f125';\nvar svgPathData = 'M448 109.3l54.6-54.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L402.7 64 160 64l0 64 178.7 0L128 338.7 128 32c0-17.7-14.3-32-32-32S64 14.3 64 32l0 32L32 64C14.3 64 0 78.3 0 96s14.3 32 32 32l32 0 0 256c0 35.3 28.7 64 64 64l224 0 0-64-178.7 0L384 173.3 384 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-32 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0 0-274.7z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCrop = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'crop-simple';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"crop-alt\"];\nvar unicode = 'f565';\nvar svgPathData = 'M128 32c0-17.7-14.3-32-32-32S64 14.3 64 32l0 32L32 64C14.3 64 0 78.3 0 96s14.3 32 32 32l32 0 0 256c0 35.3 28.7 64 64 64l224 0 0-64-224 0 0-352zM384 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-32 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0 0-256c0-35.3-28.7-64-64-64L160 64l0 64 224 0 0 352z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCropSimple = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'cross';\nvar width = 384;\nvar height = 512;\nvar aliases = [128327,10013];\nvar unicode = 'f654';\nvar svgPathData = 'M176 0c-26.5 0-48 21.5-48 48l0 80-80 0c-26.5 0-48 21.5-48 48l0 32c0 26.5 21.5 48 48 48l80 0 0 208c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-208 80 0c26.5 0 48-21.5 48-48l0-32c0-26.5-21.5-48-48-48l-80 0 0-80c0-26.5-21.5-48-48-48L176 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faCross = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'd';\nvar width = 384;\nvar height = 512;\nvar aliases = [100];\nvar unicode = '44';\nvar svgPathData = 'M0 96C0 60.7 28.7 32 64 32l96 0c123.7 0 224 100.3 224 224s-100.3 224-224 224l-96 0c-35.3 0-64-28.7-64-64L0 96zm160 0L64 96l0 320 96 0c88.4 0 160-71.6 160-160s-71.6-160-160-160z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faD = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'database';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f1c0';\nvar svgPathData = 'M448 80l0 48c0 44.2-100.3 80-224 80S0 172.2 0 128L0 80C0 35.8 100.3 0 224 0S448 35.8 448 80zM393.2 214.7c20.8-7.4 39.9-16.9 54.8-28.6L448 288c0 44.2-100.3 80-224 80S0 332.2 0 288L0 186.1c14.9 11.8 34 21.2 54.8 28.6C99.7 230.7 159.5 240 224 240s124.3-9.3 169.2-25.3zM0 346.1c14.9 11.8 34 21.2 54.8 28.6C99.7 390.7 159.5 400 224 400s124.3-9.3 169.2-25.3c20.8-7.4 39.9-16.9 54.8-28.6l0 85.9c0 44.2-100.3 80-224 80S0 476.2 0 432l0-85.9z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faDatabase = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'delete-left';\nvar width = 576;\nvar height = 512;\nvar aliases = [9003,\"backspace\"];\nvar unicode = 'f55a';\nvar svgPathData = 'M576 128c0-35.3-28.7-64-64-64L205.3 64c-17 0-33.3 6.7-45.3 18.7L9.4 233.4c-6 6-9.4 14.1-9.4 22.6s3.4 16.6 9.4 22.6L160 429.3c12 12 28.3 18.7 45.3 18.7L512 448c35.3 0 64-28.7 64-64l0-256zM271 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faDeleteLeft = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'desktop';\nvar width = 576;\nvar height = 512;\nvar aliases = [128421,61704,\"desktop-alt\"];\nvar unicode = 'f390';\nvar svgPathData = 'M64 0C28.7 0 0 28.7 0 64L0 352c0 35.3 28.7 64 64 64l176 0-10.7 32L160 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l256 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-69.3 0L336 416l176 0c35.3 0 64-28.7 64-64l0-288c0-35.3-28.7-64-64-64L64 0zM512 64l0 224L64 288 64 64l448 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faDesktop = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'diagram-project';\nvar width = 576;\nvar height = 512;\nvar aliases = [\"project-diagram\"];\nvar unicode = 'f542';\nvar svgPathData = 'M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 16 192 0 0-16c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-16-192 0 0 16c0 1.7-.1 3.4-.3 5L272 288l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96c0-1.7 .1-3.4 .3-5L144 224l-96 0c-26.5 0-48-21.5-48-48L0 80z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faDiagramProject = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'diamond';\nvar width = 512;\nvar height = 512;\nvar aliases = [9830];\nvar unicode = 'f219';\nvar svgPathData = 'M284.3 11.7c-15.6-15.6-40.9-15.6-56.6 0l-216 216c-15.6 15.6-15.6 40.9 0 56.6l216 216c15.6 15.6 40.9 15.6 56.6 0l216-216c15.6-15.6 15.6-40.9 0-56.6l-216-216z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faDiamond = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'display';\nvar width = 576;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'e163';\nvar svgPathData = 'M64 0C28.7 0 0 28.7 0 64L0 352c0 35.3 28.7 64 64 64l176 0-10.7 32L160 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l256 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-69.3 0L336 416l176 0c35.3 0 64-28.7 64-64l0-288c0-35.3-28.7-64-64-64L64 0zM512 64l0 288L64 352 64 64l448 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faDisplay = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'download';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f019';\nvar svgPathData = 'M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 242.7-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7 288 32zM64 352c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-101.5 0-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352 64 352zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faDownload = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'e';\nvar width = 320;\nvar height = 512;\nvar aliases = [101];\nvar unicode = '45';\nvar svgPathData = 'M64 32C28.7 32 0 60.7 0 96L0 256 0 416c0 35.3 28.7 64 64 64l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L64 416l0-128 160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L64 224 64 96l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L64 32z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faE = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'envelope';\nvar width = 512;\nvar height = 512;\nvar aliases = [128386,9993,61443];\nvar unicode = 'f0e0';\nvar svgPathData = 'M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48L48 64zM0 176L0 384c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-208L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faEnvelope = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'equals';\nvar width = 448;\nvar height = 512;\nvar aliases = [62764];\nvar unicode = '3d';\nvar svgPathData = 'M48 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l352 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L48 128zm0 192c-17.7 0-32 14.3-32 32s14.3 32 32 32l352 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L48 320z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faEquals = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'eraser';\nvar width = 576;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f12d';\nvar svgPathData = 'M290.7 57.4L57.4 290.7c-25 25-25 65.5 0 90.5l80 80c12 12 28.3 18.7 45.3 18.7L288 480l9.4 0L512 480c17.7 0 32-14.3 32-32s-14.3-32-32-32l-124.1 0L518.6 285.3c25-25 25-65.5 0-90.5L381.3 57.4c-25-25-65.5-25-90.5 0zM297.4 416l-9.4 0-105.4 0-80-80L227.3 211.3 364.7 348.7 297.4 416z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faEraser = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'eye';\nvar width = 576;\nvar height = 512;\nvar aliases = [128065];\nvar unicode = 'f06e';\nvar svgPathData = 'M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faEye = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'eye-slash';\nvar width = 640;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f070';\nvar svgPathData = 'M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zM223.1 149.5C248.6 126.2 282.7 112 320 112c79.5 0 144 64.5 144 144c0 24.9-6.3 48.3-17.4 68.7L408 294.5c8.4-19.3 10.6-41.4 4.8-63.3c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zM373 389.9c-16.4 6.5-34.3 10.1-53 10.1c-79.5 0-144-64.5-144-144c0-6.9 .5-13.6 1.4-20.2L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5L373 389.9z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faEyeSlash = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'file';\nvar width = 384;\nvar height = 512;\nvar aliases = [128196,128459,61462];\nvar unicode = 'f15b';\nvar svgPathData = 'M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 288c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFile = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'file-arrow-down';\nvar width = 384;\nvar height = 512;\nvar aliases = [\"file-download\"];\nvar unicode = 'f56d';\nvar svgPathData = 'M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM216 232l0 102.1 31-31c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-72 72c-9.4 9.4-24.6 9.4-33.9 0l-72-72c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l31 31L168 232c0-13.3 10.7-24 24-24s24 10.7 24 24z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFileArrowDown = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'file-circle-plus';\nvar width = 576;\nvar height = 512;\nvar aliases = [58606];\nvar unicode = 'e494';\nvar svgPathData = 'M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 38.6C310.1 219.5 256 287.4 256 368c0 59.1 29.1 111.3 73.7 143.3c-3.2 .5-6.4 .7-9.7 .7L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zm48 96a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm16 80c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 48-48 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 0 48c0 8.8 7.2 16 16 16s16-7.2 16-16l0-48 48 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0 0-48z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFileCirclePlus = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'file-code';\nvar width = 384;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f1c9';\nvar svgPathData = 'M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM153 289l-31 31 31 31c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L71 337c-9.4-9.4-9.4-24.6 0-33.9l48-48c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9zM265 255l48 48c9.4 9.4 9.4 24.6 0 33.9l-48 48c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l31-31-31-31c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFileCode = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'file-contract';\nvar width = 384;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f56c';\nvar svgPathData = 'M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM80 64l64 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L80 96c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l64 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm54.2 253.8c-6.1 20.3-24.8 34.2-46 34.2L80 416c-8.8 0-16-7.2-16-16s7.2-16 16-16l8.2 0c7.1 0 13.3-4.6 15.3-11.4l14.9-49.5c3.4-11.3 13.8-19.1 25.6-19.1s22.2 7.7 25.6 19.1l11.6 38.6c7.4-6.2 16.8-9.7 26.8-9.7c15.9 0 30.4 9 37.5 23.2l4.4 8.8 54.1 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0c-6.1 0-11.6-3.4-14.3-8.8l-8.8-17.7c-1.7-3.4-5.1-5.5-8.8-5.5s-7.2 2.1-8.8 5.5l-8.8 17.7c-2.9 5.9-9.2 9.4-15.7 8.8s-12.1-5.1-13.9-11.3L144 349l-9.8 32.8z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFileContract = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'file-export';\nvar width = 576;\nvar height = 512;\nvar aliases = [\"arrow-right-from-file\"];\nvar unicode = 'f56e';\nvar svgPathData = 'M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 128-168 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l168 0 0 112c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zM384 336l0-48 110.1 0-39-39c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l80 80c9.4 9.4 9.4 24.6 0 33.9l-80 80c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l39-39L384 336zm0-208l-128 0L256 0 384 128z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFileExport = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'file-image';\nvar width = 384;\nvar height = 512;\nvar aliases = [128443];\nvar unicode = 'f1c5';\nvar svgPathData = 'M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM64 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm152 32c5.3 0 10.2 2.6 13.2 6.9l88 128c3.4 4.9 3.7 11.3 1 16.5s-8.2 8.6-14.2 8.6l-88 0-40 0-48 0-48 0c-5.8 0-11.1-3.1-13.9-8.1s-2.8-11.2 .2-16.1l48-80c2.9-4.8 8.1-7.8 13.7-7.8s10.8 2.9 13.7 7.8l12.8 21.4 48.3-70.2c3-4.3 7.9-6.9 13.2-6.9z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFileImage = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'file-invoice-dollar';\nvar width = 384;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f571';\nvar svgPathData = 'M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM64 80c0-8.8 7.2-16 16-16l64 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L80 96c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16l64 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16zm128 72c8.8 0 16 7.2 16 16l0 17.3c8.5 1.2 16.7 3.1 24.1 5.1c8.5 2.3 13.6 11 11.3 19.6s-11 13.6-19.6 11.3c-11.1-3-22-5.2-32.1-5.3c-8.4-.1-17.4 1.8-23.6 5.5c-5.7 3.4-8.1 7.3-8.1 12.8c0 3.7 1.3 6.5 7.3 10.1c6.9 4.1 16.6 7.1 29.2 10.9l.5 .1s0 0 0 0s0 0 0 0c11.3 3.4 25.3 7.6 36.3 14.6c12.1 7.6 22.4 19.7 22.7 38.2c.3 19.3-9.6 33.3-22.9 41.6c-7.7 4.8-16.4 7.6-25.1 9.1l0 17.1c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-17.8c-11.2-2.1-21.7-5.7-30.9-8.9c0 0 0 0 0 0c-2.1-.7-4.2-1.4-6.2-2.1c-8.4-2.8-12.9-11.9-10.1-20.2s11.9-12.9 20.2-10.1c2.5 .8 4.8 1.6 7.1 2.4c0 0 0 0 0 0s0 0 0 0s0 0 0 0c13.6 4.6 24.6 8.4 36.3 8.7c9.1 .3 17.9-1.7 23.7-5.3c5.1-3.2 7.9-7.3 7.8-14c-.1-4.6-1.8-7.8-7.7-11.6c-6.8-4.3-16.5-7.4-29-11.2l-1.6-.5s0 0 0 0c-11-3.3-24.3-7.3-34.8-13.7c-12-7.2-22.6-18.9-22.7-37.3c-.1-19.4 10.8-32.8 23.8-40.5c7.5-4.4 15.8-7.2 24.1-8.7l0-17.3c0-8.8 7.2-16 16-16z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFileInvoiceDollar = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'file-lines';\nvar width = 384;\nvar height = 512;\nvar aliases = [128441,128462,61686,\"file-alt\",\"file-text\"];\nvar unicode = 'f15c';\nvar svgPathData = 'M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM112 256l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFileLines = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'file-pdf';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f1c1';\nvar svgPathData = 'M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 144-208 0c-35.3 0-64 28.7-64 64l0 144-48 0c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zM176 352l32 0c30.9 0 56 25.1 56 56s-25.1 56-56 56l-16 0 0 32c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48 0-80c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0 0 48 16 0zm96-80l32 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-32 0c-8.8 0-16-7.2-16-16l0-128c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-16 0 0 96 16 0zm80-112c0-8.8 7.2-16 16-16l48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 32 32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-64 0-64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFilePdf = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'file-pen';\nvar width = 576;\nvar height = 512;\nvar aliases = [128221,\"file-edit\"];\nvar unicode = 'f31c';\nvar svgPathData = 'M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 125.7-86.8 86.8c-10.3 10.3-17.5 23.1-21 37.2l-18.7 74.9c-2.3 9.2-1.8 18.8 1.3 27.5L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zM549.8 235.7l14.4 14.4c15.6 15.6 15.6 40.9 0 56.6l-29.4 29.4-71-71 29.4-29.4c15.6-15.6 40.9-15.6 56.6 0zM311.9 417L441.1 287.8l71 71L382.9 487.9c-4.1 4.1-9.2 7-14.9 8.4l-60.1 15c-5.5 1.4-11.2-.2-15.2-4.2s-5.6-9.7-4.2-15.2l15-60.1c1.4-5.6 4.3-10.8 8.4-14.9z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFilePen = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'file-zipper';\nvar width = 384;\nvar height = 512;\nvar aliases = [\"file-archive\"];\nvar unicode = 'f1c6';\nvar svgPathData = 'M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM96 48c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16zm-6.3 71.8c3.7-14 16.4-23.8 30.9-23.8l14.8 0c14.5 0 27.2 9.7 30.9 23.8l23.5 88.2c1.4 5.4 2.1 10.9 2.1 16.4c0 35.2-28.8 63.7-64 63.7s-64-28.5-64-63.7c0-5.5 .7-11.1 2.1-16.4l23.5-88.2zM112 336c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFileZipper = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'fill';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f575';\nvar svgPathData = 'M86.6 9.4C74.1-3.1 53.9-3.1 41.4 9.4s-12.5 32.8 0 45.3L122.7 136 30.6 228.1c-37.5 37.5-37.5 98.3 0 135.8L148.1 481.4c37.5 37.5 98.3 37.5 135.8 0L474.3 290.9c28.1-28.1 28.1-73.7 0-101.8L322.9 37.7c-28.1-28.1-73.7-28.1-101.8 0L168 90.7 86.6 9.4zM168 181.3l49.4 49.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L213.3 136l53.1-53.1c3.1-3.1 8.2-3.1 11.3 0L429.1 234.3c3.1 3.1 3.1 8.2 0 11.3L386.7 288 67.5 288c1.4-5.4 4.2-10.4 8.4-14.6L168 181.3z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFill = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'filter';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f0b0';\nvar svgPathData = 'M3.9 54.9C10.5 40.9 24.5 32 40 32l432 0c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9 320 448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6l0-79.1L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFilter = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'fingerprint';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f577';\nvar svgPathData = 'M48 256C48 141.1 141.1 48 256 48c63.1 0 119.6 28.1 157.8 72.5c8.6 10.1 23.8 11.2 33.8 2.6s11.2-23.8 2.6-33.8C403.3 34.6 333.7 0 256 0C114.6 0 0 114.6 0 256l0 40c0 13.3 10.7 24 24 24s24-10.7 24-24l0-40zm458.5-52.9c-2.7-13-15.5-21.3-28.4-18.5s-21.3 15.5-18.5 28.4c2.9 13.9 4.5 28.3 4.5 43.1l0 40c0 13.3 10.7 24 24 24s24-10.7 24-24l0-40c0-18.1-1.9-35.8-5.5-52.9zM256 80c-19 0-37.4 3-54.5 8.6c-15.2 5-18.7 23.7-8.3 35.9c7.1 8.3 18.8 10.8 29.4 7.9c10.6-2.9 21.8-4.4 33.4-4.4c70.7 0 128 57.3 128 128l0 24.9c0 25.2-1.5 50.3-4.4 75.3c-1.7 14.6 9.4 27.8 24.2 27.8c11.8 0 21.9-8.6 23.3-20.3c3.3-27.4 5-55 5-82.7l0-24.9c0-97.2-78.8-176-176-176zM150.7 148.7c-9.1-10.6-25.3-11.4-33.9-.4C93.7 178 80 215.4 80 256l0 24.9c0 24.2-2.6 48.4-7.8 71.9C68.8 368.4 80.1 384 96.1 384c10.5 0 19.9-7 22.2-17.3c6.4-28.1 9.7-56.8 9.7-85.8l0-24.9c0-27.2 8.5-52.4 22.9-73.1c7.2-10.4 8-24.6-.2-34.2zM256 160c-53 0-96 43-96 96l0 24.9c0 35.9-4.6 71.5-13.8 106.1c-3.8 14.3 6.7 29 21.5 29c9.5 0 17.9-6.2 20.4-15.4c10.5-39 15.9-79.2 15.9-119.7l0-24.9c0-28.7 23.3-52 52-52s52 23.3 52 52l0 24.9c0 36.3-3.5 72.4-10.4 107.9c-2.7 13.9 7.7 27.2 21.8 27.2c10.2 0 19-7 21-17c7.7-38.8 11.6-78.3 11.6-118.1l0-24.9c0-53-43-96-96-96zm24 96c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 24.9c0 59.9-11 119.3-32.5 175.2l-5.9 15.3c-4.8 12.4 1.4 26.3 13.8 31s26.3-1.4 31-13.8l5.9-15.3C267.9 411.9 280 346.7 280 280.9l0-24.9z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFingerprint = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'flag-checkered';\nvar width = 448;\nvar height = 512;\nvar aliases = [127937];\nvar unicode = 'f11e';\nvar svgPathData = 'M32 0C49.7 0 64 14.3 64 32l0 16 69-17.2c38.1-9.5 78.3-5.1 113.5 12.5c46.3 23.2 100.8 23.2 147.1 0l9.6-4.8C423.8 28.1 448 43.1 448 66.1l0 279.7c0 13.3-8.3 25.3-20.8 30l-34.7 13c-46.2 17.3-97.6 14.6-141.7-7.4c-37.9-19-81.3-23.7-122.5-13.4L64 384l0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-80 0-66L0 64 0 32C0 14.3 14.3 0 32 0zM64 187.1l64-13.9 0 65.5L64 252.6 64 318l48.8-12.2c5.1-1.3 10.1-2.4 15.2-3.3l0-63.9 38.9-8.4c8.3-1.8 16.7-2.5 25.1-2.1l0-64c13.6 .4 27.2 2.6 40.4 6.4l23.6 6.9 0 66.7-41.7-12.3c-7.3-2.1-14.8-3.4-22.3-3.8l0 71.4c21.8 1.9 43.3 6.7 64 14.4l0-69.8 22.7 6.7c13.5 4 27.3 6.4 41.3 7.4l0-64.2c-7.8-.8-15.6-2.3-23.2-4.5l-40.8-12 0-62c-13-3.8-25.8-8.8-38.2-15c-8.2-4.1-16.9-7-25.8-8.8l0 72.4c-13-.4-26 .8-38.7 3.6L128 173.2 128 98 64 114l0 73.1zM320 335.7c16.8 1.5 33.9-.7 50-6.8l14-5.2 0-71.7-7.9 1.8c-18.4 4.3-37.3 5.7-56.1 4.5l0 77.4zm64-149.4l0-70.8c-20.9 6.1-42.4 9.1-64 9.1l0 69.4c13.9 1.4 28 .5 41.7-2.6l22.3-5.2z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFlagCheckered = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'floppy-disk';\nvar width = 448;\nvar height = 512;\nvar aliases = [128190,128426,\"save\"];\nvar unicode = 'f0c7';\nvar svgPathData = 'M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-242.7c0-17-6.7-33.3-18.7-45.3L352 50.7C340 38.7 323.7 32 306.7 32L64 32zm0 96c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32L96 224c-17.7 0-32-14.3-32-32l0-64zM224 288a64 64 0 1 1 0 128 64 64 0 1 1 0-128z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFloppyDisk = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'font';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f031';\nvar svgPathData = 'M254 52.8C249.3 40.3 237.3 32 224 32s-25.3 8.3-30 20.8L57.8 416 32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-1.8 0 18-48 159.6 0 18 48-1.8 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-25.8 0L254 52.8zM279.8 304l-111.6 0L224 155.1 279.8 304z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faFont = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'g';\nvar width = 448;\nvar height = 512;\nvar aliases = [103];\nvar unicode = '47';\nvar svgPathData = 'M224 96C135.6 96 64 167.6 64 256s71.6 160 160 160c77.4 0 142-55 156.8-128L256 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l144 0c25.8 0 49.6 21.4 47.2 50.6C437.8 389.6 341.4 480 224 480C100.3 480 0 379.7 0 256S100.3 32 224 32c57.4 0 109.7 21.6 149.3 57c13.2 11.8 14.3 32 2.5 45.2s-32 14.3-45.2 2.5C302.3 111.4 265 96 224 96z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faG = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'gas-pump';\nvar width = 512;\nvar height = 512;\nvar aliases = [9981];\nvar unicode = 'f52f';\nvar svgPathData = 'M32 64C32 28.7 60.7 0 96 0L256 0c35.3 0 64 28.7 64 64l0 192 8 0c48.6 0 88 39.4 88 88l0 32c0 13.3 10.7 24 24 24s24-10.7 24-24l0-154c-27.6-7.1-48-32.2-48-62l0-64L384 64c-8.8-8.8-8.8-23.2 0-32s23.2-8.8 32 0l77.3 77.3c12 12 18.7 28.3 18.7 45.3l0 13.5 0 24 0 32 0 152c0 39.8-32.2 72-72 72s-72-32.2-72-72l0-32c0-22.1-17.9-40-40-40l-8 0 0 144c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 512c-17.7 0-32-14.3-32-32s14.3-32 32-32L32 64zM96 80l0 96c0 8.8 7.2 16 16 16l128 0c8.8 0 16-7.2 16-16l0-96c0-8.8-7.2-16-16-16L112 64c-8.8 0-16 7.2-16 16z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faGasPump = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'gauge';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"dashboard\",\"gauge-med\",\"tachometer-alt-average\"];\nvar unicode = 'f624';\nvar svgPathData = 'M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm320 96c0-26.9-16.5-49.9-40-59.3L280 88c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 204.7c-23.5 9.5-40 32.5-40 59.3c0 35.3 28.7 64 64 64s64-28.7 64-64zM144 176a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm-16 80a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm288 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM400 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faGauge = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'gauge-high';\nvar width = 512;\nvar height = 512;\nvar aliases = [62461,\"tachometer-alt\",\"tachometer-alt-fast\"];\nvar unicode = 'f625';\nvar svgPathData = 'M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM256 416c35.3 0 64-28.7 64-64c0-17.4-6.9-33.1-18.1-44.6L366 161.7c5.3-12.1-.2-26.3-12.3-31.6s-26.3 .2-31.6 12.3L257.9 288c-.6 0-1.3 0-1.9 0c-35.3 0-64 28.7-64 64s28.7 64 64 64zM176 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM96 288a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm352-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faGaugeHigh = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'gear';\nvar width = 512;\nvar height = 512;\nvar aliases = [9881,\"cog\"];\nvar unicode = 'f013';\nvar svgPathData = 'M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faGear = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'glass-water';\nvar width = 384;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'e4f4';\nvar svgPathData = 'M32 0C23.1 0 14.6 3.7 8.6 10.2S-.6 25.4 .1 34.3L28.9 437.7c3 41.9 37.8 74.3 79.8 74.3l166.6 0c42 0 76.8-32.4 79.8-74.3L383.9 34.3c.6-8.9-2.4-17.6-8.5-24.1S360.9 0 352 0L32 0zM73 156.5L66.4 64l251.3 0L311 156.5l-24.2 12.1c-19.4 9.7-42.2 9.7-61.6 0c-20.9-10.4-45.5-10.4-66.4 0c-19.4 9.7-42.2 9.7-61.6 0L73 156.5z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faGlassWater = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'globe';\nvar width = 512;\nvar height = 512;\nvar aliases = [127760];\nvar unicode = 'f0ac';\nvar svgPathData = 'M352 256c0 22.2-1.2 43.6-3.3 64l-185.3 0c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64l185.3 0c2.2 20.4 3.3 41.8 3.3 64zm28.8-64l123.1 0c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64l-123.1 0c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32l-116.7 0c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0l-176.6 0c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0L18.6 160C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192l123.1 0c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64L8.1 320C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6l176.6 0c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352l116.7 0zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6l116.7 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faGlobe = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'graduation-cap';\nvar width = 640;\nvar height = 512;\nvar aliases = [127891,\"mortar-board\"];\nvar unicode = 'f19d';\nvar svgPathData = 'M320 32c-8.1 0-16.1 1.4-23.7 4.1L15.8 137.4C6.3 140.9 0 149.9 0 160s6.3 19.1 15.8 22.6l57.9 20.9C57.3 229.3 48 259.8 48 291.9l0 28.1c0 28.4-10.8 57.7-22.3 80.8c-6.5 13-13.9 25.8-22.5 37.6C0 442.7-.9 448.3 .9 453.4s6 8.9 11.2 10.2l64 16c4.2 1.1 8.7 .3 12.4-2s6.3-6.1 7.1-10.4c8.6-42.8 4.3-81.2-2.1-108.7C90.3 344.3 86 329.8 80 316.5l0-24.6c0-30.2 10.2-58.7 27.9-81.5c12.9-15.5 29.6-28 49.2-35.7l157-61.7c8.2-3.2 17.5 .8 20.7 9s-.8 17.5-9 20.7l-157 61.7c-12.4 4.9-23.3 12.4-32.2 21.6l159.6 57.6c7.6 2.7 15.6 4.1 23.7 4.1s16.1-1.4 23.7-4.1L624.2 182.6c9.5-3.4 15.8-12.5 15.8-22.6s-6.3-19.1-15.8-22.6L343.7 36.1C336.1 33.4 328.1 32 320 32zM128 408c0 35.3 86 72 192 72s192-36.7 192-72L496.7 262.6 354.5 314c-11.1 4-22.8 6-34.5 6s-23.5-2-34.5-6L143.3 262.6 128 408z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faGraduationCap = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'h';\nvar width = 384;\nvar height = 512;\nvar aliases = [104];\nvar unicode = '48';\nvar svgPathData = 'M320 256l0 192c0 17.7 14.3 32 32 32s32-14.3 32-32l0-224 0-160c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 128L64 192 64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-192 256 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faH = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'hand-holding-heart';\nvar width = 576;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f4be';\nvar svgPathData = 'M163.9 136.9c-29.4-29.8-29.4-78.2 0-108s77-29.8 106.4 0l17.7 18 17.7-18c29.4-29.8 77-29.8 106.4 0s29.4 78.2 0 108L310.5 240.1c-6.2 6.3-14.3 9.4-22.5 9.4s-16.3-3.1-22.5-9.4L163.9 136.9zM568.2 336.3c13.1 17.8 9.3 42.8-8.5 55.9L433.1 485.5c-23.4 17.2-51.6 26.5-80.7 26.5L192 512 32 512c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32l36.8 0 44.9-36c22.7-18.2 50.9-28 80-28l78.3 0 16 0 64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l120.6 0 119.7-88.2c17.8-13.1 42.8-9.3 55.9 8.5zM193.6 384c0 0 0 0 0 0l-.9 0c.3 0 .6 0 .9 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faHandHoldingHeart = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'hard-drive';\nvar width = 512;\nvar height = 512;\nvar aliases = [128436,\"hdd\"];\nvar unicode = 'f0a0';\nvar svgPathData = 'M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 184.4c-17-15.2-39.4-24.4-64-24.4L64 256c-24.6 0-47 9.2-64 24.4L0 96zM64 288l384 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64zM320 416a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm128-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faHardDrive = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'hashtag';\nvar width = 448;\nvar height = 512;\nvar aliases = [62098];\nvar unicode = '23';\nvar svgPathData = 'M181.3 32.4c17.4 2.9 29.2 19.4 26.3 36.8L197.8 128l95.1 0 11.5-69.3c2.9-17.4 19.4-29.2 36.8-26.3s29.2 19.4 26.3 36.8L357.8 128l58.2 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-68.9 0L325.8 320l58.2 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-68.9 0-11.5 69.3c-2.9 17.4-19.4 29.2-36.8 26.3s-29.2-19.4-26.3-36.8l9.8-58.7-95.1 0-11.5 69.3c-2.9 17.4-19.4 29.2-36.8 26.3s-29.2-19.4-26.3-36.8L90.2 384 32 384c-17.7 0-32-14.3-32-32s14.3-32 32-32l68.9 0 21.3-128L64 192c-17.7 0-32-14.3-32-32s14.3-32 32-32l68.9 0 11.5-69.3c2.9-17.4 19.4-29.2 36.8-26.3zM187.1 192L165.8 320l95.1 0 21.3-128-95.1 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faHashtag = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'heart';\nvar width = 512;\nvar height = 512;\nvar aliases = [128153,128154,128155,128156,128420,129293,129294,129505,9829,10084,61578];\nvar unicode = 'f004';\nvar svgPathData = 'M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faHeart = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'heart-pulse';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"heartbeat\"];\nvar unicode = 'f21e';\nvar svgPathData = 'M228.3 469.1L47.6 300.4c-4.2-3.9-8.2-8.1-11.9-12.4l87 0c22.6 0 43-13.6 51.7-34.5l10.5-25.2 49.3 109.5c3.8 8.5 12.1 14 21.4 14.1s17.8-5 22-13.3L320 253.7l1.7 3.4c9.5 19 28.9 31 50.1 31l104.5 0c-3.7 4.3-7.7 8.5-11.9 12.4L283.7 469.1c-7.5 7-17.4 10.9-27.7 10.9s-20.2-3.9-27.7-10.9zM503.7 240l-132 0c-3 0-5.8-1.7-7.2-4.4l-23.2-46.3c-4.1-8.1-12.4-13.3-21.5-13.3s-17.4 5.1-21.5 13.3l-41.4 82.8L205.9 158.2c-3.9-8.7-12.7-14.3-22.2-14.1s-18.1 5.9-21.8 14.8l-31.8 76.3c-1.2 3-4.2 4.9-7.4 4.9L16 240c-2.6 0-5 .4-7.3 1.1C3 225.2 0 208.2 0 190.9l0-5.8c0-69.9 50.5-129.5 119.4-141C165 36.5 211.4 51.4 244 84l12 12 12-12c32.6-32.6 79-47.5 124.6-39.9C461.5 55.6 512 115.2 512 185.1l0 5.8c0 16.9-2.8 33.5-8.3 49.1z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faHeartPulse = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'house';\nvar width = 576;\nvar height = 512;\nvar aliases = [127968,63498,63500,\"home\",\"home-alt\",\"home-lg-alt\"];\nvar unicode = 'f015';\nvar svgPathData = 'M575.8 255.5c0 18-15 32.1-32 32.1l-32 0 .7 160.2c0 2.7-.2 5.4-.5 8.1l0 16.2c0 22.1-17.9 40-40 40l-16 0c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1L416 512l-24 0c-22.1 0-40-17.9-40-40l0-24 0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32l0 64 0 24c0 22.1-17.9 40-40 40l-24 0-31.9 0c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2l-16 0c-22.1 0-40-17.9-40-40l0-112c0-.9 0-1.9 .1-2.8l0-69.7-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faHouse = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'id-card';\nvar width = 576;\nvar height = 512;\nvar aliases = [62147,\"drivers-license\"];\nvar unicode = 'f2c2';\nvar svgPathData = 'M0 96l576 0c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96zm0 32L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-288L0 128zM64 405.3c0-29.5 23.9-53.3 53.3-53.3l117.3 0c29.5 0 53.3 23.9 53.3 53.3c0 5.9-4.8 10.7-10.7 10.7L74.7 416c-5.9 0-10.7-4.8-10.7-10.7zM176 192a64 64 0 1 1 0 128 64 64 0 1 1 0-128zm176 16c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faIdCard = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'image';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f03e';\nvar svgPathData = 'M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faImage = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'image-portrait';\nvar width = 384;\nvar height = 512;\nvar aliases = [\"portrait\"];\nvar unicode = 'f3e0';\nvar svgPathData = 'M384 64c0-35.3-28.7-64-64-64L64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384zM128 192a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM80 356.6c0-37.9 30.7-68.6 68.6-68.6l86.9 0c37.9 0 68.6 30.7 68.6 68.6c0 15.1-12.3 27.4-27.4 27.4l-169.1 0C92.3 384 80 371.7 80 356.6z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faImagePortrait = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'images';\nvar width = 576;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f302';\nvar svgPathData = 'M160 32c-35.3 0-64 28.7-64 64l0 224c0 35.3 28.7 64 64 64l352 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L160 32zM396 138.7l96 144c4.9 7.4 5.4 16.8 1.2 24.6S480.9 320 472 320l-144 0-48 0-80 0c-9.2 0-17.6-5.3-21.6-13.6s-2.9-18.2 2.9-25.4l64-80c4.6-5.7 11.4-9 18.7-9s14.2 3.3 18.7 9l17.3 21.6 56-84C360.5 132 368 128 376 128s15.5 4 20 10.7zM192 128a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM48 120c0-13.3-10.7-24-24-24S0 106.7 0 120L0 344c0 75.1 60.9 136 136 136l320 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-320 0c-48.6 0-88-39.4-88-88l0-224z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faImages = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'info';\nvar width = 192;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f129';\nvar svgPathData = 'M48 80a48 48 0 1 1 96 0A48 48 0 1 1 48 80zM0 224c0-17.7 14.3-32 32-32l64 0c17.7 0 32 14.3 32 32l0 224 32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 512c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0 0-192-32 0c-17.7 0-32-14.3-32-32z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faInfo = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'key';\nvar width = 512;\nvar height = 512;\nvar aliases = [128273];\nvar unicode = 'f084';\nvar svgPathData = 'M336 352c97.2 0 176-78.8 176-176S433.2 0 336 0S160 78.8 160 176c0 18.7 2.9 36.8 8.3 53.7L7 391c-4.5 4.5-7 10.6-7 17l0 80c0 13.3 10.7 24 24 24l80 0c13.3 0 24-10.7 24-24l0-40 40 0c13.3 0 24-10.7 24-24l0-40 40 0c6.4 0 12.5-2.5 17-7l33.3-33.3c16.9 5.4 35 8.3 53.7 8.3zM376 96a40 40 0 1 1 0 80 40 40 0 1 1 0-80z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faKey = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'language';\nvar width = 640;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f1ab';\nvar svgPathData = 'M0 128C0 92.7 28.7 64 64 64l192 0 48 0 16 0 256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64l-256 0-16 0-48 0L64 448c-35.3 0-64-28.7-64-64L0 128zm320 0l0 256 256 0 0-256-256 0zM178.3 175.9c-3.2-7.2-10.4-11.9-18.3-11.9s-15.1 4.7-18.3 11.9l-64 144c-4.5 10.1 .1 21.9 10.2 26.4s21.9-.1 26.4-10.2l8.9-20.1 73.6 0 8.9 20.1c4.5 10.1 16.3 14.6 26.4 10.2s14.6-16.3 10.2-26.4l-64-144zM160 233.2L179 276l-38 0 19-42.8zM448 164c11 0 20 9 20 20l0 4 44 0 16 0c11 0 20 9 20 20s-9 20-20 20l-2 0-1.6 4.5c-8.9 24.4-22.4 46.6-39.6 65.4c.9 .6 1.8 1.1 2.7 1.6l18.9 11.3c9.5 5.7 12.5 18 6.9 27.4s-18 12.5-27.4 6.9l-18.9-11.3c-4.5-2.7-8.8-5.5-13.1-8.5c-10.6 7.5-21.9 14-34 19.4l-3.6 1.6c-10.1 4.5-21.9-.1-26.4-10.2s.1-21.9 10.2-26.4l3.6-1.6c6.4-2.9 12.6-6.1 18.5-9.8l-12.2-12.2c-7.8-7.8-7.8-20.5 0-28.3s20.5-7.8 28.3 0l14.6 14.6 .5 .5c12.4-13.1 22.5-28.3 29.8-45L448 228l-72 0c-11 0-20-9-20-20s9-20 20-20l52 0 0-4c0-11 9-20 20-20z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faLanguage = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'layer-group';\nvar width = 576;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f5fd';\nvar svgPathData = 'M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 149.8C37.4 145.8 32 137.3 32 128s5.4-17.9 13.9-21.8L264.5 5.2zM476.9 209.6l53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 277.8C37.4 273.8 32 265.3 32 256s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0l152-70.2zm-152 198.2l152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 405.8C37.4 401.8 32 393.3 32 384s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faLayerGroup = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'leaf';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f06c';\nvar svgPathData = 'M272 96c-78.6 0-145.1 51.5-167.7 122.5c33.6-17 71.5-26.5 111.7-26.5l88 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-16 0-72 0s0 0 0 0c-16.6 0-32.7 1.9-48.3 5.4c-25.9 5.9-49.9 16.4-71.4 30.7c0 0 0 0 0 0C38.3 298.8 0 364.9 0 440l0 16c0 13.3 10.7 24 24 24s24-10.7 24-24l0-16c0-48.7 20.7-92.5 53.8-123.2C121.6 392.3 190.3 448 272 448l1 0c132.1-.7 239-130.9 239-291.4c0-42.6-7.5-83.1-21.1-119.6c-2.6-6.9-12.7-6.6-16.2-.1C455.9 72.1 418.7 96 376 96L272 96z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faLeaf = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'lightbulb';\nvar width = 384;\nvar height = 512;\nvar aliases = [128161];\nvar unicode = 'f0eb';\nvar svgPathData = 'M272 384c9.6-31.9 29.5-59.1 49.2-86.2c0 0 0 0 0 0c5.2-7.1 10.4-14.2 15.4-21.4c19.8-28.5 31.4-63 31.4-100.3C368 78.8 289.2 0 192 0S16 78.8 16 176c0 37.3 11.6 71.9 31.4 100.3c5 7.2 10.2 14.3 15.4 21.4c0 0 0 0 0 0c19.8 27.1 39.7 54.4 49.2 86.2l160 0zM192 512c44.2 0 80-35.8 80-80l0-16-160 0 0 16c0 44.2 35.8 80 80 80zM112 176c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-61.9 50.1-112 112-112c8.8 0 16 7.2 16 16s-7.2 16-16 16c-44.2 0-80 35.8-80 80z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faLightbulb = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'link';\nvar width = 640;\nvar height = 512;\nvar aliases = [128279,\"chain\"];\nvar unicode = 'f0c1';\nvar svgPathData = 'M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faLink = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'list';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"list-squares\"];\nvar unicode = 'f03a';\nvar svgPathData = 'M40 48C26.7 48 16 58.7 16 72l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24L40 48zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM16 232l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faList = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'list-ol';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"list-1-2\",\"list-numeric\"];\nvar unicode = 'f0cb';\nvar svgPathData = 'M24 56c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24l0 120 16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l16 0 0-96-8 0C34.7 80 24 69.3 24 56zM86.7 341.2c-6.5-7.4-18.3-6.9-24 1.2L51.5 357.9c-7.7 10.8-22.7 13.3-33.5 5.6s-13.3-22.7-5.6-33.5l11.1-15.6c23.7-33.2 72.3-35.6 99.2-4.9c21.3 24.4 20.8 60.9-1.1 84.7L86.8 432l33.2 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-88 0c-9.5 0-18.2-5.6-22-14.4s-2.1-18.9 4.3-25.9l72-78c5.3-5.8 5.4-14.6 .3-20.5zM224 64l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faListOl = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'location-crosshairs';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"location\"];\nvar unicode = 'f601';\nvar svgPathData = 'M256 0c17.7 0 32 14.3 32 32l0 34.7C368.4 80.1 431.9 143.6 445.3 224l34.7 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-34.7 0C431.9 368.4 368.4 431.9 288 445.3l0 34.7c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-34.7C143.6 431.9 80.1 368.4 66.7 288L32 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l34.7 0C80.1 143.6 143.6 80.1 224 66.7L224 32c0-17.7 14.3-32 32-32zM128 256a128 128 0 1 0 256 0 128 128 0 1 0 -256 0zm128-80a80 80 0 1 1 0 160 80 80 0 1 1 0-160z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faLocationCrosshairs = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'location-dot';\nvar width = 384;\nvar height = 512;\nvar aliases = [\"map-marker-alt\"];\nvar unicode = 'f3c5';\nvar svgPathData = 'M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faLocationDot = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'lock';\nvar width = 448;\nvar height = 512;\nvar aliases = [128274];\nvar unicode = 'f023';\nvar svgPathData = 'M144 144l0 48 160 0 0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192l0-48C80 64.5 144.5 0 224 0s144 64.5 144 144l0 48 16 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 256c0-35.3 28.7-64 64-64l16 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faLock = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'm';\nvar width = 448;\nvar height = 512;\nvar aliases = [109];\nvar unicode = '4d';\nvar svgPathData = 'M22.7 33.4c13.5-4.1 28.1 1.1 35.9 12.9L224 294.3 389.4 46.3c7.8-11.7 22.4-17 35.9-12.9S448 49.9 448 64l0 384c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-278.3L250.6 369.8c-5.9 8.9-15.9 14.2-26.6 14.2s-20.7-5.3-26.6-14.2L64 169.7 64 448c0 17.7-14.3 32-32 32s-32-14.3-32-32L0 64C0 49.9 9.2 37.5 22.7 33.4z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faM = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'magnifying-glass';\nvar width = 512;\nvar height = 512;\nvar aliases = [128269,\"search\"];\nvar unicode = 'f002';\nvar svgPathData = 'M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faMagnifyingGlass = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'map';\nvar width = 576;\nvar height = 512;\nvar aliases = [128506,62072];\nvar unicode = 'f279';\nvar svgPathData = 'M384 476.1L192 421.2l0-385.3L384 90.8l0 385.3zm32-1.2l0-386.5L543.1 37.5c15.8-6.3 32.9 5.3 32.9 22.3l0 334.8c0 9.8-6 18.6-15.1 22.3L416 474.8zM15.1 95.1L160 37.2l0 386.5L32.9 474.5C17.1 480.8 0 469.2 0 452.2L0 117.4c0-9.8 6-18.6 15.1-22.3z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faMap = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'message';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"comment-alt\"];\nvar unicode = 'f27a';\nvar svgPathData = 'M64 0C28.7 0 0 28.7 0 64L0 352c0 35.3 28.7 64 64 64l96 0 0 80c0 6.1 3.4 11.6 8.8 14.3s11.9 2.1 16.8-1.5L309.3 416 448 416c35.3 0 64-28.7 64-64l0-288c0-35.3-28.7-64-64-64L64 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faMessage = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'minus';\nvar width = 448;\nvar height = 512;\nvar aliases = [8211,8722,10134,\"subtract\"];\nvar unicode = 'f068';\nvar svgPathData = 'M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faMinus = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'mobile';\nvar width = 384;\nvar height = 512;\nvar aliases = [128241,\"mobile-android\",\"mobile-phone\"];\nvar unicode = 'f3ce';\nvar svgPathData = 'M80 0C44.7 0 16 28.7 16 64l0 384c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-384c0-35.3-28.7-64-64-64L80 0zm80 432l64 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faMobile = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'mobile-screen-button';\nvar width = 384;\nvar height = 512;\nvar aliases = [\"mobile-alt\"];\nvar unicode = 'f3cd';\nvar svgPathData = 'M16 64C16 28.7 44.7 0 80 0L304 0c35.3 0 64 28.7 64 64l0 384c0 35.3-28.7 64-64 64L80 512c-35.3 0-64-28.7-64-64L16 64zM224 448a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM304 64L80 64l0 320 224 0 0-320z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faMobileScreenButton = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'money-bill-transfer';\nvar width = 640;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'e528';\nvar svgPathData = 'M535 41c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l64 64c4.5 4.5 7 10.6 7 17s-2.5 12.5-7 17l-64 64c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l23-23L384 112c-13.3 0-24-10.7-24-24s10.7-24 24-24l174.1 0L535 41zM105 377l-23 23L256 400c13.3 0 24 10.7 24 24s-10.7 24-24 24L81.9 448l23 23c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L7 441c-4.5-4.5-7-10.6-7-17s2.5-12.5 7-17l64-64c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9zM96 64l241.9 0c-3.7 7.2-5.9 15.3-5.9 24c0 28.7 23.3 52 52 52l117.4 0c-4 17 .6 35.5 13.8 48.8c20.3 20.3 53.2 20.3 73.5 0L608 169.5 608 384c0 35.3-28.7 64-64 64l-241.9 0c3.7-7.2 5.9-15.3 5.9-24c0-28.7-23.3-52-52-52l-117.4 0c4-17-.6-35.5-13.8-48.8c-20.3-20.3-53.2-20.3-73.5 0L32 342.5 32 128c0-35.3 28.7-64 64-64zm64 64l-64 0 0 64c35.3 0 64-28.7 64-64zM544 320c-35.3 0-64 28.7-64 64l64 0 0-64zM320 352a96 96 0 1 0 0-192 96 96 0 1 0 0 192z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faMoneyBillTransfer = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'money-bill-wave';\nvar width = 576;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f53a';\nvar svgPathData = 'M0 112.5L0 422.3c0 18 10.1 35 27 41.3c87 32.5 174 10.3 261-11.9c79.8-20.3 159.6-40.7 239.3-18.9c23 6.3 48.7-9.5 48.7-33.4l0-309.9c0-18-10.1-35-27-41.3C462 15.9 375 38.1 288 60.3C208.2 80.6 128.4 100.9 48.7 79.1C25.6 72.8 0 88.6 0 112.5zM288 352c-44.2 0-80-43-80-96s35.8-96 80-96s80 43 80 96s-35.8 96-80 96zM64 352c35.3 0 64 28.7 64 64l-64 0 0-64zm64-208c0 35.3-28.7 64-64 64l0-64 64 0zM512 304l0 64-64 0c0-35.3 28.7-64 64-64zM448 96l64 0 0 64c-35.3 0-64-28.7-64-64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faMoneyBillWave = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'network-wired';\nvar width = 640;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f6ff';\nvar svgPathData = 'M256 64l128 0 0 64-128 0 0-64zM240 0c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48l48 0 0 32L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0 0 32-48 0c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48l160 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-48 0 0-32 256 0 0 32-48 0c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48l160 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-48 0 0-32 96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-256 0 0-32 48 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48L240 0zM96 448l0-64 128 0 0 64L96 448zm320-64l128 0 0 64-128 0 0-64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faNetworkWired = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'object-group';\nvar width = 576;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f247';\nvar svgPathData = 'M32 119.4C12.9 108.4 0 87.7 0 64C0 28.7 28.7 0 64 0c23.7 0 44.4 12.9 55.4 32l337.1 0C467.6 12.9 488.3 0 512 0c35.3 0 64 28.7 64 64c0 23.7-12.9 44.4-32 55.4l0 273.1c19.1 11.1 32 31.7 32 55.4c0 35.3-28.7 64-64 64c-23.7 0-44.4-12.9-55.4-32l-337.1 0c-11.1 19.1-31.7 32-55.4 32c-35.3 0-64-28.7-64-64c0-23.7 12.9-44.4 32-55.4l0-273.1zM456.6 96L119.4 96c-5.6 9.7-13.7 17.8-23.4 23.4l0 273.1c9.7 5.6 17.8 13.7 23.4 23.4l337.1 0c5.6-9.7 13.7-17.8 23.4-23.4l0-273.1c-9.7-5.6-17.8-13.7-23.4-23.4zM128 160c0-17.7 14.3-32 32-32l128 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32l0-96zM256 320l32 0c35.3 0 64-28.7 64-64l0-32 64 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32l0-32z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faObjectGroup = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'om';\nvar width = 512;\nvar height = 512;\nvar aliases = [128329];\nvar unicode = 'f679';\nvar svgPathData = 'M379.3 4.7c-6.2-6.2-16.4-6.2-22.6 0l-16 16c-6.2 6.2-6.2 16.4 0 22.6l16 16c6.2 6.2 16.4 6.2 22.6 0l16-16c6.2-6.2 6.2-16.4 0-22.6l-16-16zM281 66.7c-2.2-1.5-4.9-2.5-7.7-2.7c-.6 0-1.3-.1-1.9 0c-3.9 .2-7.4 1.7-10.1 4.2c-.9 .8-1.6 1.7-2.3 2.6c-1.7 2.4-2.7 5.3-2.9 8.5c0 .7 0 1.4 0 2.1c.2 2.2 .9 4.3 1.9 6.2l.3 .6c.3 .6 .8 1.4 1.4 2.4c1.2 2 2.9 4.8 5.1 8.2c4.4 6.7 11.1 15.5 20 24.4C302.4 141.1 330.3 160 368 160c31.2 0 56.6-10.4 73.9-20.2c8.7-5 15.6-9.9 20.4-13.8c2.4-1.9 4.3-3.6 5.7-4.9c.7-.6 1.3-1.2 1.7-1.6l.6-.5 .1-.1 .1-.1s0 0 0 0s0 0 0 0c5.9-5.8 9.5-13.9 9.5-22.8c0-17.7-14.3-32-32-32c-8.7 0-16.7 3.5-22.4 9.2c-.1 .1-.2 .2-.5 .4c-.5 .5-1.5 1.3-2.8 2.4c-2.7 2.2-6.8 5.2-12.1 8.2C399.4 90.4 384.8 96 368 96c-20.8 0-42.4-7-59.5-14.6c-8.4-3.7-15.4-7.5-20.3-10.3c-2.4-1.4-4.3-2.5-5.6-3.3c-.6-.4-1.1-.7-1.4-.9l-.3-.2zM115.2 169.6c8-6 17.9-9.6 28.8-9.6c26.5 0 48 21.5 48 48s-21.5 48-48 48l-34.2 0c-7.6 0-13.8 6.2-13.8 13.8c0 1.5 .2 2.9 .7 4.4l8 24c4.4 13.1 16.6 21.9 30.4 21.9l8.9 0 16 0c35.3 0 64 28.7 64 64s-28.7 64-64 64c-50.8 0-82.7-21.5-102.2-42.8c-9.9-10.8-16.6-21.6-20.9-29.7c-2.1-4-3.6-7.3-4.5-9.6c-.5-1.1-.8-2-1-2.5l-.2-.5c-.3-.9-.7-1.8-1.1-2.6c-1.2-2.2-2.8-4-4.7-5.4c-1.9-1.4-4.1-2.3-6.5-2.8c-1.4-.3-2.9-.3-4.4-.2c-2.5 .2-4.8 1-6.8 2.3c-1.1 .7-2.2 1.5-3.1 2.5c-2.4 2.5-4.1 5.8-4.5 9.5c-.1 .6-.1 1.1-.1 1.7c0 0 0 0 0 0c0 .8 .1 1.7 .2 2.5l0 .1c0 .3 .1 .8 .2 1.3c.2 1.1 .4 2.7 .8 4.6c.8 3.9 2 9.4 3.9 15.9c3.8 13 10.3 30.4 21.3 48C48.7 476.2 89.4 512 160 512c70.7 0 128-57.3 128-128c0-23.3-6.2-45.2-17.1-64l22.6 0c25.5 0 49.9-10.1 67.9-28.1l26.5-26.5c6-6 14.1-9.4 22.6-9.4l5.5 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32c-25.7 0-41.4-12.5-51.2-25.6c-5-6.7-8.4-13.4-10.5-18.6c-1.1-2.5-1.8-4.6-2.2-6c-.2-.7-.4-1.2-.5-1.5l-.1-.2c-.3-1.3-.8-2.6-1.5-3.8c-1.1-2-2.6-3.8-4.4-5.1c-2.7-2-6-3.2-9.6-3.2l-.2 0c-8 .1-14.6 6.1-15.6 13.9c0 0 0 0 0 0c0 .3-.1 .6-.2 1.1c-.1 .9-.3 2.1-.4 3.6c-.3 3-.6 7.3-.6 12.4c0 10.1 1.1 23.9 5.8 38.1c4.8 14.3 13.4 29.3 28.6 40.7C368.7 473.3 389.3 480 416 480c53 0 96-43 96-96l0-96c0-53-43-96-96-96l-5.5 0c-25.5 0-49.9 10.1-67.9 28.1l-26.5 26.5c-6 6-14.1 9.4-22.6 9.4l-48.3 0c6.9-14.5 10.8-30.8 10.8-48c0-61.9-50.1-112-112-112c-25.2 0-48.5 8.3-67.2 22.4c-14.1 10.6-17 30.7-6.4 44.8s30.7 17 44.8 6.4z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faOm = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'p';\nvar width = 320;\nvar height = 512;\nvar aliases = [112];\nvar unicode = '50';\nvar svgPathData = 'M0 96C0 60.7 28.7 32 64 32l96 0c88.4 0 160 71.6 160 160s-71.6 160-160 160l-96 0 0 96c0 17.7-14.3 32-32 32s-32-14.3-32-32L0 320 0 96zM64 288l96 0c53 0 96-43 96-96s-43-96-96-96L64 96l0 192z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faP = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'palette';\nvar width = 512;\nvar height = 512;\nvar aliases = [127912];\nvar unicode = 'f53f';\nvar svgPathData = 'M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3L344 320c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faPalette = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'paragraph';\nvar width = 448;\nvar height = 512;\nvar aliases = [182];\nvar unicode = 'f1dd';\nvar svgPathData = 'M192 32l64 0 160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0 0 352c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-352-32 0 0 352c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-96-32 0c-88.4 0-160-71.6-160-160s71.6-160 160-160z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faParagraph = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'paste';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"file-clipboard\"];\nvar unicode = 'f0ea';\nvar svgPathData = 'M160 0c-23.7 0-44.4 12.9-55.4 32L48 32C21.5 32 0 53.5 0 80L0 400c0 26.5 21.5 48 48 48l144 0 0-272c0-44.2 35.8-80 80-80l48 0 0-16c0-26.5-21.5-48-48-48l-56.6 0C204.4 12.9 183.7 0 160 0zM272 128c-26.5 0-48 21.5-48 48l0 272 0 16c0 26.5 21.5 48 48 48l192 0c26.5 0 48-21.5 48-48l0-220.1c0-12.7-5.1-24.9-14.1-33.9l-67.9-67.9c-9-9-21.2-14.1-33.9-14.1L320 128l-48 0zM160 40a24 24 0 1 1 0 48 24 24 0 1 1 0-48z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faPaste = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'pen';\nvar width = 512;\nvar height = 512;\nvar aliases = [128394];\nvar unicode = 'f304';\nvar svgPathData = 'M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faPen = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'pen-to-square';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"edit\"];\nvar unicode = 'f044';\nvar svgPathData = 'M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faPenToSquare = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'percent';\nvar width = 384;\nvar height = 512;\nvar aliases = [62101,62785,\"percentage\"];\nvar unicode = '25';\nvar svgPathData = 'M374.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-320 320c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l320-320zM128 128A64 64 0 1 0 0 128a64 64 0 1 0 128 0zM384 384a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faPercent = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'person-running';\nvar width = 448;\nvar height = 512;\nvar aliases = [127939,\"running\"];\nvar unicode = 'f70c';\nvar svgPathData = 'M320 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM125.7 175.5c9.9-9.9 23.4-15.5 37.5-15.5c1.9 0 3.8 .1 5.6 .3L137.6 254c-9.3 28 1.7 58.8 26.8 74.5l86.2 53.9-25.4 88.8c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l28.7-100.4c5.9-20.6-2.6-42.6-20.7-53.9L238 299l30.9-82.4 5.1 12.3C289 264.7 323.9 288 362.7 288l21.3 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-21.3 0c-12.9 0-24.6-7.8-29.5-19.7l-6.3-15c-14.6-35.1-44.1-61.9-80.5-73.1l-48.7-15c-11.1-3.4-22.7-5.2-34.4-5.2c-31 0-60.8 12.3-82.7 34.3L57.4 153.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l23.1-23.1zM91.2 352L32 352c-17.7 0-32 14.3-32 32s14.3 32 32 32l69.6 0c19 0 36.2-11.2 43.9-28.5L157 361.6l-9.5-6c-17.5-10.9-30.5-26.8-37.9-44.9L91.2 352z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faPersonRunning = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'phone';\nvar width = 512;\nvar height = 512;\nvar aliases = [128222,128379];\nvar unicode = 'f095';\nvar svgPathData = 'M164.9 24.6c-7.7-18.6-28-28.5-47.4-23.2l-88 24C12.1 30.2 0 46 0 64C0 311.4 200.6 512 448 512c18 0 33.8-12.1 38.6-29.5l24-88c5.3-19.4-4.6-39.7-23.2-47.4l-96-40c-16.3-6.8-35.2-2.1-46.3 11.6L304.7 368C234.3 334.7 177.3 277.7 144 207.3L193.3 167c13.7-11.2 18.4-30 11.6-46.3l-40-96z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faPhone = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'piggy-bank';\nvar width = 576;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f4d3';\nvar svgPathData = 'M400 96l0 .7c-5.3-.4-10.6-.7-16-.7L256 96c-16.5 0-32.5 2.1-47.8 6c-.1-2-.2-4-.2-6c0-53 43-96 96-96s96 43 96 96zm-16 32c3.5 0 7 .1 10.4 .3c4.2 .3 8.4 .7 12.6 1.3C424.6 109.1 450.8 96 480 96l11.5 0c10.4 0 18 9.8 15.5 19.9l-13.8 55.2c15.8 14.8 28.7 32.8 37.5 52.9l13.3 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32l-32 0c-9.1 12.1-19.9 22.9-32 32l0 64c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-32-128 0 0 32c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-64c-34.9-26.2-58.7-66.3-63.2-112L68 304c-37.6 0-68-30.4-68-68s30.4-68 68-68l4 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-4 0c-11 0-20 9-20 20s9 20 20 20l31.2 0c12.1-59.8 57.7-107.5 116.3-122.8c12.9-3.4 26.5-5.2 40.5-5.2l128 0zm64 136a24 24 0 1 0 -48 0 24 24 0 1 0 48 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faPiggyBank = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'pills';\nvar width = 576;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f484';\nvar svgPathData = 'M112 96c-26.5 0-48 21.5-48 48l0 112 96 0 0-112c0-26.5-21.5-48-48-48zM0 144C0 82.1 50.1 32 112 32s112 50.1 112 112l0 224c0 61.9-50.1 112-112 112S0 429.9 0 368L0 144zM554.9 399.4c-7.1 12.3-23.7 13.1-33.8 3.1L333.5 214.9c-10-10-9.3-26.7 3.1-33.8C360 167.7 387.1 160 416 160c88.4 0 160 71.6 160 160c0 28.9-7.7 56-21.1 79.4zm-59.5 59.5C472 472.3 444.9 480 416 480c-88.4 0-160-71.6-160-160c0-28.9 7.7-56 21.1-79.4c7.1-12.3 23.7-13.1 33.8-3.1L498.5 425.1c10 10 9.3 26.7-3.1 33.8z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faPills = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'play';\nvar width = 384;\nvar height = 512;\nvar aliases = [9654];\nvar unicode = 'f04b';\nvar svgPathData = 'M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80L0 432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faPlay = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'plug';\nvar width = 384;\nvar height = 512;\nvar aliases = [128268];\nvar unicode = 'f1e6';\nvar svgPathData = 'M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2C297 398 352 333.4 352 256l0-32c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faPlug = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'plus';\nvar width = 448;\nvar height = 512;\nvar aliases = [10133,61543,\"add\"];\nvar unicode = '2b';\nvar svgPathData = 'M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faPlus = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'print';\nvar width = 512;\nvar height = 512;\nvar aliases = [128424,128438,9113];\nvar unicode = 'f02f';\nvar svgPathData = 'M128 0C92.7 0 64 28.7 64 64l0 96 64 0 0-96 226.7 0L384 93.3l0 66.7 64 0 0-66.7c0-17-6.7-33.3-18.7-45.3L400 18.7C388 6.7 371.7 0 354.7 0L128 0zM384 352l0 32 0 64-256 0 0-64 0-16 0-16 256 0zm64 32l32 0c17.7 0 32-14.3 32-32l0-96c0-35.3-28.7-64-64-64L64 192c-35.3 0-64 28.7-64 64l0 96c0 17.7 14.3 32 32 32l32 0 0 64c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-64zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faPrint = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'puzzle-piece';\nvar width = 512;\nvar height = 512;\nvar aliases = [129513];\nvar unicode = 'f12e';\nvar svgPathData = 'M192 104.8c0-9.2-5.8-17.3-13.2-22.8C167.2 73.3 160 61.3 160 48c0-26.5 28.7-48 64-48s64 21.5 64 48c0 13.3-7.2 25.3-18.8 34c-7.4 5.5-13.2 13.6-13.2 22.8c0 12.8 10.4 23.2 23.2 23.2l56.8 0c26.5 0 48 21.5 48 48l0 56.8c0 12.8 10.4 23.2 23.2 23.2c9.2 0 17.3-5.8 22.8-13.2c8.7-11.6 20.7-18.8 34-18.8c26.5 0 48 28.7 48 64s-21.5 64-48 64c-13.3 0-25.3-7.2-34-18.8c-5.5-7.4-13.6-13.2-22.8-13.2c-12.8 0-23.2 10.4-23.2 23.2L384 464c0 26.5-21.5 48-48 48l-56.8 0c-12.8 0-23.2-10.4-23.2-23.2c0-9.2 5.8-17.3 13.2-22.8c11.6-8.7 18.8-20.7 18.8-34c0-26.5-28.7-48-64-48s-64 21.5-64 48c0 13.3 7.2 25.3 18.8 34c7.4 5.5 13.2 13.6 13.2 22.8c0 12.8-10.4 23.2-23.2 23.2L48 512c-26.5 0-48-21.5-48-48L0 343.2C0 330.4 10.4 320 23.2 320c9.2 0 17.3 5.8 22.8 13.2C54.7 344.8 66.7 352 80 352c26.5 0 48-28.7 48-64s-21.5-64-48-64c-13.3 0-25.3 7.2-34 18.8C40.5 250.2 32.4 256 23.2 256C10.4 256 0 245.6 0 232.8L0 176c0-26.5 21.5-48 48-48l120.8 0c12.8 0 23.2-10.4 23.2-23.2z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faPuzzlePiece = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'qrcode';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f029';\nvar svgPathData = 'M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48L0 80zM64 96l0 64 64 0 0-64L64 96zM0 336c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96zm64 16l0 64 64 0 0-64-64 0zM304 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96c0-26.5 21.5-48 48-48zm80 64l-64 0 0 64 64 0 0-64zM256 304c0-8.8 7.2-16 16-16l64 0c8.8 0 16 7.2 16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s7.2-16 16-16s16 7.2 16 16l0 96c0 8.8-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s-7.2-16-16-16s-16 7.2-16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-160zM368 480a16 16 0 1 1 0-32 16 16 0 1 1 0 32zm64 0a16 16 0 1 1 0-32 16 16 0 1 1 0 32z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faQrcode = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'quote-left';\nvar width = 448;\nvar height = 512;\nvar aliases = [8220,\"quote-left-alt\"];\nvar unicode = 'f10d';\nvar svgPathData = 'M0 216C0 149.7 53.7 96 120 96l8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-8 0c-30.9 0-56 25.1-56 56l0 8 64 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64l-64 0c-35.3 0-64-28.7-64-64l0-32 0-32 0-72zm256 0c0-66.3 53.7-120 120-120l8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-8 0c-30.9 0-56 25.1-56 56l0 8 64 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64l-64 0c-35.3 0-64-28.7-64-64l0-32 0-32 0-72z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faQuoteLeft = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'quote-right';\nvar width = 448;\nvar height = 512;\nvar aliases = [8221,\"quote-right-alt\"];\nvar unicode = 'f10e';\nvar svgPathData = 'M448 296c0 66.3-53.7 120-120 120l-8 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l8 0c30.9 0 56-25.1 56-56l0-8-64 0c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l64 0c35.3 0 64 28.7 64 64l0 32 0 32 0 72zm-256 0c0 66.3-53.7 120-120 120l-8 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l8 0c30.9 0 56-25.1 56-56l0-8-64 0c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l64 0c35.3 0 64 28.7 64 64l0 32 0 32 0 72z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faQuoteRight = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'radio';\nvar width = 512;\nvar height = 512;\nvar aliases = [128251];\nvar unicode = 'f8d7';\nvar svgPathData = 'M494.8 47c12.7-3.7 20-17.1 16.3-29.8S494-2.8 481.2 1L51.7 126.9c-9.4 2.7-17.9 7.3-25.1 13.2C10.5 151.7 0 170.6 0 192l0 4L0 304 0 448c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64l-229.5 0L494.8 47zM368 240a80 80 0 1 1 0 160 80 80 0 1 1 0-160zM80 256c0-8.8 7.2-16 16-16l96 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-96 0c-8.8 0-16-7.2-16-16zM64 320c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L80 336c-8.8 0-16-7.2-16-16zm16 64c0-8.8 7.2-16 16-16l96 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-96 0c-8.8 0-16-7.2-16-16z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faRadio = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'receipt';\nvar width = 384;\nvar height = 512;\nvar aliases = [129534];\nvar unicode = 'f543';\nvar svgPathData = 'M14 2.2C22.5-1.7 32.5-.3 39.6 5.8L80 40.4 120.4 5.8c9-7.7 22.3-7.7 31.2 0L192 40.4 232.4 5.8c9-7.7 22.3-7.7 31.2 0L304 40.4 344.4 5.8c7.1-6.1 17.1-7.5 25.6-3.6s14 12.4 14 21.8l0 464c0 9.4-5.5 17.9-14 21.8s-18.5 2.5-25.6-3.6L304 471.6l-40.4 34.6c-9 7.7-22.3 7.7-31.2 0L192 471.6l-40.4 34.6c-9 7.7-22.3 7.7-31.2 0L80 471.6 39.6 506.2c-7.1 6.1-17.1 7.5-25.6 3.6S0 497.4 0 488L0 24C0 14.6 5.5 6.1 14 2.2zM96 144c-8.8 0-16 7.2-16 16s7.2 16 16 16l192 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L96 144zM80 352c0 8.8 7.2 16 16 16l192 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L96 336c-8.8 0-16 7.2-16 16zM96 240c-8.8 0-16 7.2-16 16s7.2 16 16 16l192 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L96 240z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faReceipt = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'rectangle-ad';\nvar width = 576;\nvar height = 512;\nvar aliases = [\"ad\"];\nvar unicode = 'f641';\nvar svgPathData = 'M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM229.5 173.3l72 144c5.9 11.9 1.1 26.3-10.7 32.2s-26.3 1.1-32.2-10.7L253.2 328l-90.3 0-5.4 10.7c-5.9 11.9-20.3 16.7-32.2 10.7s-16.7-20.3-10.7-32.2l72-144c4.1-8.1 12.4-13.3 21.5-13.3s17.4 5.1 21.5 13.3zM208 237.7L186.8 280l42.3 0L208 237.7zM392 256a24 24 0 1 0 0 48 24 24 0 1 0 0-48zm24-43.9l0-28.1c0-13.3 10.7-24 24-24s24 10.7 24 24l0 96 0 48c0 13.3-10.7 24-24 24c-6.6 0-12.6-2.7-17-7c-9.4 4.5-19.9 7-31 7c-39.8 0-72-32.2-72-72s32.2-72 72-72c8.4 0 16.5 1.4 24 4.1z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faRectangleAd = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'right-from-bracket';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"sign-out-alt\"];\nvar unicode = 'f2f5';\nvar svgPathData = 'M377.9 105.9L500.7 228.7c7.2 7.2 11.3 17.1 11.3 27.3s-4.1 20.1-11.3 27.3L377.9 406.1c-6.4 6.4-15 9.9-24 9.9c-18.7 0-33.9-15.2-33.9-33.9l0-62.1-128 0c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32l128 0 0-62.1c0-18.7 15.2-33.9 33.9-33.9c9 0 17.6 3.6 24 9.9zM160 96L96 96c-17.7 0-32 14.3-32 32l0 256c0 17.7 14.3 32 32 32l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0c-53 0-96-43-96-96L0 128C0 75 43 32 96 32l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faRightFromBracket = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'right-left';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"exchange-alt\"];\nvar unicode = 'f362';\nvar svgPathData = 'M32 96l320 0 0-64c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l96 96c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-96 96c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6l0-64L32 160c-17.7 0-32-14.3-32-32s14.3-32 32-32zM480 352c17.7 0 32 14.3 32 32s-14.3 32-32 32l-320 0 0 64c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-96-96c-6-6-9.4-14.1-9.4-22.6s3.4-16.6 9.4-22.6l96-96c9.2-9.2 22.9-11.9 34.9-6.9s19.8 16.6 19.8 29.6l0 64 320 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faRightLeft = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'robot';\nvar width = 640;\nvar height = 512;\nvar aliases = [129302];\nvar unicode = 'f544';\nvar svgPathData = 'M320 0c17.7 0 32 14.3 32 32l0 64 120 0c39.8 0 72 32.2 72 72l0 272c0 39.8-32.2 72-72 72l-304 0c-39.8 0-72-32.2-72-72l0-272c0-39.8 32.2-72 72-72l120 0 0-64c0-17.7 14.3-32 32-32zM208 384c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0zM264 256a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm152 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM48 224l16 0 0 192-16 0c-26.5 0-48-21.5-48-48l0-96c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-16 0 0-192 16 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faRobot = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'rotate';\nvar width = 512;\nvar height = 512;\nvar aliases = [128260,\"sync-alt\"];\nvar unicode = 'f2f1';\nvar svgPathData = 'M142.9 142.9c-17.5 17.5-30.1 38-37.8 59.8c-5.9 16.7-24.2 25.4-40.8 19.5s-25.4-24.2-19.5-40.8C55.6 150.7 73.2 122 97.6 97.6c87.2-87.2 228.3-87.5 315.8-1L455 55c6.9-6.9 17.2-8.9 26.2-5.2s14.8 12.5 14.8 22.2l0 128c0 13.3-10.7 24-24 24l-8.4 0c0 0 0 0 0 0L344 224c-9.7 0-18.5-5.8-22.2-14.8s-1.7-19.3 5.2-26.2l41.1-41.1c-62.6-61.5-163.1-61.2-225.3 1zM16 312c0-13.3 10.7-24 24-24l7.6 0 .7 0L168 288c9.7 0 18.5 5.8 22.2 14.8s1.7 19.3-5.2 26.2l-41.1 41.1c62.6 61.5 163.1 61.2 225.3-1c17.5-17.5 30.1-38 37.8-59.8c5.9-16.7 24.2-25.4 40.8-19.5s25.4 24.2 19.5 40.8c-10.8 30.6-28.4 59.3-52.9 83.8c-87.2 87.2-228.3 87.5-315.8 1L57 457c-6.9 6.9-17.2 8.9-26.2 5.2S16 449.7 16 440l0-119.6 0-.7 0-7.6z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faRotate = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'rotate-left';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"rotate-back\",\"rotate-backward\",\"undo-alt\"];\nvar unicode = 'f2ea';\nvar svgPathData = 'M48.5 224L40 224c-13.3 0-24-10.7-24-24L16 72c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2L98.6 96.6c87.6-86.5 228.7-86.2 315.8 1c87.5 87.5 87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3c-62.2-62.2-162.7-62.5-225.3-1L185 183c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8L48.5 224z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faRotateLeft = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'rotate-right';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"redo-alt\",\"rotate-forward\"];\nvar unicode = 'f2f9';\nvar svgPathData = 'M463.5 224l8.5 0c13.3 0 24-10.7 24-24l0-128c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8l119.5 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faRotateRight = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'route';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f4d7';\nvar svgPathData = 'M512 96c0 50.2-59.1 125.1-84.6 155c-3.8 4.4-9.4 6.1-14.5 5L320 256c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c53 0 96 43 96 96s-43 96-96 96l-276.4 0c8.7-9.9 19.3-22.6 30-36.8c6.3-8.4 12.8-17.6 19-27.2L416 448c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0c-53 0-96-43-96-96s43-96 96-96l39.8 0c-21-31.5-39.8-67.7-39.8-96c0-53 43-96 96-96s96 43 96 96zM117.1 489.1c-3.8 4.3-7.2 8.1-10.1 11.3l-1.8 2-.2-.2c-6 4.6-14.6 4-20-1.8C59.8 473 0 402.5 0 352c0-53 43-96 96-96s96 43 96 96c0 30-21.1 67-43.5 97.9c-10.7 14.7-21.7 28-30.8 38.5l-.6 .7zM128 352a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM416 128a32 32 0 1 0 0-64 32 32 0 1 0 0 64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faRoute = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'ruler';\nvar width = 512;\nvar height = 512;\nvar aliases = [128207];\nvar unicode = 'f545';\nvar svgPathData = 'M177.9 494.1c-18.7 18.7-49.1 18.7-67.9 0L17.9 401.9c-18.7-18.7-18.7-49.1 0-67.9l50.7-50.7 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 41.4-41.4 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 41.4-41.4 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 41.4-41.4 48 48c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-48-48 50.7-50.7c18.7-18.7 49.1-18.7 67.9 0l92.1 92.1c18.7 18.7 18.7 49.1 0 67.9L177.9 494.1z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faRuler = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'ruler-combined';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f546';\nvar svgPathData = 'M.2 468.9C2.7 493.1 23.1 512 48 512l96 0 320 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-48 0 0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80-64 0 0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80-64 0 0 80c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-80-80 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l80 0 0-64-80 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l80 0 0-64-80 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l80 0 0-48c0-26.5-21.5-48-48-48L48 0C21.5 0 0 21.5 0 48L0 368l0 96c0 1.7 .1 3.3 .2 4.9z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faRulerCombined = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 's';\nvar width = 320;\nvar height = 512;\nvar aliases = [115];\nvar unicode = '53';\nvar svgPathData = 'M99.1 105.4C79 114 68.2 127.2 65.2 144.8c-2.4 14.1-.7 23.2 2 29.4c2.8 6.3 7.9 12.4 16.7 18.6c19.2 13.4 48.3 22.1 84.9 32.5c1 .3 1.9 .6 2.9 .8c32.7 9.3 72 20.6 100.9 40.7c15.7 10.9 29.9 25.5 38.6 45.1c8.8 19.8 10.8 42 6.6 66.3c-7.3 42.5-35.3 71.7-71.8 87.3c-35.4 15.2-79.1 17.9-123.7 10.9l-.2 0s0 0 0 0c-24-3.9-62.7-17.1-87.6-25.6c-4.8-1.7-9.2-3.1-12.8-4.3C5.1 440.8-3.9 422.7 1.6 405.9s23.7-25.8 40.5-20.3c4.9 1.6 10.2 3.4 15.9 5.4c25.4 8.6 56.4 19.2 74.4 22.1c36.8 5.7 67.5 2.5 88.5-6.5c20.1-8.6 30.8-21.8 33.9-39.4c2.4-14.1 .7-23.2-2-29.4c-2.8-6.3-7.9-12.4-16.7-18.6c-19.2-13.4-48.3-22.1-84.9-32.5c-1-.3-1.9-.6-2.9-.8c-32.7-9.3-72-20.6-100.9-40.7c-15.7-10.9-29.9-25.5-38.6-45.1c-8.8-19.8-10.8-42-6.6-66.3l31.5 5.5L2.1 133.9C9.4 91.4 37.4 62.2 73.9 46.6c35.4-15.2 79.1-17.9 123.7-10.9c13 2 52.4 9.6 66.6 13.4c17.1 4.5 27.2 22.1 22.7 39.2s-22.1 27.2-39.2 22.7c-11.2-3-48.1-10.2-60.1-12l4.9-31.5-4.9 31.5c-36.9-5.8-67.5-2.5-88.6 6.5z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faS = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'scale-balanced';\nvar width = 640;\nvar height = 512;\nvar aliases = [9878,\"balance-scale\"];\nvar unicode = 'f24e';\nvar svgPathData = 'M384 32l128 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L398.4 96c-5.2 25.8-22.9 47.1-46.4 57.3L352 448l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-192 0-192 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l160 0 0-294.7c-23.5-10.3-41.2-31.6-46.4-57.3L128 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l128 0c14.6-19.4 37.8-32 64-32s49.4 12.6 64 32zm55.6 288l144.9 0L512 195.8 439.6 320zM512 416c-62.9 0-115.2-34-126-78.9c-2.6-11 1-22.3 6.7-32.1l95.2-163.2c5-8.6 14.2-13.8 24.1-13.8s19.1 5.3 24.1 13.8l95.2 163.2c5.7 9.8 9.3 21.1 6.7 32.1C627.2 382 574.9 416 512 416zM126.8 195.8L54.4 320l144.9 0L126.8 195.8zM.9 337.1c-2.6-11 1-22.3 6.7-32.1l95.2-163.2c5-8.6 14.2-13.8 24.1-13.8s19.1 5.3 24.1 13.8l95.2 163.2c5.7 9.8 9.3 21.1 6.7 32.1C242 382 189.7 416 126.8 416S11.7 382 .9 337.1z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faScaleBalanced = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'scissors';\nvar width = 512;\nvar height = 512;\nvar aliases = [9984,9986,9988,\"cut\"];\nvar unicode = 'f0c4';\nvar svgPathData = 'M256 192l-39.5-39.5c4.9-12.6 7.5-26.2 7.5-40.5C224 50.1 173.9 0 112 0S0 50.1 0 112s50.1 112 112 112c14.3 0 27.9-2.7 40.5-7.5L192 256l-39.5 39.5c-12.6-4.9-26.2-7.5-40.5-7.5C50.1 288 0 338.1 0 400s50.1 112 112 112s112-50.1 112-112c0-14.3-2.7-27.9-7.5-40.5L499.2 76.8c7.1-7.1 7.1-18.5 0-25.6c-28.3-28.3-74.1-28.3-102.4 0L256 192zm22.6 150.6L396.8 460.8c28.3 28.3 74.1 28.3 102.4 0c7.1-7.1 7.1-18.5 0-25.6L342.6 278.6l-64 64zM64 112a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm48 240a48 48 0 1 1 0 96 48 48 0 1 1 0-96z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faScissors = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'screwdriver-wrench';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"tools\"];\nvar unicode = 'f7d9';\nvar svgPathData = 'M78.6 5C69.1-2.4 55.6-1.5 47 7L7 47c-8.5 8.5-9.4 22-2.1 31.6l80 104c4.5 5.9 11.6 9.4 19 9.4l54.1 0 109 109c-14.7 29-10 65.4 14.3 89.6l112 112c12.5 12.5 32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3l-112-112c-24.2-24.2-60.6-29-89.6-14.3l-109-109 0-54.1c0-7.5-3.5-14.5-9.4-19L78.6 5zM19.9 396.1C7.2 408.8 0 426.1 0 444.1C0 481.6 30.4 512 67.9 512c18 0 35.3-7.2 48-19.9L233.7 374.3c-7.8-20.9-9-43.6-3.6-65.1l-61.7-61.7L19.9 396.1zM512 144c0-10.5-1.1-20.7-3.2-30.5c-2.4-11.2-16.1-14.1-24.2-6l-63.9 63.9c-3 3-7.1 4.7-11.3 4.7L352 176c-8.8 0-16-7.2-16-16l0-57.4c0-4.2 1.7-8.3 4.7-11.3l63.9-63.9c8.1-8.1 5.2-21.8-6-24.2C388.7 1.1 378.5 0 368 0C288.5 0 224 64.5 224 144l0 .8 85.3 85.3c36-9.1 75.8 .5 104 28.7L429 274.5c49-23 83-72.8 83-130.5zM56 432a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faScrewdriverWrench = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'scroll';\nvar width = 576;\nvar height = 512;\nvar aliases = [128220];\nvar unicode = 'f70e';\nvar svgPathData = 'M0 80l0 48c0 17.7 14.3 32 32 32l16 0 48 0 0-80c0-26.5-21.5-48-48-48S0 53.5 0 80zM112 32c10 13.4 16 30 16 48l0 304c0 35.3 28.7 64 64 64s64-28.7 64-64l0-5.3c0-32.4 26.3-58.7 58.7-58.7L480 320l0-192c0-53-43-96-96-96L112 32zM464 480c61.9 0 112-50.1 112-112c0-8.8-7.2-16-16-16l-245.3 0c-14.7 0-26.7 11.9-26.7 26.7l0 5.3c0 53-43 96-96 96l176 0 96 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faScroll = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'section';\nvar width = 256;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'e447';\nvar svgPathData = 'M64.9 96C67.1 84.4 73.7 76.2 86 70.6c13.8-6.2 34.8-8.9 61.2-4.5c8.8 1.4 36.1 7.1 44.1 9.3c17 4.8 34.7-5.1 39.5-22.2s-5.1-34.7-22.2-39.5c-11.1-3.1-41-9.2-50.9-10.8C123-2.7 88.3-.6 59.7 12.3C29.9 25.8 7.5 50.9 1.6 86.5c-.1 .5-.2 1.1-.2 1.6c-2.2 19.7 .3 37.9 8.1 54.1c7.7 16.1 19.4 28 32 36.9c.6 .5 1.3 .9 2 1.4C22.3 194.2 6.5 215.1 1.7 243c-.1 .6-.2 1.1-.2 1.7c-2.3 19.3 .4 37.1 8.4 53c7.9 15.6 19.8 27 32.3 35.5c22.4 15.2 51.9 24 75.4 31c0 0 0 0 0 0l3.7 1.1c27.2 8.2 46.9 14.6 59.4 23.8c5.5 4 8.2 7.6 9.5 10.9c1.3 3.2 2.6 8.6 .9 18.1c-1.7 10.1-7.7 18-20.7 23.5c-14 6-35.4 8.5-62 4.4c-12.8-2.1-35.1-9.7-54.1-16.2c0 0 0 0 0 0c-4.3-1.5-8.5-2.9-12.3-4.2C25.3 420 7.2 429.1 1.6 445.8s3.5 34.9 20.3 40.5c2.6 .8 5.7 1.9 9.2 3.1c18.6 6.3 48.5 16.6 67.3 19.6c0 0 0 0 0 0l.2 0c34.5 5.4 68.8 3.4 97.2-8.7c29.4-12.6 52.5-36.5 58.5-71.5c3.3-19.3 1.9-37.4-5-53.9c-6.3-15-16.4-26.4-27.6-35.2c16.5-13.9 28.5-33.2 32.6-58.2c3.2-19.8 1.9-38.3-4.8-55.1c-6.7-16.8-17.8-29.4-30.2-39c-22.8-17.6-53.6-27.4-77.7-35l-1.4-.5c-27.4-8.7-47.8-15.3-61.5-25c-6.1-4.4-9.5-8.5-11.4-12.4c-1.8-3.7-3.2-9.3-2.3-18.5zm76.7 208.5l-.6-.2-1.4-.4c-27.4-8.2-47.9-14.5-61.7-23.8c-6.2-4.2-9.3-7.9-11-11.3c-1.5-3-2.9-7.7-2.1-15.7c1.9-9.7 7.9-17.3 20.5-22.7c14-6 35.4-8.5 62.1-4.3l16.4 2.6c6.3 2.9 11.7 6 16.2 9.5c5.5 4.2 8.4 8.2 10 12.2c1.6 4 2.8 10.4 1.1 20.9c-2.4 14.7-12.8 26.4-37.1 31l-12.4 2.3z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faSection = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'server';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f233';\nvar svgPathData = 'M64 32C28.7 32 0 60.7 0 96l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 32zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 288zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faServer = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'share';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"mail-forward\"];\nvar unicode = 'f064';\nvar svgPathData = 'M307 34.8c-11.5 5.1-19 16.6-19 29.2l0 64-112 0C78.8 128 0 206.8 0 304C0 417.3 81.5 467.9 100.2 478.1c2.5 1.4 5.3 1.9 8.1 1.9c10.9 0 19.7-8.9 19.7-19.7c0-7.5-4.3-14.4-9.8-19.5C108.8 431.9 96 414.4 96 384c0-53 43-96 96-96l96 0 0 64c0 12.6 7.4 24.1 19 29.2s25 3 34.4-5.4l160-144c6.7-6.1 10.6-14.7 10.6-23.8s-3.8-17.7-10.6-23.8l-160-144c-9.4-8.5-22.9-10.6-34.4-5.4z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faShare = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'share-nodes';\nvar width = 448;\nvar height = 512;\nvar aliases = [\"share-alt\"];\nvar unicode = 'f1e0';\nvar svgPathData = 'M352 224c53 0 96-43 96-96s-43-96-96-96s-96 43-96 96c0 4 .2 8 .7 11.9l-94.1 47C145.4 170.2 121.9 160 96 160c-53 0-96 43-96 96s43 96 96 96c25.9 0 49.4-10.2 66.6-26.9l94.1 47c-.5 3.9-.7 7.8-.7 11.9c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-25.9 0-49.4 10.2-66.6 26.9l-94.1-47c.5-3.9 .7-7.8 .7-11.9s-.2-8-.7-11.9l94.1-47C302.6 213.8 326.1 224 352 224z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faShareNodes = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'shield-halved';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"shield-alt\"];\nvar unicode = 'f3ed';\nvar svgPathData = 'M256 0c4.6 0 9.2 1 13.4 2.9L457.7 82.8c22 9.3 38.4 31 38.3 57.2c-.5 99.2-41.3 280.7-213.6 363.2c-16.7 8-36.1 8-52.8 0C57.3 420.7 16.5 239.2 16 140c-.1-26.2 16.3-47.9 38.3-57.2L242.7 2.9C246.8 1 251.4 0 256 0zm0 66.8l0 378.1C394 378 431.1 230.1 432 141.4L256 66.8s0 0 0 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faShieldHalved = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'shield-heart';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'e574';\nvar svgPathData = 'M269.4 2.9C265.2 1 260.7 0 256 0s-9.2 1-13.4 2.9L54.3 82.8c-22 9.3-38.4 31-38.3 57.2c.5 99.2 41.3 280.7 213.6 363.2c16.7 8 36.1 8 52.8 0C454.7 420.7 495.5 239.2 496 140c.1-26.2-16.3-47.9-38.3-57.2L269.4 2.9zM144 221.3c0-33.8 27.4-61.3 61.3-61.3c16.2 0 31.8 6.5 43.3 17.9l7.4 7.4 7.4-7.4c11.5-11.5 27.1-17.9 43.3-17.9c33.8 0 61.3 27.4 61.3 61.3c0 16.2-6.5 31.8-17.9 43.3l-82.7 82.7c-6.2 6.2-16.4 6.2-22.6 0l-82.7-82.7c-11.5-11.5-17.9-27.1-17.9-43.3z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faShieldHeart = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'sitemap';\nvar width = 576;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f0e8';\nvar svgPathData = 'M208 80c0-26.5 21.5-48 48-48l64 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-8 0 0 40 152 0c30.9 0 56 25.1 56 56l0 32 8 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-64 0c-26.5 0-48-21.5-48-48l0-64c0-26.5 21.5-48 48-48l8 0 0-32c0-4.4-3.6-8-8-8l-152 0 0 40 8 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-64 0c-26.5 0-48-21.5-48-48l0-64c0-26.5 21.5-48 48-48l8 0 0-40-152 0c-4.4 0-8 3.6-8 8l0 32 8 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-64 0c-26.5 0-48-21.5-48-48l0-64c0-26.5 21.5-48 48-48l8 0 0-32c0-30.9 25.1-56 56-56l152 0 0-40-8 0c-26.5 0-48-21.5-48-48l0-64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faSitemap = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'sliders';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"sliders-h\"];\nvar unicode = 'f1de';\nvar svgPathData = 'M0 416c0 17.7 14.3 32 32 32l54.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48L480 448c17.7 0 32-14.3 32-32s-14.3-32-32-32l-246.7 0c-12.3-28.3-40.5-48-73.3-48s-61 19.7-73.3 48L32 384c-17.7 0-32 14.3-32 32zm128 0a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM320 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm32-80c-32.8 0-61 19.7-73.3 48L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l246.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48l54.7 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-54.7 0c-12.3-28.3-40.5-48-73.3-48zM192 128a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm73.3-64C253 35.7 224.8 16 192 16s-61 19.7-73.3 48L32 64C14.3 64 0 78.3 0 96s14.3 32 32 32l86.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48L480 128c17.7 0 32-14.3 32-32s-14.3-32-32-32L265.3 64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faSliders = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'sort';\nvar width = 320;\nvar height = 512;\nvar aliases = [\"unsorted\"];\nvar unicode = 'f0dc';\nvar svgPathData = 'M137.4 41.4c12.5-12.5 32.8-12.5 45.3 0l128 128c9.2 9.2 11.9 22.9 6.9 34.9s-16.6 19.8-29.6 19.8L32 224c-12.9 0-24.6-7.8-29.6-19.8s-2.2-25.7 6.9-34.9l128-128zm0 429.3l-128-128c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8l256 0c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-128 128c-12.5 12.5-32.8 12.5-45.3 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faSort = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'spinner';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f110';\nvar svgPathData = 'M304 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm0 416a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM48 304a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm464-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM142.9 437A48 48 0 1 0 75 369.1 48 48 0 1 0 142.9 437zm0-294.2A48 48 0 1 0 75 75a48 48 0 1 0 67.9 67.9zM369.1 437A48 48 0 1 0 437 369.1 48 48 0 1 0 369.1 437z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faSpinner = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'square';\nvar width = 448;\nvar height = 512;\nvar aliases = [9632,9723,9724,61590];\nvar unicode = 'f0c8';\nvar svgPathData = 'M0 96C0 60.7 28.7 32 64 32H384c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faSquare = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'star';\nvar width = 576;\nvar height = 512;\nvar aliases = [11088,61446];\nvar unicode = 'f005';\nvar svgPathData = 'M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faStar = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'store';\nvar width = 576;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f54e';\nvar svgPathData = 'M547.6 103.8L490.3 13.1C485.2 5 476.1 0 466.4 0L109.6 0C99.9 0 90.8 5 85.7 13.1L28.3 103.8c-29.6 46.8-3.4 111.9 51.9 119.4c4 .5 8.1 .8 12.1 .8c26.1 0 49.3-11.4 65.2-29c15.9 17.6 39.1 29 65.2 29c26.1 0 49.3-11.4 65.2-29c15.9 17.6 39.1 29 65.2 29c26.2 0 49.3-11.4 65.2-29c16 17.6 39.1 29 65.2 29c4.1 0 8.1-.3 12.1-.8c55.5-7.4 81.8-72.5 52.1-119.4zM499.7 254.9c0 0 0 0-.1 0c-5.3 .7-10.7 1.1-16.2 1.1c-12.4 0-24.3-1.9-35.4-5.3L448 384l-320 0 0-133.4c-11.2 3.5-23.2 5.4-35.6 5.4c-5.5 0-11-.4-16.3-1.1l-.1 0c-4.1-.6-8.1-1.3-12-2.3L64 384l0 64c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-64 0-131.4c-4 1-8 1.8-12.3 2.3z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faStore = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 't';\nvar width = 384;\nvar height = 512;\nvar aliases = [116];\nvar unicode = '54';\nvar svgPathData = 'M32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l128 0 0 352c0 17.7 14.3 32 32 32s32-14.3 32-32l0-352 128 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 32 32 32z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faT = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'table';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f0ce';\nvar svgPathData = 'M64 256l0-96 160 0 0 96L64 256zm0 64l160 0 0 96L64 416l0-96zm224 96l0-96 160 0 0 96-160 0zM448 256l-160 0 0-96 160 0 0 96zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faTable = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'tablet';\nvar width = 448;\nvar height = 512;\nvar aliases = [\"tablet-android\"];\nvar unicode = 'f3fb';\nvar svgPathData = 'M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-384c0-35.3-28.7-64-64-64L64 0zM176 432l96 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-96 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faTablet = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'tags';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f02c';\nvar svgPathData = 'M345 39.1L472.8 168.4c52.4 53 52.4 138.2 0 191.2L360.8 472.9c-9.3 9.4-24.5 9.5-33.9 .2s-9.5-24.5-.2-33.9L438.6 325.9c33.9-34.3 33.9-89.4 0-123.7L310.9 72.9c-9.3-9.4-9.2-24.6 .2-33.9s24.6-9.2 33.9 .2zM0 229.5L0 80C0 53.5 21.5 32 48 32l149.5 0c17 0 33.3 6.7 45.3 18.7l168 168c25 25 25 65.5 0 90.5L277.3 442.7c-25 25-65.5 25-90.5 0l-168-168C6.7 262.7 0 246.5 0 229.5zM144 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faTags = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'temperature-half';\nvar width = 320;\nvar height = 512;\nvar aliases = [127777,\"temperature-2\",\"thermometer-2\",\"thermometer-half\"];\nvar unicode = 'f2c9';\nvar svgPathData = 'M160 64c-26.5 0-48 21.5-48 48l0 164.5c0 17.3-7.1 31.9-15.3 42.5C86.2 332.6 80 349.5 80 368c0 44.2 35.8 80 80 80s80-35.8 80-80c0-18.5-6.2-35.4-16.7-48.9c-8.2-10.6-15.3-25.2-15.3-42.5L208 112c0-26.5-21.5-48-48-48zM48 112C48 50.2 98.1 0 160 0s112 50.1 112 112l0 164.4c0 .1 .1 .3 .2 .6c.2 .6 .8 1.6 1.7 2.8c18.9 24.4 30.1 55 30.1 88.1c0 79.5-64.5 144-144 144S16 447.5 16 368c0-33.2 11.2-63.8 30.1-88.1c.9-1.2 1.5-2.2 1.7-2.8c.1-.3 .2-.5 .2-.6L48 112zM208 368c0 26.5-21.5 48-48 48s-48-21.5-48-48c0-20.9 13.4-38.7 32-45.3L144 208c0-8.8 7.2-16 16-16s16 7.2 16 16l0 114.7c18.6 6.6 32 24.4 32 45.3z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faTemperatureHalf = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'terminal';\nvar width = 576;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f120';\nvar svgPathData = 'M9.4 86.6C-3.1 74.1-3.1 53.9 9.4 41.4s32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L178.7 256 9.4 86.6zM256 416l288 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-288 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faTerminal = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'text-height';\nvar width = 576;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f034';\nvar svgPathData = 'M64 128l0-32 64 0 0 320-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0 0-320 64 0 0 32c0 17.7 14.3 32 32 32s32-14.3 32-32l0-48c0-26.5-21.5-48-48-48L160 32 48 32C21.5 32 0 53.5 0 80l0 48c0 17.7 14.3 32 32 32s32-14.3 32-32zM502.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l32 0 0 192-32 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8l-32 0 0-192 32 0c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-64-64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faTextHeight = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'text-width';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f035';\nvar svgPathData = 'M64 128l0-32 128 0 0 128-16 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-16 0 0-128 128 0 0 32c0 17.7 14.3 32 32 32s32-14.3 32-32l0-48c0-26.5-21.5-48-48-48L224 32 48 32C21.5 32 0 53.5 0 80l0 48c0 17.7 14.3 32 32 32s32-14.3 32-32zM9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-32 192 0 0 32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6l0 32-192 0 0-32c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faTextWidth = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'trash';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f1f8';\nvar svgPathData = 'M135.2 17.7L128 32 32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0-7.2-14.3C307.4 6.8 296.3 0 284.2 0L163.8 0c-12.1 0-23.2 6.8-28.6 17.7zM416 128L32 128 53.2 467c1.6 25.3 22.6 45 47.9 45l245.8 0c25.3 0 46.3-19.7 47.9-45L416 128z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faTrash = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'trash-can';\nvar width = 448;\nvar height = 512;\nvar aliases = [61460,\"trash-alt\"];\nvar unicode = 'f2ed';\nvar svgPathData = 'M135.2 17.7C140.6 6.8 151.7 0 163.8 0L284.2 0c12.1 0 23.2 6.8 28.6 17.7L320 32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 7.2-14.3zM32 128l384 0 0 320c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-320zm96 64c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faTrashCan = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'triangle-exclamation';\nvar width = 512;\nvar height = 512;\nvar aliases = [9888,\"exclamation-triangle\",\"warning\"];\nvar unicode = 'f071';\nvar svgPathData = 'M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faTriangleExclamation = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'trophy';\nvar width = 576;\nvar height = 512;\nvar aliases = [127942];\nvar unicode = 'f091';\nvar svgPathData = 'M400 0L176 0c-26.5 0-48.1 21.8-47.1 48.2c.2 5.3 .4 10.6 .7 15.8L24 64C10.7 64 0 74.7 0 88c0 92.6 33.5 157 78.5 200.7c44.3 43.1 98.3 64.8 138.1 75.8c23.4 6.5 39.4 26 39.4 45.6c0 20.9-17 37.9-37.9 37.9L192 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-26.1 0C337 448 320 431 320 410.1c0-19.6 15.9-39.2 39.4-45.6c39.9-11 93.9-32.7 138.2-75.8C542.5 245 576 180.6 576 88c0-13.3-10.7-24-24-24L446.4 64c.3-5.2 .5-10.4 .7-15.8C448.1 21.8 426.5 0 400 0zM48.9 112l84.4 0c9.1 90.1 29.2 150.3 51.9 190.6c-24.9-11-50.8-26.5-73.2-48.3c-32-31.1-58-76-63-142.3zM464.1 254.3c-22.4 21.8-48.3 37.3-73.2 48.3c22.7-40.3 42.8-100.5 51.9-190.6l84.4 0c-5.1 66.3-31.1 111.2-63 142.3z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faTrophy = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'unlock';\nvar width = 448;\nvar height = 512;\nvar aliases = [128275];\nvar unicode = 'f09c';\nvar svgPathData = 'M144 144c0-44.2 35.8-80 80-80c31.9 0 59.4 18.6 72.3 45.7c7.6 16 26.7 22.8 42.6 15.2s22.8-26.7 15.2-42.6C331 33.7 281.5 0 224 0C144.5 0 80 64.5 80 144l0 48-16 0c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-192c0-35.3-28.7-64-64-64l-240 0 0-48z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faUnlock = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'up-right-and-down-left-from-center';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"expand-alt\"];\nvar unicode = 'f424';\nvar svgPathData = 'M344 0L488 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87L327 41c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512L24 512c-13.3 0-24-10.7-24-24L0 344c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faUpRightAndDownLeftFromCenter = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'up-right-from-square';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"external-link-alt\"];\nvar unicode = 'f35d';\nvar svgPathData = 'M352 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9L370.7 96 201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L416 141.3l41.4 41.4c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-128c0-17.7-14.3-32-32-32L352 0zM80 32C35.8 32 0 67.8 0 112L0 432c0 44.2 35.8 80 80 80l320 0c44.2 0 80-35.8 80-80l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-320c0-8.8 7.2-16 16-16l112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faUpRightFromSquare = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'upload';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f093';\nvar svgPathData = 'M288 109.3L288 352c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-242.7-73.4 73.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l128-128c12.5-12.5 32.8-12.5 45.3 0l128 128c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L288 109.3zM64 352l128 0c0 35.3 28.7 64 64 64s64-28.7 64-64l128 0c35.3 0 64 28.7 64 64l0 32c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64l0-32c0-35.3 28.7-64 64-64zM432 456a24 24 0 1 0 0-48 24 24 0 1 0 0 48z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faUpload = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'user';\nvar width = 448;\nvar height = 512;\nvar aliases = [128100,62144];\nvar unicode = 'f007';\nvar svgPathData = 'M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304l-91.4 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faUser = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'user-plus';\nvar width = 640;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f234';\nvar svgPathData = 'M96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM0 482.3C0 383.8 79.8 304 178.3 304l91.4 0C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7L29.7 512C13.3 512 0 498.7 0 482.3zM504 312l0-64-64 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l64 0 0-64c0-13.3 10.7-24 24-24s24 10.7 24 24l0 64 64 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-64 0 0 64c0 13.3-10.7 24-24 24s-24-10.7-24-24z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faUserPlus = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'users';\nvar width = 640;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f0c0';\nvar svgPathData = 'M144 0a80 80 0 1 1 0 160A80 80 0 1 1 144 0zM512 0a80 80 0 1 1 0 160A80 80 0 1 1 512 0zM0 298.7C0 239.8 47.8 192 106.7 192l42.7 0c15.9 0 31 3.5 44.6 9.7c-1.3 7.2-1.9 14.7-1.9 22.3c0 38.2 16.8 72.5 43.3 96c-.2 0-.4 0-.7 0L21.3 320C9.6 320 0 310.4 0 298.7zM405.3 320c-.2 0-.4 0-.7 0c26.6-23.5 43.3-57.8 43.3-96c0-7.6-.7-15-1.9-22.3c13.6-6.3 28.7-9.7 44.6-9.7l42.7 0C592.2 192 640 239.8 640 298.7c0 11.8-9.6 21.3-21.3 21.3l-213.3 0zM224 224a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zM128 485.3C128 411.7 187.7 352 261.3 352l117.3 0C452.3 352 512 411.7 512 485.3c0 14.7-11.9 26.7-26.7 26.7l-330.7 0c-14.7 0-26.7-11.9-26.7-26.7z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faUsers = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'v';\nvar width = 384;\nvar height = 512;\nvar aliases = [118];\nvar unicode = '56';\nvar svgPathData = 'M19.7 34.5c16.3-6.8 35 .9 41.8 17.2L192 364.8 322.5 51.7c6.8-16.3 25.5-24 41.8-17.2s24 25.5 17.2 41.8l-160 384c-5 11.9-16.6 19.7-29.5 19.7s-24.6-7.8-29.5-19.7L2.5 76.3c-6.8-16.3 .9-35 17.2-41.8z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faV = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'vector-square';\nvar width = 448;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f5cb';\nvar svgPathData = 'M368 80l32 0 0 32-32 0 0-32zM352 32c-17.7 0-32 14.3-32 32L128 64c0-17.7-14.3-32-32-32L32 32C14.3 32 0 46.3 0 64l0 64c0 17.7 14.3 32 32 32l0 192c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l192 0c0 17.7 14.3 32 32 32l64 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l0-192c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-64 0zM96 160c17.7 0 32-14.3 32-32l192 0c0 17.7 14.3 32 32 32l0 192c-17.7 0-32 14.3-32 32l-192 0c0-17.7-14.3-32-32-32l0-192zM48 400l32 0 0 32-32 0 0-32zm320 32l0-32 32 0 0 32-32 0zM48 112l0-32 32 0 0 32-32 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faVectorSquare = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'video';\nvar width = 576;\nvar height = 512;\nvar aliases = [\"video-camera\"];\nvar unicode = 'f03d';\nvar svgPathData = 'M0 128C0 92.7 28.7 64 64 64l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128zM559.1 99.8c10.4 5.6 16.9 16.4 16.9 28.2l0 256c0 11.8-6.5 22.6-16.9 28.2s-23 5-32.9-1.6l-96-64L416 337.1l0-17.1 0-128 0-17.1 14.2-9.5 96-64c9.8-6.5 22.4-7.2 32.9-1.6z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faVideo = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'wallet';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f555';\nvar svgPathData = 'M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L80 128c-8.8 0-16-7.2-16-16s7.2-16 16-16l368 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L64 32zM416 272a32 32 0 1 1 0 64 32 32 0 1 1 0-64z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faWallet = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'wand-magic-sparkles';\nvar width = 576;\nvar height = 512;\nvar aliases = [\"magic-wand-sparkles\"];\nvar unicode = 'e2ca';\nvar svgPathData = 'M234.7 42.7L197 56.8c-3 1.1-5 4-5 7.2s2 6.1 5 7.2l37.7 14.1L248.8 123c1.1 3 4 5 7.2 5s6.1-2 7.2-5l14.1-37.7L315 71.2c3-1.1 5-4 5-7.2s-2-6.1-5-7.2L277.3 42.7 263.2 5c-1.1-3-4-5-7.2-5s-6.1 2-7.2 5L234.7 42.7zM46.1 395.4c-18.7 18.7-18.7 49.1 0 67.9l34.6 34.6c18.7 18.7 49.1 18.7 67.9 0L529.9 116.5c18.7-18.7 18.7-49.1 0-67.9L495.3 14.1c-18.7-18.7-49.1-18.7-67.9 0L46.1 395.4zM484.6 82.6l-105 105-23.3-23.3 105-105 23.3 23.3zM7.5 117.2C3 118.9 0 123.2 0 128s3 9.1 7.5 10.8L64 160l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L128 160l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L128 96 106.8 39.5C105.1 35 100.8 32 96 32s-9.1 3-10.8 7.5L64 96 7.5 117.2zm352 256c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L416 416l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L480 416l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L480 352l-21.2-56.5c-1.7-4.5-6-7.5-10.8-7.5s-9.1 3-10.8 7.5L416 352l-56.5 21.2z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faWandMagicSparkles = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'wave-square';\nvar width = 640;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f83e';\nvar svgPathData = 'M128 64c0-17.7 14.3-32 32-32l160 0c17.7 0 32 14.3 32 32l0 352 96 0 0-160c0-17.7 14.3-32 32-32l128 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0 0 160c0 17.7-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32l0-352-96 0 0 160c0 17.7-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l96 0 0-160z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faWaveSquare = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'weight-hanging';\nvar width = 512;\nvar height = 512;\nvar aliases = [];\nvar unicode = 'f5cd';\nvar svgPathData = 'M224 96a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm122.5 32c3.5-10 5.5-20.8 5.5-32c0-53-43-96-96-96s-96 43-96 96c0 11.2 1.9 22 5.5 32L120 128c-22 0-41.2 15-46.6 36.4l-72 288c-3.6 14.3-.4 29.5 8.7 41.2S33.2 512 48 512l416 0c14.8 0 28.7-6.8 37.8-18.5s12.3-26.8 8.7-41.2l-72-288C433.2 143 414 128 392 128l-45.5 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faWeightHanging = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'weight-scale';\nvar width = 512;\nvar height = 512;\nvar aliases = [\"weight\"];\nvar unicode = 'f496';\nvar svgPathData = 'M128 176a128 128 0 1 1 256 0 128 128 0 1 1 -256 0zM391.8 64C359.5 24.9 310.7 0 256 0S152.5 24.9 120.2 64L64 64C28.7 64 0 92.7 0 128L0 448c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64l-56.2 0zM296 224c0-10.6-4.1-20.2-10.9-27.4l33.6-78.3c3.5-8.1-.3-17.5-8.4-21s-17.5 .3-21 8.4L255.7 184c-22 .1-39.7 18-39.7 40c0 22.1 17.9 40 40 40s40-17.9 40-40z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faWeightScale = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'wifi';\nvar width = 640;\nvar height = 512;\nvar aliases = [\"wifi-3\",\"wifi-strong\"];\nvar unicode = 'f1eb';\nvar svgPathData = 'M54.2 202.9C123.2 136.7 216.8 96 320 96s196.8 40.7 265.8 106.9c12.8 12.2 33 11.8 45.2-.9s11.8-33-.9-45.2C549.7 79.5 440.4 32 320 32S90.3 79.5 9.8 156.7C-2.9 169-3.3 189.2 8.9 202s32.5 13.2 45.2 .9zM320 256c56.8 0 108.6 21.1 148.2 56c13.3 11.7 33.5 10.4 45.2-2.8s10.4-33.5-2.8-45.2C459.8 219.2 393 192 320 192s-139.8 27.2-190.5 72c-13.3 11.7-14.5 31.9-2.8 45.2s31.9 14.5 45.2 2.8c39.5-34.9 91.3-56 148.2-56zm64 160a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faWifi = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'x';\nvar width = 384;\nvar height = 512;\nvar aliases = [120];\nvar unicode = '58';\nvar svgPathData = 'M376.6 84.5c11.3-13.6 9.5-33.8-4.1-45.1s-33.8-9.5-45.1 4.1L192 206 56.6 43.5C45.3 29.9 25.1 28.1 11.5 39.4S-3.9 70.9 7.4 84.5L150.3 256 7.4 427.5c-11.3 13.6-9.5 33.8 4.1 45.1s33.8 9.5 45.1-4.1L192 306 327.4 468.5c11.3 13.6 31.5 15.4 45.1 4.1s15.4-31.5 4.1-45.1L233.7 256 376.6 84.5z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faX = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","'use strict';\nObject.defineProperty(exports, '__esModule', { value: true });\nvar prefix = 'fas';\nvar iconName = 'xmark';\nvar width = 384;\nvar height = 512;\nvar aliases = [128473,10005,10006,10060,215,\"close\",\"multiply\",\"remove\",\"times\"];\nvar unicode = 'f00d';\nvar svgPathData = 'M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z';\n\nexports.definition = {\n  prefix: prefix,\n  iconName: iconName,\n  icon: [\n    width,\n    height,\n    aliases,\n    unicode,\n    svgPathData\n  ]};\n\nexports.faXmark = exports.definition;\nexports.prefix = prefix;\nexports.iconName = iconName;\nexports.width = width;\nexports.height = height;\nexports.ligatures = aliases;\nexports.unicode = unicode;\nexports.svgPathData = svgPathData;\nexports.aliases = aliases;","import { DEBUG } from '@glimmer/env';\nimport { capabilities, setComponentManager } from '@ember/component';\nimport { destroy } from '@ember/destroyable';\nimport { schedule } from '@ember/runloop';\nimport { setOwner } from '@ember/owner';\n\nconst DESTROYING = new WeakMap();\nconst DESTROYED = new WeakMap();\nfunction setDestroying(component) {\n  DESTROYING.set(component, true);\n}\nfunction setDestroyed(component) {\n  DESTROYED.set(component, true);\n}\n\n// This provides a type-safe `WeakMap`: the getter and setter link the key to a\n// specific value. This is how `WeakMap`s actually behave, but the TS type\n// system does not (yet!) have a good way to capture that for types like\n// `WeakMap` where the type is generic over another generic type (here, `Args`).\n\n// SAFETY: this only holds because we *only* acces this when `DEBUG` is `true`.\n// There is not a great way to connect that data in TS at present.\nlet ARGS_SET;\nif (DEBUG) {\n  ARGS_SET = new WeakMap();\n}\n\n// --- Type utilities for component signatures --- //\n// Type-only \"symbol\" to use with `EmptyObject` below, so that it is *not*\n// equivalent to an empty interface.\n\n/**\n * This provides us a way to have a \"fallback\" which represents an empty object,\n * without the downsides of how TS treats `{}`. Specifically: this will\n * correctly leverage \"excess property checking\" so that, given a component\n * which has no named args, if someone invokes it with any named args, they will\n * get a type error.\n *\n * @internal This is exported so declaration emit works (if it were not emitted,\n *   declarations which fall back to it would not work). It is *not* intended for\n *   public usage, and the specific mechanics it uses may change at any time.\n *   The location of this export *is* part of the public API, because moving it\n *   will break existing declarations, but is not legal for end users to import\n *   themselves, so ***DO NOT RELY ON IT***.\n */\n\n/** Given a signature `S`, get back the `Args` type. */\n\n/**\n * Given any allowed shorthand form of a signature, desugars it to its full\n * expanded type.\n *\n * @internal This is only exported so we can avoid duplicating it in\n *   [Glint](https://github.com/typed-ember/glint) or other such tooling. It is\n *   *not* intended for public usage, and the specific mechanics it uses may\n *   change at any time. Although the signature produced by is part of Glimmer's\n *   public API the existence and mechanics of this specific symbol are *not*,\n *   so ***DO NOT RELY ON IT***.\n */\n// The conditional type here is because TS applies conditional types\n// distributively. This means that for union types, checks like `keyof T` get\n// all the keys from all elements of the union, instead of ending up as `never`\n// and then always falling into the `Signature` path instead of falling back to\n// the legacy args handling path.\n\n/**\n * @internal we use this type for convenience internally; inference means users\n *   should not normally need to name it\n */\n\n/**\n * The `Component` class defines an encapsulated UI element that is rendered to\n * the DOM. A component is made up of a template and, optionally, this component\n * object.\n *\n * ## Defining a Component\n *\n * To define a component, subclass `Component` and add your own properties,\n * methods and lifecycle hooks:\n *\n * ```ts\n * import Component from '@glimmer/component';\n *\n * export default class extends Component {\n * }\n * ```\n *\n * ## Lifecycle Hooks\n *\n * Lifecycle hooks allow you to respond to changes to a component, such as when\n * it gets created, rendered, updated or destroyed. To add a lifecycle hook to a\n * component, implement the hook as a method on your component subclass.\n *\n * For example, to be notified when Glimmer has rendered your component so you\n * can attach a legacy jQuery plugin, implement the `didInsertElement()` method:\n *\n * ```ts\n * import Component from '@glimmer/component';\n *\n * export default class extends Component {\n *   didInsertElement() {\n *     $(this.element).pickadate();\n *   }\n * }\n * ```\n *\n * ## Data for Templates\n *\n * `Component`s have two different kinds of data, or state, that can be\n * displayed in templates:\n *\n * 1. Arguments\n * 2. Properties\n *\n * Arguments are data that is passed in to a component from its parent\n * component. For example, if I have a `UserGreeting` component, I can pass it\n * a name and greeting to use:\n *\n * ```hbs\n * <UserGreeting @name=\"Ricardo\" @greeting=\"Olá\" />\n * ```\n *\n * Inside my `UserGreeting` template, I can access the `@name` and `@greeting`\n * arguments that I've been given:\n *\n * ```hbs\n * {{@greeting}}, {{@name}}!\n * ```\n *\n * Arguments are also available inside my component:\n *\n * ```ts\n * console.log(this.args.greeting); // prints \"Olá\"\n * ```\n *\n * Properties, on the other hand, are internal to the component and declared in\n * the class. You can use properties to store data that you want to show in the\n * template, or pass to another component as an argument.\n *\n * ```ts\n * import Component from '@glimmer/component';\n *\n * export default class extends Component {\n *   user = {\n *     name: 'Robbie'\n *   }\n * }\n * ```\n *\n * In the above example, we've defined a component with a `user` property that\n * contains an object with its own `name` property.\n *\n * We can render that property in our template:\n *\n * ```hbs\n * Hello, {{user.name}}!\n * ```\n *\n * We can also take that property and pass it as an argument to the\n * `UserGreeting` component we defined above:\n *\n * ```hbs\n * <UserGreeting @greeting=\"Hello\" @name={{user.name}} />\n * ```\n *\n * ## Arguments vs. Properties\n *\n * Remember, arguments are data that was given to your component by its parent\n * component, and properties are data your component has defined for itself.\n *\n * You can tell the difference between arguments and properties in templates\n * because arguments always start with an `@` sign (think \"A is for arguments\"):\n *\n * ```hbs\n * {{@firstName}}\n * ```\n *\n * We know that `@firstName` came from the parent component, not the current\n * component, because it starts with `@` and is therefore an argument.\n *\n * On the other hand, if we see:\n *\n * ```hbs\n * {{name}}\n * ```\n *\n * We know that `name` is a property on the component. If we want to know where\n * the data is coming from, we can go look at our component class to find out.\n *\n * Inside the component itself, arguments always show up inside the component's\n * `args` property. For example, if `{{@firstName}}` is `Tom` in the template,\n * inside the component `this.args.firstName` would also be `Tom`.\n */\nclass GlimmerComponent {\n  /**\n   * Constructs a new component and assigns itself the passed properties. You\n   * should not construct new components yourself. Instead, Glimmer will\n   * instantiate new components automatically as it renders.\n   *\n   * @param owner\n   * @param args\n   */\n  constructor(owner, args) {\n    if (DEBUG && !(owner !== null && typeof owner === 'object' && ARGS_SET.has(args))) {\n      throw new Error(`You must pass both the owner and args to super() in your component: ${this.constructor.name}. You can pass them directly, or use ...arguments to pass all arguments through.`);\n    }\n    this.args = args;\n    DESTROYING.set(this, false);\n    DESTROYED.set(this, false);\n  }\n\n  /**\n   * Named arguments passed to the component from its parent component.\n   * They can be accessed in JavaScript via `this.args.argumentName` and in the template via `@argumentName`.\n   *\n   * Say you have the following component, which will have two `args`, `firstName` and `lastName`:\n   *\n   * ```hbs\n   * <my-component @firstName=\"Arthur\" @lastName=\"Dent\" />\n   * ```\n   *\n   * If you needed to calculate `fullName` by combining both of them, you would do:\n   *\n   * ```ts\n   * didInsertElement() {\n   *   console.log(`Hi, my full name is ${this.args.firstName} ${this.args.lastName}`);\n   * }\n   * ```\n   *\n   * While in the template you could do:\n   *\n   * ```hbs\n   * <p>Welcome, {{@firstName}} {{@lastName}}!</p>\n   * ```\n   */\n  args;\n  get isDestroying() {\n    return DESTROYING.get(this) || false;\n  }\n  get isDestroyed() {\n    return DESTROYED.get(this) || false;\n  }\n\n  /**\n   * Called before the component has been removed from the DOM.\n   */\n  willDestroy() {}\n}\n\nclass BaseComponentManager {\n  owner;\n  constructor(owner) {\n    this.owner = owner;\n  }\n  createComponent(ComponentClass, args) {\n    if (DEBUG) {\n      ARGS_SET.set(args.named, true);\n    }\n    return new ComponentClass(this.owner, args.named);\n  }\n  getContext(component) {\n    return component;\n  }\n}\n\nconst CAPABILITIES = capabilities('3.13', {\n  destructor: true,\n  asyncLifecycleCallbacks: false,\n  updateHook: false\n});\nfunction scheduledDestroyComponent(component) {\n  if (component.isDestroyed) {\n    return;\n  }\n  destroy(component);\n  setDestroyed(component);\n}\n\n/**\n * This component manager runs in Ember.js environments and extends the base component manager to:\n *\n * 1. Properly destroy the component's associated `meta` data structure\n * 2. Schedule destruction using Ember's runloop\n */\nclass EmberGlimmerComponentManager extends BaseComponentManager {\n  capabilities = CAPABILITIES;\n  destroyComponent(component) {\n    if (component.isDestroying) {\n      return;\n    }\n    setDestroying(component);\n    schedule('actions', component, component.willDestroy);\n    schedule('destroy', this, scheduledDestroyComponent, component);\n  }\n}\n\n/**\n  A component is a reusable UI element that consists of a `.hbs` template and an\n  optional JavaScript class that defines its behavior. For example, someone\n  might make a `button` in the template and handle the click behavior in the\n  JavaScript file that shares the same name as the template.\n\n  Components are broken down into two categories:\n\n  - Components _without_ JavaScript, that are based only on a template. These\n    are called Template-only or TO components.\n  - Components _with_ JavaScript, which consist of a template and a backing\n    class.\n\n  Ember ships with two types of JavaScript classes for components:\n\n  1. Glimmer components, imported from `@glimmer/component`, which are the\n     default components for Ember Octane (3.15) and more recent editions.\n  2. Classic components, imported from `@ember/component`, which were the\n     default for older editions of Ember (pre 3.15).\n\n  Below is the documentation for Template-only and Glimmer components. If you\n  are looking for the API documentation for Classic components, it is\n  [available here](/ember/release/classes/Component). The source code for\n  Glimmer components can be found in [`@glimmer/component`](https://github.com/glimmerjs/glimmer.js/tree/master/packages/%40glimmer/component).\n\n  ## Defining a Template-only Component\n\n  The simplest way to create a component is to create a template file in\n  `app/templates/components`. For example, if you name a template\n  `app/templates/components/person-profile.hbs`:\n\n  ```app/templates/components/person-profile.hbs\n  <h1>{{@person.name}}</h1>\n  <img src={{@person.avatar}}>\n  <p class='signature'>{{@person.signature}}</p>\n  ```\n\n  You will be able to use `<PersonProfile />` to invoke this component elsewhere\n  in your application:\n\n  ```app/templates/application.hbs\n  <PersonProfile @person={{this.currentUser}} />\n  ```\n\n  Note that component names are capitalized here in order to distinguish them\n  from regular HTML elements, but they are dasherized in the file system.\n\n  While the angle bracket invocation form is generally preferred, it is also\n  possible to invoke the same component with the `{{person-profile}}` syntax:\n\n  ```app/templates/application.hbs\n  {{person-profile person=this.currentUser}}\n  ```\n\n  Note that with this syntax, you use dashes in the component name and\n  arguments are passed without the `@` sign.\n\n  In both cases, Ember will render the content of the component template we\n  created above. The end result will be something like this:\n\n  ```html\n  <h1>Tomster</h1>\n  <img src=\"https://emberjs.com/tomster.jpg\">\n  <p class='signature'>Out of office this week</p>\n  ```\n\n  ## File System Nesting\n\n  Components can be nested inside sub-folders for logical groupping. For\n  example, if we placed our template in\n  `app/templates/components/person/short-profile.hbs`, we can invoke it as\n  `<Person::ShortProfile />`:\n\n  ```app/templates/application.hbs\n  <Person::ShortProfile @person={{this.currentUser}} />\n  ```\n\n  Or equivalently, `{{person/short-profile}}`:\n\n  ```app/templates/application.hbs\n  {{person/short-profile person=this.currentUser}}\n  ```\n\n  ## Using Blocks\n\n  You can use `yield` inside a template to include the **contents** of any block\n  attached to the component. For instance, if we added a `{{yield}}` to our\n  component like so:\n\n  ```app/templates/components/person-profile.hbs\n  <h1>{{@person.name}}</h1>\n  {{yield}}\n  ```\n\n  We could then invoke it like this:\n\n  ```handlebars\n  <PersonProfile @person={{this.currentUser}}>\n    <p>Admin mode</p>\n  </PersonProfile>\n  ```\n\n  or with curly syntax like this:\n\n  ```handlebars\n  {{#person-profile person=this.currentUser}}\n    <p>Admin mode</p>\n  {{/person-profile}}\n  ```\n\n  And the content passed in between the brackets of the component would be\n  rendered in the same place as the `{{yield}}` within it, replacing it.\n\n  Blocks are executed in their original context, meaning they have access to the\n  scope and any in-scope variables where they were defined.\n\n  ### Passing parameters to blocks\n\n  You can also pass positional parameters to `{{yield}}`, which are then made\n  available in the block:\n\n  ```app/templates/components/person-profile.hbs\n  <h1>{{@person.name}}</h1>\n  {{yield @person.signature}}\n  ```\n\n  We can then use this value in the block like so:\n\n  ```handlebars\n  <PersonProfile @person={{this.currentUser}} as |signature|>\n    {{signature}}\n  </PersonProfile>\n  ```\n\n  ### Passing multiple blocks\n\n  You can pass multiple blocks to a component by giving them names, and\n  specifying which block you are yielding to with `{{yield}}`. For instance, if\n  we wanted to add a way for users to customize the title of our\n  `<PersonProfile>` component, we could add a named block inside of the header:\n\n  ```app/templates/components/person-profile.hbs\n  <h1>{{yield to=\"title\"}}</h1>\n  {{yield}}\n  ```\n\n  This component could then be invoked like so:\n\n  ```handlebars\n  <PersonProfile @person={{this.currentUser}}>\n    <:title>{{this.currentUser.name}}</:title>\n    <:default>{{this.currentUser.signature}}</:default>\n  </PersonProfile>\n  ```\n\n  When passing named blocks, you must name every block, including the `default`\n  block, which is the block that is defined if you do not pass a `to` parameter\n  to `{{yield}}`. Whenever you invoke a component without passing explicitly\n  named blocks, the passed block is considered the `default` block.\n\n  ### Passing parameters to named blocks\n\n  You can also pass parameters to named blocks:\n\n  ```app/templates/components/person-profile.hbs\n  <h1>{{yield @person.name to=\"title\"}}</h1>\n  {{yield @person.signature}}\n  ```\n\n  These parameters can then be used like so:\n\n  ```handlebars\n  <PersonProfile @person={{this.currentUser}}>\n    <:title as |name|>{{name}}</:title>\n    <:default as |signature|>{{signature}}</:default>\n  </PersonProfile>\n  ```\n\n  ### Checking to see if a block exists\n\n  You can also check to see if a block exists using the `(has-block)` keyword,\n  and conditionally use it, or provide a default template instead.\n\n  ```app/templates/components/person-profile.hbs\n  <h1>\n    {{#if (has-block \"title\")}}\n      {{yield @person.name to=\"title\"}}\n    {{else}}\n      {{@person.name}}\n    {{/if}}\n  </h1>\n\n  {{#if (has-block)}}\n    {{yield @person.signature}}\n  {{else}}\n    {{@person.signature}}\n  {{/if}}\n  ```\n\n  With this template, we can then optionally pass in one block, both blocks, or\n  none at all:\n\n  ```handlebars\n  {{! passing both blocks }}\n  <PersonProfile @person={{this.currentUser}}>\n    <:title as |name|>{{name}}</:title>\n    <:default as |signature|>{{signature}}</:default>\n  </PersonProfile>\n\n  {{! passing just the title block }}\n  <PersonProfile @person={{this.currentUser}}>\n    <:title as |name|>{{name}}</:title>\n  </PersonProfile>\n\n  {{! passing just the default block }}\n  <PersonProfile @person={{this.currentUser}} as |signature|>\n    {{signature}}\n  </PersonProfile>\n\n  {{! not passing any blocks }}\n  <PersonProfile @person={{this.currentUser}}/>\n  ```\n\n  ### Checking to see if a block has parameters\n\n  We can also check if a block receives parameters using the `(has-block-params)`\n  keyword, and conditionally yield different values if so.\n\n  ```app/templates/components/person-profile.hbs\n  {{#if (has-block-params)}}\n    {{yield @person.signature}}\n  {{else}}\n    {{yield}}\n  {{/if}}\n  ```\n\n  ## Customizing Components With JavaScript\n\n  To add JavaScript to a component, create a JavaScript file in the same\n  location as the template file, with the same name, and export a subclass\n  of `Component` as the default value. For example, to add Javascript to the\n  `PersonProfile` component which we defined above, we would create\n  `app/components/person-profile.js` and export our class as the default, like\n  so:\n\n  ```app/components/person-profile.js\n  import Component from '@glimmer/component';\n\n  export default class PersonProfileComponent extends Component {\n    get displayName() {\n      let { title, firstName, lastName } = this.args.person;\n\n      if (title) {\n        return `${title} ${lastName}`;\n      } else {\n        return `${firstName} ${lastName}`;\n      }\n    })\n  }\n  ```\n\n  You can add your own properties, methods, and lifecycle hooks to this\n  subclass to customize its behavior, and you can reference the instance of the\n  class in your template using `{{this}}`. For instance, we could access the\n  `displayName` property of our `PersonProfile` component instance in the\n  template like this:\n\n  ```app/templates/components/person-profile.hbs\n  <h1>{{this.displayName}}</h1>\n  {{yield}}\n  ```\n\n  ## `constructor`\n\n  params: `owner` object and `args` object\n\n  Constructs a new component and assigns itself the passed properties. The\n  constructor is run whenever a new instance of the component is created, and\n  can be used to setup the initial state of the component.\n\n  ```javascript\n  import Component from '@glimmer/component';\n\n  export default class SomeComponent extends Component {\n    constructor(owner, args) {\n      super(owner, args);\n\n      if (this.args.displayMode === 'list') {\n        this.items = [];\n      }\n    }\n  }\n  ```\n\n  Service injections and arguments are available in the constructor.\n\n  ```javascript\n  import Component from '@glimmer/component';\n  import { service } from '@ember/service';\n\n  export default class SomeComponent extends Component {\n    @service myAnimations;\n\n    constructor(owner, args) {\n      super(owner, args);\n\n      if (this.args.fadeIn === true) {\n        this.myAnimations.register(this, 'fade-in');\n      }\n    }\n  }\n  ```\n\n  ## `willDestroy`\n\n  `willDestroy` is called after the component has been removed from the DOM, but\n  before the component is fully destroyed. This lifecycle hook can be used to\n  cleanup the component and any related state.\n\n  ```javascript\n  import Component from '@glimmer/component';\n  import { service } from '@ember/service';\n\n  export default class SomeComponent extends Component {\n    @service myAnimations;\n\n    willDestroy() {\n      super.willDestroy();\n\n      this.myAnimations.unregister(this);\n    }\n  }\n  ```\n\n  ## `args`\n\n  The `args` property of Glimmer components is an object that contains the\n  _arguments_ that are passed to the component. For instance, the\n  following component usage:\n\n  ```handlebars\n  <SomeComponent @fadeIn={{true}} />\n  ```\n\n  Would result in the following `args` object to be passed to the component:\n\n  ```javascript\n  { fadeIn: true }\n  ```\n\n  `args` can be accessed at any point in the component lifecycle, including\n  `constructor` and `willDestroy`. They are also automatically marked as tracked\n  properties, and they can be depended on as computed property dependencies:\n\n  ```javascript\n  import Component from '@glimmer/component';\n  import { computed } from '@ember/object';\n\n  export default class SomeComponent extends Component {\n\n    @computed('args.someValue')\n    get computedGetter() {\n      // updates whenever args.someValue updates\n      return this.args.someValue;\n    }\n\n    get standardGetter() {\n      // updates whenever args.anotherValue updates (Ember 3.13+)\n      return this.args.anotherValue;\n    }\n  }\n  ```\n\n  ## `isDestroying`\n\n  A boolean flag to tell if the component is in the process of destroying. This is set to\n  true before `willDestroy` is called.\n\n  ## `isDestroyed`\n  A boolean to tell if the component has been fully destroyed. This is set to true\n  after `willDestroy` is called.\n\n  @module @glimmer/component\n  @public\n*/\nclass Component extends GlimmerComponent {\n  constructor(owner, args) {\n    super(owner, args);\n    if (DEBUG && !(owner !== null && typeof owner === 'object')) {\n      throw new Error(`You must pass both the owner and args to super() in your component: ${this.constructor.name}. You can pass them directly, or use ...arguments to pass all arguments through.`);\n    }\n    setOwner(this, owner);\n  }\n}\nsetComponentManager(owner => {\n  return new EmberGlimmerComponentManager(owner);\n}, Component);\n\nexport { Component as default };\n","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n  return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n  return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n  return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n  if (node == null) {\n    return window;\n  }\n\n  if (node.toString() !== '[object Window]') {\n    var ownerDocument = node.ownerDocument;\n    return ownerDocument ? ownerDocument.defaultView || window : window;\n  }\n\n  return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n  var OwnElement = getWindow(node).Element;\n  return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n  var OwnElement = getWindow(node).HTMLElement;\n  return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n  // IE 11 has no ShadowRoot\n  if (typeof ShadowRoot === 'undefined') {\n    return false;\n  }\n\n  var OwnElement = getWindow(node).ShadowRoot;\n  return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n  var state = _ref.state;\n  Object.keys(state.elements).forEach(function (name) {\n    var style = state.styles[name] || {};\n    var attributes = state.attributes[name] || {};\n    var element = state.elements[name]; // arrow is optional + virtual elements\n\n    if (!isHTMLElement(element) || !getNodeName(element)) {\n      return;\n    } // Flow doesn't support to extend this property, but it's the most\n    // effective way to apply styles to an HTMLElement\n    // $FlowFixMe[cannot-write]\n\n\n    Object.assign(element.style, style);\n    Object.keys(attributes).forEach(function (name) {\n      var value = attributes[name];\n\n      if (value === false) {\n        element.removeAttribute(name);\n      } else {\n        element.setAttribute(name, value === true ? '' : value);\n      }\n    });\n  });\n}\n\nfunction effect(_ref2) {\n  var state = _ref2.state;\n  var initialStyles = {\n    popper: {\n      position: state.options.strategy,\n      left: '0',\n      top: '0',\n      margin: '0'\n    },\n    arrow: {\n      position: 'absolute'\n    },\n    reference: {}\n  };\n  Object.assign(state.elements.popper.style, initialStyles.popper);\n  state.styles = initialStyles;\n\n  if (state.elements.arrow) {\n    Object.assign(state.elements.arrow.style, initialStyles.arrow);\n  }\n\n  return function () {\n    Object.keys(state.elements).forEach(function (name) {\n      var element = state.elements[name];\n      var attributes = state.attributes[name] || {};\n      var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n      var style = styleProperties.reduce(function (style, property) {\n        style[property] = '';\n        return style;\n      }, {}); // arrow is optional + virtual elements\n\n      if (!isHTMLElement(element) || !getNodeName(element)) {\n        return;\n      }\n\n      Object.assign(element.style, style);\n      Object.keys(attributes).forEach(function (attribute) {\n        element.removeAttribute(attribute);\n      });\n    });\n  };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'applyStyles',\n  enabled: true,\n  phase: 'write',\n  fn: applyStyles,\n  effect: effect,\n  requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n  return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n  var uaData = navigator.userAgentData;\n\n  if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n    return uaData.brands.map(function (item) {\n      return item.brand + \"/\" + item.version;\n    }).join(' ');\n  }\n\n  return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n  return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n  if (includeScale === void 0) {\n    includeScale = false;\n  }\n\n  if (isFixedStrategy === void 0) {\n    isFixedStrategy = false;\n  }\n\n  var clientRect = element.getBoundingClientRect();\n  var scaleX = 1;\n  var scaleY = 1;\n\n  if (includeScale && isHTMLElement(element)) {\n    scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n    scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n  }\n\n  var _ref = isElement(element) ? getWindow(element) : window,\n      visualViewport = _ref.visualViewport;\n\n  var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n  var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n  var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n  var width = clientRect.width / scaleX;\n  var height = clientRect.height / scaleY;\n  return {\n    width: width,\n    height: height,\n    top: y,\n    right: x + width,\n    bottom: y + height,\n    left: x,\n    x: x,\n    y: y\n  };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n  var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n  // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n  var width = element.offsetWidth;\n  var height = element.offsetHeight;\n\n  if (Math.abs(clientRect.width - width) <= 1) {\n    width = clientRect.width;\n  }\n\n  if (Math.abs(clientRect.height - height) <= 1) {\n    height = clientRect.height;\n  }\n\n  return {\n    x: element.offsetLeft,\n    y: element.offsetTop,\n    width: width,\n    height: height\n  };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n  var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n  if (parent.contains(child)) {\n    return true;\n  } // then fallback to custom implementation with Shadow DOM support\n  else if (rootNode && isShadowRoot(rootNode)) {\n      var next = child;\n\n      do {\n        if (next && parent.isSameNode(next)) {\n          return true;\n        } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n        next = next.parentNode || next.host;\n      } while (next);\n    } // Give up, the result is false\n\n\n  return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n  return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n  return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n  // $FlowFixMe[incompatible-return]: assume body is always available\n  return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n  element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n  if (getNodeName(element) === 'html') {\n    return element;\n  }\n\n  return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n    // $FlowFixMe[incompatible-return]\n    // $FlowFixMe[prop-missing]\n    element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n    element.parentNode || ( // DOM Element detected\n    isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n    // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n    getDocumentElement(element) // fallback\n\n  );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n  if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n  getComputedStyle(element).position === 'fixed') {\n    return null;\n  }\n\n  return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n  var isFirefox = /firefox/i.test(getUAString());\n  var isIE = /Trident/i.test(getUAString());\n\n  if (isIE && isHTMLElement(element)) {\n    // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n    var elementCss = getComputedStyle(element);\n\n    if (elementCss.position === 'fixed') {\n      return null;\n    }\n  }\n\n  var currentNode = getParentNode(element);\n\n  if (isShadowRoot(currentNode)) {\n    currentNode = currentNode.host;\n  }\n\n  while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n    var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n    // create a containing block.\n    // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n    if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n      return currentNode;\n    } else {\n      currentNode = currentNode.parentNode;\n    }\n  }\n\n  return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n  var window = getWindow(element);\n  var offsetParent = getTrueOffsetParent(element);\n\n  while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n    offsetParent = getTrueOffsetParent(offsetParent);\n  }\n\n  if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n    return window;\n  }\n\n  return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n  return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n  return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n  var v = within(min, value, max);\n  return v > max ? max : v;\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n  return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function getFreshSideObject() {\n  return {\n    top: 0,\n    right: 0,\n    bottom: 0,\n    left: 0\n  };\n}","export default function expandToHashMap(value, keys) {\n  return keys.reduce(function (hashMap, key) {\n    hashMap[key] = value;\n    return hashMap;\n  }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n  padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n    placement: state.placement\n  })) : padding;\n  return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n  var _state$modifiersData$;\n\n  var state = _ref.state,\n      name = _ref.name,\n      options = _ref.options;\n  var arrowElement = state.elements.arrow;\n  var popperOffsets = state.modifiersData.popperOffsets;\n  var basePlacement = getBasePlacement(state.placement);\n  var axis = getMainAxisFromPlacement(basePlacement);\n  var isVertical = [left, right].indexOf(basePlacement) >= 0;\n  var len = isVertical ? 'height' : 'width';\n\n  if (!arrowElement || !popperOffsets) {\n    return;\n  }\n\n  var paddingObject = toPaddingObject(options.padding, state);\n  var arrowRect = getLayoutRect(arrowElement);\n  var minProp = axis === 'y' ? top : left;\n  var maxProp = axis === 'y' ? bottom : right;\n  var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n  var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n  var arrowOffsetParent = getOffsetParent(arrowElement);\n  var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n  var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n  // outside of the popper bounds\n\n  var min = paddingObject[minProp];\n  var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n  var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n  var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n  var axisProp = axis;\n  state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n  var state = _ref2.state,\n      options = _ref2.options;\n  var _options$element = options.element,\n      arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n  if (arrowElement == null) {\n    return;\n  } // CSS selector\n\n\n  if (typeof arrowElement === 'string') {\n    arrowElement = state.elements.popper.querySelector(arrowElement);\n\n    if (!arrowElement) {\n      return;\n    }\n  }\n\n  if (!contains(state.elements.popper, arrowElement)) {\n    return;\n  }\n\n  state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'arrow',\n  enabled: true,\n  phase: 'main',\n  fn: arrow,\n  effect: effect,\n  requires: ['popperOffsets'],\n  requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n  return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n  top: 'auto',\n  right: 'auto',\n  bottom: 'auto',\n  left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n  var x = _ref.x,\n      y = _ref.y;\n  var dpr = win.devicePixelRatio || 1;\n  return {\n    x: round(x * dpr) / dpr || 0,\n    y: round(y * dpr) / dpr || 0\n  };\n}\n\nexport function mapToStyles(_ref2) {\n  var _Object$assign2;\n\n  var popper = _ref2.popper,\n      popperRect = _ref2.popperRect,\n      placement = _ref2.placement,\n      variation = _ref2.variation,\n      offsets = _ref2.offsets,\n      position = _ref2.position,\n      gpuAcceleration = _ref2.gpuAcceleration,\n      adaptive = _ref2.adaptive,\n      roundOffsets = _ref2.roundOffsets,\n      isFixed = _ref2.isFixed;\n  var _offsets$x = offsets.x,\n      x = _offsets$x === void 0 ? 0 : _offsets$x,\n      _offsets$y = offsets.y,\n      y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n  var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n    x: x,\n    y: y\n  }) : {\n    x: x,\n    y: y\n  };\n\n  x = _ref3.x;\n  y = _ref3.y;\n  var hasX = offsets.hasOwnProperty('x');\n  var hasY = offsets.hasOwnProperty('y');\n  var sideX = left;\n  var sideY = top;\n  var win = window;\n\n  if (adaptive) {\n    var offsetParent = getOffsetParent(popper);\n    var heightProp = 'clientHeight';\n    var widthProp = 'clientWidth';\n\n    if (offsetParent === getWindow(popper)) {\n      offsetParent = getDocumentElement(popper);\n\n      if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n        heightProp = 'scrollHeight';\n        widthProp = 'scrollWidth';\n      }\n    } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n    offsetParent = offsetParent;\n\n    if (placement === top || (placement === left || placement === right) && variation === end) {\n      sideY = bottom;\n      var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n      offsetParent[heightProp];\n      y -= offsetY - popperRect.height;\n      y *= gpuAcceleration ? 1 : -1;\n    }\n\n    if (placement === left || (placement === top || placement === bottom) && variation === end) {\n      sideX = right;\n      var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n      offsetParent[widthProp];\n      x -= offsetX - popperRect.width;\n      x *= gpuAcceleration ? 1 : -1;\n    }\n  }\n\n  var commonStyles = Object.assign({\n    position: position\n  }, adaptive && unsetSides);\n\n  var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n    x: x,\n    y: y\n  }, getWindow(popper)) : {\n    x: x,\n    y: y\n  };\n\n  x = _ref4.x;\n  y = _ref4.y;\n\n  if (gpuAcceleration) {\n    var _Object$assign;\n\n    return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n  }\n\n  return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n  var state = _ref5.state,\n      options = _ref5.options;\n  var _options$gpuAccelerat = options.gpuAcceleration,\n      gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n      _options$adaptive = options.adaptive,\n      adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n      _options$roundOffsets = options.roundOffsets,\n      roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n  var commonStyles = {\n    placement: getBasePlacement(state.placement),\n    variation: getVariation(state.placement),\n    popper: state.elements.popper,\n    popperRect: state.rects.popper,\n    gpuAcceleration: gpuAcceleration,\n    isFixed: state.options.strategy === 'fixed'\n  };\n\n  if (state.modifiersData.popperOffsets != null) {\n    state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n      offsets: state.modifiersData.popperOffsets,\n      position: state.options.strategy,\n      adaptive: adaptive,\n      roundOffsets: roundOffsets\n    })));\n  }\n\n  if (state.modifiersData.arrow != null) {\n    state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n      offsets: state.modifiersData.arrow,\n      position: 'absolute',\n      adaptive: false,\n      roundOffsets: roundOffsets\n    })));\n  }\n\n  state.attributes.popper = Object.assign({}, state.attributes.popper, {\n    'data-popper-placement': state.placement\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'computeStyles',\n  enabled: true,\n  phase: 'beforeWrite',\n  fn: computeStyles,\n  data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n  passive: true\n};\n\nfunction effect(_ref) {\n  var state = _ref.state,\n      instance = _ref.instance,\n      options = _ref.options;\n  var _options$scroll = options.scroll,\n      scroll = _options$scroll === void 0 ? true : _options$scroll,\n      _options$resize = options.resize,\n      resize = _options$resize === void 0 ? true : _options$resize;\n  var window = getWindow(state.elements.popper);\n  var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n  if (scroll) {\n    scrollParents.forEach(function (scrollParent) {\n      scrollParent.addEventListener('scroll', instance.update, passive);\n    });\n  }\n\n  if (resize) {\n    window.addEventListener('resize', instance.update, passive);\n  }\n\n  return function () {\n    if (scroll) {\n      scrollParents.forEach(function (scrollParent) {\n        scrollParent.removeEventListener('scroll', instance.update, passive);\n      });\n    }\n\n    if (resize) {\n      window.removeEventListener('resize', instance.update, passive);\n    }\n  };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'eventListeners',\n  enabled: true,\n  phase: 'write',\n  fn: function fn() {},\n  effect: effect,\n  data: {}\n};","var hash = {\n  left: 'right',\n  right: 'left',\n  bottom: 'top',\n  top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n  return placement.replace(/left|right|bottom|top/g, function (matched) {\n    return hash[matched];\n  });\n}","var hash = {\n  start: 'end',\n  end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n  return placement.replace(/start|end/g, function (matched) {\n    return hash[matched];\n  });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n  var win = getWindow(node);\n  var scrollLeft = win.pageXOffset;\n  var scrollTop = win.pageYOffset;\n  return {\n    scrollLeft: scrollLeft,\n    scrollTop: scrollTop\n  };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n  // If <html> has a CSS width greater than the viewport, then this will be\n  // incorrect for RTL.\n  // Popper 1 is broken in this case and never had a bug report so let's assume\n  // it's not an issue. I don't think anyone ever specifies width on <html>\n  // anyway.\n  // Browsers where the left scrollbar doesn't cause an issue report `0` for\n  // this (e.g. Edge 2019, IE11, Safari)\n  return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n  // Firefox wants us to check `-x` and `-y` variations as well\n  var _getComputedStyle = getComputedStyle(element),\n      overflow = _getComputedStyle.overflow,\n      overflowX = _getComputedStyle.overflowX,\n      overflowY = _getComputedStyle.overflowY;\n\n  return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n  if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n    // $FlowFixMe[incompatible-return]: assume body is always available\n    return node.ownerDocument.body;\n  }\n\n  if (isHTMLElement(node) && isScrollParent(node)) {\n    return node;\n  }\n\n  return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n  var _element$ownerDocumen;\n\n  if (list === void 0) {\n    list = [];\n  }\n\n  var scrollParent = getScrollParent(element);\n  var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n  var win = getWindow(scrollParent);\n  var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n  var updatedList = list.concat(target);\n  return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n  updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n  return Object.assign({}, rect, {\n    left: rect.x,\n    top: rect.y,\n    right: rect.x + rect.width,\n    bottom: rect.y + rect.height\n  });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n  var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n  rect.top = rect.top + element.clientTop;\n  rect.left = rect.left + element.clientLeft;\n  rect.bottom = rect.top + element.clientHeight;\n  rect.right = rect.left + element.clientWidth;\n  rect.width = element.clientWidth;\n  rect.height = element.clientHeight;\n  rect.x = rect.left;\n  rect.y = rect.top;\n  return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n  return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n  var clippingParents = listScrollParents(getParentNode(element));\n  var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n  var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n  if (!isElement(clipperElement)) {\n    return [];\n  } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n  return clippingParents.filter(function (clippingParent) {\n    return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n  });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n  var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n  var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n  var firstClippingParent = clippingParents[0];\n  var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n    var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n    accRect.top = max(rect.top, accRect.top);\n    accRect.right = min(rect.right, accRect.right);\n    accRect.bottom = min(rect.bottom, accRect.bottom);\n    accRect.left = max(rect.left, accRect.left);\n    return accRect;\n  }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n  clippingRect.width = clippingRect.right - clippingRect.left;\n  clippingRect.height = clippingRect.bottom - clippingRect.top;\n  clippingRect.x = clippingRect.left;\n  clippingRect.y = clippingRect.top;\n  return clippingRect;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n  var win = getWindow(element);\n  var html = getDocumentElement(element);\n  var visualViewport = win.visualViewport;\n  var width = html.clientWidth;\n  var height = html.clientHeight;\n  var x = 0;\n  var y = 0;\n\n  if (visualViewport) {\n    width = visualViewport.width;\n    height = visualViewport.height;\n    var layoutViewport = isLayoutViewport();\n\n    if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n      x = visualViewport.offsetLeft;\n      y = visualViewport.offsetTop;\n    }\n  }\n\n  return {\n    width: width,\n    height: height,\n    x: x + getWindowScrollBarX(element),\n    y: y\n  };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n  var _element$ownerDocumen;\n\n  var html = getDocumentElement(element);\n  var winScroll = getWindowScroll(element);\n  var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n  var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n  var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n  var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n  var y = -winScroll.scrollTop;\n\n  if (getComputedStyle(body || html).direction === 'rtl') {\n    x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n  }\n\n  return {\n    width: width,\n    height: height,\n    x: x,\n    y: y\n  };\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n  var reference = _ref.reference,\n      element = _ref.element,\n      placement = _ref.placement;\n  var basePlacement = placement ? getBasePlacement(placement) : null;\n  var variation = placement ? getVariation(placement) : null;\n  var commonX = reference.x + reference.width / 2 - element.width / 2;\n  var commonY = reference.y + reference.height / 2 - element.height / 2;\n  var offsets;\n\n  switch (basePlacement) {\n    case top:\n      offsets = {\n        x: commonX,\n        y: reference.y - element.height\n      };\n      break;\n\n    case bottom:\n      offsets = {\n        x: commonX,\n        y: reference.y + reference.height\n      };\n      break;\n\n    case right:\n      offsets = {\n        x: reference.x + reference.width,\n        y: commonY\n      };\n      break;\n\n    case left:\n      offsets = {\n        x: reference.x - element.width,\n        y: commonY\n      };\n      break;\n\n    default:\n      offsets = {\n        x: reference.x,\n        y: reference.y\n      };\n  }\n\n  var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n  if (mainAxis != null) {\n    var len = mainAxis === 'y' ? 'height' : 'width';\n\n    switch (variation) {\n      case start:\n        offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n        break;\n\n      case end:\n        offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n        break;\n\n      default:\n    }\n  }\n\n  return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var _options = options,\n      _options$placement = _options.placement,\n      placement = _options$placement === void 0 ? state.placement : _options$placement,\n      _options$strategy = _options.strategy,\n      strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n      _options$boundary = _options.boundary,\n      boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n      _options$rootBoundary = _options.rootBoundary,\n      rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n      _options$elementConte = _options.elementContext,\n      elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n      _options$altBoundary = _options.altBoundary,\n      altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n      _options$padding = _options.padding,\n      padding = _options$padding === void 0 ? 0 : _options$padding;\n  var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n  var altContext = elementContext === popper ? reference : popper;\n  var popperRect = state.rects.popper;\n  var element = state.elements[altBoundary ? altContext : elementContext];\n  var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n  var referenceClientRect = getBoundingClientRect(state.elements.reference);\n  var popperOffsets = computeOffsets({\n    reference: referenceClientRect,\n    element: popperRect,\n    strategy: 'absolute',\n    placement: placement\n  });\n  var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n  var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n  // 0 or negative = within the clipping rect\n\n  var overflowOffsets = {\n    top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n    bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n    left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n    right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n  };\n  var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n  if (elementContext === popper && offsetData) {\n    var offset = offsetData[placement];\n    Object.keys(overflowOffsets).forEach(function (key) {\n      var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n      var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n      overflowOffsets[key] += offset[axis] * multiply;\n    });\n  }\n\n  return overflowOffsets;\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n  if (getBasePlacement(placement) === auto) {\n    return [];\n  }\n\n  var oppositePlacement = getOppositePlacement(placement);\n  return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n  var state = _ref.state,\n      options = _ref.options,\n      name = _ref.name;\n\n  if (state.modifiersData[name]._skip) {\n    return;\n  }\n\n  var _options$mainAxis = options.mainAxis,\n      checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n      _options$altAxis = options.altAxis,\n      checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n      specifiedFallbackPlacements = options.fallbackPlacements,\n      padding = options.padding,\n      boundary = options.boundary,\n      rootBoundary = options.rootBoundary,\n      altBoundary = options.altBoundary,\n      _options$flipVariatio = options.flipVariations,\n      flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n      allowedAutoPlacements = options.allowedAutoPlacements;\n  var preferredPlacement = state.options.placement;\n  var basePlacement = getBasePlacement(preferredPlacement);\n  var isBasePlacement = basePlacement === preferredPlacement;\n  var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n  var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n    return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      padding: padding,\n      flipVariations: flipVariations,\n      allowedAutoPlacements: allowedAutoPlacements\n    }) : placement);\n  }, []);\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var checksMap = new Map();\n  var makeFallbackChecks = true;\n  var firstFittingPlacement = placements[0];\n\n  for (var i = 0; i < placements.length; i++) {\n    var placement = placements[i];\n\n    var _basePlacement = getBasePlacement(placement);\n\n    var isStartVariation = getVariation(placement) === start;\n    var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n    var len = isVertical ? 'width' : 'height';\n    var overflow = detectOverflow(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      altBoundary: altBoundary,\n      padding: padding\n    });\n    var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n    if (referenceRect[len] > popperRect[len]) {\n      mainVariationSide = getOppositePlacement(mainVariationSide);\n    }\n\n    var altVariationSide = getOppositePlacement(mainVariationSide);\n    var checks = [];\n\n    if (checkMainAxis) {\n      checks.push(overflow[_basePlacement] <= 0);\n    }\n\n    if (checkAltAxis) {\n      checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n    }\n\n    if (checks.every(function (check) {\n      return check;\n    })) {\n      firstFittingPlacement = placement;\n      makeFallbackChecks = false;\n      break;\n    }\n\n    checksMap.set(placement, checks);\n  }\n\n  if (makeFallbackChecks) {\n    // `2` may be desired in some cases – research later\n    var numberOfChecks = flipVariations ? 3 : 1;\n\n    var _loop = function _loop(_i) {\n      var fittingPlacement = placements.find(function (placement) {\n        var checks = checksMap.get(placement);\n\n        if (checks) {\n          return checks.slice(0, _i).every(function (check) {\n            return check;\n          });\n        }\n      });\n\n      if (fittingPlacement) {\n        firstFittingPlacement = fittingPlacement;\n        return \"break\";\n      }\n    };\n\n    for (var _i = numberOfChecks; _i > 0; _i--) {\n      var _ret = _loop(_i);\n\n      if (_ret === \"break\") break;\n    }\n  }\n\n  if (state.placement !== firstFittingPlacement) {\n    state.modifiersData[name]._skip = true;\n    state.placement = firstFittingPlacement;\n    state.reset = true;\n  }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'flip',\n  enabled: true,\n  phase: 'main',\n  fn: flip,\n  requiresIfExists: ['offset'],\n  data: {\n    _skip: false\n  }\n};","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var _options = options,\n      placement = _options.placement,\n      boundary = _options.boundary,\n      rootBoundary = _options.rootBoundary,\n      padding = _options.padding,\n      flipVariations = _options.flipVariations,\n      _options$allowedAutoP = _options.allowedAutoPlacements,\n      allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n  var variation = getVariation(placement);\n  var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n    return getVariation(placement) === variation;\n  }) : basePlacements;\n  var allowedPlacements = placements.filter(function (placement) {\n    return allowedAutoPlacements.indexOf(placement) >= 0;\n  });\n\n  if (allowedPlacements.length === 0) {\n    allowedPlacements = placements;\n  } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n  var overflows = allowedPlacements.reduce(function (acc, placement) {\n    acc[placement] = detectOverflow(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      padding: padding\n    })[getBasePlacement(placement)];\n    return acc;\n  }, {});\n  return Object.keys(overflows).sort(function (a, b) {\n    return overflows[a] - overflows[b];\n  });\n}","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n  if (preventedOffsets === void 0) {\n    preventedOffsets = {\n      x: 0,\n      y: 0\n    };\n  }\n\n  return {\n    top: overflow.top - rect.height - preventedOffsets.y,\n    right: overflow.right - rect.width + preventedOffsets.x,\n    bottom: overflow.bottom - rect.height + preventedOffsets.y,\n    left: overflow.left - rect.width - preventedOffsets.x\n  };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n  return [top, right, bottom, left].some(function (side) {\n    return overflow[side] >= 0;\n  });\n}\n\nfunction hide(_ref) {\n  var state = _ref.state,\n      name = _ref.name;\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var preventedOffsets = state.modifiersData.preventOverflow;\n  var referenceOverflow = detectOverflow(state, {\n    elementContext: 'reference'\n  });\n  var popperAltOverflow = detectOverflow(state, {\n    altBoundary: true\n  });\n  var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n  var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n  var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n  var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n  state.modifiersData[name] = {\n    referenceClippingOffsets: referenceClippingOffsets,\n    popperEscapeOffsets: popperEscapeOffsets,\n    isReferenceHidden: isReferenceHidden,\n    hasPopperEscaped: hasPopperEscaped\n  };\n  state.attributes.popper = Object.assign({}, state.attributes.popper, {\n    'data-popper-reference-hidden': isReferenceHidden,\n    'data-popper-escaped': hasPopperEscaped\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'hide',\n  enabled: true,\n  phase: 'main',\n  requiresIfExists: ['preventOverflow'],\n  fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n  var basePlacement = getBasePlacement(placement);\n  var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n  var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n    placement: placement\n  })) : offset,\n      skidding = _ref[0],\n      distance = _ref[1];\n\n  skidding = skidding || 0;\n  distance = (distance || 0) * invertDistance;\n  return [left, right].indexOf(basePlacement) >= 0 ? {\n    x: distance,\n    y: skidding\n  } : {\n    x: skidding,\n    y: distance\n  };\n}\n\nfunction offset(_ref2) {\n  var state = _ref2.state,\n      options = _ref2.options,\n      name = _ref2.name;\n  var _options$offset = options.offset,\n      offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n  var data = placements.reduce(function (acc, placement) {\n    acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n    return acc;\n  }, {});\n  var _data$state$placement = data[state.placement],\n      x = _data$state$placement.x,\n      y = _data$state$placement.y;\n\n  if (state.modifiersData.popperOffsets != null) {\n    state.modifiersData.popperOffsets.x += x;\n    state.modifiersData.popperOffsets.y += y;\n  }\n\n  state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'offset',\n  enabled: true,\n  phase: 'main',\n  requires: ['popperOffsets'],\n  fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n  var state = _ref.state,\n      name = _ref.name;\n  // Offsets are the actual position the popper needs to have to be\n  // properly positioned near its reference element\n  // This is the most basic placement, and will be adjusted by\n  // the modifiers in the next step\n  state.modifiersData[name] = computeOffsets({\n    reference: state.rects.reference,\n    element: state.rects.popper,\n    strategy: 'absolute',\n    placement: state.placement\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'popperOffsets',\n  enabled: true,\n  phase: 'read',\n  fn: popperOffsets,\n  data: {}\n};","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n  var state = _ref.state,\n      options = _ref.options,\n      name = _ref.name;\n  var _options$mainAxis = options.mainAxis,\n      checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n      _options$altAxis = options.altAxis,\n      checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n      boundary = options.boundary,\n      rootBoundary = options.rootBoundary,\n      altBoundary = options.altBoundary,\n      padding = options.padding,\n      _options$tether = options.tether,\n      tether = _options$tether === void 0 ? true : _options$tether,\n      _options$tetherOffset = options.tetherOffset,\n      tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n  var overflow = detectOverflow(state, {\n    boundary: boundary,\n    rootBoundary: rootBoundary,\n    padding: padding,\n    altBoundary: altBoundary\n  });\n  var basePlacement = getBasePlacement(state.placement);\n  var variation = getVariation(state.placement);\n  var isBasePlacement = !variation;\n  var mainAxis = getMainAxisFromPlacement(basePlacement);\n  var altAxis = getAltAxis(mainAxis);\n  var popperOffsets = state.modifiersData.popperOffsets;\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n    placement: state.placement\n  })) : tetherOffset;\n  var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n    mainAxis: tetherOffsetValue,\n    altAxis: tetherOffsetValue\n  } : Object.assign({\n    mainAxis: 0,\n    altAxis: 0\n  }, tetherOffsetValue);\n  var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n  var data = {\n    x: 0,\n    y: 0\n  };\n\n  if (!popperOffsets) {\n    return;\n  }\n\n  if (checkMainAxis) {\n    var _offsetModifierState$;\n\n    var mainSide = mainAxis === 'y' ? top : left;\n    var altSide = mainAxis === 'y' ? bottom : right;\n    var len = mainAxis === 'y' ? 'height' : 'width';\n    var offset = popperOffsets[mainAxis];\n    var min = offset + overflow[mainSide];\n    var max = offset - overflow[altSide];\n    var additive = tether ? -popperRect[len] / 2 : 0;\n    var minLen = variation === start ? referenceRect[len] : popperRect[len];\n    var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n    // outside the reference bounds\n\n    var arrowElement = state.elements.arrow;\n    var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n      width: 0,\n      height: 0\n    };\n    var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n    var arrowPaddingMin = arrowPaddingObject[mainSide];\n    var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n    // to include its full size in the calculation. If the reference is small\n    // and near the edge of a boundary, the popper can overflow even if the\n    // reference is not overflowing as well (e.g. virtual elements with no\n    // width or height)\n\n    var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n    var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n    var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n    var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n    var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n    var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n    var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n    var tetherMax = offset + maxOffset - offsetModifierValue;\n    var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n    popperOffsets[mainAxis] = preventedOffset;\n    data[mainAxis] = preventedOffset - offset;\n  }\n\n  if (checkAltAxis) {\n    var _offsetModifierState$2;\n\n    var _mainSide = mainAxis === 'x' ? top : left;\n\n    var _altSide = mainAxis === 'x' ? bottom : right;\n\n    var _offset = popperOffsets[altAxis];\n\n    var _len = altAxis === 'y' ? 'height' : 'width';\n\n    var _min = _offset + overflow[_mainSide];\n\n    var _max = _offset - overflow[_altSide];\n\n    var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n    var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n    var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n    var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n    var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n    popperOffsets[altAxis] = _preventedOffset;\n    data[altAxis] = _preventedOffset - _offset;\n  }\n\n  state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'preventOverflow',\n  enabled: true,\n  phase: 'main',\n  fn: preventOverflow,\n  requiresIfExists: ['offset']\n};","export default function getAltAxis(axis) {\n  return axis === 'x' ? 'y' : 'x';\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n  var rect = element.getBoundingClientRect();\n  var scaleX = round(rect.width) / element.offsetWidth || 1;\n  var scaleY = round(rect.height) / element.offsetHeight || 1;\n  return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n  if (isFixed === void 0) {\n    isFixed = false;\n  }\n\n  var isOffsetParentAnElement = isHTMLElement(offsetParent);\n  var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n  var documentElement = getDocumentElement(offsetParent);\n  var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n  var scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  var offsets = {\n    x: 0,\n    y: 0\n  };\n\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n    isScrollParent(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n\n    if (isHTMLElement(offsetParent)) {\n      offsets = getBoundingClientRect(offsetParent, true);\n      offsets.x += offsetParent.clientLeft;\n      offsets.y += offsetParent.clientTop;\n    } else if (documentElement) {\n      offsets.x = getWindowScrollBarX(documentElement);\n    }\n  }\n\n  return {\n    x: rect.left + scroll.scrollLeft - offsets.x,\n    y: rect.top + scroll.scrollTop - offsets.y,\n    width: rect.width,\n    height: rect.height\n  };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n  if (node === getWindow(node) || !isHTMLElement(node)) {\n    return getWindowScroll(node);\n  } else {\n    return getHTMLElementScroll(node);\n  }\n}","export default function getHTMLElementScroll(element) {\n  return {\n    scrollLeft: element.scrollLeft,\n    scrollTop: element.scrollTop\n  };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n  var map = new Map();\n  var visited = new Set();\n  var result = [];\n  modifiers.forEach(function (modifier) {\n    map.set(modifier.name, modifier);\n  }); // On visiting object, check for its dependencies and visit them recursively\n\n  function sort(modifier) {\n    visited.add(modifier.name);\n    var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n    requires.forEach(function (dep) {\n      if (!visited.has(dep)) {\n        var depModifier = map.get(dep);\n\n        if (depModifier) {\n          sort(depModifier);\n        }\n      }\n    });\n    result.push(modifier);\n  }\n\n  modifiers.forEach(function (modifier) {\n    if (!visited.has(modifier.name)) {\n      // check for visited object\n      sort(modifier);\n    }\n  });\n  return result;\n}\n\nexport default function orderModifiers(modifiers) {\n  // order based on dependencies\n  var orderedModifiers = order(modifiers); // order based on phase\n\n  return modifierPhases.reduce(function (acc, phase) {\n    return acc.concat(orderedModifiers.filter(function (modifier) {\n      return modifier.phase === phase;\n    }));\n  }, []);\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n  placement: 'bottom',\n  modifiers: [],\n  strategy: 'absolute'\n};\n\nfunction areValidElements() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n\n  return !args.some(function (element) {\n    return !(element && typeof element.getBoundingClientRect === 'function');\n  });\n}\n\nexport function popperGenerator(generatorOptions) {\n  if (generatorOptions === void 0) {\n    generatorOptions = {};\n  }\n\n  var _generatorOptions = generatorOptions,\n      _generatorOptions$def = _generatorOptions.defaultModifiers,\n      defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n      _generatorOptions$def2 = _generatorOptions.defaultOptions,\n      defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n  return function createPopper(reference, popper, options) {\n    if (options === void 0) {\n      options = defaultOptions;\n    }\n\n    var state = {\n      placement: 'bottom',\n      orderedModifiers: [],\n      options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n      modifiersData: {},\n      elements: {\n        reference: reference,\n        popper: popper\n      },\n      attributes: {},\n      styles: {}\n    };\n    var effectCleanupFns = [];\n    var isDestroyed = false;\n    var instance = {\n      state: state,\n      setOptions: function setOptions(setOptionsAction) {\n        var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n        cleanupModifierEffects();\n        state.options = Object.assign({}, defaultOptions, state.options, options);\n        state.scrollParents = {\n          reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n          popper: listScrollParents(popper)\n        }; // Orders the modifiers based on their dependencies and `phase`\n        // properties\n\n        var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n        state.orderedModifiers = orderedModifiers.filter(function (m) {\n          return m.enabled;\n        });\n        runModifierEffects();\n        return instance.update();\n      },\n      // Sync update – it will always be executed, even if not necessary. This\n      // is useful for low frequency updates where sync behavior simplifies the\n      // logic.\n      // For high frequency updates (e.g. `resize` and `scroll` events), always\n      // prefer the async Popper#update method\n      forceUpdate: function forceUpdate() {\n        if (isDestroyed) {\n          return;\n        }\n\n        var _state$elements = state.elements,\n            reference = _state$elements.reference,\n            popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n        // anymore\n\n        if (!areValidElements(reference, popper)) {\n          return;\n        } // Store the reference and popper rects to be read by modifiers\n\n\n        state.rects = {\n          reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n          popper: getLayoutRect(popper)\n        }; // Modifiers have the ability to reset the current update cycle. The\n        // most common use case for this is the `flip` modifier changing the\n        // placement, which then needs to re-run all the modifiers, because the\n        // logic was previously ran for the previous placement and is therefore\n        // stale/incorrect\n\n        state.reset = false;\n        state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n        // is filled with the initial data specified by the modifier. This means\n        // it doesn't persist and is fresh on each update.\n        // To ensure persistent data, use `${name}#persistent`\n\n        state.orderedModifiers.forEach(function (modifier) {\n          return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n        });\n\n        for (var index = 0; index < state.orderedModifiers.length; index++) {\n          if (state.reset === true) {\n            state.reset = false;\n            index = -1;\n            continue;\n          }\n\n          var _state$orderedModifie = state.orderedModifiers[index],\n              fn = _state$orderedModifie.fn,\n              _state$orderedModifie2 = _state$orderedModifie.options,\n              _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n              name = _state$orderedModifie.name;\n\n          if (typeof fn === 'function') {\n            state = fn({\n              state: state,\n              options: _options,\n              name: name,\n              instance: instance\n            }) || state;\n          }\n        }\n      },\n      // Async and optimistically optimized update – it will not be executed if\n      // not necessary (debounced to run at most once-per-tick)\n      update: debounce(function () {\n        return new Promise(function (resolve) {\n          instance.forceUpdate();\n          resolve(state);\n        });\n      }),\n      destroy: function destroy() {\n        cleanupModifierEffects();\n        isDestroyed = true;\n      }\n    };\n\n    if (!areValidElements(reference, popper)) {\n      return instance;\n    }\n\n    instance.setOptions(options).then(function (state) {\n      if (!isDestroyed && options.onFirstUpdate) {\n        options.onFirstUpdate(state);\n      }\n    }); // Modifiers have the ability to execute arbitrary code before the first\n    // update cycle runs. They will be executed in the same order as the update\n    // cycle. This is useful when a modifier adds some persistent data that\n    // other modifiers need to use, but the modifier is run after the dependent\n    // one.\n\n    function runModifierEffects() {\n      state.orderedModifiers.forEach(function (_ref) {\n        var name = _ref.name,\n            _ref$options = _ref.options,\n            options = _ref$options === void 0 ? {} : _ref$options,\n            effect = _ref.effect;\n\n        if (typeof effect === 'function') {\n          var cleanupFn = effect({\n            state: state,\n            name: name,\n            instance: instance,\n            options: options\n          });\n\n          var noopFn = function noopFn() {};\n\n          effectCleanupFns.push(cleanupFn || noopFn);\n        }\n      });\n    }\n\n    function cleanupModifierEffects() {\n      effectCleanupFns.forEach(function (fn) {\n        return fn();\n      });\n      effectCleanupFns = [];\n    }\n\n    return instance;\n  };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","export default function debounce(fn) {\n  var pending;\n  return function () {\n    if (!pending) {\n      pending = new Promise(function (resolve) {\n        Promise.resolve().then(function () {\n          pending = undefined;\n          resolve(fn());\n        });\n      });\n    }\n\n    return pending;\n  };\n}","export default function mergeByName(modifiers) {\n  var merged = modifiers.reduce(function (merged, current) {\n    var existing = merged[current.name];\n    merged[current.name] = existing ? Object.assign({}, existing, current, {\n      options: Object.assign({}, existing.options, current.options),\n      data: Object.assign({}, existing.data, current.data)\n    }) : current;\n    return merged;\n  }, {}); // IE11 does not support Object.values\n\n  return Object.keys(merged).map(function (key) {\n    return merged[key];\n  });\n}","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n  defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n  defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","import { getOrSetGlobal, peekTransient, setTransient } from './types/-private.js';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nimport './types/request.js';\nimport { g as getPromiseResult, s as setPromiseResult } from \"./future-BKkJJkj7.js\";\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\nconst ARRAY_SIGNAL = getOrSetGlobal('#[]', Symbol('#[]'));\nconst OBJECT_SIGNAL = getOrSetGlobal('#{}', Symbol('#{}'));\n\n/**\n * Requirements:\n *\n * Signal:\n *\n * - signal: a way of creating a reference that we can dirty when we desire to notify\n *         - @signal: a way of creating an accessor on an object that subscribes to a signal on access\n *                    and notifies the signal on set, or of upgrading a descriptor to be such an accessor\n *         - defineSignal: a way of creating a signal on an object\n *         - notifySignal: a way of notifying the underlying signal that it has been dirtied\n *         - peekSignal: a way of inspecting the signal without notifying it\n *\n *  - gate: a memoized getter function that re-runs when on access if its signal is dirty\n *          conceptually, a gate is a tightly coupled signal and memo\n *         - @gate: a way of creating a gate on an object or upgrading a descriptor with a getter\n *                  to be a gate\n *         - defineGate: a way of creating a gate on an object\n *         - notifySignal: a way of notifying the signal for a gate that it has been dirtied\n *\n * - memo:\n *        - @memo: a way of creating a memoized getter on an object or upgrading a descriptor with a getter\n *                 to be a memo\n *        - defineMemo: a way of creating a memo on an object\n *\n * - signalStore: storage bucket for signals associated to an object\n *        - withSignalStore: a way of pre-creating a signal store on an object\n *\n *\n * @internal\n */\n\n/**\n * An Opaque type that represents a framework specific or TC39 signal.\n *\n * It may be an array of signals or a single signal.\n *\n * @private\n */\n\n/**\n * The hooks which MUST be configured in order to use reactive arrays,\n * resources and documents with framework specfic signals or TC39 signals.\n *\n * Support for multiple frameworks simultaneously can be done via\n * this abstraction by returning multiple signals from the `createSignal`\n * method, and consuming the correct one via the correct framework via\n * the `consumeSignal` and `notifySignal` methods.\n *\n * Unlike many signals implementations, WarpDrive does not wrap values as\n * signals directly, but instead uses signals to alert the reactive layer\n * to changes in the underlying cache. E.g. a signal is associated to a value,\n * but does not serve as the cache for that value directly. We refer to this as\n * a \"gate\", the pattern has also been called \"side-signals\".\n *\n * A no-op implementation is allowed, though it may lead to performance issues\n * in locations that use createMemo as no memoization would be done. This is\n * typically desirable only when integrating with a framework that does its own\n * memoization and does not integrate with any signals-like primitive. For these\n * scenarios you may also be interested in integrating with the {@link NotificationManager}\n * more directly.\n *\n * @public\n */\n\n/**\n * Contains information a {@link SignalHooks} implementation may want\n * to use, such as the specialized key used for the signal\n * representing an array's contents / length.\n *\n * ```ts\n * interface HooksOptions {\n *   wellknown: {\n *     Array: symbol | string;\n *   }\n * }\n * ```\n *\n * @public\n */\n\n/**\n * Configures the signals implementation to use. Supports multiple\n * implementations simultaneously.\n *\n * See {@link HooksOptions} for the options passed to the provided function\n * when called.\n *\n * See {@link SignalHooks} for the implementation the callback function should\n * return.\n *\n * @public\n * @param buildConfig - a function that takes options and returns a configuration object\n */\nfunction setupSignals(buildConfig) {\n  // We want to assert this but can't because too many package manager\n  // and bundler bugs exist that cause this to be called multiple times\n  // for what should be a single call.\n  // assert(`Cannot override configured signal hooks`, peekTransient('signalHooks') === null);\n  const hooks = buildConfig({\n    wellknown: {\n      Array: ARRAY_SIGNAL\n    }\n  });\n  setTransient('signalHooks', hooks);\n}\n\n/**\n * Internal method for consuming the configured `createSignal` hook\n *\n * @private\n */\nfunction createSignal(obj, key) {\n  const signalHooks = peekTransient('signalHooks');\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Signal hooks not configured`);\n    }\n  })(signalHooks) : {};\n  return signalHooks.createSignal(obj, key);\n}\n\n/**\n * Internal method for consuming the configured `consumeSignal` hook\n *\n * @private\n */\nfunction consumeSignal(signal) {\n  const signalHooks = peekTransient('signalHooks');\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Signal hooks not configured`);\n    }\n  })(signalHooks) : {};\n  return signalHooks.consumeSignal(signal);\n}\n\n/**\n * Internal method for consuming the configured `notifySignal` hook\n *\n * @private\n */\nfunction notifySignal(signal) {\n  const signalHooks = peekTransient('signalHooks');\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Signal hooks not configured`);\n    }\n  })(signalHooks) : {};\n  return signalHooks.notifySignal(signal);\n}\nfunction createMemo(object, key, fn) {\n  const signalHooks = peekTransient('signalHooks');\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Signal hooks not configured`);\n    }\n  })(signalHooks) : {};\n  return signalHooks.createMemo(object, key, fn);\n}\nfunction willSyncFlushWatchers() {\n  const signalHooks = peekTransient('signalHooks');\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Signal hooks not configured`);\n    }\n  })(signalHooks) : {};\n  return signalHooks.willSyncFlushWatchers();\n}\nfunction waitFor(promise) {\n  const signalHooks = peekTransient('signalHooks');\n  if (signalHooks?.waitFor) {\n    return signalHooks.waitFor(promise);\n  }\n  return promise;\n}\nconst INITIALIZER_PROTO = {\n  isInitializer: true\n};\nfunction makeInitializer(fn) {\n  // we use a prototype to ensure that the initializer is not enumerable\n  // and does not interfere with the signal's value.\n  return Object.assign(Object.create(INITIALIZER_PROTO), {\n    value: fn\n  });\n}\nfunction isInitializer(obj) {\n  return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === INITIALIZER_PROTO;\n}\n\n/**\n * A WarpDriveSignal is a wrapper around a framework specific or TC39 signal\n * that enables us to store and manage the signal in a universal way.\n *\n * WarpDrive uses signals to manage three separate concepts:\n *\n * - as a `storage` for a value local to the object that we want to be reactive\n *   (see `@local` schema field for an example)\n * - as a `gate` for a memoized getter that we want to act as a reactive property\n *   but whose value is computed/pulled from a non-reactive source elsewhere\n *   and whose latest value is stored in the signal\n *   (see `field` schema field for an example)\n * - as a `gate` with a manually managed value updated on pull when `isStale` is true\n *\n *\n * It offers\n *\n * - a non-reactive way to access/update the current value\n * - a non-reactive way to mark the signal as dirtied\n * - a non-reactive way to store content for why the signal was dirtied\n * - access to the underlying Signal(s) in-use\n *\n * For debugging:\n * - the \"key\" or \"name\" of the signal\n * - the \"object identity\" or \"context\" to which the signal is attached\n *\n * @private\n */\n\n/**\n * We attach signals to their context object via\n * a Map attached to the object via this symbol.\n *\n * This allows us to store multiple signals\n * on the same object with smaller memory\n * overhead and no WeakMap lookups.\n *\n * Performance sensitive objects should\n * pre-warm their shape by assigning this\n * during initialization.\n *\n * ```ts\n * initializeSignalStore(obj);\n * ```\n *\n * @private\n */\nconst Signals = getOrSetGlobal('Signals', Symbol('Signals'));\n\n/**\n * A util that will create a signal store on the object\n * if it does not already exist and returns the associated\n * signal store.\n *\n * @private\n */\nfunction withSignalStore(obj) {\n  if (!obj[Signals]) {\n    initializeSignalStore(obj);\n  }\n  return obj[Signals];\n}\n\n/**\n * A util that will create a signal store on the object\n * if it does not already exist.\n *\n * Useful for pre-warming the shape of an object to ensure\n * a key-transition to add it is not required later.\n *\n * @private\n */\nfunction initializeSignalStore(obj) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Signal store already exists on object`);\n    }\n  })(!obj[Signals]) : {};\n  obj[Signals] = new Map();\n}\nfunction createInternalSignal(signals, obj, key, initialValue) {\n  const warpDriveSignal = {\n    key,\n    context: obj,\n    signal: createSignal(obj, key),\n    value: isInitializer(initialValue) ? initialValue.value.call(obj) : initialValue,\n    isStale: false\n  };\n  signals.set(key, warpDriveSignal);\n  return warpDriveSignal;\n}\nfunction getOrCreateInternalSignal(signals, obj, key, initialValue) {\n  let signal = peekInternalSignal(signals, key);\n  if (!signal) {\n    signal = createInternalSignal(signals, obj, key, initialValue);\n  }\n  return signal;\n}\nfunction createInternalMemo(signals, object, key, fn) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected no signal/memo to exist for key \"${String(key)}\"`);\n    }\n  })(!peekInternalSignal(signals, key)) : {};\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    return withFrame(signals, object, key, fn);\n  } else {\n    const memo = createMemo(object, key, fn);\n    signals.set(key, memo);\n    return memo;\n  }\n}\nfunction peekInternalSignal(signals, key) {\n  return signals?.get(key);\n}\nfunction consumeInternalSignal(signal) {\n  TrackingFrame?.signals.add(signal);\n  consumeSignal(signal.signal);\n}\nfunction notifyInternalSignal(signal) {\n  if (signal) {\n    signal.isStale = true;\n    notifySignal(signal.signal);\n  }\n}\nlet TrackingFrame = null;\n\n/**\n * This is currently just for signals debugging, but it could be used in production\n * if we wanted to eliminate the need for frameworks to implement createMemo / to\n * allow us to add our own Watcher.\n *\n * @internal\n */\nfunction withFrame(signals, object, key, fn) {\n  const frameSignals = new Set();\n  const frameFn = () => {\n    if (frameSignals.size) {\n      frameSignals.clear();\n    }\n    TrackingFrame = {\n      object,\n      key,\n      signals: frameSignals,\n      parent: TrackingFrame\n    };\n    try {\n      return fn();\n    } finally {\n      TrackingFrame = TrackingFrame.parent;\n    }\n  };\n  const memo = createMemo(object, key, frameFn);\n  // @ts-expect-error\n  memo.signals = frameSignals;\n  signals.set(key, memo);\n  return memo;\n}\nfunction isMemo(obj) {\n  // @ts-expect-error\n  return typeof obj === 'function' && obj.signals instanceof Set;\n}\nif (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n  // @ts-expect-error adding to global API\n  globalThis.debugWarpDriveSignals = (obj, key) => {\n    const signals = obj[Signals];\n    if (!signals) {\n      log('The object has no associated signals');\n      return false;\n    }\n    if (key) {\n      const signal = signals.get(key);\n      if (!signal) {\n        log(`No signal found for key \"${String(key)}\"`);\n        return false;\n      }\n      log(signal);\n      if (isMemo(signal)) {\n        colorizeLines(printMemo(signal, key));\n        return true;\n      } else {\n        colorizeLines(printSignal(signal, key));\n        return true;\n      }\n    }\n    const lines = [];\n    for (const [k, signal] of signals) {\n      if (isMemo(signal)) continue;\n      printSignal(signal, k, lines);\n    }\n    for (const [k, signal] of signals) {\n      if (isMemo(signal)) {\n        printMemo(signal, k, lines);\n      }\n    }\n    log(signals);\n    colorizeLines(lines);\n    return true;\n  };\n}\nconst LightColors = {\n  red: 'color: red;',\n  green: 'color: green;',\n  reset: 'color: inherit;'\n};\nconst DarkColors = {\n  red: 'color: red;',\n  green: 'color: lightgreen;',\n  reset: 'color: inherit;'\n};\nfunction isLightMode() {\n  if (window?.matchMedia?.('(prefers-color-scheme: light)').matches) {\n    return true;\n  }\n  return false;\n}\nconst RED = {};\nconst GREEN = {};\nconst RESET = {};\nconst EOL = {};\nfunction colorizeLines(lines) {\n  const Colors = isLightMode() ? LightColors : DarkColors;\n  const colors = [];\n  let line = '';\n  for (const str of lines) {\n    if (str === RED) {\n      colors.push(Colors.red);\n      line += '%c';\n    } else if (str === GREEN) {\n      colors.push(Colors.green);\n      line += '%c';\n    } else if (str === RESET) {\n      colors.push(Colors.reset);\n      line += '%c';\n    } else if (str === EOL) {\n      line += '\\n';\n    } else {\n      line += str;\n    }\n  }\n  log(line, ...colors);\n}\nfunction log(...args) {\n  // eslint-disable-next-line no-console\n  console.log(...args);\n}\nfunction isDirty(signal) {\n  return signal.isStale;\n}\nfunction isDirtyMemo(memo) {\n  // iterate simple signals first to get fastest answer\n  for (const signal of memo.signals) {\n    if (isMemo(signal)) continue;\n    if (isDirty(signal)) {\n      return true;\n    }\n  }\n  for (const signal of memo.signals) {\n    if (isMemo(signal)) {\n      return isDirtyMemo(signal);\n    }\n  }\n  return false;\n}\nfunction printSignal(signal, key, lines = [], depth = 0) {\n  const _dirty = isDirty(signal);\n  lines.push(`${''.padStart(depth * 2, ' ')}${_dirty ? '❌' : '✅'} `, _dirty ? RED : GREEN, `${String(key)}`, RESET, EOL);\n  return lines;\n}\nfunction printMemo(memo, key, lines = [], depth = 0) {\n  const _dirty = isDirtyMemo(memo);\n  lines.push(`${''.padStart(depth * 2, ' ')}${_dirty ? '❌' : '✅'} `, _dirty ? RED : GREEN, `<memo> ${String(key)}`, RESET, `: (consumes ${memo.signals.size} signals)`, EOL);\n  for (const signal of memo.signals) {\n    if (isMemo(signal)) continue;\n    printSignal(signal, signal.key, lines, depth + 1);\n  }\n  for (const signal of memo.signals) {\n    if (isMemo(signal)) {\n      printMemo(signal, signal.key, lines, depth + 1);\n    }\n  }\n  return lines;\n}\nfunction entangleSignal(signals, obj, key, initialValue) {\n  let internalSignal = peekInternalSignal(signals, key);\n  if (!internalSignal) {\n    internalSignal = createInternalSignal(signals, obj, key, initialValue);\n  }\n  consumeInternalSignal(internalSignal);\n  return internalSignal;\n}\nfunction entangleInitiallyStaleSignal(signals, obj, key, initialValue) {\n  let internalSignal = peekInternalSignal(signals, key);\n  if (!internalSignal) {\n    internalSignal = createInternalSignal(signals, obj, key, initialValue);\n    internalSignal.isStale = true; // mark it as stale\n  }\n  consumeInternalSignal(internalSignal);\n  return internalSignal;\n}\nfunction createSignalDescriptor(key, intialValue) {\n  return {\n    enumerable: true,\n    configurable: false,\n    get() {\n      const signals = withSignalStore(this);\n      const internalSignal = entangleSignal(signals, this, key, intialValue);\n      internalSignal.isStale = false; // reset stale state\n      return internalSignal.value;\n    },\n    set(value) {\n      const signals = withSignalStore(this);\n      const internalSignal = getOrCreateInternalSignal(signals, this, key, intialValue);\n      if (internalSignal.value !== value) {\n        internalSignal.value = value;\n        notifyInternalSignal(internalSignal);\n      }\n    }\n  };\n}\n\n/**\n * define an enumerable signal property.\n *\n * Akin to Object.defineProperty.\n *\n * The signal will be lazily created when accessed and scoped to the\n * instance of the object.\n *\n * @private\n */\nfunction defineSignal(obj, key, v) {\n  Object.defineProperty(obj, key, createSignalDescriptor(key, v));\n}\n\n/**\n * Define a non-enumerable signal property.\n *\n * @private\n */\nfunction defineNonEnumerableSignal(obj, key, v) {\n  const desc = createSignalDescriptor(key, v);\n  desc.enumerable = false;\n  Object.defineProperty(obj, key, desc);\n}\n/**\n * Decorator version of creating a signal.\n */\nfunction signal(target, key, descriptor) {\n  // Error on `@signal()`, `@signal(...args)``\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error('You attempted to use @signal(), which is not necessary nor supported. Remove the parentheses and you will be good to go!');\n    }\n  })(target !== undefined) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You attempted to use @signal on with ${arguments.length > 1 ? 'arguments' : 'an argument'} ( @signal(${Array.from(arguments).map(d => `'${d}'`).join(', ')}) ), which is not supported. Dependencies are automatically tracked, so you can just use ${'`@signal`'}`);\n    }\n  })(typeof target === 'object' && typeof key === 'string' && typeof descriptor === 'object' && arguments.length === 3) : {};\n  return createSignalDescriptor(key, descriptor.initializer ? makeInitializer(descriptor.initializer) : null);\n}\n\n/**\n * Decorator version of creating a memoized getter\n */\nfunction memoized(target, key, descriptor) {\n  // Error on `@memoized()`, `@memoized(...args)`, and `@memoized propName = value;`\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error('You attempted to use @memoized(), which is not necessary nor supported. Remove the parentheses and you will be good to go!');\n    }\n  })(target !== undefined) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You attempted to use @memoized on with ${arguments.length > 1 ? 'arguments' : 'an argument'} ( @memoized(${Array.from(arguments).map(d => `'${d}'`).join(', ')}), which is not supported. Dependencies are automatically tracked, so you can just use ${'`@memoized`'}`);\n    }\n  })(typeof target === 'object' && typeof key === 'string' && typeof descriptor === 'object' && arguments.length === 3) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`The @memoized decorator must be applied to getters. '${key}' is not a getter.`);\n    }\n  })(typeof descriptor.get === 'function') : {};\n\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  const getter = descriptor.get;\n  descriptor.get = function () {\n    const signals = withSignalStore(this);\n    let memoSignal = signals.get(key);\n    if (!memoSignal) {\n      memoSignal = createInternalMemo(signals, this, key, getter.bind(this));\n    }\n    return memoSignal();\n  };\n  return descriptor;\n}\n\n/**\n * Decorator version of creating a gate.\n *\n * @private\n */\nfunction gate(_target, key, desc) {\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  const getter = desc.get;\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  const setter = desc.set;\n  const isLocal = desc.isLocal;\n  desc.get = function () {\n    const signals = withSignalStore(this);\n    let internalSignal = peekInternalSignal(signals, key);\n    if (!internalSignal) {\n      internalSignal = createInternalSignal(signals, this, key, getter.call(this));\n    } else if (internalSignal.isStale) {\n      internalSignal.isStale = false;\n      internalSignal.value = getter.call(this);\n    }\n    consumeInternalSignal(internalSignal);\n    return internalSignal.value;\n  };\n  if (setter) {\n    desc.set = function (v) {\n      const signals = withSignalStore(this);\n      let internalSignal = peekInternalSignal(signals, key);\n      if (!internalSignal) {\n        // we can't use `v` as initialValue here because setters don't\n        // return the value and the final value may be different\n        // than what the setter was called with.\n        internalSignal = createInternalSignal(signals, this, key, undefined);\n        internalSignal.isStale = true;\n      }\n      setter.call(this, v);\n      // when a gate is set, we do not notify the signal\n      // as its update is controlled externally.\n      // unless it specifically sets itself to be locally managed\n      if (isLocal) {\n        internalSignal.isStale = true;\n        notifyInternalSignal(internalSignal);\n      }\n    };\n  }\n  return desc;\n}\nfunction defineGate(obj, key, desc) {\n  const options = Object.assign({\n    enumerable: true,\n    configurable: false\n  }, gate(obj, key, desc));\n  Object.defineProperty(obj, key, options);\n}\nconst RequestCache = new WeakMap();\nfunction isAbortError(error) {\n  return error instanceof DOMException && error.name === 'AbortError';\n}\nfunction upgradeLoadingState(state) {\n  return state;\n}\nasync function watchStream(stream, loadingState) {\n  const state = upgradeLoadingState(loadingState);\n  const reader = stream.getReader();\n  let bytesLoaded = 0;\n  let shouldForward = state._stream !== null && state._stream.readable.locked;\n  let isForwarding = shouldForward;\n  let writer = state._stream?.writable.getWriter();\n  const buffer = [];\n  state._isPending = false;\n  state._isStarted = true;\n  state._startTime = performance.now();\n  while (true) {\n    const {\n      value,\n      done\n    } = await reader.read();\n    if (done) {\n      break;\n    }\n    bytesLoaded += value.byteLength;\n    state._bytesLoaded = bytesLoaded;\n    state._lastPacketTime = performance.now();\n    shouldForward = shouldForward || state._stream !== null && state._stream.readable.locked;\n    if (shouldForward) {\n      if (!isForwarding) {\n        isForwarding = true;\n        writer = state._stream.writable.getWriter();\n        for (const item of buffer) {\n          await writer.ready;\n          await writer.write(item);\n        }\n        buffer.length = 0;\n      }\n      await writer.ready;\n      await writer.write(value);\n    } else {\n      buffer.push(value);\n    }\n  }\n\n  // if we are still forwarding, we need to close the writer\n  if (isForwarding) {\n    await writer.ready;\n    await writer.close();\n  } else if (state._stream) {\n    // if we are not forwarding, we need to cancel the stream\n    await state._stream.readable.cancel('The Stream Has Already Ended');\n    state._stream = null;\n  }\n  const endTime = performance.now();\n  state._endTime = endTime;\n  state._isComplete = true;\n  state._isStarted = false;\n}\n\n/**\n * Lazily consumes the stream of a request, providing a number of\n * reactive properties that can be used to build UIs that respond\n * to the progress of a request.\n *\n * @hideconstructor\n */\nclass RequestLoadingState {\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n  _stream = null;\n  /** @internal */\n  _future;\n  /** @internal */\n  _triggered = false;\n  /** @internal */\n  _trigger() {\n    if (this._triggered) {\n      return;\n    }\n    this._triggered = true;\n    const future = this._future;\n    const promise = future.getStream();\n    if (promise.sizeHint) {\n      this._sizeHint = promise.sizeHint;\n    }\n    this.promise = promise.then(stream => {\n      if (!stream) {\n        this._isPending = false;\n        this._isComplete = true;\n        return;\n      }\n      return watchStream(stream, this);\n    }, error => {\n      this._isPending = false;\n      this._isStarted = false;\n      if (isAbortError(error)) {\n        this._isCancelled = true;\n        this._isComplete = true;\n      }\n      this._isErrored = true;\n      this._error = error;\n    });\n  }\n  promise = null;\n  get isPending() {\n    this._trigger();\n    return this._isPending;\n  }\n  get sizeHint() {\n    this._trigger();\n    return this._sizeHint;\n  }\n  get stream() {\n    this._trigger();\n    if (!this._stream) {\n      if (this._isComplete || this._isCancelled || this._isErrored) {\n        return null;\n      }\n      this._stream = new TransformStream();\n    }\n    return this._stream.readable;\n  }\n  get isStarted() {\n    this._trigger();\n    return this._isStarted;\n  }\n  get bytesLoaded() {\n    this._trigger();\n    return this._bytesLoaded;\n  }\n  get startTime() {\n    this._trigger();\n    return this._startTime;\n  }\n  get endTime() {\n    this._trigger();\n    return this._endTime;\n  }\n  get lastPacketTime() {\n    this._trigger();\n    return this._lastPacketTime;\n  }\n  get isComplete() {\n    this._trigger();\n    return this._isComplete;\n  }\n  get isCancelled() {\n    this._trigger();\n    return this._isCancelled;\n  }\n  get isErrored() {\n    this._trigger();\n    return this._isErrored;\n  }\n  get error() {\n    this._trigger();\n    return this._error;\n  }\n  get elapsedTime() {\n    return (this.endTime || this.lastPacketTime) - this.startTime;\n  }\n  get completedRatio() {\n    return this.sizeHint ? this.bytesLoaded / this.sizeHint : 0;\n  }\n  get remainingRatio() {\n    return 1 - this.completedRatio;\n  }\n  get duration() {\n    return this.endTime - this.startTime;\n  }\n  get speed() {\n    // bytes per second\n    return this.bytesLoaded / (this.elapsedTime / 1000);\n  }\n  constructor(future) {\n    this._future = future;\n  }\n  abort = () => {\n    this._future.abort();\n  };\n}\ndefineNonEnumerableSignal(RequestLoadingState.prototype, '_isPending', true);\ndefineNonEnumerableSignal(RequestLoadingState.prototype, '_isStarted', false);\ndefineNonEnumerableSignal(RequestLoadingState.prototype, '_isComplete', false);\ndefineNonEnumerableSignal(RequestLoadingState.prototype, '_isCancelled', false);\ndefineNonEnumerableSignal(RequestLoadingState.prototype, '_isErrored', false);\ndefineNonEnumerableSignal(RequestLoadingState.prototype, '_error', null);\ndefineNonEnumerableSignal(RequestLoadingState.prototype, '_sizeHint', 0);\ndefineNonEnumerableSignal(RequestLoadingState.prototype, '_bytesLoaded', 0);\ndefineNonEnumerableSignal(RequestLoadingState.prototype, '_startTime', 0);\ndefineNonEnumerableSignal(RequestLoadingState.prototype, '_endTime', 0);\ndefineNonEnumerableSignal(RequestLoadingState.prototype, '_lastPacketTime', 0);\n\n/**\n * The state of a request in the \"pending\"\n * state. This is the default initial state.\n *\n * Extends the {@link PendingPromise} interface.\n *\n */\n\n/**\n * The state of a request in the \"fulfilled\" state.\n * This is the state of a request that has resolved\n * successfully.\n *\n * Extends the {@link ResolvedPromise} interface.\n *\n */\n\n/**\n * The state of a request in the \"rejected\" state.\n * This is the state of a request that has rejected\n * with an error.\n *\n * Extends the {@link RejectedPromise} interface.\n *\n */\n\n/**\n * The state of a request in the \"cancelled\" state.\n * This is the state of a promise that has been\n * cancelled.\n *\n */\n\n/**\n * RequestState extends the concept of {@link PromiseState} to provide a reactive\n * wrapper for a request {@link Future} which allows you write declarative code\n * around a Future's control flow.\n *\n * It is useful in both Template and JavaScript contexts, allowing you\n * to quickly derive behaviors and data from pending, error and success\n * states.\n *\n * The key difference between a {@link Promise} and a Future is that Futures provide\n * access to a {@link ReadableStream | stream} of their content, the {@link RequestKey} of the request (if any)\n * as well as the ability to attempt to {@link Future.abort | abort} the request.\n *\n * ```ts\n * interface Future<T> extends Promise<T>> {\n *   getStream(): Promise<ReadableStream>;\n *   abort(): void;\n *   lid: RequestKey | null;\n * }\n * ```\n *\n * These additional APIs allow us to craft even richer state experiences.\n *\n * To get the state of a request, use {@link getRequestState}.\n *\n * See also:\n * - {@link PendingRequest}\n * - {@link ResolvedRequest}\n * - {@link RejectedRequest}\n * - {@link CancelledRequest}\n *\n */\n\nconst RequestStateProto = {};\nfunction performRefresh(requester, request, isReload) {\n  const req = Object.assign({}, request);\n  const cacheOptions = Object.assign({}, req.cacheOptions);\n  if (isReload) {\n    // force direct to network\n    cacheOptions.reload = true;\n  } else if (isReload === false) {\n    // delete reload to ensure we use backgroundReload / policy\n    delete cacheOptions.reload;\n    cacheOptions.backgroundReload = true;\n  } else {\n    // delete props to ensure we use the policy\n    delete cacheOptions.backgroundReload;\n    delete cacheOptions.reload;\n  }\n  req.cacheOptions = cacheOptions;\n  return requester.request(req);\n}\n\n// TODO introduce a new mechanism for defining multiple properties\n// that share a common signal\ndefineSignal(RequestStateProto, 'reason', null);\ndefineSignal(RequestStateProto, 'value', null);\ndefineSignal(RequestStateProto, 'result', null);\ndefineSignal(RequestStateProto, 'error', null);\ndefineSignal(RequestStateProto, 'status', 'pending');\ndefineSignal(RequestStateProto, 'isPending', true);\ndefineSignal(RequestStateProto, 'isLoading', true);\ndefineSignal(RequestStateProto, 'isSuccess', false);\ndefineSignal(RequestStateProto, 'isError', false);\ndefineSignal(RequestStateProto, 'request', null);\ndefineSignal(RequestStateProto, 'response', null);\nObject.defineProperty(RequestStateProto, 'isCancelled', {\n  get() {\n    return this.isError && isAbortError(this.reason);\n  }\n});\nObject.defineProperty(RequestStateProto, 'loadingState', {\n  get() {\n    if (!this._loadingState) {\n      this._loadingState = new RequestLoadingState(this._request);\n    }\n    return this._loadingState;\n  }\n});\nfunction createRequestState(future) {\n  const state = getPromiseResult(future);\n  const promiseState = Object.create(RequestStateProto);\n  promiseState._request = future;\n  // @ts-expect-error - we still attach it for PendingState\n  promiseState.reload = () => {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot reload a request that is still pending. Await or abort the original request first.`);\n      }\n    })(!promiseState.isPending) : {};\n    return performRefresh(future.requester, promiseState.request, true);\n  };\n\n  // @ts-expect-error - we still attach it for PendingState\n  promiseState.refresh = (usePolicy = false) => {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot refresh a request that is still pending. Await or abort the original request first.`);\n      }\n    })(!promiseState.isPending) : {};\n    return performRefresh(future.requester, promiseState.request, usePolicy === true ? null : false);\n  };\n  if (state) {\n    if (state.isError) {\n      promiseState.error = state.result;\n      promiseState.reason = state.result;\n      promiseState.status = 'rejected';\n      promiseState.isError = true;\n      promiseState.isPending = false;\n      promiseState.isLoading = false;\n      promiseState.request = state.result.request;\n      promiseState.response = state.result.response;\n    } else {\n      promiseState.result = state.result.content;\n      promiseState.value = state.result.content;\n      promiseState.status = 'fulfilled';\n      promiseState.isSuccess = true;\n      promiseState.isPending = false;\n      promiseState.isLoading = false;\n      promiseState.request = state.result.request;\n      promiseState.response = state.result.response;\n    }\n  } else {\n    void future.then(result => {\n      setPromiseResult(future, {\n        isError: false,\n        result\n      });\n      promiseState.result = result.content;\n      promiseState.value = result.content;\n      promiseState.status = 'fulfilled';\n      promiseState.isSuccess = true;\n      promiseState.isPending = false;\n      promiseState.isLoading = false;\n      promiseState.request = result.request;\n      promiseState.response = result.response;\n    }, error => {\n      setPromiseResult(future, {\n        isError: true,\n        result: error\n      });\n      promiseState.error = error;\n      promiseState.reason = error;\n      promiseState.status = 'rejected';\n      promiseState.isError = true;\n      promiseState.isPending = false;\n      promiseState.isLoading = false;\n      promiseState.request = error.request;\n      promiseState.response = error.response;\n    });\n  }\n  return promiseState;\n}\n\n/**\n * `getRequestState` can be used in both JavaScript and Template contexts.\n *\n * ```ts\n * import { getRequestState } from '@warp-drive/ember';\n *\n * const state = getRequestState(future);\n * ```\n *\n * For instance, we could write a getter on a component that updates whenever\n * the request state advances or the future changes, by combining the function\n * with the use of `@cached`\n *\n * ```ts\n * class Component {\n *   @cached\n *   get title() {\n *     const state = getRequestState(this.args.request);\n *     if (state.isPending) {\n *       return 'loading...';\n *     }\n *     if (state.isError) { return null; }\n *     return state.result.title;\n *   }\n * }\n * ```\n *\n * Or in a template as a helper:\n *\n * ```gjs\n * import { getRequestState } from '@warp-drive/ember';\n *\n * <template>\n *   {{#let (getRequestState @request) as |state|}}\n *     {{#if state.isPending}}\n *       <Spinner />\n *     {{else if state.isError}}\n *       <ErrorForm @error={{state.error}} />\n *     {{else}}\n *       <h1>{{state.result.title}}</h1>\n *     {{/if}}\n *   {{/let}}\n * </template>\n * ```\n *\n * If looking to use in a template, consider also the `<Request />` component\n * which offers a number of additional capabilities for requests *beyond* what\n * `RequestState` provides.\n *\n */\nfunction getRequestState(future) {\n  let state = RequestCache.get(future);\n  if (!state) {\n    state = createRequestState(future);\n    RequestCache.set(future, state);\n  }\n  return state;\n}\nfunction decorateMethodV2(prototype, prop, decorators) {\n  const origDesc = Object.getOwnPropertyDescriptor(prototype, prop);\n  let desc = {\n    ...origDesc\n  };\n  for (let decorator of decorators) {\n    desc = decorator(prototype, prop, desc) || desc;\n  }\n  if (desc.initializer !== void 0) {\n    desc.value = desc.initializer ? desc.initializer.call(prototype) : void 0;\n    desc.initializer = void 0;\n  }\n  Object.defineProperty(prototype, prop, desc);\n}\nconst DEFAULT_DEADLINE = 30_000;\nconst DISPOSE = Symbol.dispose || Symbol.for('dispose');\nfunction isNeverString(val) {\n  return val;\n}\n\n/**\n * Utilities to assist in recovering from the error.\n */\n\n/** @deprecated use {@link RecoveryFeatures} */\n\n/**\n * Utilities for keeping the request fresh\n */\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n/**\n * A reactive class\n *\n * @hideconstructor\n */\nclass RequestSubscription {\n  /**\n   * Whether the browser reports that the network is online.\n   */\n\n  /**\n   * Whether the browser reports that the tab is hidden.\n   */\n\n  /**\n   * Whether the component is currently refreshing the request.\n   */\n\n  /**\n   * The most recent blocking request that was made, typically\n   * the result of a reload.\n   *\n   * This will never be the original request passed as an arg to\n   * the component.\n   *\n   * @internal\n   */\n\n  /**\n   * The most recent request that was made, typically due to either a\n   * reload or a refresh.\n   *\n   * This will never be the original request passed as an arg to\n   * the component.\n   *\n   * @internal\n   */\n\n  /**\n   * The time at which the network was reported as offline.\n   *\n   * @internal\n   */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /**\n   * The event listener for network status changes,\n   * cached to use the reference for removal.\n   *\n   * @internal\n   */\n\n  /**\n   * The event listener for visibility status changes,\n   * cached to use the reference for removal.\n   *\n   * @internal\n   */\n\n  /**\n   * The last request passed as an arg to the component,\n   * cached for comparison.\n   *\n   * @internal\n   */\n\n  /**\n   * The last query passed as an arg to the component,\n   * cached for comparison.\n   *\n   * @internal\n   */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /**\n   * The Store this subscription subscribes to or the RequestManager\n   * which issues this request.\n   */\n\n  /**\n   * The Store or RequestManager that the last subscription is attached to.\n   *\n   * This differs from 'store' because a <Request /> may be passed a\n   * request originating from a different store than the <Request />\n   * component would use if it were to issue the request itself.\n   *\n   * @internal\n   */\n  _requester;\n  constructor(store, args) {\n    this._args = args;\n    this.store = store;\n    this._subscribedTo = null;\n    this._subscription = null;\n    this._intervalStart = null;\n    this._invalidated = false;\n    this._nextInterval = null;\n    this._requester = null;\n    this.isDestroyed = false;\n    this[DISPOSE] = _DISPOSE;\n    this._installListeners();\n    void this._beginPolling();\n  }\n\n  /**\n   * @internal\n   */\n  async _beginPolling() {\n    // await the initial request\n    try {\n      if (!this.isIdle) {\n        await this.request;\n      }\n    } catch {\n      // ignore errors here, we just want to wait for the request to finish\n    } finally {\n      if (!this.isDestroyed) {\n        void this._scheduleInterval();\n      }\n    }\n  }\n  get isIdle() {\n    const {\n      request,\n      query\n    } = this._args;\n    return Boolean(!request && !query);\n  }\n  static {\n    decorateMethodV2(this.prototype, \"isIdle\", [memoized]);\n  }\n  get autorefreshTypes() {\n    const {\n      autorefresh\n    } = this._args;\n    let types;\n    if (autorefresh === true) {\n      types = ['online', 'invalid'];\n    } else if (typeof autorefresh === 'string') {\n      types = autorefresh.split(',');\n    } else {\n      types = [];\n    }\n    return new Set(types);\n  }\n\n  // we only run this function on component creation\n  // and when an update is triggered, so it does not\n  // react to changes in the autorefreshThreshold\n  // or autorefresh args.\n  //\n  // if we need to react to those changes, we can\n  // use a modifier or internal component or some\n  // such to trigger a re-run of this function.\n  /** @internal */\n  static {\n    decorateMethodV2(this.prototype, \"autorefreshTypes\", [memoized]);\n  }\n  async _scheduleInterval() {\n    const {\n      autorefreshThreshold\n    } = this._args;\n    const hasValidThreshold = typeof autorefreshThreshold === 'number' && autorefreshThreshold > 0;\n    if (\n    // dont schedule in SSR\n    typeof window === 'undefined' ||\n    // dont schedule without a threshold\n    !hasValidThreshold ||\n    // dont schedule if we weren't told to\n    !this.autorefreshTypes.has('interval') ||\n    // dont schedule if we're already scheduled\n    this._intervalStart !== null) {\n      return;\n    }\n\n    // if we have a current request, wait for it to finish\n    // before scheduling the next one\n    if (this._latestRequest) {\n      try {\n        await this._latestRequest;\n      } catch {\n        // ignore errors here, we just want to wait for the request to finish\n      }\n      if (this.isDestroyed) {\n        return;\n      }\n    }\n\n    // setup the next interval\n    this._intervalStart = Date.now();\n    this._nextInterval = setTimeout(() => {\n      this._maybeUpdate();\n    }, autorefreshThreshold);\n  }\n\n  /** @internal */\n  _clearInterval() {\n    if (this._nextInterval) {\n      clearTimeout(this._nextInterval);\n      this._intervalStart = null;\n    }\n  }\n  /**\n   * @internal\n   */\n  _updateSubscriptions() {\n    if (this.isIdle) {\n      return;\n    }\n    const requestId = this._request.lid;\n\n    // if we're already subscribed to this request, we don't need to do anything\n    if (this._subscribedTo === requestId) {\n      return;\n    }\n\n    // if we're subscribed to a different request, we need to unsubscribe\n    this._removeSubscriptions();\n\n    // if we have a request, we need to subscribe to it\n    const store = this._getRequester();\n    this._requester = store;\n    if (requestId && isStore(store)) {\n      this._subscribedTo = requestId;\n      this._subscription = store.notifications.subscribe(requestId, (_id, op) => {\n        // ignore subscription events that occur while our own component's request\n        // is occurring\n        if (this._isUpdating) {\n          return;\n        }\n        switch (op) {\n          case 'invalidated':\n            {\n              // if we're subscribed to invalidations, we need to update\n              if (this.autorefreshTypes.has('invalid')) {\n                this._invalidated = true;\n                this._maybeUpdate();\n              }\n              break;\n            }\n          case 'state':\n            {\n              const latest = store.requestManager._deduped.get(requestId);\n              const priority = latest?.priority;\n              const state = this.reqState;\n              if (!priority) {\n                // if there is no priority, we have completed whatever request\n                // was occurring and so we are no longer refreshing (if we were)\n                this.isRefreshing = false;\n              } else if (priority.blocking && !state.isLoading) {\n                // if we are blocking, there is an active request for this identity\n                // that MUST be fulfilled from network (not cache).\n                // Thus this is not \"refreshing\" because we should clear out and\n                // block on this request.\n                //\n                // we receive state notifications when either a request initiates\n                // or completes.\n                //\n                // In the completes case: we may receive the state notification\n                // slightly before the request is finalized because the NotificationManager\n                // may sync flush it (and thus deliver it before the microtask completes)\n                //\n                // In the initiates case: we aren't supposed to receive one unless there\n                // is no other request in flight for this identity.\n                //\n                // However, there is a race condition here where the completed\n                // notification can trigger an update that generates a new request\n                // thus giving us an initiated notification before the older request\n                // finalizes.\n                //\n                // When this occurs, if the triggered update happens to have caused\n                // a new request to be made for the same identity AND that request\n                // is the one passed into this component as the @request arg, then\n                // getRequestState will return the state of the new request.\n                // We can detect this by checking if the request state is \"loading\"\n                // as outside of this case we would have a completed request.\n                //\n                // That is the reason for the `&& !state.isLoading` check above.\n\n                // TODO should we just treat this as refreshing?\n                this.isRefreshing = false;\n                this._maybeUpdate('policy', true);\n              } else {\n                this.isRefreshing = true;\n              }\n            }\n        }\n      });\n    }\n  }\n\n  /**\n   * @internal\n   */\n  _removeSubscriptions() {\n    const store = this._requester;\n    if (this._subscription && store && isStore(store)) {\n      store.notifications.unsubscribe(this._subscription);\n      this._subscribedTo = null;\n      this._subscription = null;\n      this._requester = null;\n    }\n  }\n\n  /**\n   * Install the event listeners for network and visibility changes.\n   * This is only done in browser environments with a global `window`.\n   *\n   * @internal\n   */\n  _installListeners() {\n    if (typeof window === 'undefined') {\n      return;\n    }\n    this.isOnline = window.navigator.onLine;\n    this._unavailableStart = this.isOnline ? null : Date.now();\n    this.isHidden = document.visibilityState === 'hidden';\n    this._onlineChanged = event => {\n      this.isOnline = event.type === 'online';\n      if (event.type === 'offline' && this._unavailableStart === null) {\n        this._unavailableStart = Date.now();\n      }\n      this._maybeUpdate();\n    };\n    this._backgroundChanged = () => {\n      const isHidden = document.visibilityState === 'hidden';\n      this.isHidden = isHidden;\n      if (isHidden && this._unavailableStart === null) {\n        this._unavailableStart = Date.now();\n      }\n      this._maybeUpdate();\n    };\n    window.addEventListener('online', this._onlineChanged, {\n      passive: true,\n      capture: true\n    });\n    window.addEventListener('offline', this._onlineChanged, {\n      passive: true,\n      capture: true\n    });\n    document.addEventListener('visibilitychange', this._backgroundChanged, {\n      passive: true,\n      capture: true\n    });\n  }\n\n  /**\n   * If the network is online and the tab is visible, either reload or refresh the request\n   * based on the component's configuration and the requested update mode.\n   *\n   * Valid modes are:\n   *\n   * - `'reload'`: Force a reload of the request.\n   * - `'refresh'`: Refresh the request in the background.\n   * - `'policy'`: Make the request, letting the store's configured CachePolicy decide whether to reload, refresh, or do nothing.\n   * - `undefined`: Make the request using the component's autorefreshBehavior setting if the autorefreshThreshold has passed.\n   *\n   * @internal\n   */\n  _maybeUpdate(mode, silent) {\n    if (this.isIdle) {\n      return;\n    }\n    const {\n      reqState\n    } = this;\n    if (reqState.isPending) {\n      return;\n    }\n    const canAttempt = Boolean(this.isOnline && !this.isHidden && (mode || this.autorefreshTypes.size));\n    if (!canAttempt) {\n      if (!silent && mode && mode !== '_invalidated') {\n        throw new Error(`Reload not available: the network is not online or the tab is hidden`);\n      }\n      return;\n    }\n    const {\n      autorefreshTypes\n    } = this;\n    let shouldAttempt = this._invalidated || Boolean(mode);\n    if (!shouldAttempt && autorefreshTypes.has('online')) {\n      const {\n        _unavailableStart\n      } = this;\n      const {\n        autorefreshThreshold\n      } = this._args;\n      const deadline = typeof autorefreshThreshold === 'number' ? autorefreshThreshold : DEFAULT_DEADLINE;\n      shouldAttempt = Boolean(_unavailableStart && Date.now() - _unavailableStart > deadline);\n    }\n    if (!shouldAttempt && autorefreshTypes.has('interval')) {\n      const {\n        _intervalStart\n      } = this;\n      const {\n        autorefreshThreshold\n      } = this._args;\n      if (_intervalStart && typeof autorefreshThreshold === 'number' && autorefreshThreshold > 0) {\n        shouldAttempt = Boolean(Date.now() - _intervalStart >= autorefreshThreshold);\n      }\n    }\n    this._unavailableStart = null;\n    this._invalidated = false;\n    if (shouldAttempt) {\n      this._clearInterval();\n      this._isUpdating = true;\n      const realMode = mode === '_invalidated' ? null : mode;\n      const val = realMode ?? this._args.autorefreshBehavior ?? 'policy';\n\n      // if the future was generated by an older store version, it may not have\n      // a requester set. In this case we append it to ensure that reload and\n      // refresh will work appropriately.\n      const requester = this._getRequester();\n      if (!reqState._request.requester) {\n        reqState._request.requester = requester;\n      }\n      switch (val) {\n        case 'reload':\n          this._latestRequest = reqState.reload();\n          break;\n        case 'refresh':\n          this._latestRequest = reqState.refresh();\n          break;\n        case 'policy':\n          this._latestRequest = reqState.refresh(true);\n          break;\n        default:\n          macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n            {\n              throw new Error(`Invalid ${mode ? 'update mode' : '@autorefreshBehavior'} for <Request />: ${isNeverString(val)}`);\n            }\n          })() : {};\n      }\n      if (val !== 'refresh') {\n        this._localRequest = this._latestRequest;\n      }\n      void this._scheduleInterval();\n      void this._latestRequest.finally(() => {\n        this._isUpdating = false;\n      });\n    }\n  }\n\n  /**\n   * @internal\n   */\n  _getRequester() {\n    // Note: we check for the requester's presence\n    // as well as the request's presence because we may\n    // be subscribed to a request issued by a store from an older\n    // version of the library that didn't yet set requester.\n    if (this._args.request?.requester) {\n      return this._args.request.requester;\n    }\n    return this.store;\n  }\n\n  /**\n   * Retry the request, reloading it from the server.\n   */\n  retry = async () => {\n    this._maybeUpdate('reload');\n    await this._localRequest;\n  };\n\n  /**\n   * Refresh the request, updating it in the background.\n   */\n  refresh = async () => {\n    this._maybeUpdate('refresh');\n    await this._latestRequest;\n  };\n\n  /**\n   * features to yield to the error slot of a component\n   */\n  get errorFeatures() {\n    return {\n      isHidden: this.isHidden,\n      isOnline: this.isOnline,\n      retry: this.retry\n    };\n  }\n\n  /**\n   * features to yield to the content slot of a component\n   */\n  static {\n    decorateMethodV2(this.prototype, \"errorFeatures\", [memoized]);\n  }\n  get contentFeatures() {\n    const feat = {\n      isHidden: this.isHidden,\n      isOnline: this.isOnline,\n      reload: this.retry,\n      refresh: this.refresh,\n      isRefreshing: this.isRefreshing,\n      latestRequest: this._latestRequest\n    };\n    if (feat.isRefreshing) {\n      feat.abort = () => {\n        this._latestRequest?.abort();\n      };\n    }\n    return feat;\n  }\n\n  /**\n   * @internal\n   */\n  static {\n    decorateMethodV2(this.prototype, \"contentFeatures\", [memoized]);\n  }\n  get _request() {\n    const {\n      request,\n      query\n    } = this._args;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot use both @request and @query args with the <Request> component`);\n      }\n    })(!request || !query) : {};\n    const {\n      _localRequest,\n      _originalRequest,\n      _originalQuery\n    } = this;\n    const isOriginalRequest = request === _originalRequest && query === _originalQuery;\n    if (_localRequest && isOriginalRequest) {\n      return _localRequest;\n    }\n\n    // update state checks for the next time\n    this._originalQuery = query;\n    this._originalRequest = request;\n    if (request) {\n      return request;\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You must provide either @request or an @query arg with the <Request> component`);\n      }\n    })(query) : {};\n    return this.store.request(query);\n  }\n  static {\n    decorateMethodV2(this.prototype, \"_request\", [memoized]);\n  }\n  get request() {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      try {\n        const request = this._request;\n        this._updateSubscriptions();\n        return request;\n      } catch (e) {\n        // eslint-disable-next-line no-console\n        console.log(e);\n        throw new Error(`Unable to initialize the request`, {\n          cause: e\n        });\n      }\n    } else {\n      const request = this._request;\n      this._updateSubscriptions();\n      return request;\n    }\n  }\n  static {\n    decorateMethodV2(this.prototype, \"request\", [memoized]);\n  }\n  get reqState() {\n    return getRequestState(this.request);\n  }\n  get result() {\n    return this.reqState.result;\n  }\n}\ndefineSignal(RequestSubscription.prototype, 'isOnline', true);\ndefineSignal(RequestSubscription.prototype, 'isHidden', false);\ndefineSignal(RequestSubscription.prototype, 'isRefreshing', false);\ndefineSignal(RequestSubscription.prototype, '_localRequest', undefined);\ndefineSignal(RequestSubscription.prototype, '_latestRequest', undefined);\nfunction isStore(store) {\n  return 'requestManager' in store;\n}\nfunction createRequestSubscription(store, args) {\n  return new RequestSubscription(store, args);\n}\nfunction upgradeSubscription(sub) {\n  return sub;\n}\nfunction _DISPOSE() {\n  const self = upgradeSubscription(this);\n  self.isDestroyed = true;\n  self._removeSubscriptions();\n  if (typeof window === 'undefined') {\n    return;\n  }\n  self._clearInterval();\n  window.removeEventListener('online', self._onlineChanged, {\n    passive: true,\n    capture: true\n  });\n  window.removeEventListener('offline', self._onlineChanged, {\n    passive: true,\n    capture: true\n  });\n  document.removeEventListener('visibilitychange', self._backgroundChanged, {\n    passive: true,\n    capture: true\n  });\n}\nconst PromiseCache = new WeakMap();\n\n/**\n * The state of a promise in the \"pending\"\n * state. This is the default initial state.\n *\n */\n\n/**\n * The state of a promise in the \"fulfilled\" state.\n * This is the state of a promise that has resolved\n * successfully.\n *\n */\n\n/**\n * The state of a promise in the \"rejected\" state.\n * This is the state of a promise that has rejected\n * with an error.\n *\n */\n\n/**\n * The state of a promise. This is the type that is returned\n * from `getPromiseState`.\n *\n * See also:\n * - {@link PendingPromise}\n * - {@link ResolvedPromise}\n * - {@link RejectedPromise}\n *\n */\n\nconst PromiseStateProto = {};\n\n// TODO introduce a new mechanism for defining multiple properties\n// that share a common signal\ndefineSignal(PromiseStateProto, 'reason', null);\ndefineSignal(PromiseStateProto, 'value', null);\ndefineSignal(PromiseStateProto, 'result', null);\ndefineSignal(PromiseStateProto, 'error', null);\ndefineSignal(PromiseStateProto, 'status', 'pending');\ndefineSignal(PromiseStateProto, 'isPending', true);\ndefineSignal(PromiseStateProto, 'isLoading', true);\ndefineSignal(PromiseStateProto, 'isSuccess', false);\ndefineSignal(PromiseStateProto, 'isError', false);\nfunction createPromiseState(promise) {\n  const state = getPromiseResult(promise);\n  const promiseState = Object.create(PromiseStateProto);\n  if (state) {\n    if (state.isError) {\n      promiseState.error = state.result;\n      promiseState.reason = state.result;\n      promiseState.status = 'rejected';\n      promiseState.isError = true;\n      promiseState.isPending = false;\n      promiseState.isLoading = false;\n    } else {\n      promiseState.result = state.result;\n      promiseState.value = state.result;\n      promiseState.status = 'fulfilled';\n      promiseState.isSuccess = true;\n      promiseState.isPending = false;\n      promiseState.isLoading = false;\n    }\n  } else {\n    void promise.then(result => {\n      setPromiseResult(promise, {\n        isError: false,\n        result\n      });\n      promiseState.result = result;\n      promiseState.value = result;\n      promiseState.status = 'fulfilled';\n      promiseState.isSuccess = true;\n      promiseState.isPending = false;\n      promiseState.isLoading = false;\n    }, error => {\n      setPromiseResult(promise, {\n        isError: true,\n        result: error\n      });\n      promiseState.error = error;\n      promiseState.reason = error;\n      promiseState.status = 'rejected';\n      promiseState.isError = true;\n      promiseState.isPending = false;\n      promiseState.isLoading = false;\n    });\n  }\n  return promiseState;\n}\nconst LegacyPromiseProxy = Symbol.for('LegacyPromiseProxy');\nfunction isLegacyAwaitable(promise) {\n  return LegacyPromiseProxy in promise && 'promise' in promise && promise[LegacyPromiseProxy] === true;\n}\nfunction getPromise(promise) {\n  return isLegacyAwaitable(promise) ? promise.promise : promise;\n}\n\n/**\n * Returns a reactive state-machine for the provided promise or awaitable.\n *\n * Repeat calls to `getPromiseState` with the same promise will return the same state object\n * making is safe and easy to use in templates and JavaScript code to produce reactive\n * behaviors around promises.\n *\n * `getPromiseState` can be used in both JavaScript and Template contexts.\n *\n * ```ts\n * import { getPromiseState } from '@warp-drive/ember';\n *\n * const state = getPromiseState(promise);\n * ```\n *\n * For instance, we could write a getter on a component that updates whenever\n * the promise state advances or the promise changes, by combining the function\n * with the use of `@cached`\n *\n * ```ts\n * class Component {\n *   @cached\n *   get title() {\n *     const state = getPromiseState(this.args.request);\n *     if (state.isPending) {\n *       return 'loading...';\n *     }\n *     if (state.isError) { return null; }\n *     return state.result.title;\n *   }\n * }\n * ```\n *\n * Or in a template as a helper:\n *\n * ```gjs\n * import { getPromiseState } from '@warp-drive/ember';\n *\n * <template>\n *   {{#let (getPromiseState @request) as |state|}}\n *     {{#if state.isPending}} <Spinner />\n *     {{else if state.isError}} <ErrorForm @error={{state.error}} />\n *     {{else}}\n *       <h1>{{state.result.title}}</h1>\n *     {{/if}}\n *   {{/let}}\n * </template>\n * ```\n *\n * If looking to use in a template, consider also the `<Await />` component.\n *\n * See also {@link PromiseState}\n */\nfunction getPromiseState(promise) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`getPromiseState expects to be called with a promise: called with ${String(promise)}`);\n    }\n  })(promise) : {};\n  const _promise = getPromise(promise);\n  let state = PromiseCache.get(_promise);\n  if (!state) {\n    state = createPromiseState(_promise);\n    PromiseCache.set(_promise, state);\n  }\n  return state;\n}\nexport { ARRAY_SIGNAL as A, DISPOSE as D, OBJECT_SIGNAL as O, Signals as S, defineGate as a, defineSignal as b, withSignalStore as c, defineNonEnumerableSignal as d, entangleSignal as e, createRequestSubscription as f, gate as g, getRequestState as h, getPromiseState as i, willSyncFlushWatchers as j, getOrCreateInternalSignal as k, consumeInternalSignal as l, memoized as m, notifyInternalSignal as n, createInternalSignal as o, peekInternalSignal as p, createSignalDescriptor as q, entangleInitiallyStaleSignal as r, signal as s, createInternalMemo as t, setupSignals as u, waitFor as w };","import { deprecate } from '@ember/debug';\nimport { LRUCache } from './utils/string.js';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\n\n/**\n * Interface of a parsed Cache-Control header value.\n *\n * - [MDN Cache-Control Reference](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control)\n */\nconst NUMERIC_KEYS = new Set(['max-age', 's-maxage', 'stale-if-error', 'stale-while-revalidate']);\n\n/**\n *  Parses a string Cache-Control header value into an object with the following structure:\n *\n * ```ts\n * interface CacheControlValue {\n *   immutable?: boolean;\n *   'max-age'?: number;\n *   'must-revalidate'?: boolean;\n *   'must-understand'?: boolean;\n *   'no-cache'?: boolean;\n *   'no-store'?: boolean;\n *   'no-transform'?: boolean;\n *   'only-if-cached'?: boolean;\n *   private?: boolean;\n *   'proxy-revalidate'?: boolean;\n *   public?: boolean;\n *   's-maxage'?: number;\n *   'stale-if-error'?: number;\n *   'stale-while-revalidate'?: number;\n * }\n * ```\n *\n * See also {@link CacheControlValue} and [Response Directives](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control#response_directives)\n *\n * @public\n */\nfunction parseCacheControl(header) {\n  return CACHE_CONTROL_CACHE.get(header);\n}\nconst CACHE_CONTROL_CACHE = new LRUCache(header => {\n  let key = '';\n  let value = '';\n  let isParsingKey = true;\n  const cacheControlValue = {};\n  for (let i = 0; i < header.length; i++) {\n    const char = header.charAt(i);\n    if (char === ',') {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Invalid Cache-Control value, expected a value`);\n        }\n      })(!isParsingKey || !NUMERIC_KEYS.has(key)) : {};\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Invalid Cache-Control value, expected a value after \"=\" but got \",\"`);\n        }\n      })(i === 0 || header.charAt(i - 1) !== '=') : {};\n      isParsingKey = true;\n      // @ts-expect-error TS incorrectly thinks that optional keys must have a type that includes undefined\n      cacheControlValue[key] = NUMERIC_KEYS.has(key) ? parseCacheControlValue(value) : true;\n      key = '';\n      value = '';\n      continue;\n    } else if (char === '=') {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Invalid Cache-Control value, expected a value after \"=\"`);\n        }\n      })(i + 1 !== header.length) : {};\n      isParsingKey = false;\n    } else if (char === ' ' || char === `\\t` || char === `\\n`) {\n      continue;\n    } else if (isParsingKey) {\n      key += char;\n    } else {\n      value += char;\n    }\n    if (i === header.length - 1) {\n      // @ts-expect-error TS incorrectly thinks that optional keys must have a type that includes undefined\n      cacheControlValue[key] = NUMERIC_KEYS.has(key) ? parseCacheControlValue(value) : true;\n    }\n  }\n  return cacheControlValue;\n}, 200);\nfunction parseCacheControlValue(stringToParse) {\n  const parsedValue = Number.parseInt(stringToParse);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Invalid Cache-Control value, expected a number but got - ${stringToParse}`);\n    }\n  })(!Number.isNaN(parsedValue)) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Invalid Cache-Control value, expected a number greater than 0 but got - ${stringToParse}`);\n    }\n  })(parsedValue >= 0) : {};\n  if (Number.isNaN(parsedValue) || parsedValue < 0) {\n    return 0;\n  }\n  return parsedValue;\n}\nfunction isExpired(cacheKey, request, config) {\n  const {\n    constraints\n  } = config;\n  if (constraints?.isExpired) {\n    const result = constraints.isExpired(request);\n    if (result !== null) {\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE_POLICY)) {\n        if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {\n          // eslint-disable-next-line no-console\n          console.log(`CachePolicy: ${cacheKey.lid} is ${result ? 'EXPIRED' : 'NOT expired'} because constraints.isExpired returned ${result}`);\n        }\n      }\n      return result;\n    }\n  }\n  const {\n    headers\n  } = request.response;\n  if (!headers) {\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE_POLICY)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {\n        // eslint-disable-next-line no-console\n        console.log(`CachePolicy: ${cacheKey.lid} is EXPIRED because no headers were provided`);\n      }\n    }\n\n    // if we have no headers then both the headers based expiration\n    // and the time based expiration will be considered expired\n    return true;\n  }\n\n  // check for X-WarpDrive-Expires\n  const now = Date.now();\n  const date = headers.get('Date');\n  if (constraints?.headers) {\n    if (constraints.headers['X-WarpDrive-Expires']) {\n      const xWarpDriveExpires = headers.get('X-WarpDrive-Expires');\n      if (xWarpDriveExpires) {\n        const expirationTime = new Date(xWarpDriveExpires).getTime();\n        const result = now >= expirationTime;\n        if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE_POLICY)) {\n          if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {\n            // eslint-disable-next-line no-console\n            console.log(`CachePolicy: ${cacheKey.lid} is ${result ? 'EXPIRED' : 'NOT expired'} because the time set by X-WarpDrive-Expires header is ${result ? 'in the past' : 'in the future'}`);\n          }\n        }\n        return result;\n      }\n    }\n\n    // check for Cache-Control\n    if (constraints.headers['Cache-Control']) {\n      const cacheControl = headers.get('Cache-Control');\n      const age = headers.get('Age');\n      if (cacheControl && age && date) {\n        const cacheControlValue = parseCacheControl(cacheControl);\n\n        // max-age and s-maxage are stored in\n        const maxAge = cacheControlValue['max-age'] || cacheControlValue['s-maxage'];\n        if (maxAge) {\n          // age is stored in seconds\n          const ageValue = parseInt(age, 10);\n          macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n            if (!test) {\n              throw new Error(`Invalid Cache-Control value, expected a number but got - ${age}`);\n            }\n          })(!Number.isNaN(ageValue)) : {};\n          macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n            if (!test) {\n              throw new Error(`Invalid Cache-Control value, expected a number greater than 0 but got - ${age}`);\n            }\n          })(ageValue >= 0) : {};\n          if (!Number.isNaN(ageValue) && ageValue >= 0) {\n            const dateValue = new Date(date).getTime();\n            const expirationTime = dateValue + (maxAge - ageValue) * 1000;\n            const result = now >= expirationTime;\n            if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE_POLICY)) {\n              if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {\n                // eslint-disable-next-line no-console\n                console.log(`CachePolicy: ${cacheKey.lid} is ${result ? 'EXPIRED' : 'NOT expired'} because the time set by Cache-Control header is ${result ? 'in the past' : 'in the future'}`);\n              }\n            }\n            return result;\n          }\n        }\n      }\n    }\n\n    // check for Expires\n    if (constraints.headers.Expires) {\n      const expires = headers.get('Expires');\n      if (expires) {\n        const expirationTime = new Date(expires).getTime();\n        const result = now >= expirationTime;\n        if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE_POLICY)) {\n          if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {\n            // eslint-disable-next-line no-console\n            console.log(`CachePolicy: ${cacheKey.lid} is ${result ? 'EXPIRED' : 'NOT expired'} because the time set by Expires header is ${result ? 'in the past' : 'in the future'}`);\n          }\n        }\n        return result;\n      }\n    }\n  }\n\n  // check for Date\n  if (!date) {\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE_POLICY)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {\n        // eslint-disable-next-line no-console\n        console.log(`CachePolicy: ${cacheKey.lid} is EXPIRED because no Date header was provided`);\n      }\n    }\n    return true;\n  }\n  let expirationTime = config.apiCacheHardExpires;\n  if (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {\n    if (!config.disableTestOptimization) {\n      expirationTime = config.apiCacheSoftExpires;\n    }\n  }\n  const time = new Date(date).getTime();\n  const deadline = time + expirationTime;\n  const result = now >= deadline;\n  if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE_POLICY)) {\n    if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {\n      // eslint-disable-next-line no-console\n      console.log(`CachePolicy: ${cacheKey.lid} is ${result ? 'EXPIRED' : 'NOT expired'} because the apiCacheHardExpires time since the response's Date header is ${result ? 'in the past' : 'in the future'}`);\n    }\n  }\n  return result;\n}\n\n/**\n * The constraint options for {@link PolicyConfig.constraints}\n */\n\n/**\n * The configuration options for the {@link DefaultCachePolicy}\n *\n * ```ts [app/services/store.ts]\n * import { Store } from '@warp-drive/core';\n * import { DefaultCachePolicy } from '@warp-drive/core/store'; // [!code focus]\n *\n * export default class AppStore extends Store {\n *   lifetimes = new DefaultCachePolicy({ // [!code focus:3]\n *     // ... PolicyConfig Settings ... //\n *   });\n * }\n * ```\n *\n */\n\n/**\n * A basic {@link CachePolicy} that can be added to the Store service.\n *\n * ```ts [app/services/store.ts]\n * import { Store } from '@warp-drive/core';\n * import { DefaultCachePolicy } from '@warp-drive/core/store'; // [!code focus]\n *\n * export default class AppStore extends Store {\n *   lifetimes = new DefaultCachePolicy({ // [!code focus:5]\n *     apiCacheSoftExpires: 30_000,\n *     apiCacheHardExpires: 60_000,\n *     // ... Other PolicyConfig Settings ... //\n *   });\n * }\n * ```\n *\n * :::tip 💡 TIP\n * Date headers do not have millisecond precision, so expiration times should\n * generally be larger than 1000ms.\n * :::\n *\n * See also {@link PolicyConfig} for configuration options.\n *\n * ### The Mechanics\n *\n * This policy determines staleness based on various configurable constraints falling back to a simple\n * check of the time elapsed since the request was last received from the API using the `date` header\n * from the last response.\n *\n * :::tip 💡 TIP\n * The {@link Fetch} handler provided by `@warp-drive/core` will automatically\n * add the `date` header to responses if it is not present.\n * :::\n *\n * - For manual override of reload see {@link CacheOptions.reload | cacheOptions.reload}\n * - For manual override of background reload see {@link CacheOptions.backgroundReload | cacheOptions.backgroundReload}\n *\n * In order expiration is determined by:\n *\n * ```md\n * Is explicitly invalidated by `cacheOptions.reload`\n *   ↳ (if falsey) if the request has been explicitly invalidated\n *      since the last request (see Automatic Invalidation below)\n *   ↳ (if false) (If Active) isExpired function\n *   ↳ (if null) (If Active) X-WarpDrive-Expires header\n *   ↳ (if null) (If Active) Cache-Control header\n *   ↳ (if null) (If Active) Expires header\n *   ↳ (if null) Date header + apiCacheHardExpires < current time\n *\n *   -- <if above is false, a background request is issued if> --\n *\n *   ↳ is invalidated by `cacheOptions.backgroundReload`\n *   ↳ (if falsey) Date header + apiCacheSoftExpires < current time\n * ```\n *\n * ### Automatic Invalidation / Entanglement\n *\n * It also invalidates any request with an {@link RequestInfo.op | OpCode} of `\"query\"`\n * for which {@link CacheOptions.types | cacheOptions.types} was provided\n * when a request with an `OpCode` of `\"createRecord\"` is successful and also includes\n * a matching type in its own `cacheOptions.types` array.\n\n * :::tip 💡 TIP\n * Abstracting this behavior via builders is recommended to ensure consistency.\n * :::\n *\n * ### Testing\n *\n * In Testing environments:\n *\n * - `apiCacheSoftExpires` will always be `false`\n * - `apiCacheHardExpires` will use the `apiCacheSoftExpires` value.\n *\n * This helps reduce flakiness and produce predictably rendered results in test suites.\n *\n * Requests that specifically set `cacheOptions.backgroundReload = true` will\n * still be background reloaded in tests.\n *\n * This behavior can be opted out of by setting `disableTestOptimization = true`\n * in the policy config.\n *\n * @public\n */\nclass DefaultCachePolicy {\n  /**\n   * @internal\n   */\n\n  /**\n   * @internal\n   */\n\n  /**\n   * @internal\n   */\n  _getStore(store) {\n    let set = this._stores.get(store);\n    if (!set) {\n      set = {\n        invalidated: new Set(),\n        types: new Map()\n      };\n      this._stores.set(store, set);\n    }\n    return set;\n  }\n  constructor(config) {\n    this._stores = new WeakMap();\n    const _config = arguments.length === 1 ? config : arguments[1];\n    deprecate(`Passing a Store to the CachePolicy is deprecated, please pass only a config instead.`, arguments.length === 1, {\n      id: 'ember-data:request-utils:lifetimes-service-store-arg',\n      since: {\n        enabled: '5.4',\n        available: '4.13'\n      },\n      for: '@ember-data/request-utils',\n      until: '6.0'\n    });\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You must pass a config to the CachePolicy`);\n      }\n    })(_config) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You must pass a apiCacheSoftExpires to the CachePolicy`);\n      }\n    })(typeof _config.apiCacheSoftExpires === 'number') : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You must pass a apiCacheHardExpires to the CachePolicy`);\n      }\n    })(typeof _config.apiCacheHardExpires === 'number') : {};\n    this.config = _config;\n  }\n\n  /**\n   * Invalidate a request by its CacheKey for the given store instance.\n   *\n   * While the store argument may seem redundant, the CachePolicy\n   * is designed to be shared across multiple stores / forks\n   * of the store.\n   *\n   * ```ts\n   * store.lifetimes.invalidateRequest(store, cacheKey);\n   * ```\n   *\n   * @public\n   */\n  invalidateRequest(cacheKey, store) {\n    this._getStore(store).invalidated.add(cacheKey);\n  }\n\n  /**\n   * Invalidate all requests associated to a specific type\n   * for a given store instance.\n   *\n   * While the store argument may seem redundant, the CachePolicy\n   * is designed to be shared across multiple stores / forks\n   * of the store.\n   *\n   * This invalidation is done automatically when using this service\n   * for both the {@link CacheHandler} and the [NetworkHandler](/api/@warp-drive/legacy/compat/variables/LegacyNetworkHandler).\n   *\n   * ```ts\n   * store.lifetimes.invalidateRequestsForType(store, 'person');\n   * ```\n   *\n   * @public\n   */\n  invalidateRequestsForType(type, store) {\n    const storeCache = this._getStore(store);\n    const set = storeCache.types.get(type);\n    const notifications = store.notifications;\n    if (set) {\n      // TODO batch notifications\n      set.forEach(id => {\n        storeCache.invalidated.add(id);\n        // @ts-expect-error\n        notifications.notify(id, 'invalidated', null);\n      });\n    }\n  }\n\n  /**\n   * Invoked when a request has been fulfilled from the configured request handlers.\n   * This is invoked by the CacheHandler for both foreground and background requests\n   * once the cache has been updated.\n   *\n   * Note, this is invoked by the {@link CacheHandler} regardless of whether\n   * the request has a cache-key.\n   *\n   * This method should not be invoked directly by consumers.\n   *\n   * @public\n   */\n  didRequest(request, response, cacheKey, store) {\n    // if this is a successful createRecord request, invalidate the cacheKey for the type\n    if (request.op === 'createRecord') {\n      const statusNumber = response?.status ?? 0;\n      if (statusNumber >= 200 && statusNumber < 400) {\n        const types = new Set(request.records?.map(r => r.type));\n        const additionalTypes = request.cacheOptions?.types;\n        additionalTypes?.forEach(type => {\n          types.add(type);\n        });\n        types.forEach(type => {\n          this.invalidateRequestsForType(type, store);\n        });\n      }\n\n      // add this document's cacheKey to a map for all associated types\n      // it is recommended to only use this for queries\n    } else if (cacheKey && request.cacheOptions?.types?.length) {\n      const storeCache = this._getStore(store);\n      request.cacheOptions?.types.forEach(type => {\n        const set = storeCache.types.get(type);\n        if (set) {\n          set.add(cacheKey);\n          storeCache.invalidated.delete(cacheKey);\n        } else {\n          storeCache.types.set(type, new Set([cacheKey]));\n        }\n      });\n    }\n  }\n\n  /**\n   * Invoked to determine if the request may be fulfilled from cache\n   * if possible.\n   *\n   * Note, this is only invoked by the {@link CacheHandler} if the request has\n   * a cache-key.\n   *\n   * If no cache entry is found or the entry is hard expired,\n   * the request will be fulfilled from the configured request handlers\n   * and the cache will be updated before returning the response.\n   *\n   * @public\n   * @return true if the request is considered hard expired\n   */\n  isHardExpired(cacheKey, store) {\n    // if we are explicitly invalidated, we are hard expired\n    const storeCache = this._getStore(store);\n    if (storeCache.invalidated.has(cacheKey)) {\n      return true;\n    }\n    const cache = store.cache;\n    const cached = cache.peekRequest(cacheKey);\n    if (!cached?.response) {\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE_POLICY)) {\n        if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {\n          // eslint-disable-next-line no-console\n          console.log(`CachePolicy: ${cacheKey.lid} is EXPIRED because no cache entry was found`);\n        }\n      }\n      return true;\n    }\n    return isExpired(cacheKey, cached, this.config);\n  }\n\n  /**\n   * Invoked if `isHardExpired` is false to determine if the request\n   * should be update behind the scenes if cache data is already available.\n   *\n   * Note, this is only invoked by the {@link CacheHandler} if the request has\n   * a cache-key.\n   *\n   * If true, the request will be fulfilled from cache while a backgrounded\n   * request is made to update the cache via the configured request handlers.\n   *\n   * @public\n   * @return true if the request is considered soft expired\n   */\n  isSoftExpired(cacheKey, store) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {\n      if (!this.config.disableTestOptimization) {\n        return false;\n      }\n    }\n    const cache = store.cache;\n    const cached = cache.peekRequest(cacheKey);\n    if (cached?.response) {\n      const date = cached.response.headers.get('date');\n      if (!date) {\n        if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE_POLICY)) {\n          if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {\n            // eslint-disable-next-line no-console\n            console.log(`CachePolicy: ${cacheKey.lid} is STALE because no date header was found`);\n          }\n        }\n        return true;\n      } else {\n        const time = new Date(date).getTime();\n        const now = Date.now();\n        const deadline = time + this.config.apiCacheSoftExpires;\n        const result = now >= deadline;\n        if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE_POLICY)) {\n          if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {\n            // eslint-disable-next-line no-console\n            console.log(`CachePolicy: ${cacheKey.lid} is ${result ? 'STALE' : 'NOT stale'}. Expiration time: ${deadline}, now: ${now}`);\n          }\n        }\n        return result;\n      }\n    }\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE_POLICY)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {\n        // eslint-disable-next-line no-console\n        console.log(`CachePolicy: ${cacheKey.lid} is STALE because no cache entry was found`);\n      }\n    }\n    return true;\n  }\n}\nexport { DefaultCachePolicy as D, parseCacheControl as p };","import { SkipCache, STRUCTURED, IS_FUTURE } from './types/request.js';\nimport { getOrSetGlobal, getOrSetUniversal } from './types/-private.js';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nconst BODY_TYPES = {\n  type: 'string',\n  klass: ['Blob', 'ArrayBuffer', 'TypedArray', 'DataView', 'FormData', 'URLSearchParams', 'ReadableStream']\n};\nconst ValidKeys = new Map([['duplex', ['half']], ['records', 'array'], ['data', 'json'], ['body', BODY_TYPES], ['disableTestWaiter', 'boolean'], ['options', 'object'], ['cacheOptions', 'object'], ['op', 'string'], ['store', 'object'], ['url', 'string'], ['cache', ['default', 'force-cache', 'no-cache', 'no-store', 'only-if-cached', 'reload']], ['credentials', ['include', 'omit', 'same-origin']], ['destination', ['', 'object', 'audio', 'audioworklet', 'document', 'embed', 'font', 'frame', 'iframe', 'image', 'manifest', 'paintworklet', 'report', 'script', 'sharedworker', 'style', 'track', 'video', 'worker', 'xslt']], ['headers', 'headers'], ['integrity', 'string'], ['keepalive', 'boolean'], ['method', ['QUERY', 'GET', 'PUT', 'PATCH', 'DELETE', 'POST', 'OPTIONS', 'HEAD', 'CONNECT', 'TRACE']], ['mode', ['same-origin', 'cors', 'navigate', 'no-cors']], ['redirect', ['error', 'follow', 'manual']], ['referrer', 'string'], ['signal', 'AbortSignal'], ['controller', 'AbortController'], ['referrerPolicy', ['', 'same-origin', 'no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url']]]);\nconst IS_FROZEN = getOrSetGlobal('IS_FROZEN', Symbol('FROZEN'));\nconst IS_COLLECTION = getOrSetGlobal('IS_COLLECTION', Symbol.for('Collection'));\nfunction freezeHeaders(headers) {\n  headers.delete = headers.set = headers.append = () => {\n    throw new Error(`Cannot Mutate Immutatable Headers, use headers.clone to get a copy`);\n  };\n  upgradeHeaders(headers);\n  return headers;\n}\nfunction deepFreeze(value) {\n  if (value && value[IS_FROZEN]) {\n    return value;\n  }\n  const _type = typeof value;\n  switch (_type) {\n    case 'boolean':\n    case 'string':\n    case 'number':\n    case 'symbol':\n    case 'undefined':\n    case 'bigint':\n      return value;\n    case 'function':\n      throw new Error(`Cannot deep-freeze a function`);\n    case 'object':\n      {\n        const _niceType = niceTypeOf(value);\n        switch (_niceType) {\n          case 'array':\n            {\n              if (value[IS_COLLECTION]) {\n                return value;\n              }\n              const arr = value.map(deepFreeze);\n              arr[IS_FROZEN] = true;\n              return Object.freeze(arr);\n            }\n          case 'null':\n            return value;\n          case 'object':\n            Object.keys(value).forEach(key => {\n              try {\n                value[key] = deepFreeze(value[key]);\n              } catch {\n                // continue\n              }\n            });\n            value[IS_FROZEN] = true;\n            return Object.freeze(value);\n          case 'headers':\n            return freezeHeaders(value);\n          case 'Collection':\n          case 'Store':\n          case 'AbortSignal':\n            return value;\n          case 'date':\n          case 'map':\n          case 'set':\n          case 'error':\n          case 'stream':\n          default:\n            // console.log(`Cannot deep-freeze ${_niceType}`);\n            return value;\n        }\n      }\n  }\n}\nfunction isMaybeContext(request) {\n  if (request && typeof request === 'object') {\n    const keys = Object.keys(request);\n    if (keys.length === 1 && keys[0] === 'request') {\n      return true;\n    }\n  }\n  return false;\n}\nfunction niceTypeOf(v) {\n  if (v === null) {\n    return 'null';\n  }\n  if (typeof v === 'string') {\n    return v ? 'non-empty-string' : 'empty-string';\n  }\n  if (!v) {\n    return typeof v;\n  }\n  if (Array.isArray(v)) {\n    return 'array';\n  }\n  if (v instanceof Date) {\n    return 'date';\n  }\n  if (v instanceof Map) {\n    return 'map';\n  }\n  if (v instanceof Set) {\n    return 'set';\n  }\n  if (v instanceof Error) {\n    return 'error';\n  }\n  if (v instanceof ReadableStream || v instanceof WritableStream || v instanceof TransformStream) {\n    return 'stream';\n  }\n  if (v instanceof Headers) {\n    return 'headers';\n  }\n  if (typeof v === 'object' && v.constructor && v.constructor.name !== 'Object') {\n    return v.constructor.name;\n  }\n  return typeof v;\n}\nfunction validateKey(key, value, errors) {\n  const schema = ValidKeys.get(key);\n  if (!schema && !IgnoredKeys.has(key)) {\n    errors.push(`InvalidKey: '${key}'`);\n    return;\n  }\n  if (schema) {\n    if (schema === BODY_TYPES) {\n      if (typeof value === 'string' || value instanceof ReadableStream) {\n        return;\n      }\n      const type = niceTypeOf(value);\n      if (schema.klass.includes(type)) {\n        return;\n      }\n      errors.push(`InvalidValue: key 'body' should be a string or one of '${schema.klass.join(\"', '\")}', received ${'<a value of type ' + niceTypeOf(value) + '>'}`);\n      return;\n    }\n    if (Array.isArray(schema)) {\n      if (!schema.includes(value)) {\n        errors.push(`InvalidValue: key ${key} should be one of '${schema.join(\"', '\")}', received ${typeof value === 'string' ? value : '<a value of type ' + niceTypeOf(value) + '>'}`);\n      }\n      return;\n    } else if (schema === 'json') {\n      try {\n        JSON.stringify(value);\n      } catch (e) {\n        errors.push(`InvalidValue: key ${key} should be a JSON serializable value, but failed to serialize with Error - ${e.message}`);\n      }\n      return;\n    } else if (schema === 'headers') {\n      if (!(value instanceof Headers)) {\n        errors.push(`InvalidValue: key ${key} should be an instance of Headers, received ${niceTypeOf(value)}`);\n      }\n      return;\n    } else if (schema === 'record') {\n      const _type = typeof value;\n      // record must extend plain object or Object.create(null)\n      if (!value || _type !== 'object' || value.constructor && value.constructor !== Object) {\n        errors.push(`InvalidValue: key ${key} should be a dictionary of string keys to string values, received ${niceTypeOf(value)}`);\n        return;\n      }\n      const keys = Object.keys(value);\n      keys.forEach(k => {\n        const v = value[k];\n        if (typeof k !== 'string') {\n          errors.push(`\\tThe key ${String(k)} on ${key} should be a string key`);\n        } else if (typeof v !== 'string') {\n          errors.push(`\\tThe value of ${key}.${k} should be a string not ${niceTypeOf(v)}`);\n        }\n      });\n      return;\n    } else if (schema === 'string') {\n      if (typeof value !== 'string' || value.length === 0) {\n        errors.push(`InvalidValue: key ${key} should be a non-empty string, received ${typeof value === 'string' ? \"''\" : typeof value}`);\n      }\n      return;\n    } else if (schema === 'object') {\n      if (!value || Array.isArray(value) || typeof value !== 'object') {\n        errors.push(`InvalidValue: key ${key} should be an object`);\n      }\n      return;\n    } else if (schema === 'boolean') {\n      if (typeof value !== 'boolean') {\n        errors.push(`InvalidValue: key ${key} should be a boolean, received ${typeof value}`);\n      }\n      return;\n    } else if (schema === 'array') {\n      if (!Array.isArray(value)) {\n        errors.push(`InvalidValue: key ${key} should be an array, received ${typeof value}`);\n      }\n      return;\n    }\n  }\n}\nconst IgnoredKeys = new Set([]);\nfunction assertValidRequest(request, isTopLevel) {\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    // handle basic shape\n    if (!request) {\n      throw new Error(`Expected ${isTopLevel ? 'RequestManager.request' : 'next'}(<request>) to be called with a request, but none was provided.`);\n    }\n    if (Array.isArray(request) || typeof request !== 'object') {\n      throw new Error(`The \\`request\\` passed to \\`${isTopLevel ? 'RequestManager.request' : 'next'}(<request>)\\` should be an object, received \\`${niceTypeOf(request)}\\``);\n    }\n    if (Object.keys(request).length === 0) {\n      throw new Error(`The \\`request\\` passed to \\`${isTopLevel ? 'RequestManager.request' : 'next'}(<request>)\\` was empty (\\`{}\\`). Requests need at least one valid key.`);\n    }\n\n    // handle accidentally passing context entirely\n    if (request instanceof Context) {\n      throw new Error(`Expected a request passed to \\`${isTopLevel ? 'RequestManager.request' : 'next'}(<request>)\\` but received the previous handler's context instead`);\n    }\n    // handle Object.assign({}, context);\n    if (isMaybeContext(request)) {\n      throw new Error(`Expected a request passed to \\`${isTopLevel ? 'RequestManager.request' : 'next'}(<request>)\\` but received an object with a request key instead.`);\n    }\n\n    // handle schema\n    const keys = Object.keys(request);\n    const validationErrors = [];\n    const isLegacyRequest = Boolean('op' in request && !request.url);\n    keys.forEach(key => {\n      if (isLegacyRequest && key === 'data') {\n        return;\n      }\n      validateKey(key, request[key], validationErrors);\n    });\n    if (validationErrors.length) {\n      const error = new Error(`Invalid Request passed to \\`${isTopLevel ? 'RequestManager.request' : 'next'}(<request>)\\`.\\n\\nThe following issues were found:\\n\\n\\t${validationErrors.join('\\n\\t')}`);\n      error.errors = validationErrors;\n      throw error;\n    }\n  }\n}\nfunction upgradeHeaders(headers) {\n  headers.clone = () => {\n    return new Headers(headers);\n  };\n  headers.toJSON = () => {\n    return Array.from(headers);\n  };\n  return headers;\n}\nfunction cloneResponseProperties(response) {\n  const {\n    headers,\n    ok,\n    redirected,\n    status,\n    statusText,\n    type,\n    url\n  } = response;\n  upgradeHeaders(headers);\n  return {\n    headers: headers,\n    ok,\n    redirected,\n    status,\n    statusText,\n    type,\n    url\n  };\n}\nclass ContextOwner {\n  hasSetStream = false;\n  hasSetResponse = false;\n  hasSubscribers = false;\n  stream = createDeferred();\n  response = null;\n  nextCalled = 0;\n  constructor(request, god, isRoot = false) {\n    this.isRoot = isRoot;\n    this.requestId = god.id;\n    this.controller = request.controller || god.controller;\n    this.stream.promise.sizeHint = 0;\n    if (request.controller) {\n      if (request.controller !== god.controller) {\n        god.controller.signal.addEventListener('abort', () => {\n          this.controller.abort(god.controller.signal.reason);\n        });\n      }\n      delete request.controller;\n    }\n    let enhancedRequest = Object.assign({\n      signal: this.controller.signal\n    }, request);\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      if (!request?.cacheOptions?.[SkipCache]) {\n        request = deepFreeze(request);\n        enhancedRequest = deepFreeze(enhancedRequest);\n      }\n    } else {\n      if (request.headers) {\n        upgradeHeaders(request.headers);\n      }\n    }\n    this.enhancedRequest = enhancedRequest;\n    this.request = request;\n    this.god = god;\n    this.stream.promise = this.stream.promise.then(stream => {\n      if (this.god.stream === stream && this.hasSubscribers) {\n        this.god.stream = null;\n      }\n      return stream;\n    });\n  }\n  get hasRequestedStream() {\n    return this.god.hasRequestedStream;\n  }\n  getResponse() {\n    if (this.hasSetResponse) {\n      return this.response;\n    }\n    if (this.nextCalled === 1) {\n      return this.god.response;\n    }\n    return null;\n  }\n  getStream() {\n    if (this.isRoot) {\n      this.god.hasRequestedStream = true;\n    }\n    if (!this.hasSetResponse) {\n      const hint = this.god.response?.headers?.get('content-length');\n      this.stream.promise.sizeHint = hint ? parseInt(hint, 10) : 0;\n    }\n    this.hasSubscribers = true;\n    return this.stream.promise;\n  }\n  abort(reason) {\n    this.controller.abort(reason);\n  }\n  setStream(stream) {\n    if (!this.hasSetStream) {\n      this.hasSetStream = true;\n      if (!(stream instanceof Promise)) {\n        this.god.stream = stream;\n      }\n      // @ts-expect-error\n      this.stream.resolve(stream);\n    }\n  }\n  resolveStream() {\n    this.setStream(this.nextCalled === 1 ? this.god.stream : null);\n  }\n  setResponse(response) {\n    if (this.hasSetResponse) {\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        throw new Error(`Cannot setResponse when a response has already been set`);\n      }\n      return;\n    }\n    this.hasSetResponse = true;\n    if (response instanceof Response) {\n      // TODO potentially avoid cloning in prod\n      let responseData = cloneResponseProperties(response);\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        responseData = deepFreeze(responseData);\n      }\n      this.response = responseData;\n      this.god.response = responseData;\n      const sizeHint = response.headers?.get('content-length');\n      this.stream.promise.sizeHint = sizeHint ? parseInt(sizeHint, 10) : 0;\n    } else {\n      this.response = response;\n      this.god.response = response;\n    }\n  }\n}\nclass Context {\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  constructor(owner, isCacheHandler) {\n    this.id = owner.requestId;\n    this.___owner = owner;\n    this.request = owner.enhancedRequest;\n    this._isCacheHandler = isCacheHandler;\n    this._finalized = false;\n  }\n  setStream(stream) {\n    this.___owner.setStream(stream);\n  }\n  setResponse(response) {\n    this.___owner.setResponse(response);\n  }\n  setIdentifier(identifier) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`setIdentifier may only be used synchronously from a CacheHandler`);\n      }\n    })(identifier && this._isCacheHandler && !this._finalized) : {};\n    this.___owner.god.identifier = identifier;\n  }\n  get hasRequestedStream() {\n    return this.___owner.hasRequestedStream;\n  }\n\n  /** @private */\n  _finalize() {\n    this._finalized = true;\n  }\n}\nconst PromiseCache = getOrSetUniversal('PromiseCache', new WeakMap());\nconst RequestMap = getOrSetUniversal('RequestMap', new Map());\nfunction setRequestResult(requestId, result) {\n  RequestMap.set(requestId, result);\n}\nfunction clearRequestResult(requestId) {\n  RequestMap.delete(requestId);\n}\nfunction getRequestResult(requestId) {\n  return RequestMap.get(requestId);\n}\nfunction setPromiseResult(promise, result) {\n  PromiseCache.set(promise, result);\n}\nfunction getPromiseResult(promise) {\n  return PromiseCache.get(promise);\n}\nconst IS_CACHE_HANDLER = getOrSetGlobal('IS_CACHE_HANDLER', Symbol('IS_CACHE_HANDLER'));\nfunction curryFuture(owner, inbound, outbound) {\n  owner.setStream(inbound.getStream());\n  inbound.then(doc => {\n    const document = {\n      [STRUCTURED]: true,\n      request: owner.request,\n      response: doc.response,\n      content: doc.content\n    };\n    outbound.resolve(document);\n  }, error => {\n    if (isDoc(error)) {\n      owner.setStream(owner.god.stream);\n    }\n    if (!error || !(error instanceof Error)) {\n      try {\n        throw new Error(error ? error : `Request Rejected with an Unknown Error`);\n      } catch (e) {\n        if (error && typeof error === 'object') {\n          Object.assign(e, error);\n          e.message = error.message || `Request Rejected with an Unknown Error`;\n        }\n        error = e;\n      }\n    }\n    error[STRUCTURED] = true;\n    error.request = owner.request;\n    error.response = owner.getResponse();\n    error.error = error.error || error.message;\n    outbound.reject(error);\n  });\n  return outbound.promise;\n}\nfunction isDoc(doc) {\n  return doc && doc[STRUCTURED] === true;\n}\nfunction ensureDoc(owner, content, isError) {\n  if (isDoc(content)) {\n    return content;\n  }\n  if (isError) {\n    return {\n      [STRUCTURED]: true,\n      request: owner.request,\n      response: owner.getResponse(),\n      error: content\n    };\n  }\n  return {\n    [STRUCTURED]: true,\n    request: owner.request,\n    response: owner.getResponse(),\n    content: content\n  };\n}\n\n/**\n * Additional properties exposed on errors thrown by the\n * {@link Fetch | Fetch Handler}.\n *\n * In the case of an Abort or system/browser level issue,\n * this extends {@link DOMException}.\n *\n * Else it extends from {@link AggregateError} if the\n * response includes an array of errors, falling back\n * to {@link Error} as its base.\n */\n\nfunction enhanceReason(reason) {\n  return new DOMException(reason || 'The user aborted a request.', 'AbortError');\n}\nfunction handleOutcome(owner, inbound, outbound) {\n  inbound.then(content => {\n    if (owner.controller.signal.aborted) {\n      // the next function did not respect the signal, we handle it here\n      outbound.reject(enhanceReason(owner.controller.signal.reason));\n      return;\n    }\n    if (isDoc(content)) {\n      owner.setStream(owner.god.stream);\n      content = content.content;\n    }\n    const document = {\n      [STRUCTURED]: true,\n      request: owner.request,\n      response: owner.getResponse(),\n      content\n    };\n    outbound.resolve(document);\n  }, error => {\n    if (isDoc(error)) {\n      owner.setStream(owner.god.stream);\n    }\n    if (!error || !(error instanceof Error)) {\n      try {\n        throw new Error(error ? error : `Request Rejected with an Unknown Error`);\n      } catch (e) {\n        if (error && typeof error === 'object') {\n          Object.assign(e, error);\n          e.message = error.message || `Request Rejected with an Unknown Error`;\n        }\n        error = e;\n      }\n    }\n    error[STRUCTURED] = true;\n    error.request = owner.request;\n    error.response = owner.getResponse();\n    error.error = error.error || error.message;\n    outbound.reject(error);\n  });\n  return outbound.promise;\n}\nfunction isCacheHandler(handler, index) {\n  return index === 0 && Boolean(handler[IS_CACHE_HANDLER]);\n}\nfunction executeNextHandler(wares, request, i, god) {\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    if (i === wares.length) {\n      throw new Error(`No handler was able to handle this request.`);\n    }\n    assertValidRequest(request, false);\n  }\n  const owner = new ContextOwner(request, god, i === 0);\n  function next(r) {\n    owner.nextCalled++;\n    return executeNextHandler(wares, r, i + 1, god);\n  }\n  const _isCacheHandler = isCacheHandler(wares[i], i);\n  const context = new Context(owner, _isCacheHandler);\n  let outcome;\n  try {\n    outcome = wares[i].request(context, next);\n    if (_isCacheHandler) {\n      context._finalize();\n    }\n    if (!!outcome && _isCacheHandler) {\n      if (!(outcome instanceof Promise)) {\n        setRequestResult(owner.requestId, {\n          isError: false,\n          result: ensureDoc(owner, outcome, false)\n        });\n        outcome = Promise.resolve(outcome);\n      }\n    } else if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      if (!outcome || !(outcome instanceof Promise) && !(typeof outcome === 'object' && 'then' in outcome)) {\n        // eslint-disable-next-line no-console\n        console.log({\n          request,\n          handler: wares[i],\n          outcome\n        });\n        if (outcome === undefined) {\n          throw new Error(`Expected handler.request to return a promise, instead received undefined.`);\n        }\n        throw new Error(`Expected handler.request to return a promise, instead received a synchronous value.`);\n      }\n    }\n  } catch (e) {\n    if (_isCacheHandler) {\n      setRequestResult(owner.requestId, {\n        isError: true,\n        result: ensureDoc(owner, e, true)\n      });\n    }\n    // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\n    outcome = Promise.reject(e);\n  }\n  const future = createFuture(owner);\n  if (isFuture(outcome)) {\n    return curryFuture(owner, outcome, future);\n  }\n  return handleOutcome(owner, outcome, future);\n}\nfunction isFuture(maybe) {\n  return Boolean(maybe && maybe instanceof Promise && maybe[IS_FUTURE] === true);\n}\nfunction createDeferred() {\n  let resolve;\n  let reject;\n  const promise = new Promise((res, rej) => {\n    resolve = res;\n    reject = rej;\n  });\n  return {\n    resolve,\n    reject,\n    promise\n  };\n}\nfunction upgradePromise(promise, future) {\n  promise[IS_FUTURE] = true;\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  promise.getStream = future.getStream;\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  promise.abort = future.abort;\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  promise.onFinalize = future.onFinalize;\n  promise.id = future.id;\n  promise.lid = future.lid;\n  promise.requester = future.requester;\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    // @ts-expect-error\n    promise.toJSON = () => {\n      const id = 'Future<' + promise.id + '>';\n      if (promise.lid) {\n        return `${id} (${promise.lid.lid})`;\n      }\n      return id;\n    };\n  }\n  return promise;\n}\nfunction createFuture(owner) {\n  const deferred = createDeferred();\n  let {\n    promise\n  } = deferred;\n  let cbs;\n  promise = promise.finally(() => {\n    owner.resolveStream();\n    if (cbs) {\n      cbs.forEach(cb => cb());\n    }\n  });\n  promise.onFinalize = fn => {\n    cbs = cbs || [];\n    cbs.push(fn);\n  };\n  promise[IS_FUTURE] = true;\n  promise.getStream = () => {\n    return owner.getStream();\n  };\n  promise.abort = reason => {\n    owner.abort(enhanceReason(reason));\n  };\n  promise.id = owner.requestId;\n  promise.lid = owner.god.identifier;\n  promise.requester = owner.god.requester;\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    // @ts-expect-error\n    promise.toJSON = () => {\n      const id = 'Future<' + promise.id + '>';\n      if (promise.lid) {\n        return `${id} (${promise.lid.lid})`;\n      }\n      return id;\n    };\n  }\n  deferred.promise = promise;\n  return deferred;\n}\nexport { IS_CACHE_HANDLER as I, cloneResponseProperties as a, assertValidRequest as b, createDeferred as c, getRequestResult as d, executeNextHandler as e, clearRequestResult as f, getPromiseResult as g, setPromiseResult as s, upgradePromise as u };","import { macroCondition, getGlobalConfig } from '@embroider/macros';\n\n// provided for additional debuggability\nconst DEBUG_CLIENT_ORIGINATED = Symbol('record-originated-on-client');\nconst DEBUG_KEY_TYPE = Symbol('key-type');\nconst DEBUG_STALE_CACHE_OWNER = Symbol('warpDriveStaleCache');\nfunction ProdSymbol(str, debugStr) {\n  return macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? Symbol(debugStr) : str;\n}\n\n// also present in production\nconst CACHE_OWNER = ProdSymbol('__$co', 'CACHE_OWNER');\n\n/**\n * A referentially stable object with a unique string (lid) that can be used\n * as a reference to request data in the cache.\n *\n * Only requests that are assigned a RequestKey are retrievable/replayable from\n * the cache, though requests without RequestKeys may still update cache state.\n *\n * @public\n */\n\n/** @deprecated use {@link RequestKey} */\n\n/**\n * Used when an ResourceKey is known to be the stable version\n */\n\n/**\n * Used when a ResourceKey was not created locally as part\n * of a call to store.createRecord\n *\n * Distinguishing between this ResourceKey and one for a client created\n * resource that was created with an ID is generally speaking not possible\n * at runtime, so anything with an ID typically narrows to this.\n */\n\n/** @deprecated use {@link PersistedResourceKey} */\n\n/**\n * Used when a ResourceKey was created locally\n * (by a call to store.createRecord).\n *\n * It is possible in rare circumstances to have a ResourceKey\n * that is not for a new record but does not have an ID. This would\n * happen if a user intentionally created one for use with a secondary-index\n * prior to the record having been fully loaded.\n */\n\n/**\n * A referentially stable object with a unique string (lid) that can be used\n * as a reference to data in the cache.\n *\n * Every resource has a unique ResourceKey, and ResourceKeys may refer\n * to data that has never been loaded (for instance, in an async relationship).\n *\n * @public\n */\n\n/** @deprecated use {@link ResourceKey} */\n\nexport { CACHE_OWNER, DEBUG_CLIENT_ORIGINATED, DEBUG_KEY_TYPE, DEBUG_STALE_CACHE_OWNER };","import { a as defineGate, c as withSignalStore, n as notifyInternalSignal, p as peekInternalSignal, j as willSyncFlushWatchers, k as getOrCreateInternalSignal, l as consumeInternalSignal, o as createInternalSignal, A as ARRAY_SIGNAL, S as Signals, q as createSignalDescriptor, b as defineSignal, e as entangleSignal, r as entangleInitiallyStaleSignal, O as OBJECT_SIGNAL, t as createInternalMemo, w as waitFor } from \"./configure-DPUFCemT.js\";\nimport { deprecate, warn } from '@ember/debug';\nimport { EnableHydration, SkipCache, STRUCTURED } from './types/request.js';\nimport { macroCondition, getGlobalConfig, dependencySatisfies, importSync } from '@embroider/macros';\nimport { D as Destroy, a as Context, S as SOURCE, C as Checkout, b as Commit } from \"./symbols-3C1OkYtZ.js\";\nimport { isResourceSchema } from './types/schema/fields.js';\nimport { a as cloneResponseProperties, I as IS_CACHE_HANDLER, b as assertValidRequest, e as executeNextHandler, d as getRequestResult, u as upgradePromise, s as setPromiseResult, f as clearRequestResult } from \"./future-BKkJJkj7.js\";\nimport { getOrSetGlobal, peekTransient, setTransient, peekUniversalTransient, setUniversalTransient } from './types/-private.js';\nimport { D as DefaultCachePolicy } from \"./default-cache-policy-D7_u4YRH.js\";\nimport { withBrand } from './request.js';\nimport { CACHE_OWNER, DEBUG_STALE_CACHE_OWNER, DEBUG_KEY_TYPE, DEBUG_CLIENT_ORIGINATED } from './types/identifier.js';\nimport { dasherize } from './utils/string.js';\nimport { setLogging, getRuntimeConfig } from './types/runtime.js';\nimport { RecordStore, Type } from './types/symbols.js';\nfunction urlFromLink(link) {\n  if (typeof link === 'string') return link;\n  return link.href;\n}\n\n/**\n * A Document is a class that wraps the response content from a request to the API\n * returned by `Cache.put` or `Cache.peek`, converting ResourceKeys into\n * ReactiveResource instances.\n *\n * It is not directly instantiated by the user, and its properties should not\n * be directly modified. Whether individual properties are mutable or not is\n * determined by the record instance itself.\n *\n * @public\n */\n\nconst ReactiveDocumentProto = {\n  async _request(link, options = withBrand({\n    url: '',\n    method: 'GET'\n  })) {\n    const href = this.links?.[link];\n    if (!href) {\n      return null;\n    }\n    options.method = options.method || 'GET';\n    Object.assign(options, {\n      url: urlFromLink(href)\n    });\n    const response = await this._store.request(options);\n    return response.content;\n  },\n  fetch(options = withBrand({\n    url: '',\n    method: 'GET'\n  })) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`No self or related link`);\n      }\n    })(this.links?.related || this.links?.self) : {};\n    options.cacheOptions = options.cacheOptions || {};\n    options.cacheOptions.key = this.identifier?.lid;\n    return this._request(this.links.related ? 'related' : 'self', options);\n  },\n  next(options) {\n    return this._request('next', options);\n  },\n  prev(options) {\n    return this._request('prev', options);\n  },\n  first(options) {\n    return this._request('first', options);\n  },\n  last(options) {\n    return this._request('last', options);\n  },\n  toJSON() {\n    const data = {};\n    data.identifier = this.identifier;\n    if (this.data !== undefined) {\n      data.data = this.data;\n    }\n    if (this.links !== undefined) {\n      data.links = this.links;\n    }\n    if (this.errors !== undefined) {\n      data.errors = this.errors;\n    }\n    if (this.meta !== undefined) {\n      data.meta = this.meta;\n    }\n    return data;\n  },\n  [Destroy]() {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot destroy a ReactiveDocument which has already been destroyed`);\n      }\n    })(this._store) : {};\n    if (this._subscription) {\n      this._store.notifications.unsubscribe(this._subscription);\n      // @ts-expect-error\n      this._store = null;\n      // @ts-expect-error\n      this._subscription = null;\n    }\n  }\n};\ndefineGate(ReactiveDocumentProto, 'errors', {\n  get() {\n    const {\n      identifier\n    } = this;\n    if (!identifier) {\n      const {\n        document\n      } = this._localCache;\n      if ('errors' in document) {\n        return document.errors;\n      }\n      return;\n    }\n    const doc = this._store.cache.peek(identifier);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`No cache data was found for the document '${identifier.lid}'`);\n      }\n    })(doc) : {};\n    return 'errors' in doc ? doc.errors : undefined;\n  }\n});\ndefineGate(ReactiveDocumentProto, 'data', {\n  get() {\n    const {\n      identifier,\n      _localCache\n    } = this;\n    const doc = identifier ? this._store.cache.peek(identifier) : _localCache.document;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`No cache data was found for the document '${identifier?.lid ?? '<uncached document>'}'`);\n      }\n    })(doc) : {};\n    const data = 'data' in doc ? doc.data : undefined;\n    if (Array.isArray(data)) {\n      return identifier ? this._store.recordArrayManager.getCollection({\n        source: data.slice(),\n        requestKey: identifier\n      }) : this._store.recordArrayManager.getCollection({\n        source: data.slice()\n      });\n    } else if (data) {\n      return this._store.peekRecord(data);\n    } else {\n      return data;\n    }\n  }\n});\ndefineGate(ReactiveDocumentProto, 'links', {\n  get() {\n    const {\n      identifier\n    } = this;\n    if (!identifier) {\n      return this._localCache.document.links;\n    }\n    const data = this._store.cache.peek(identifier);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`No cache data was found for the document '${identifier.lid}'`);\n      }\n    })(data) : {};\n    return data.links;\n  }\n});\ndefineGate(ReactiveDocumentProto, 'meta', {\n  get() {\n    const {\n      identifier\n    } = this;\n    if (!identifier) {\n      return this._localCache.document.meta;\n    }\n    const data = this._store.cache.peek(identifier);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`No cache data was found for the document '${identifier.lid}'`);\n      }\n    })(data) : {};\n    return data.meta;\n  }\n});\nfunction createReactiveDocument(store, cacheKey, localCache) {\n  const doc = Object.create(ReactiveDocumentProto);\n  doc._store = store;\n  doc._localCache = localCache;\n  // @ts-expect-error we are initializing it here\n  doc.identifier = cacheKey;\n  const signals = withSignalStore(doc);\n\n  // TODO if we ever enable auto-cleanup of the cache, we will need to tear this down\n  // in a destroy method\n  if (cacheKey) {\n    doc._subscription = store.notifications.subscribe(cacheKey, (_key, type) => {\n      switch (type) {\n        case 'updated':\n          // FIXME in the case of a collection we need to notify it's length\n          // and have it recalc\n          notifyInternalSignal(peekInternalSignal(signals, 'data'));\n          notifyInternalSignal(peekInternalSignal(signals, 'links'));\n          notifyInternalSignal(peekInternalSignal(signals, 'meta'));\n          notifyInternalSignal(peekInternalSignal(signals, 'errors'));\n          break;\n      }\n    });\n  }\n  return doc;\n}\nconst TEXT_COLORS = {\n  TEXT: 'inherit',\n  notify: ['white', 'white', 'inherit', 'magenta', 'inherit'],\n  'reactive-ui': ['white', 'white', 'inherit', 'magenta', 'inherit'],\n  graph: ['white', 'white', 'inherit', 'magenta', 'inherit'],\n  request: ['white', 'white', 'inherit', 'magenta', 'inherit'],\n  cache: ['white', 'white', 'inherit', 'magenta', 'inherit']\n};\nconst BG_COLORS = {\n  TEXT: 'transparent',\n  notify: ['dimgray', 'cadetblue', 'transparent', 'transparent', 'transparent'],\n  'reactive-ui': ['dimgray', 'cadetblue', 'transparent', 'transparent', 'transparent'],\n  graph: ['dimgray', 'cadetblue', 'transparent', 'transparent', 'transparent'],\n  request: ['dimgray', 'cadetblue', 'transparent', 'transparent', 'transparent'],\n  cache: ['dimgray', 'cadetblue', 'transparent', 'transparent', 'transparent']\n};\nconst NOTIFY_BORDER = {\n  TEXT: 0,\n  notify: [3, 2, 0, 0, 0],\n  'reactive-ui': [3, 2, 0, 0, 0],\n  graph: [3, 2, 0, 0, 0],\n  request: [3, 2, 0, 0, 0],\n  cache: [3, 2, 0, 0, 0]\n};\nconst LIGHT_DARK_ALT = {\n  lightgreen: 'green',\n  green: 'lightgreen'\n};\nfunction badge(isLight, color, bgColor, border) {\n  return [`color: ${correctColor(isLight, color)}; background-color: ${correctColor(isLight, bgColor)}; padding: ${border}px ${2 * border}px; border-radius: ${border}px;`, `color: ${TEXT_COLORS.TEXT}; background-color: ${BG_COLORS.TEXT};`];\n}\nfunction colorForBucket(isLight, scope, bucket) {\n  if (scope === 'request') {\n    return bucket === 'blocking' ? badge(isLight, 'red', 'transparent', 0) : bucket === 'cached' ? badge(isLight, 'lightgreen', 'transparent', 0) : bucket === 'non-blocking' ? badge(isLight, 'orange', 'transparent', 0) : badge(isLight, 'gray', 'transparent', 0);\n  }\n  if (scope === 'notify') {\n    return bucket === 'added' ? badge(isLight, 'lightgreen', 'transparent', 0) : bucket === 'removed' ? badge(isLight, 'red', 'transparent', 0) : badge(isLight, TEXT_COLORS[scope][2], BG_COLORS[scope][2], NOTIFY_BORDER[scope][2]);\n  }\n  if (scope === 'reactive-ui') {\n    return bucket === 'created' ? badge(isLight, 'lightgreen', 'transparent', 0) : bucket === 'disconnected' ? badge(isLight, 'red', 'transparent', 0) : badge(isLight, TEXT_COLORS[scope][2], BG_COLORS[scope][2], NOTIFY_BORDER[scope][2]);\n  }\n  if (scope === 'cache') {\n    return bucket === 'inserted' ? badge(isLight, 'lightgreen', 'transparent', 0) : bucket === 'removed' ? badge(isLight, 'red', 'transparent', 0) : badge(isLight, TEXT_COLORS[scope][2], BG_COLORS[scope][2], NOTIFY_BORDER[scope][2]);\n  }\n  return badge(isLight, TEXT_COLORS[scope][3], BG_COLORS[scope][3], NOTIFY_BORDER[scope][3]);\n}\nfunction logGroup(scope, prefix, subScop1, subScop2, subScop3, subScop4) {\n  // eslint-disable-next-line no-console\n  console.groupCollapsed(..._log(scope, prefix, subScop1, subScop2, subScop3, subScop4));\n}\nfunction log(scope, prefix, subScop1, subScop2, subScop3, subScop4) {\n  // eslint-disable-next-line no-console\n  console.log(..._log(scope, prefix, subScop1, subScop2, subScop3, subScop4));\n}\nfunction correctColor(isLight, color) {\n  if (!isLight) {\n    return color;\n  }\n  return color in LIGHT_DARK_ALT ? LIGHT_DARK_ALT[color] : color;\n}\nfunction isLightMode() {\n  if (window?.matchMedia?.('(prefers-color-scheme: light)').matches) {\n    return true;\n  }\n  return false;\n}\nfunction _log(scope, prefix, subScop1, subScop2, subScop3, subScop4) {\n  const isLight = isLightMode();\n  switch (scope) {\n    case 'request':\n    case 'reactive-ui':\n    case 'notify':\n      {\n        const scopePath = prefix ? `[${prefix}] ${scope}` : scope;\n        const path = subScop4 ? `${subScop3}.${subScop4}` : subScop3;\n        return [`%c@warp%c-%cdrive%c %c${scopePath}%c %c${subScop1}%c %c${subScop2}%c %c${path}%c`, ...badge(isLight, 'lightgreen', 'transparent', 0), ...badge(isLight, 'magenta', 'transparent', 0), ...badge(isLight, TEXT_COLORS[scope][0], BG_COLORS[scope][0], NOTIFY_BORDER[scope][0]), ...badge(isLight, TEXT_COLORS[scope][1], BG_COLORS[scope][1], NOTIFY_BORDER[scope][1]), ...badge(isLight, TEXT_COLORS[scope][2], BG_COLORS[scope][2], NOTIFY_BORDER[scope][2]), ...colorForBucket(isLight, scope, path)];\n      }\n    case 'cache':\n      {\n        const scopePath = prefix ? `${scope} (${prefix})` : scope;\n        return [`%c@warp%c-%cdrive%c %c${scopePath}%c %c${subScop1}%c %c${subScop2}%c %c${subScop3}%c %c${subScop4}%c`, ...badge(isLight, 'lightgreen', 'transparent', 0), ...badge(isLight, 'magenta', 'transparent', 0), ...badge(isLight, TEXT_COLORS[scope][0], BG_COLORS[scope][0], NOTIFY_BORDER[scope][0]), ...badge(isLight, TEXT_COLORS[scope][1], BG_COLORS[scope][1], NOTIFY_BORDER[scope][1]), ...badge(isLight, TEXT_COLORS[scope][2], BG_COLORS[scope][2], NOTIFY_BORDER[scope][2]), ...colorForBucket(isLight, scope, subScop3), ...badge(isLight, TEXT_COLORS[scope][4], BG_COLORS[scope][4], NOTIFY_BORDER[scope][4])];\n      }\n  }\n  return [];\n}\nfunction isResource(resource) {\n  return Boolean(resource && typeof resource === 'object');\n}\nfunction hasProp(resource, prop) {\n  return Boolean(isResource(resource) && prop in resource && typeof resource[prop] === 'string' && resource[prop].length);\n}\nfunction hasLid(resource) {\n  return hasProp(resource, 'lid');\n}\nfunction hasId(resource) {\n  return hasProp(resource, 'id') || Boolean(isResource(resource) && 'id' in resource && typeof resource.id === 'number');\n}\nfunction hasType(resource) {\n  return hasProp(resource, 'type');\n}\nfunction coerceId(id) {\n  if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_NON_STRICT_ID)) {\n    let normalized;\n    if (id === null || id === undefined || id === '') {\n      normalized = null;\n    } else {\n      normalized = String(id);\n    }\n    deprecate(`The resource id '<${typeof id}> ${String(id)} ' is not normalized. Update your application code to use '${JSON.stringify(normalized)}' instead.`, normalized === id, {\n      id: 'ember-data:deprecate-non-strict-id',\n      until: '6.0',\n      for: 'ember-data',\n      since: {\n        available: '4.13',\n        enabled: '5.3'\n      }\n    });\n    return normalized;\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Resource IDs must be a non-empty string or null. Received '${String(id)}'.`);\n    }\n  })(id === null || typeof id === 'string' && id.length > 0) : {};\n  return id;\n}\nfunction ensureStringId(id) {\n  let normalized = null;\n  if (typeof id === 'string') {\n    normalized = id.length > 0 ? id : null;\n  } else if (typeof id === 'number' && !isNaN(id)) {\n    normalized = String(id);\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected id to be a string or number, received ${String(id)}`);\n    }\n  })(normalized !== null) : {};\n  return normalized;\n}\nfunction normalizeModelName(type) {\n  if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_NON_STRICT_TYPES)) {\n    const result = dasherize(type);\n    deprecate(`The resource type '${type}' is not normalized. Update your application code to use '${result}' instead of '${type}'.`, result === type, {\n      id: 'ember-data:deprecate-non-strict-types',\n      until: '6.0',\n      for: 'ember-data',\n      since: {\n        available: '4.13',\n        enabled: '5.3'\n      }\n    });\n    return result;\n  }\n  return type;\n}\nfunction installPolyfill() {\n  const isFastBoot = typeof FastBoot !== 'undefined';\n  const CRYPTO = isFastBoot ? FastBoot.require('crypto') : globalThis.crypto;\n  if (!CRYPTO.randomUUID) {\n    // we might be able to optimize this by requesting more bytes than we need at a time\n    const rng = function () {\n      // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n      const rnds8 = new Uint8Array(16);\n      if (!CRYPTO.getRandomValues && !isFastBoot) {\n        throw new Error(`Unable to generate bytes for UUID`);\n      }\n      return CRYPTO.getRandomValues ? CRYPTO.getRandomValues(rnds8) : CRYPTO.randomFillSync(rnds8);\n    };\n\n    /*\n     * Convert array of 16 byte values to UUID string format of the form:\n     * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n     */\n    const byteToHex = [];\n    for (let i = 0; i < 256; ++i) {\n      byteToHex[i] = (i + 0x100).toString(16).substr(1);\n    }\n    const bytesToUuid = function (buf) {\n      const bth = byteToHex;\n      // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n      return [bth[buf[0]], bth[buf[1]], bth[buf[2]], bth[buf[3]], '-', bth[buf[4]], bth[buf[5]], '-', bth[buf[6]], bth[buf[7]], '-', bth[buf[8]], bth[buf[9]], '-', bth[buf[10]], bth[buf[11]], bth[buf[12]], bth[buf[13]], bth[buf[14]], bth[buf[15]]].join('');\n    };\n    CRYPTO.randomUUID = function uuidv4() {\n      const rnds = rng();\n\n      // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n      rnds[6] = rnds[6] & 0x0f | 0x40;\n      rnds[8] = rnds[8] & 0x3f | 0x80;\n      return bytesToUuid(rnds);\n    };\n  }\n}\nfunction isResourceKey(identifier) {\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    return !!identifier && typeof identifier === 'object' && 'type' in identifier && 'id' in identifier && identifier.type !== '@document' && identifier[CACHE_OWNER] !== undefined;\n  } else {\n    return identifier.type !== '@document' && identifier[CACHE_OWNER] !== undefined;\n  }\n}\nfunction isRequestKey(identifier) {\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    return !!identifier && typeof identifier === 'object' && 'type' in identifier && !('id' in identifier) && identifier.type === '@document' && identifier[CACHE_OWNER] !== undefined;\n  } else {\n    return identifier.type === '@document' && identifier[CACHE_OWNER] !== undefined;\n  }\n}\nconst isFastBoot = typeof FastBoot !== 'undefined';\nconst _crypto = isFastBoot ? FastBoot.require('crypto') : globalThis.crypto;\nif (macroCondition(getGlobalConfig().WarpDrive.polyfillUUID)) {\n  installPolyfill();\n}\nfunction uuidv4() {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error('crypto.randomUUID needs to be avaliable. Some browsers incorrectly disallow it in insecure contexts. You maybe want to enable the polyfill: https://github.com/warp-drive-data/warp-drive#randomuuid-polyfill');\n    }\n  })(typeof _crypto.randomUUID === 'function') : {};\n  return _crypto.randomUUID();\n}\nfunction freeze(obj) {\n  if (typeof Object.freeze === 'function') {\n    return Object.freeze(obj);\n  }\n  return obj;\n}\n\n// type IdentifierTypeLookup = { all: Set<ResourceKey>; id: Map<string, ResourceKey> };\n// type IdentifiersByType = Map<string, IdentifierTypeLookup>;\n\n/**\n  Configures how unique identifier lid strings are generated by @ember-data/store.\n\n  This configuration MUST occur prior to the store instance being created.\n\n  Takes a method which can expect to receive various data as its first argument\n  and the name of a bucket as its second argument.\n\n  Currently there are two buckets, 'record' and 'document'.\n\n  ### Resource (`Record`) Identity\n\n  If the bucket is `record` the method must return a unique (to at-least\n  the given bucket) string identifier for the given data as a string to be\n  used as the `lid` of an `Identifier` token.\n\n  This method will only be called by either `getOrCreateRecordIdentifier` or\n  `createIdentifierForNewRecord` when an identifier for the supplied data\n  is not already known via `lid` or `type + id` combo and one needs to be\n  generated or retrieved from a proprietary cache.\n\n  `data` will be the same data argument provided to `getOrCreateRecordIdentifier`\n  and in the `createIdentifierForNewRecord` case will be an object with\n  only `type` as a key.\n\n  ```ts\n  import { setIdentifierGenerationMethod } from '@warp-drive/core';\n\n  export function initialize(applicationInstance) {\n    // note how `count` here is now scoped to the application instance\n    // for our generation method by being inside the closure provided\n    // by the initialize function\n    let count = 0;\n\n    setIdentifierGenerationMethod((resource, bucket) => {\n      return resource.lid || `my-key-${count++}`;\n    });\n  }\n\n  export default {\n    name: 'configure-ember-data-identifiers',\n    initialize\n  };\n  ```\n\n  ### Document Identity\n\n  If the bucket is `document` the method will receive the associated\n  immutable `request` passed to `store.request` as its first argument\n  and should return a unique string for the given request if the document\n  should be cached, and `null` if it should not be cached.\n\n  Note, the request result will still be passed to the cache via `Cache.put`,\n  but caches should take this as a signal that the document should not itself\n  be cached, while its contents may still be used to update other cache state.\n\n  The presence of `cacheOptions.key` on the request will take precedence\n  for the document cache key, and this method will not be called if it is\n  present.\n\n  The default method implementation for this bucket is to return `null`\n  for all requests whose method is not `GET`, and to return the `url` for\n  those where it is.\n\n  This means that queries via `POST` MUST provide `cacheOptions.key` or\n  implement this hook.\n\n  ⚠️ Caution: Requests that do not have a `method` assigned are assumed to be `GET`\n\n  @public\n*/\nfunction setIdentifierGenerationMethod(method) {\n  setTransient('configuredGenerationMethod', method);\n}\n\n/**\n Configure a callback for when the identifier cache encounters new resource\n data for an existing resource.\n\n This configuration MUST occur prior to the store instance being created.\n\n ```js\n import { setIdentifierUpdateMethod } from '@warp-drive/core';\n ```\n\n Takes a method which can expect to receive an existing `Identifier` alongside\n some new data to consider as a second argument. This is an opportunity\n for secondary lookup tables and caches associated with the identifier\n to be amended.\n\n This method is called everytime `updateRecordIdentifier` is called and\n  with the same arguments. It provides the opportunity to update secondary\n  lookup tables for existing identifiers.\n\n It will always be called after an identifier created with `createIdentifierForNewRecord`\n  has been committed, or after an update to the `record` a `RecordIdentifier`\n  is assigned to has been committed. Committed here meaning that the server\n  has acknowledged the update (for instance after a call to `.save()`)\n\n If `id` has not previously existed, it will be assigned to the `Identifier`\n  prior to this `UpdateMethod` being called; however, calls to the parent method\n  `updateRecordIdentifier` that attempt to change the `id` or calling update\n  without providing an `id` when one is missing will throw an error.\n\n  @public\n*/\nfunction setIdentifierUpdateMethod(method) {\n  setTransient('configuredUpdateMethod', method);\n}\n\n/**\n Configure a callback for when the identifier cache is going to release an identifier.\n\n This configuration MUST occur prior to the store instance being created.\n\n ```js\n import { setIdentifierForgetMethod } from '@warp-drive/core';\n ```\n\n Takes method which can expect to receive an existing `Identifier` that should be eliminated\n from any secondary lookup tables or caches that the user has populated for it.\n\n  @public\n*/\nfunction setIdentifierForgetMethod(method) {\n  setTransient('configuredForgetMethod', method);\n}\n\n/**\n Configure a callback for when the identifier cache is being torn down.\n\n This configuration MUST occur prior to the store instance being created.\n\n ```js\n import { setIdentifierResetMethod } from '@warp-drive/core';\n ```\n\n Takes a method which can expect to be called when the parent application is destroyed.\n\n If you have properly used a WeakMap to encapsulate the state of your customization\n to the application instance, you may not need to implement the `resetMethod`.\n\n  @public\n*/\nfunction setIdentifierResetMethod(method) {\n  setTransient('configuredResetMethod', method);\n}\n\n/**\n Configure a callback for when the identifier cache is generating a new\n ResourceKey for a resource.\n\n This method controls the `type` and `id` that will be assigned to the\n `ResourceKey` that is created.\n\n This configuration MUST occur prior to the store instance being created.\n\n ```js\n import { setKeyInfoForResource } from '@warp-drive/core';\n ```\n\n  @public\n */\nfunction setKeyInfoForResource(method) {\n  setTransient('configuredKeyInfoMethod', method);\n}\n\n// Map<type, Map<id, lid>>\n\n// TODO can we just delete this?\nconst NEW_IDENTIFIERS = new Map();\n// TODO @runspired maybe needs peekTransient ?\nlet IDENTIFIER_CACHE_ID = 0;\nfunction updateTypeIdMapping(typeMap, identifier, id) {\n  let idMap = typeMap.get(identifier.type);\n  if (!idMap) {\n    idMap = new Map();\n    typeMap.set(identifier.type, idMap);\n  }\n  idMap.set(id, identifier.lid);\n}\nfunction defaultUpdateMethod(identifier, data, bucket) {\n  if (bucket === 'record') {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected identifier to be a ResourceKey`);\n      }\n    })(isResourceKey(identifier)) : {};\n    if (!identifier.id && hasId(data)) {\n      updateTypeIdMapping(NEW_IDENTIFIERS, identifier, data.id);\n    }\n  }\n}\nfunction defaultKeyInfoMethod(resource, known) {\n  // TODO RFC something to make this configurable\n  const id = hasId(resource) ? coerceId(resource.id) : null;\n  const type = hasType(resource) ? normalizeModelName(resource.type) : known ? known.type : null;\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected keyInfoForResource to provide a type for the resource`);\n    }\n  })(type) : {};\n  return {\n    type,\n    id\n  };\n}\nfunction defaultGenerationMethod(data, bucket) {\n  if (bucket === 'record') {\n    if (hasLid(data)) {\n      return data.lid;\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot generate an identifier for a resource without a type`);\n      }\n    })(hasType(data)) : {};\n    if (hasId(data)) {\n      const type = normalizeModelName(data.type);\n      const lid = NEW_IDENTIFIERS.get(type)?.get(data.id);\n      return lid || `@lid:${type}-${data.id}`;\n    }\n    return uuidv4();\n  } else if (bucket === 'document') {\n    if (!data.url) {\n      return null;\n    }\n    if (!data.method || data.method.toUpperCase() === 'GET') {\n      return data.url;\n    }\n    return null;\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    {\n      throw new Error(`Unknown bucket ${bucket}`);\n    }\n  })() : {};\n}\nfunction defaultEmptyCallback(...args) {}\nfunction defaultMergeMethod(a, _b, _c) {\n  return a;\n}\nlet DEBUG_MAP;\nif (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n  DEBUG_MAP = getOrSetGlobal('DEBUG_MAP', new WeakMap());\n}\n\n/**\n * Each instance of {@link Store} receives a unique instance of a CacheKeyManager.\n *\n * This cache is responsible for assigning or retrieving the unique identify\n * for arbitrary resource data encountered by the store. Data representing\n * a unique resource or record should always be represented by the same\n * identifier.\n *\n * It can be configured by consuming applications.\n *\n * @hideconstructor\n * @public\n */\nclass CacheKeyManager {\n  /** @internal */\n  _cache;\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  constructor() {\n    // we cache the user configuredGenerationMethod at init because it must\n    // be configured prior and is not allowed to be changed\n    this._generate = peekTransient('configuredGenerationMethod') || defaultGenerationMethod;\n    this._update = peekTransient('configuredUpdateMethod') || defaultUpdateMethod;\n    this._forget = peekTransient('configuredForgetMethod') || defaultEmptyCallback;\n    this._reset = peekTransient('configuredResetMethod') || defaultEmptyCallback;\n    this._merge = defaultMergeMethod;\n    this._keyInfoForResource = peekTransient('configuredKeyInfoMethod') || defaultKeyInfoMethod;\n    this._id = IDENTIFIER_CACHE_ID++;\n    this._cache = {\n      resources: new Map(),\n      resourcesByType: Object.create(null),\n      documents: new Map(),\n      polymorphicLidBackMap: new Map()\n    };\n  }\n\n  /**\n   * Internal hook to allow management of merge conflicts with identifiers.\n   *\n   * we allow late binding of this private internal merge so that\n   * the cache can insert itself here to handle elimination of duplicates\n   *\n   * @internal\n   */\n  __configureMerge(method) {\n    this._merge = method || defaultMergeMethod;\n  }\n\n  /** @internal */\n  upgradeIdentifier(resource) {\n    return this._getRecordIdentifier(resource, 2);\n  }\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n  _getRecordIdentifier(resource, shouldGenerate) {\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_IDENTIFIERS)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_IDENTIFIERS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_IDENTIFIERS) {\n        // eslint-disable-next-line no-console\n        console.groupCollapsed(`Identifiers: ${shouldGenerate ? 'Generating' : 'Peeking'} Identifier`, resource);\n      }\n    }\n    // short circuit if we're already the stable version\n    if (isResourceKey(resource)) {\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        // TODO should we instead just treat this case as a new generation skipping the short circuit?\n        if (!this._cache.resources.has(resource.lid) || this._cache.resources.get(resource.lid) !== resource) {\n          throw new Error(`The supplied identifier ${JSON.stringify(resource)} does not belong to this store instance`);\n        }\n      }\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_IDENTIFIERS)) {\n        if (getGlobalConfig().WarpDrive.debug.LOG_IDENTIFIERS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_IDENTIFIERS) {\n          // eslint-disable-next-line no-console\n          console.log(`Identifiers: cache HIT - Stable ${resource.lid}`);\n          // eslint-disable-next-line no-console\n          console.groupEnd();\n        }\n      }\n      return resource;\n    }\n\n    // the resource is unknown, ask the application to identify this data for us\n    const lid = this._generate(resource, 'record');\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_IDENTIFIERS)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_IDENTIFIERS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_IDENTIFIERS) {\n        // eslint-disable-next-line no-console\n        console.log(`Identifiers: ${lid ? 'no ' : ''}lid ${lid ? lid + ' ' : ''}determined for resource`, resource);\n      }\n    }\n    let identifier = /*#__NOINLINE__*/getIdentifierFromLid(this._cache, lid, resource);\n    if (identifier !== null) {\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_IDENTIFIERS)) {\n        if (getGlobalConfig().WarpDrive.debug.LOG_IDENTIFIERS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_IDENTIFIERS) {\n          // eslint-disable-next-line no-console\n          console.groupEnd();\n        }\n      }\n      return identifier;\n    }\n    if (shouldGenerate === 0) {\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_IDENTIFIERS)) {\n        if (getGlobalConfig().WarpDrive.debug.LOG_IDENTIFIERS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_IDENTIFIERS) {\n          // eslint-disable-next-line no-console\n          console.groupEnd();\n        }\n      }\n      return;\n    }\n\n    // if we still don't have an identifier, time to generate one\n    if (shouldGenerate === 2) {\n      resource.lid = lid;\n      resource[CACHE_OWNER] = this._id;\n      identifier = /*#__NOINLINE__*/makeResourceKey(resource, 'record', false);\n    } else {\n      // we lie a bit here as a memory optimization\n      const keyInfo = this._keyInfoForResource(resource, null);\n      keyInfo.lid = lid;\n      keyInfo[CACHE_OWNER] = this._id;\n      identifier = /*#__NOINLINE__*/makeResourceKey(keyInfo, 'record', false);\n    }\n    addResourceToCache(this._cache, identifier);\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_IDENTIFIERS)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_IDENTIFIERS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_IDENTIFIERS) {\n        // eslint-disable-next-line no-console\n        console.groupEnd();\n      }\n    }\n    return identifier;\n  }\n\n  /**\n   * allows us to peek without generating when needed\n   * useful for the \"create\" case when we need to see if\n   * we are accidentally overwritting something\n   *\n   * @private\n   */\n  peekResourceKey(resource) {\n    return this._getRecordIdentifier(resource, 0);\n  }\n\n  /**\n   * Peeks the {@link RequestKey} for the given {@link RequestInfo}, but will not\n   * create one if none has been previously generated.\n   *\n   * @public\n   */\n  peekRequestKey(request) {\n    let cacheKey = request.cacheOptions?.key;\n    if (!cacheKey) {\n      cacheKey = this._generate(request, 'document');\n    }\n    if (!cacheKey) {\n      return null;\n    }\n    const identifier = this._cache.documents.get(cacheKey);\n    return identifier ?? null;\n  }\n\n  /**\n   * Returns the {@link RequestKey} for the given {@link RequestInfo} if the request is\n   * considered cacheable. For cacheable requests, this method will create\n   * a RequestKey if none is found.\n   *\n   * A `null` response indicates the request cannot/will not be cached,\n   * generally this means either\n   *\n   * - {@link RequestInfo.cacheOptions.key} is not present on the `RequestInfo`\n   * - the request's method is `GET` but it has no `url`\n   *\n   * Generally you should not seek to cache requests that are not idempotent\n   * or have side effects, such as mutations that create, update or delete\n   * a resource.\n   *\n   * @public\n   */\n  getOrCreateDocumentIdentifier(request) {\n    let cacheKey = request.cacheOptions?.key;\n    if (!cacheKey) {\n      cacheKey = this._generate(request, 'document');\n    }\n    if (!cacheKey) {\n      return null;\n    }\n    let identifier = this._cache.documents.get(cacheKey);\n    if (identifier === undefined) {\n      identifier = {\n        lid: cacheKey,\n        type: '@document',\n        [CACHE_OWNER]: this._id\n      };\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        Object.freeze(identifier);\n      }\n      this._cache.documents.set(cacheKey, identifier);\n    }\n    return identifier;\n  }\n\n  /**\n    Returns the {@link ResourceKey} for the given Resource, creates one if it does not yet exist.\n     Specifically this means that we:\n     - validate the `id` `type` and `lid` combo against known identifiers\n    - return an object with an `lid` that is stable (repeated calls with the same\n      `id` + `type` or `lid` will return the same `lid` value)\n    - this referential stability of the object itself is guaranteed\n     @public\n  */\n  getOrCreateRecordIdentifier(resource) {\n    return this._getRecordIdentifier(resource, 1);\n  }\n\n  /**\n   Returns a new Identifier for the supplied data. Call this method to generate\n   an identifier when a new resource is being created local to the client and\n   potentially does not have an `id`.\n    Delegates generation to the user supplied `GenerateMethod` if one has been provided\n   with the signature `generateMethod({ type }, 'record')`.\n    @public\n  */\n  createIdentifierForNewRecord(data) {\n    const newLid = this._generate(data, 'record');\n    const identifier = /*#__NOINLINE__*/makeResourceKey({\n      id: data.id || null,\n      type: data.type,\n      lid: newLid,\n      [CACHE_OWNER]: this._id\n    }, 'record', true);\n\n    // populate our unique table\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      if (this._cache.resources.has(identifier.lid)) {\n        throw new Error(`The lid generated for the new record is not unique as it matches an existing identifier`);\n      }\n    }\n\n    /*#__NOINLINE__*/\n    addResourceToCache(this._cache, identifier);\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_IDENTIFIERS)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_IDENTIFIERS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_IDENTIFIERS) {\n        // eslint-disable-next-line no-console\n        console.log(`Identifiers: created identifier ${String(identifier)} for newly generated resource`, data);\n      }\n    }\n    return identifier;\n  }\n\n  /**\n   Provides the opportunity to update secondary lookup tables for existing identifiers\n   Called after an identifier created with `createIdentifierForNewRecord` has been\n   committed.\n    Assigned `id` to an `Identifier` if `id` has not previously existed; however,\n   attempting to change the `id` or calling update without providing an `id` when\n   one is missing will throw an error.\n     - sets `id` (if `id` was previously `null`)\n    - `lid` and `type` MUST NOT be altered post creation\n     If a merge occurs, it is possible the returned identifier does not match the originally\n    provided identifier. In this case the abandoned identifier will go through the usual\n    `forgetRecordIdentifier` codepaths.\n     @public\n  */\n  // FIXME audit usage\n  updateRecordIdentifier(identifierObject, data) {\n    let identifier = this.getOrCreateRecordIdentifier(identifierObject);\n    const keyInfo = this._keyInfoForResource(data, identifier);\n    let existingIdentifier = /*#__NOINLINE__*/detectMerge(this._cache, keyInfo, identifier, data);\n    const hadLid = hasLid(data);\n    if (!existingIdentifier) {\n      // If the incoming type does not match the identifier type, we need to create an identifier for the incoming\n      // data so we can merge the incoming data with the existing identifier, see #7325 and #7363\n      if (identifier.type !== keyInfo.type) {\n        if (hadLid) {\n          // Strip the lid to ensure we force a new identifier creation\n          delete data.lid;\n        }\n        existingIdentifier = this.getOrCreateRecordIdentifier(data);\n      }\n    }\n    if (existingIdentifier) {\n      const generatedIdentifier = identifier;\n      identifier = this._mergeRecordIdentifiers(keyInfo, generatedIdentifier, existingIdentifier, data);\n\n      // make sure that the `lid` on the data we are processing matches the lid we kept\n      if (hadLid) {\n        data.lid = identifier.lid;\n      }\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_IDENTIFIERS)) {\n        if (getGlobalConfig().WarpDrive.debug.LOG_IDENTIFIERS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_IDENTIFIERS) {\n          // eslint-disable-next-line no-console\n          console.log(`Identifiers: merged identifiers ${generatedIdentifier.lid} and ${existingIdentifier.lid} for resource into ${identifier.lid}`, data);\n        }\n      }\n    }\n    const id = identifier.id;\n    /*#__NOINLINE__*/\n    performRecordIdentifierUpdate(identifier, keyInfo, data, this._update);\n    const newId = identifier.id;\n\n    // add to our own secondary lookup table\n    if (id !== newId && newId !== null) {\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_IDENTIFIERS)) {\n        if (getGlobalConfig().WarpDrive.debug.LOG_IDENTIFIERS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_IDENTIFIERS) {\n          // eslint-disable-next-line no-console\n          console.log(`Identifiers: updated id for identifier ${identifier.lid} from '${String(id)}' to '${String(newId)}' for resource`, data);\n        }\n      }\n      const typeSet = this._cache.resourcesByType[identifier.type];\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected to find a typeSet for ${identifier.type}`);\n        }\n      })(typeSet) : {};\n      typeSet.id.set(newId, identifier);\n      if (id !== null) {\n        typeSet.id.delete(id);\n      }\n    } else if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_IDENTIFIERS)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_IDENTIFIERS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_IDENTIFIERS) {\n        // eslint-disable-next-line no-console\n        console.log(`Identifiers: updated identifier ${identifier.lid} resource`, data);\n      }\n    }\n    return identifier;\n  }\n\n  /**\n   * @internal\n   */\n  _mergeRecordIdentifiers(keyInfo, identifier, existingIdentifier, data) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected keyInfo to contain an id`);\n      }\n    })(hasId(keyInfo)) : {};\n    // delegate determining which identifier to keep to the configured MergeMethod\n    const kept = this._merge(identifier, existingIdentifier, data);\n    const abandoned = kept === identifier ? existingIdentifier : identifier;\n\n    // get any backreferences before forgetting this identifier, as it will be removed from the cache\n    // and we will no longer be able to find them\n    const abandonedBackReferences = this._cache.polymorphicLidBackMap.get(abandoned.lid);\n    // delete the backreferences for the abandoned identifier so that forgetRecordIdentifier\n    // does not try to remove them.\n    if (abandonedBackReferences) this._cache.polymorphicLidBackMap.delete(abandoned.lid);\n\n    // cleanup the identifier we no longer need\n    this.forgetRecordIdentifier(abandoned);\n\n    // ensure a secondary cache entry for the original lid for the abandoned identifier\n    this._cache.resources.set(abandoned.lid, kept);\n\n    // backReferences let us know which other identifiers are pointing at this identifier\n    // so we can delete them later if we forget this identifier\n    const keptBackReferences = this._cache.polymorphicLidBackMap.get(kept.lid) ?? [];\n    keptBackReferences.push(abandoned.lid);\n\n    // update the backreferences from the abandoned identifier to be for the kept identifier\n    if (abandonedBackReferences) {\n      abandonedBackReferences.forEach(lid => {\n        keptBackReferences.push(lid);\n        this._cache.resources.set(lid, kept);\n      });\n    }\n    this._cache.polymorphicLidBackMap.set(kept.lid, keptBackReferences);\n    return kept;\n  }\n\n  /**\n   Provides the opportunity to eliminate an identifier from secondary lookup tables\n   as well as eliminates it from ember-data's own lookup tables and book keeping.\n    Useful when a record has been deleted and the deletion has been persisted and\n   we do not care about the record anymore. Especially useful when an `id` of a\n   deleted record might be reused later for a new record.\n    @public\n  */\n  // FIXME audit usage\n  forgetRecordIdentifier(identifierObject) {\n    const identifier = this.getOrCreateRecordIdentifier(identifierObject);\n    const typeSet = this._cache.resourcesByType[identifier.type];\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected to find a typeSet for ${identifier.type}`);\n      }\n    })(typeSet) : {};\n    if (identifier.id !== null) {\n      typeSet.id.delete(identifier.id);\n    }\n    this._cache.resources.delete(identifier.lid);\n    typeSet.lid.delete(identifier.lid);\n    const backReferences = this._cache.polymorphicLidBackMap.get(identifier.lid);\n    if (backReferences) {\n      backReferences.forEach(lid => {\n        this._cache.resources.delete(lid);\n      });\n      this._cache.polymorphicLidBackMap.delete(identifier.lid);\n    }\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      identifier[DEBUG_STALE_CACHE_OWNER] = identifier[CACHE_OWNER];\n    }\n    identifier[CACHE_OWNER] = undefined;\n    this._forget(identifier, 'record');\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_IDENTIFIERS)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_IDENTIFIERS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_IDENTIFIERS) {\n        // eslint-disable-next-line no-console\n        console.log(`Identifiers: released identifier ${identifierObject.lid}`);\n      }\n    }\n  }\n\n  /** @internal */\n  destroy() {\n    NEW_IDENTIFIERS.clear();\n    this._reset();\n  }\n}\n\n/**\n * This type exists for internal use only for\n * where intimate contracts still exist either for\n * the Test Suite or for Legacy code.\n *\n * @private\n */\n\nfunction makeResourceKey(recordIdentifier, bucket, clientOriginated) {\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    // we enforce immutability in dev\n    //  but preserve our ability to do controlled updates to the reference\n    let wrapper = {\n      type: recordIdentifier.type,\n      lid: recordIdentifier.lid,\n      get id() {\n        return recordIdentifier.id;\n      }\n    };\n    const proto = {\n      get [CACHE_OWNER]() {\n        return recordIdentifier[CACHE_OWNER];\n      },\n      set [CACHE_OWNER](value) {\n        recordIdentifier[CACHE_OWNER] = value;\n      },\n      get [DEBUG_STALE_CACHE_OWNER]() {\n        return recordIdentifier[DEBUG_STALE_CACHE_OWNER];\n      },\n      set [DEBUG_STALE_CACHE_OWNER](value) {\n        recordIdentifier[DEBUG_STALE_CACHE_OWNER] = value;\n      },\n      get [DEBUG_CLIENT_ORIGINATED]() {\n        return clientOriginated;\n      },\n      get [DEBUG_KEY_TYPE]() {\n        return bucket;\n      }\n    };\n    Object.defineProperty(proto, 'toString', {\n      enumerable: false,\n      value: () => {\n        const {\n          type,\n          id,\n          lid\n        } = recordIdentifier;\n        return `${clientOriginated ? '[CLIENT_ORIGINATED] ' : ''}${String(type)}:${String(id)} (${lid})`;\n      }\n    });\n    Object.defineProperty(proto, 'toJSON', {\n      enumerable: false,\n      value: () => {\n        const {\n          type,\n          id,\n          lid\n        } = recordIdentifier;\n        return {\n          type,\n          id,\n          lid\n        };\n      }\n    });\n    Object.setPrototypeOf(wrapper, proto);\n    DEBUG_MAP.set(wrapper, recordIdentifier);\n    wrapper = freeze(wrapper);\n    return wrapper;\n  }\n  return recordIdentifier;\n}\nfunction performRecordIdentifierUpdate(identifier, keyInfo, data, updateFn) {\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    const {\n      id,\n      type\n    } = keyInfo;\n\n    // get the mutable instance behind our proxy wrapper\n    const wrapper = identifier;\n    identifier = DEBUG_MAP.get(wrapper);\n    if (hasLid(data)) {\n      const lid = data.lid;\n      if (lid !== identifier.lid) {\n        throw new Error(`The 'lid' for a ResourceKey cannot be updated once it has been created. Attempted to set lid for '${wrapper.lid}' to '${lid}'.`);\n      }\n    }\n    if (id && identifier.id !== null && identifier.id !== id) {\n      // here we warn and ignore, as this may be a mistake, but we allow the user\n      // to have multiple cache-keys pointing at a single lid so we cannot error\n      warn(`The 'id' for a ResourceKey should not be updated once it has been set. Attempted to set id for '${wrapper.lid}' to '${id}'.`, false, {\n        id: 'ember-data:multiple-ids-for-identifier'\n      });\n    }\n\n    // TODO consider just ignoring here to allow flexible polymorphic support\n    if (type && type !== identifier.type) {\n      throw new Error(`The 'type' for a ResourceKey cannot be updated once it has been set. Attempted to set type for '${wrapper.lid}' to '${type}'.`);\n    }\n    updateFn(wrapper, data, 'record');\n  } else {\n    updateFn(identifier, data, 'record');\n  }\n\n  // upgrade the ID, this is a \"one time only\" ability\n  // for the multiple-cache-key scenario we \"could\"\n  // use a heuristic to guess the best id for display\n  // (usually when `data.id` is available and `data.attributes` is not)\n  if (data.id !== undefined) {\n    identifier.id = coerceId(data.id);\n  }\n}\nfunction detectMerge(cache, keyInfo, identifier, data) {\n  const newId = keyInfo.id;\n  const {\n    id,\n    type,\n    lid\n  } = identifier;\n  const typeSet = cache.resourcesByType[identifier.type];\n\n  // if the IDs are present but do not match\n  // then check if we have an existing identifier\n  // for the newer ID.\n  if (id !== null && id !== newId && newId !== null) {\n    const existingIdentifier = typeSet && typeSet.id.get(newId);\n    return existingIdentifier !== undefined ? existingIdentifier : false;\n  } else {\n    const newType = keyInfo.type;\n\n    // If the ids and type are the same but lid is not the same, we should trigger a merge of the identifiers\n    // we trigger a merge of the identifiers\n    // though probably we should just throw an error here\n    if (id !== null && id === newId && newType === type && hasLid(data) && data.lid !== lid) {\n      return getIdentifierFromLid(cache, data.lid, data) || false;\n\n      // If the lids are the same, and ids are the same, but types are different we should trigger a merge of the identifiers\n    } else if (id !== null && id === newId && newType && newType !== type && hasLid(data) && data.lid === lid) {\n      const newTypeSet = cache.resourcesByType[newType];\n      const existingIdentifier = newTypeSet && newTypeSet.id.get(newId);\n      return existingIdentifier !== undefined ? existingIdentifier : false;\n    }\n  }\n  return false;\n}\nfunction getIdentifierFromLid(cache, lid, resource) {\n  const identifier = cache.resources.get(lid);\n  if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_IDENTIFIERS)) {\n    if (getGlobalConfig().WarpDrive.debug.LOG_IDENTIFIERS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_IDENTIFIERS) {\n      // eslint-disable-next-line no-console\n      console.log(`Identifiers: cache ${identifier ? 'HIT' : 'MISS'} - Non-Stable ${lid}`, resource);\n    }\n  }\n  return identifier || null;\n}\nfunction addResourceToCache(cache, identifier) {\n  cache.resources.set(identifier.lid, identifier);\n  let typeSet = cache.resourcesByType[identifier.type];\n  if (!typeSet) {\n    typeSet = {\n      lid: new Map(),\n      id: new Map()\n    };\n    cache.resourcesByType[identifier.type] = typeSet;\n  }\n  typeSet.lid.set(identifier.lid, identifier);\n  if (identifier.id) {\n    typeSet.id.set(identifier.id, identifier);\n  }\n}\nclass CacheCapabilitiesManager {\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  constructor(_store) {\n    this._store = _store;\n    this._willNotify = false;\n    this._pendingNotifies = new Map();\n  }\n  get cacheKeyManager() {\n    return this._store.cacheKeyManager;\n  }\n\n  /** @deprecated use {@link CacheCapabilitiesManager.cacheKeyManager} */\n  get identifierCache() {\n    return this.cacheKeyManager;\n  }\n\n  /** @internal */\n  _scheduleNotification(identifier, key) {\n    let pending = this._pendingNotifies.get(identifier);\n    if (!pending) {\n      pending = new Set();\n      this._pendingNotifies.set(identifier, pending);\n    }\n    pending.add(key);\n    if (this._willNotify === true) {\n      return;\n    }\n    this._willNotify = true;\n    // it's possible a cache adhoc notifies us,\n    // in which case we sync flush\n    if (this._store._cbs) {\n      this._store._schedule('notify', () => this._flushNotifications());\n    } else {\n      // TODO @runspired determine if relationship mutations should schedule\n      // into join/run vs immediate flush\n      this._flushNotifications();\n    }\n  }\n\n  /** @internal */\n  _flushNotifications() {\n    if (this._willNotify === false) {\n      return;\n    }\n    const pending = this._pendingNotifies;\n    this._pendingNotifies = new Map();\n    this._willNotify = false;\n    pending.forEach((set, identifier) => {\n      set.forEach(key => {\n        this._store.notifications.notify(identifier, 'relationships', key);\n      });\n    });\n  }\n  notifyChange(identifier, namespace, key) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected a stable identifier`);\n      }\n    })(isResourceKey(identifier) || isRequestKey(identifier)) : {};\n\n    // TODO do we still get value from this?\n    if (namespace === 'relationships' && key) {\n      this._scheduleNotification(identifier, key);\n      return;\n    }\n\n    // @ts-expect-error\n    this._store.notifications.notify(identifier, namespace, key);\n  }\n  get schema() {\n    return this._store.schema;\n  }\n  setRecordId(identifier, id) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected a stable identifier`);\n      }\n    })(isResourceKey(identifier)) : {};\n    this._store._instanceCache.setRecordId(identifier, id);\n  }\n  hasRecord(identifier) {\n    return Boolean(this._store._instanceCache.peek(identifier));\n  }\n  disconnectRecord(identifier) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected a stable identifier`);\n      }\n    })(isResourceKey(identifier)) : {};\n    this._store._instanceCache.disconnect(identifier);\n    this._pendingNotifies.delete(identifier);\n  }\n}\n\n/**\n * This type exists for internal use only for\n * where intimate contracts still exist either for\n * the Test Suite or for Legacy code.\n *\n * @private\n */\n\nif (macroCondition(getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_SCHEMA_SERVICE)) {\n  CacheCapabilitiesManager.prototype.getSchemaDefinitionService = function () {\n    // FIXME add deprecation for this\n    return this.schema;\n  };\n}\nfunction assertPrivateCapabilities(manager) {}\nfunction isDestroyable(record) {\n  return Boolean(record && typeof record === 'object' && typeof record.destroy === 'function');\n}\nconst RecordCache = getOrSetGlobal('RecordCache', new Map());\nfunction peekResourceKey(record) {\n  return RecordCache.get(record);\n}\n\n/**\n  Retrieves the unique referentially-stable {@link ResourceKey}\n  assigned to the given record instance.\n\n  ```js\n  import { recordIdentifierFor } from \"@warp-drive/core\";\n  // ... gain access to a record, for instance with peekRecord or findRecord\n  const record = store.peekRecord(\"user\", \"1\");\n  // get the identifier for the record (see docs for ResourceKey)\n  const identifier = recordIdentifierFor(record);\n  // access the identifier's properties.\n  const { id, type, lid } = identifier;\n  ```\n\n  @public\n  @param record a record instance previously obstained from the store.\n */\n\nfunction recordIdentifierFor(record) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`${String(record)} is not a ReactiveResource or Model known to WarpDrive`);\n    }\n  })(RecordCache.has(record)) : {};\n  return RecordCache.get(record);\n}\nfunction setRecordIdentifier(record, identifier) {\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    if (RecordCache.has(record) && RecordCache.get(record) !== identifier) {\n      throw new Error(`${String(record)} was already assigned an identifier`);\n    }\n  }\n\n  /*\n  It would be nice to do a reverse check here that an identifier has not\n  previously been assigned a record; however, unload + rematerialization\n  prevents us from having a great way of doing so when CustomRecordClasses\n  don't necessarily give us access to a `isDestroyed` for dematerialized\n  instance.\n  */\n\n  RecordCache.set(record, identifier);\n}\nfunction removeRecordIdentifier(record) {\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    if (!RecordCache.has(record)) {\n      throw new Error(`${String(record)} had no assigned identifier to remove`);\n    }\n  }\n  RecordCache.delete(record);\n}\nconst StoreMap = getOrSetGlobal('StoreMap', new Map());\n\n/**\n * We may eventually make this public, but its likely better for this to be killed off\n * @private\n */\nfunction storeFor(record, ignoreMissing) {\n  const store = StoreMap.get(record);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`A record in a disconnected state cannot utilize the store. This typically means the record has been destroyed, most commonly by unloading it.`);\n    }\n  })(ignoreMissing || store) : {};\n  return store ?? null;\n}\nclass InstanceCache {\n  constructor(store) {\n    this.store = store;\n    this.__instances = {\n      record: new Map(),\n      document: new Map()\n    };\n    this._storeWrapper = new CacheCapabilitiesManager(this.store);\n    store.cacheKeyManager.__configureMerge((identifier, matchedIdentifier, resourceData) => {\n      let keptIdentifier = identifier;\n      if (identifier.id !== matchedIdentifier.id) {\n        // @ts-expect-error TODO this needs to be fixed\n        keptIdentifier = 'id' in resourceData && identifier.id === resourceData.id ? identifier : matchedIdentifier;\n      } else if (identifier.type !== matchedIdentifier.type) {\n        keptIdentifier =\n        // @ts-expect-error TODO this needs to be fixed\n        'type' in resourceData && identifier.type === resourceData.type ? identifier : matchedIdentifier;\n      }\n      const staleIdentifier = identifier === keptIdentifier ? matchedIdentifier : identifier;\n\n      // check for duplicate entities\n      const keptHasRecord = this.__instances.record.has(keptIdentifier);\n      const staleHasRecord = this.__instances.record.has(staleIdentifier);\n\n      // we cannot merge entities when both have records\n      // (this may not be strictly true, we could probably swap the cache data the record points at)\n      if (keptHasRecord && staleHasRecord) {\n        // TODO we probably don't need to throw these errors anymore\n        // we can probably just \"swap\" what data source the abandoned\n        // record points at so long as\n        // it itself is not retained by the store in any way.\n        // @ts-expect-error TODO this needs to be fixed\n        if ('id' in resourceData) {\n          throw new Error(`Failed to update the 'id' for the ResourceKey '${identifier.type}:${String(identifier.id)} (${identifier.lid})' to '${String(resourceData.id)}', because that id is already in use by '${matchedIdentifier.type}:${String(matchedIdentifier.id)} (${matchedIdentifier.lid})'`);\n        }\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          {\n            throw new Error(`Failed to update the ResourceKey '${identifier.type}:${String(identifier.id)} (${identifier.lid})' to merge with the detected duplicate identifier '${matchedIdentifier.type}:${String(matchedIdentifier.id)} (${String(matchedIdentifier.lid)})'`);\n          }\n        })() : {};\n      }\n      this.store.cache.patch({\n        op: 'mergeIdentifiers',\n        record: staleIdentifier,\n        value: keptIdentifier\n      });\n\n      /*\n      TODO @runspired consider adding this to make polymorphism even nicer\n      if (identifier.type !== matchedIdentifier.type) {\n      this.store._graph?.registerPolymorphicType(identifier.type, matchedIdentifier.type);\n      }\n      */\n\n      this.unloadRecord(staleIdentifier);\n      return keptIdentifier;\n    });\n  }\n  peek(identifier) {\n    return this.__instances.record.get(identifier);\n  }\n  getDocument(identifier) {\n    let doc = this.__instances.document.get(identifier);\n    if (!doc) {\n      doc = createReactiveDocument(this.store, identifier, null);\n      this.__instances.document.set(identifier, doc);\n    }\n    return doc;\n  }\n  getRecord(identifier) {\n    let record = this.__instances.record.get(identifier);\n    if (!record) {\n      record = _createRecord(this, identifier, {});\n    }\n    return record;\n  }\n  recordIsLoaded(identifier, filterDeleted = false) {\n    const cache = this.cache;\n    if (!cache) {\n      return false;\n    }\n    const isNew = cache.isNew(identifier);\n    const isEmpty = cache.isEmpty(identifier);\n\n    // if we are new we must consider ourselves loaded\n    if (isNew) {\n      return !cache.isDeleted(identifier);\n    }\n    // even if we have a past request, if we are now empty we are not loaded\n    // typically this is true after an unloadRecord call\n\n    // if we are not empty, not new && we have a fulfilled request then we are loaded\n    // we should consider allowing for something to be loaded that is simply \"not empty\".\n    // which is how RecordState currently handles this case; however, RecordState is buggy\n    // in that it does not account for unloading.\n    return filterDeleted && cache.isDeletionCommitted(identifier) ? false : !isEmpty;\n  }\n  disconnect(identifier) {\n    const record = this.__instances.record.get(identifier);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error('Cannot destroy record while it is still materialized');\n      }\n    })(!isDestroyable(record) || record.isDestroyed || record.isDestroying) : {};\n    this.store._graph?.remove(identifier);\n    this.store.cacheKeyManager.forgetRecordIdentifier(identifier);\n    StoreMap.delete(identifier);\n    this.store._requestCache._clearEntries(identifier);\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_INSTANCE_CACHE)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_INSTANCE_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_INSTANCE_CACHE) {\n        log('reactive-ui', '', identifier.type, identifier.lid, 'disconnected', '');\n      }\n    }\n  }\n  unloadRecord(identifier) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      const requests = this.store.getRequestStateService().getPendingRequestsForRecord(identifier);\n      if (requests.some(req => {\n        return req.type === 'mutation';\n      })) {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          {\n            throw new Error(`You can only unload a record which is not inFlight. '${String(identifier)}'`);\n          }\n        })() : {};\n      }\n    }\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_INSTANCE_CACHE)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_INSTANCE_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_INSTANCE_CACHE) {\n        // eslint-disable-next-line no-console\n        console.groupCollapsed(`InstanceCache: unloading record for ${String(identifier)}`);\n      }\n    }\n\n    // TODO is this join still necessary?\n    this.store._join(() => {\n      unloadRecord(this, identifier);\n    });\n  }\n  clear(type) {\n    const cache = this.store.cacheKeyManager._cache;\n    if (type === undefined) {\n      // it would be cool if we could just de-ref cache here\n      // but probably would require WeakRef models to do so.\n      cache.resources.forEach(identifier => {\n        this.unloadRecord(identifier);\n      });\n    } else {\n      const typeCache = cache.resourcesByType;\n      const identifiers = typeCache[type]?.lid;\n      if (identifiers) {\n        identifiers.forEach(identifier => {\n          // if (rds.has(identifier)) {\n          this.unloadRecord(identifier);\n          // }\n          // TODO we don't remove the identifier, should we?\n        });\n      }\n    }\n  }\n\n  // TODO this should move into something coordinating operations\n  setRecordId(identifier, id) {\n    const {\n      type,\n      lid\n    } = identifier;\n    const oldId = identifier.id;\n\n    // ID absolutely can't be missing if the oldID is empty (missing Id in response for a new record)\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`'${type}' was saved to the server, but the response does not have an id and your record does not either.`);\n      }\n    })(!(id === null && oldId === null)) : {};\n\n    // ID absolutely can't be different than oldID if oldID is not null\n    // TODO this assertion and restriction may not strictly be needed in the identifiers world\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot update the id for '${type}:${lid}' from '${String(oldId)}' to '${id}'.`);\n      }\n    })(!(oldId !== null && id !== oldId)) : {};\n\n    // ID can be null if oldID is not null (altered ID in response for a record)\n    // however, this is more than likely a developer error.\n    if (oldId !== null && id === null) {\n      warn(`Your ${type} record was saved to the server, but the response does not have an id.`, !(oldId !== null && id === null));\n      return;\n    }\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_INSTANCE_CACHE)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_INSTANCE_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_INSTANCE_CACHE) {\n        // eslint-disable-next-line no-console\n        console.log(`InstanceCache: updating id to '${id}' for record ${String(identifier)}`);\n      }\n    }\n    const existingIdentifier = this.store.cacheKeyManager.peekResourceKey({\n      type,\n      id\n    });\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`'${type}' was saved to the server, but the response returned the new id '${id}', which has already been used with another record.'`);\n      }\n    })(!existingIdentifier || existingIdentifier === identifier) : {};\n    if (identifier.id === null) {\n      // TODO potentially this needs to handle merged result\n      this.store.cacheKeyManager.updateRecordIdentifier(identifier, {\n        type,\n        id\n      });\n    }\n\n    // TODO update resource cache if needed ?\n    // TODO handle consequences of identifier merge for notifications\n    this.store.notifications.notify(identifier, 'identity', null);\n  }\n}\nfunction getNewRecord(instances, identifier, properties) {\n  let record = instances.__instances.record.get(identifier);\n  if (!record) {\n    record = _createRecord(instances, identifier, properties);\n    if (record instanceof ReactiveResource && instances.store.schema.resource) {\n      // this is a work around until we introduce a new async createRecord API\n      const schema = instances.store.schema.resource(identifier);\n      if (!schema.legacy) {\n        const editable = _CHECKOUT(record);\n        if (properties) {\n          Object.assign(editable, properties);\n        }\n        return editable;\n      }\n    }\n  }\n  return record;\n}\nfunction _createRecord(instances, identifier, properties) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Cannot create a new record instance while the store is being destroyed`);\n    }\n  })(!instances.store.isDestroying && !instances.store.isDestroyed) : {};\n  const record = instances.store.instantiateRecord(identifier, properties);\n  setRecordIdentifier(record, identifier);\n  StoreMap.set(record, instances.store);\n  instances.__instances.record.set(identifier, record);\n  if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_INSTANCE_CACHE)) {\n    if (getGlobalConfig().WarpDrive.debug.LOG_INSTANCE_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_INSTANCE_CACHE) {\n      logGroup('reactive-ui', '', identifier.type, identifier.lid, 'created', '');\n      // eslint-disable-next-line no-console\n      console.groupEnd();\n    }\n  }\n  return record;\n}\nfunction _clearCaches() {\n  RecordCache.clear();\n  StoreMap.clear();\n}\nfunction unloadRecord(instances, identifier) {\n  const record = instances.__instances.record.get(identifier);\n  const cache = instances.cache;\n  if (record) {\n    instances.store.teardownRecord(record);\n    instances.__instances.record.delete(identifier);\n    StoreMap.delete(record);\n    RecordCache.delete(record);\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_INSTANCE_CACHE)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_INSTANCE_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_INSTANCE_CACHE) {\n        // eslint-disable-next-line no-console\n        console.log(`InstanceCache: destroyed record for ${String(identifier)}`);\n      }\n    }\n  }\n  if (cache) {\n    cache.unloadRecord(identifier);\n    StoreMap.delete(identifier);\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_INSTANCE_CACHE)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_INSTANCE_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_INSTANCE_CACHE) {\n        // eslint-disable-next-line no-console\n        console.log(`InstanceCache: destroyed cache for ${String(identifier)}`);\n      }\n    }\n  } else {\n    instances.disconnect(identifier);\n  }\n  instances.store._requestCache._clearEntries(identifier);\n  if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_INSTANCE_CACHE)) {\n    if (getGlobalConfig().WarpDrive.debug.LOG_INSTANCE_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_INSTANCE_CACHE) {\n      // eslint-disable-next-line no-console\n      console.log(`InstanceCache: unloaded RecordData for ${String(identifier)}`);\n      // eslint-disable-next-line no-console\n      console.groupEnd();\n    }\n  }\n}\n\n/**\n * The CacheManager wraps a Cache enforcing that only\n * the public API surface area is exposed.\n *\n * Hence, it is the value of `Store.cache`, wrapping\n * the cache instance returned by `Store.createCache`.\n *\n * It handles translating between cache versions when\n * necessary, for instance when a Store is configured\n * to use both a v1 and a v2 cache depending on some\n * heuristic.\n *\n * Starting with the v2 spec, the cache is designed such\n * that it must be implemented as a singleton.\n *\n * @class CacheManager\n * @public\n */\nclass CacheManager {\n  version = '2';\n\n  /** @internal */\n\n  constructor(cache) {\n    this.___cache = cache;\n  }\n\n  // Cache Management\n  // ================\n\n  /**\n   * Cache the response to a request\n   *\n   * Unlike `store.push` which has UPSERT\n   * semantics, `put` has `replace` semantics similar to\n   * the `http` method `PUT`\n   *\n   * the individually cacheable\n   * e resource data it may contain\n   * should upsert, but the document data surrounding it should\n   * fully replace any existing information\n   *\n   * Note that in order to support inserting arbitrary data\n   * to the cache that did not originate from a request `put`\n   * should expect to sometimes encounter a document with only\n   * a `content` member and therefor must not assume the existence\n   * of `request` and `response` on the document.\n   *\n   * @public\n   */\n  put(doc) {\n    return this.___cache.put(doc);\n  }\n\n  /**\n   * Perform an operation on the cache to update the remote state.\n   *\n   * @public\n   * @param op the operation to perform\n   */\n  patch(op) {\n    this.___cache.patch(op);\n  }\n\n  /**\n   * Update resource data with a local mutation. Currently supports operations\n   * on relationships only.\n   *\n   * @public\n   */\n  mutate(mutation) {\n    this.___cache.mutate(mutation);\n  }\n\n  /**\n   * Peek resource data from the Cache.\n   *\n   * In development, if the return value\n   * is JSON the return value\n   * will be deep-cloned and deep-frozen\n   * to prevent mutation thereby enforcing cache\n   * Immutability.\n   *\n   * This form of peek is useful for implementations\n   * that want to feed raw-data from cache to the UI\n   * or which want to interact with a blob of data\n   * directly from the presentation cache.\n   *\n   * An implementation might want to do this because\n   * de-referencing records which read from their own\n   * blob is generally safer because the record does\n   * not require retaining connections to the Store\n   * and Cache to present data on a per-field basis.\n   *\n   * This generally takes the place of `getAttr` as\n   * an API and may even take the place of `getRelationship`\n   * depending on implementation specifics, though this\n   * latter usage is less recommended due to the advantages\n   * of the Graph handling necessary entanglements and\n   * notifications for relational data.\n   *\n   * @public\n   * @return the known resource data\n   */\n\n  peek(cacheKey) {\n    return this.___cache.peek(cacheKey);\n  }\n  peekRemoteState(cacheKey) {\n    return this.___cache.peekRemoteState(cacheKey);\n  }\n  /**\n   * Peek the Cache for the existing request data associated with\n   * a cacheable request\n   *\n   * @public\n   */\n  peekRequest(key) {\n    return this.___cache.peekRequest(key);\n  }\n\n  /**\n   * Push resource data from a remote source into the cache for this ResourceKey\n   *\n   * @public\n   * @return if `hasRecord` is true then calculated key changes should be returned\n   */\n  upsert(key, data, hasRecord) {\n    return this.___cache.upsert(key, data, hasRecord);\n  }\n\n  // Cache Forking Support\n  // =====================\n\n  /**\n   * Create a fork of the cache from the current state.\n   *\n   * Applications should typically not call this method themselves,\n   * preferring instead to fork at the Store level, which will\n   * utilize this method to fork the cache.\n   *\n   * @public\n   */\n  fork() {\n    return this.___cache.fork();\n  }\n\n  /**\n   * Merge a fork back into a parent Cache.\n   *\n   * Applications should typically not call this method themselves,\n   * preferring instead to merge at the Store level, which will\n   * utilize this method to merge the caches.\n   *\n   * @public\n   */\n  merge(cache) {\n    return this.___cache.merge(cache);\n  }\n\n  /**\n   * Generate the list of changes applied to all\n   * record in the store.\n   *\n   * Each individual resource or document that has\n   * been mutated should be described as an individual\n   * `Change` entry in the returned array.\n   *\n   * A `Change` is described by an object containing up to\n   * three properties: (1) the `ResourceKey` of the entity that\n   * changed; (2) the `op` code of that change being one of\n   * `upsert` or `remove`, and if the op is `upsert` a `patch`\n   * containing the data to merge into the cache for the given\n   * entity.\n   *\n   * This `patch` is opaque to the Store but should be understood\n   * by the Cache and may expect to be utilized by an Adapter\n   * when generating data during a `save` operation.\n   *\n   * It is generally recommended that the `patch` contain only\n   * the updated state, ignoring fields that are unchanged\n   *\n   * ```ts\n   * interface Change {\n   *  key: ResourceKey | RequestKey;\n   *  op: 'upsert' | 'remove';\n   *  patch?: unknown;\n   * }\n   * ```\n   *\n   * @public\n   */\n  diff() {\n    return this.___cache.diff();\n  }\n\n  // SSR Support\n  // ===========\n\n  /**\n   * Serialize the entire contents of the Cache into a Stream\n   * which may be fed back into a new instance of the same Cache\n   * via `cache.hydrate`.\n   *\n   * @public\n   */\n  dump() {\n    return this.___cache.dump();\n  }\n\n  /**\n   * hydrate a Cache from a Stream with content previously serialized\n   * from another instance of the same Cache, resolving when hydration\n   * is complete.\n   *\n   * This method should expect to be called both in the context of restoring\n   * the Cache during application rehydration after SSR **AND** at unknown\n   * times during the lifetime of an already booted application when it is\n   * desired to bulk-load additional information into the cache. This latter\n   * behavior supports optimizing pre/fetching of data for route transitions\n   * via data-only SSR modes.\n   *\n   * @public\n   */\n  hydrate(stream) {\n    return this.___cache.hydrate(stream);\n  }\n\n  // Cache\n  // =====\n\n  // Resource Support\n  // ================\n\n  /**\n   * [LIFECYCLE] Signal to the cache that a new record has been instantiated on the client\n   *\n   * It returns properties from options that should be set on the record during the create\n   * process. This return value behavior is deprecated.\n   *\n   * @public\n   */\n  clientDidCreate(key, options) {\n    return this.___cache.clientDidCreate(key, options);\n  }\n\n  /**\n   * [LIFECYCLE] Signals to the cache that a resource\n   * will be part of a save transaction.\n   *\n   * @public\n   * @param key\n   */\n  willCommit(key, context) {\n    this.___cache.willCommit(key, context);\n  }\n\n  /**\n   * [LIFECYCLE] Signals to the cache that a resource\n   * was successfully updated as part of a save transaction.\n   *\n   * @public\n   */\n\n  didCommit(key, result) {\n    // @ts-expect-error TS doesn't enable proxying overload calls\n    return this.___cache.didCommit(key, result);\n  }\n\n  /**\n   * [LIFECYCLE] Signals to the cache that a resource\n   * was update via a save transaction failed.\n   *\n   * @public\n   */\n  commitWasRejected(key, errors) {\n    this.___cache.commitWasRejected(key, errors);\n  }\n\n  /**\n   * [LIFECYCLE] Signals to the cache that all data for a resource\n   * should be cleared.\n   *\n   * @public\n   */\n  unloadRecord(key) {\n    this.___cache.unloadRecord(key);\n  }\n\n  // Granular Resource Data APIs\n  // ===========================\n\n  /**\n   * Retrieve the data for an attribute from the cache\n   *\n   * @public\n   */\n  getAttr(key, propertyName) {\n    return this.___cache.getAttr(key, propertyName);\n  }\n\n  /**\n   * Retrieve the remote state for an attribute from the cache\n   *\n   * @public\n   */\n  getRemoteAttr(key, propertyName) {\n    return this.___cache.getRemoteAttr(key, propertyName);\n  }\n\n  /**\n   * Mutate the data for an attribute in the cache\n   *\n   * @public\n   */\n  setAttr(key, propertyName, value) {\n    this.___cache.setAttr(key, propertyName, value);\n  }\n\n  /**\n   * Query the cache for the changed attributes of a resource.\n   *\n   * @public\n   */\n  changedAttrs(key) {\n    return this.___cache.changedAttrs(key);\n  }\n\n  /**\n   * Query the cache for whether any mutated attributes exist\n   *\n   * @public\n   */\n  hasChangedAttrs(key) {\n    return this.___cache.hasChangedAttrs(key);\n  }\n\n  /**\n   * Tell the cache to discard any uncommitted mutations to attributes\n   *\n   * @public\n   * @return the names of attributes that were restored\n   */\n  rollbackAttrs(key) {\n    return this.___cache.rollbackAttrs(key);\n  }\n\n  // Relationships\n  // =============\n\n  /**\n   * Query the cache for the changes to relationships of a resource.\n   *\n   * Returns a map of relationship names to RelationshipDiff objects.\n   *\n   * ```ts\n   * type RelationshipDiff =\n  | {\n      kind: 'collection';\n      remoteState: ResourceKey[];\n      additions: Set<ResourceKey>;\n      removals: Set<ResourceKey>;\n      localState: ResourceKey[];\n      reordered: boolean;\n    }\n  | {\n      kind: 'resource';\n      remoteState: ResourceKey | null;\n      localState: ResourceKey | null;\n    };\n    ```\n   *\n   * @public\n   */\n  changedRelationships(key) {\n    return this.___cache.changedRelationships(key);\n  }\n\n  /**\n   * Query the cache for whether any mutated attributes exist\n   *\n   * @public\n   */\n  hasChangedRelationships(key) {\n    return this.___cache.hasChangedRelationships(key);\n  }\n\n  /**\n   * Tell the cache to discard any uncommitted mutations to relationships.\n   *\n   * This will also discard the change on any appropriate inverses.\n   *\n   * This method is a candidate to become a mutation\n   *\n   * @public\n   * @return the names of relationships that were restored\n   */\n  rollbackRelationships(key) {\n    return this.___cache.rollbackRelationships(key);\n  }\n\n  /**\n   * Query the cache for the current state of a relationship property\n   *\n   * @public\n   * @return resource relationship object\n   */\n  getRelationship(key, propertyName) {\n    return this.___cache.getRelationship(key, propertyName);\n  }\n\n  /**\n   * Query the cache for the remote state of a relationship property\n   *\n   * @public\n   * @return resource relationship object\n   */\n  getRemoteRelationship(key, propertyName) {\n    return this.___cache.getRemoteRelationship(key, propertyName);\n  }\n\n  // Resource State\n  // ===============\n\n  /**\n   * Update the cache state for the given resource to be marked as locally deleted,\n   * or remove such a mark.\n   *\n   * @public\n   */\n  setIsDeleted(key, isDeleted) {\n    this.___cache.setIsDeleted(key, isDeleted);\n  }\n\n  /**\n   * Query the cache for any validation errors applicable to the given resource.\n   *\n   * @public\n   */\n  getErrors(key) {\n    return this.___cache.getErrors(key);\n  }\n\n  /**\n   * Query the cache for whether a given resource has any available data\n   *\n   * @public\n   */\n  isEmpty(key) {\n    return this.___cache.isEmpty(key);\n  }\n\n  /**\n   * Query the cache for whether a given resource was created locally and not\n   * yet persisted.\n   *\n   * @public\n   */\n  isNew(key) {\n    return this.___cache.isNew(key);\n  }\n\n  /**\n   * Query the cache for whether a given resource is marked as deleted (but not\n   * necessarily persisted yet).\n   *\n   * @public\n   */\n  isDeleted(key) {\n    return this.___cache.isDeleted(key);\n  }\n\n  /**\n   * Query the cache for whether a given resource has been deleted and that deletion\n   * has also been persisted.\n   *\n   * @public\n   */\n  isDeletionCommitted(key) {\n    return this.___cache.isDeletionCommitted(key);\n  }\n}\nfunction isCacheOperationValue(value) {\n  return value === 'added' || value === 'state' || value === 'updated' || value === 'removed' || value === 'invalidated';\n}\nfunction count(label) {\n  // @ts-expect-error\n  // eslint-disable-next-line\n  globalThis.__WarpDriveMetricCountData[label] = (globalThis.__WarpDriveMetricCountData[label] || 0) + 1;\n}\nfunction asInternalToken(token) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected a token with a 'for' property`);\n    }\n  })(token && typeof token === 'function' && 'for' in token) : {};\n}\nfunction _unsubscribe(token, cache) {\n  asInternalToken(token);\n  const cacheKey = token.for;\n  if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_NOTIFICATIONS)) {\n    if (getGlobalConfig().WarpDrive.debug.LOG_NOTIFICATIONS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_NOTIFICATIONS) {\n      if (!cacheKey) {\n        // eslint-disable-next-line no-console\n        console.log('Passed unknown unsubscribe token to unsubscribe', cacheKey);\n      }\n    }\n  }\n  if (cacheKey) {\n    const callbacks = cache.get(cacheKey);\n    if (!callbacks) {\n      return;\n    }\n    const index = callbacks.indexOf(token);\n    if (index === -1) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Cannot unsubscribe a token that is not subscribed`);\n        }\n      })(index !== -1) : {};\n      return;\n    }\n    callbacks.splice(index, 1);\n  }\n}\n\n/**\n * The NotificationManager provides the ability to subscribe to\n * changes to Cache state.\n *\n * This Feature is what allows WarpDrive to create subscriptions that\n * work with any framework or change-notification system.\n *\n * @hideconstructor\n * @public\n */\nclass NotificationManager {\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  constructor(store) {\n    this.store = store;\n    this.isDestroyed = false;\n    this._buffered = new Map();\n    this._hasFlush = false;\n    this._cache = new Map();\n  }\n\n  /**\n   * Subscribe to changes for a given ResourceKey, RequestKey, or addition/removal of any resource\n   * or document.\n   *\n   * ```ts\n   * export type CacheOperation = 'added' | 'removed' | 'updated' | 'state';\n   *\n   * export interface NotificationCallback {\n   *   (cacheKey: ResourceKey, notificationType: 'attributes' | 'relationships', key?: string): void;\n   *   (cacheKey: ResourceKey, notificationType: 'errors' | 'meta' | 'identity' | 'state'): void;\n   *   (cacheKey: ResourceKey, notificationType: NotificationType, key?: string): void;\n   * }\n   * export interface ResourceOperationCallback {\n   *   // resource updates\n   *   (cacheKey: ResourceKey, notificationType: CacheOperation): void;\n   * }\n   * export interface DocumentOperationCallback {\n   *   // document updates\n   *   (cacheKey: RequestKey, notificationType: CacheOperation): void;\n   * }\n   * ```\n   *\n   * @public\n   * @return an opaque token to be used with unsubscribe\n   */\n\n  subscribe(cacheKey, callback) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected not to be destroyed`);\n      }\n    })(!this.isDestroyed) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected to receive a stable Identifier to subscribe to`);\n      }\n    })(cacheKey === 'resource' || cacheKey === 'document' || isResourceKey(cacheKey) || isRequestKey(cacheKey)) : {};\n    let callbacks = this._cache.get(cacheKey);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`expected to receive a valid callback`);\n      }\n    })(typeof callback === 'function') : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`cannot subscribe with the same callback twice`);\n      }\n    })(!callbacks || !callbacks.includes(callback)) : {};\n    // we use the callback as the cancellation token\n    //@ts-expect-error\n    callback.for = cacheKey;\n    if (!callbacks) {\n      callbacks = [];\n      this._cache.set(cacheKey, callbacks);\n    }\n    callbacks.push(callback);\n    return callback;\n  }\n\n  /**\n   * remove a previous subscription\n   *\n   * @public\n   */\n  unsubscribe(token) {\n    if (!this.isDestroyed) {\n      _unsubscribe(token, this._cache);\n    }\n  }\n\n  /**\n   * Custom Caches and Application Code should not call this method directly.\n   *\n   * @private\n   */\n\n  notify(cacheKey, value, key) {\n    if (this.isDestroyed) {\n      return false;\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Notify does not accept a key argument for the namespace '${value}'. Received key '${key || ''}'.`);\n      }\n    })(!key || value === 'attributes' || value === 'relationships') : {};\n    if (!isResourceKey(cacheKey) && !isRequestKey(cacheKey)) {\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_NOTIFICATIONS)) {\n        if (getGlobalConfig().WarpDrive.debug.LOG_NOTIFICATIONS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_NOTIFICATIONS) {\n          // eslint-disable-next-line no-console\n          console.log(`Notifying: Expected to receive a stable Identifier to notify '${value}' '${key || ''}' with, but ${String(cacheKey)} is not in the cache`, cacheKey);\n        }\n      }\n      return false;\n    }\n    const _hasSubscribers = hasSubscribers(this._cache, cacheKey, value);\n    if (_hasSubscribers) {\n      let buffer = this._buffered.get(cacheKey);\n      if (!buffer) {\n        buffer = [];\n        this._buffered.set(cacheKey, buffer);\n      }\n      buffer.push([value, key || null]);\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_METRIC_COUNTS)) {\n        if (getGlobalConfig().WarpDrive.debug.LOG_METRIC_COUNTS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_METRIC_COUNTS) {\n          count(`notify ${'type' in cacheKey ? cacheKey.type : '<document>'} ${value} ${key}`);\n        }\n      }\n      if (!this._scheduleNotify()) {\n        if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_NOTIFICATIONS)) {\n          if (getGlobalConfig().WarpDrive.debug.LOG_NOTIFICATIONS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_NOTIFICATIONS) {\n            log('notify', 'buffered', `${'type' in cacheKey ? cacheKey.type : 'document'}`, cacheKey.lid, `${value}`, key || '');\n          }\n        }\n      }\n    } else {\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_NOTIFICATIONS)) {\n        if (getGlobalConfig().WarpDrive.debug.LOG_NOTIFICATIONS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_NOTIFICATIONS) {\n          log('notify', 'discarded', `${'type' in cacheKey ? cacheKey.type : 'document'}`, cacheKey.lid, `${value}`, key || '');\n        }\n      }\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_METRIC_COUNTS)) {\n        if (getGlobalConfig().WarpDrive.debug.LOG_METRIC_COUNTS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_METRIC_COUNTS) {\n          count(`DISCARDED notify ${'type' in cacheKey ? cacheKey.type : '<document>'} ${value} ${key}`);\n        }\n      }\n    }\n    return _hasSubscribers;\n  }\n\n  /** @internal */\n  _onNextFlush(cb) {\n    this._onFlushCB = cb;\n  }\n\n  /** @internal */\n  _scheduleNotify() {\n    const asyncFlush = this.store._enableAsyncFlush;\n    if (this._hasFlush) {\n      if (asyncFlush !== false && !willSyncFlushWatchers()) {\n        return false;\n      }\n    }\n    if (asyncFlush && !willSyncFlushWatchers()) {\n      this._hasFlush = true;\n      return false;\n    }\n    this._flush();\n    return true;\n  }\n\n  /** @internal */\n  _flush() {\n    const buffered = this._buffered;\n    if (buffered.size) {\n      this._buffered = new Map();\n      for (const [cacheKey, states] of buffered) {\n        for (let i = 0; i < states.length; i++) {\n          // @ts-expect-error\n          _flushNotification(this._cache, cacheKey, states[i][0], states[i][1]);\n        }\n      }\n    }\n    this._hasFlush = false;\n    this._onFlushCB?.();\n    this._onFlushCB = undefined;\n  }\n\n  /** @internal */\n  destroy() {\n    this.isDestroyed = true;\n    this._cache.clear();\n  }\n}\n\n/**\n * This type exists for internal use only for\n * where intimate contracts still exist either for\n * the Test Suite or for Legacy code.\n *\n * @private\n */\n\nfunction _flushNotification(cache, cacheKey, value, key) {\n  if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_NOTIFICATIONS)) {\n    if (getGlobalConfig().WarpDrive.debug.LOG_NOTIFICATIONS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_NOTIFICATIONS) {\n      log('notify', '', `${'type' in cacheKey ? cacheKey.type : 'document'}`, cacheKey.lid, `${value}`, key || '');\n    }\n  }\n\n  // TODO for documents this will need to switch based on Identifier kind\n  if (isCacheOperationValue(value)) {\n    const callbackMap = cache.get(isRequestKey(cacheKey) ? 'document' : 'resource');\n    if (callbackMap) {\n      callbackMap.forEach(cb => {\n        cb(cacheKey, value);\n      });\n    }\n  }\n  const callbacks = cache.get(cacheKey);\n  if (!callbacks || !callbacks.length) {\n    return false;\n  }\n  callbacks.forEach(cb => {\n    // @ts-expect-error overload doesn't narrow within body\n    cb(cacheKey, value, key);\n  });\n  return true;\n}\nfunction hasSubscribers(cache, cacheKey, value) {\n  const hasSubscriber = Boolean(cache.get(cacheKey)?.length);\n  if (hasSubscriber || !isCacheOperationValue(value)) {\n    return hasSubscriber;\n  }\n  const callbackMap = cache.get(isRequestKey(cacheKey) ? 'document' : 'resource');\n  return Boolean(callbackMap?.length);\n}\nfunction update() {\n  if (this.isUpdating) {\n    return this._updatingPromise;\n  }\n  this.isUpdating = true;\n\n  // @ts-expect-error\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n  const updatingPromise = this._update();\n  void updatingPromise.finally(() => {\n    this._updatingPromise = null;\n    if (this.isDestroying || this.isDestroyed) {\n      return;\n    }\n    this.isUpdating = false;\n  });\n  this._updatingPromise = updatingPromise;\n  return updatingPromise;\n}\nfunction save() {\n  const context = this[Context];\n  const promise = Promise.all(this.map(record => context.store.saveRecord(record))).then(() => this);\n  return promise;\n}\nconst ARRAY_GETTER_METHODS$1 = new Set([Symbol.iterator, 'concat', 'entries', 'every', 'fill', 'filter', 'find', 'findIndex', 'flat', 'flatMap', 'forEach', 'includes', 'indexOf', 'join', 'keys', 'lastIndexOf', 'map', 'reduce', 'reduceRight', 'slice', 'some', 'values']);\nconst ARRAY_SETTER_METHODS$1 = new Set(['push', 'pop', 'unshift', 'shift', 'splice', 'sort']);\nfunction isArrayGetter$1(prop) {\n  return ARRAY_GETTER_METHODS$1.has(prop);\n}\nfunction isArraySetter$1(prop) {\n  return ARRAY_SETTER_METHODS$1.has(prop);\n}\nfunction convertToInt$1(prop) {\n  if (typeof prop === 'symbol') return null;\n  const num = Number(prop);\n  if (isNaN(num)) return null;\n  return num % 1 === 0 ? num : null;\n}\nfunction safeForEach$1(instance, arr, store, callback, target) {\n  if (target === undefined) {\n    target = null;\n  }\n  // clone to prevent mutation\n  arr = arr.slice();\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error('`forEach` expects a function as first argument.');\n    }\n  })(typeof callback === 'function') : {};\n\n  // because we retrieveLatest above we need not worry if array is mutated during iteration\n  // by unloadRecord/rollbackAttributes\n  // push/add/removeObject may still be problematic\n  // but this is a more traditionally expected forEach bug.\n  const length = arr.length; // we need to access length to ensure we are consumed\n\n  for (let index = 0; index < length; index++) {\n    callback.call(target, store._instanceCache.getRecord(arr[index]), index, instance);\n  }\n  return instance;\n}\nfunction isExtensionProp(extensions, prop) {\n  return Boolean(extensions && typeof prop !== 'number' && extensions.has(prop));\n}\nfunction performObjectExtensionGet(receiver, extensions, signals, prop) {\n  const desc = extensions.get(prop);\n  switch (desc.kind) {\n    case 'method':\n      {\n        return desc.fn;\n      }\n    case 'readonly-value':\n      {\n        return desc.value;\n      }\n    case 'mutable-value':\n      {\n        const signal = getOrCreateInternalSignal(signals, receiver, prop, desc.value);\n        // we don't consume this signal, since its not a true local.\n        return signal.value;\n      }\n    case 'readonly-field':\n    case 'mutable-field':\n      {\n        return desc.get.call(receiver);\n      }\n    case 'writeonly-field':\n      {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          {\n            throw new Error(`Cannot get extended field ${String(prop)} as its definition has only a setter`);\n          }\n        })() : {};\n        return undefined;\n      }\n    default:\n      {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          {\n            throw new Error(`Unhandled extension kind ${desc.kind}`);\n          }\n        })() : {};\n        return undefined;\n      }\n  }\n}\nfunction performExtensionSet(receiver, extensions, signals, prop, value) {\n  const desc = extensions.get(prop);\n  switch (desc.kind) {\n    case 'method':\n    case 'readonly-value':\n    case 'readonly-field':\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        {\n          throw new Error(`Cannot set extension field ${String(prop)} as it is a ${desc.kind}`);\n        }\n      })() : {};\n      return false;\n    case 'mutable-value':\n      {\n        const signal = getOrCreateInternalSignal(signals, receiver, prop, desc.value);\n        if (signal.value !== value) {\n          // we don't notify this signal, since its not a true local.\n          signal.value = value;\n        }\n        return true;\n      }\n    case 'writeonly-field':\n    case 'mutable-field':\n      {\n        desc.set.call(receiver, value);\n        return true;\n      }\n    default:\n      {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          {\n            throw new Error(`Unhandled extension kind ${desc.kind}`);\n          }\n        })() : {};\n        return false;\n      }\n  }\n}\nfunction performArrayExtensionGet(receiver, extensions, signals, prop, _SIGNAL, boundFns, transaction) {\n  const desc = extensions.get(prop);\n  switch (desc.kind) {\n    case 'method':\n      {\n        let fn = boundFns.get(prop);\n        if (fn === undefined) {\n          fn = function () {\n            consumeInternalSignal(_SIGNAL);\n            transaction(true);\n            const result = Reflect.apply(desc.fn, receiver, arguments);\n            transaction(false);\n            return result;\n          };\n          boundFns.set(prop, fn);\n        }\n        return fn;\n      }\n    case 'mutable-field':\n    case 'readonly-field':\n      {\n        return desc.get.call(receiver);\n      }\n    case 'readonly-value':\n      {\n        return desc.value;\n      }\n    case 'mutable-value':\n      {\n        const signal = getOrCreateInternalSignal(signals, receiver, prop, desc.value);\n        // we don't consume this signal, since its not a true local.\n        return signal.value;\n      }\n    case 'writeonly-field':\n      {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          {\n            throw new Error(`Cannot get extended field ${String(prop)} as its definition has only a setter`);\n          }\n        })() : {};\n        return undefined;\n      }\n    default:\n      {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          {\n            throw new Error(`Unhandled extension kind ${desc.kind}`);\n          }\n        })() : {};\n        return undefined;\n      }\n  }\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/*\n  We redefine Proxy because the native Proxy type treats the `target` and\n  `receiver` as the same type incorrectly.\n\n  We ported this from Typescript's own Proxy types on 3/10/2024.\n*/\n\nconst NativeProxy = Proxy;\nconst IS_COLLECTION = getOrSetGlobal('IS_COLLECTION', Symbol.for('Collection'));\nfunction isContextProp(prop) {\n  return prop === 'destroy' || prop === 'isDestroying' || prop === 'isDestroyed';\n}\n// these are \"internally\" mutable, they should not be mutated by consumers\n// though this is not currently enforced.\n//\n// all of these should become gated by field-type as they shouldn't be available\n// on request results or non-legacy relationships.\nconst MUTABLE_PROPS = ['_updatingPromise', 'isDestroying', 'isDestroyed', 'query', 'isUpdating', 'isLoaded', 'meta', 'links', 'isAsync', 'isPolymorphic', 'identifier', 'cache', 'key', 'DEPRECATED_CLASS_NAME'];\n// this will error if someone tries to call\n// A(identifierArray) since it is not configurable\n// which is preferable to the `meta` override we used\n// before which required importing all of Ember\nconst ARR_BRACKET_DESC = {\n  enumerable: true,\n  configurable: false,\n  get: function () {\n    // here to support computed chains\n    // and {{#each}}\n    if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_COMPUTED_CHAINS)) {\n      return this;\n    }\n  }\n};\nconst IS_UPDATING_DESC = createSignalDescriptor('isUpdating', false);\nconst ArrayHandler = {\n  getOwnPropertyDescriptor(target, prop) {\n    if (prop === '[]') {\n      // proxies do not allow you to report a descriptor as non-configurable\n      // if there is no descriptor or the underlying descriptor is configurable\n      const underlying = Reflect.getOwnPropertyDescriptor(target, prop);\n      if (!underlying) {\n        Object.defineProperty(target, prop, ARR_BRACKET_DESC);\n      }\n      return ARR_BRACKET_DESC;\n    }\n    if (prop === 'isUpdating') {\n      return IS_UPDATING_DESC;\n    }\n    return Reflect.getOwnPropertyDescriptor(target, prop);\n  },\n  get(target, prop, receiver) {\n    const CONTEXT = target[Context];\n\n    // we place this prop first as it needs initialized\n    // prior to the signal check below\n    if (prop === Signals) return CONTEXT.signals;\n    const index = convertToInt$1(prop);\n    if (\n    // prettier-ignore\n    CONTEXT.signal.isStale && (index !== null || prop === 'length' || prop === '[]' || CONTEXT.data && prop in CONTEXT.data || isArrayGetter$1(prop))) {\n      CONTEXT.manager._syncArray(receiver);\n      CONTEXT.signal.isStale = false;\n    }\n    if (index !== null) {\n      const identifier = target[index];\n      if (!CONTEXT.transaction) {\n        consumeInternalSignal(CONTEXT.signal);\n      }\n      return identifier && CONTEXT.store._instanceCache.getRecord(identifier);\n    }\n    if (prop === 'length') return consumeInternalSignal(CONTEXT.signal), target.length;\n    if (prop === '[]') return consumeInternalSignal(CONTEXT.signal), receiver;\n    // TODO move this to ?? so its only on subclasses\n    if (prop === 'isUpdating') return IS_UPDATING_DESC.get.call(receiver);\n    if (prop === IS_COLLECTION) return true;\n    if (prop === Context) return CONTEXT;\n    if (isContextProp(prop)) {\n      return CONTEXT[prop];\n    }\n    if (CONTEXT.data && prop in CONTEXT.data) {\n      // all props in data are reactive props.\n      return consumeInternalSignal(CONTEXT.signal), CONTEXT.data[prop];\n    }\n    if (isArrayGetter$1(prop)) {\n      let fn = CONTEXT.boundFns.get(prop);\n      if (fn === undefined) {\n        if (prop === 'forEach') {\n          fn = function () {\n            consumeInternalSignal(CONTEXT.signal);\n            CONTEXT.transaction = true;\n            const result = safeForEach$1(receiver, target, CONTEXT.store, arguments[0], arguments[1]);\n            CONTEXT.transaction = false;\n            return result;\n          };\n        } else {\n          fn = function () {\n            consumeInternalSignal(CONTEXT.signal);\n            // array functions must run through Reflect to work properly\n            // binding via other means will not work.\n            CONTEXT.transaction = true;\n            const result = Reflect.apply(target[prop], receiver, arguments);\n            CONTEXT.transaction = false;\n            return result;\n          };\n        }\n        CONTEXT.boundFns.set(prop, fn);\n      }\n      return fn;\n    }\n    if (isArraySetter$1(prop)) {\n      let fn = CONTEXT.boundFns.get(prop);\n      if (fn === undefined) {\n        fn = function () {\n          // array functions must run through Reflect to work properly\n          // binding via other means will not work.\n          if (!CONTEXT.editable) {\n            macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n              if (!test) {\n                throw new Error(`Mutating this array of records via ${String(prop)} is not allowed.`);\n              }\n            })(CONTEXT.editable) : {};\n            return;\n          }\n          const args = Array.prototype.slice.call(arguments);\n          macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n            if (!test) {\n              throw new Error(`Cannot start a new array transaction while a previous transaction is underway`);\n            }\n          })(!CONTEXT.transaction) : {};\n          CONTEXT.transaction = true;\n          const result = CONTEXT.mutate(target, receiver, prop, args, CONTEXT.signal);\n          CONTEXT.transaction = false;\n          return result;\n        };\n        CONTEXT.boundFns.set(prop, fn);\n      }\n      return fn;\n    }\n    if (CONTEXT.features && prop in CONTEXT.features) {\n      let fn = CONTEXT.boundFns.get(prop);\n      if (fn) return fn;\n\n      // @ts-expect-error\n      const outcome = CONTEXT.features[prop];\n      if (typeof outcome === 'function') {\n        fn = function () {\n          consumeInternalSignal(CONTEXT.signal);\n          // array functions must run through Reflect to work properly\n          // binding via other means will not work.\n          return Reflect.apply(outcome, receiver, arguments);\n        };\n        CONTEXT.boundFns.set(prop, fn);\n        return fn;\n      }\n      return consumeInternalSignal(CONTEXT.signal), outcome;\n    }\n    if (isExtensionProp(CONTEXT.extensions, prop)) {\n      return performArrayExtensionGet(receiver, CONTEXT.extensions, CONTEXT.signals, prop, CONTEXT.signal, CONTEXT.boundFns, v => void (CONTEXT.transaction = v));\n    }\n    return target[prop];\n  },\n  set(target, prop, value, receiver) {\n    const CONTEXT = target[Context];\n    if (prop === Signals) {\n      CONTEXT.signals = value;\n      return true;\n    }\n    if (!CONTEXT.editable && !MUTABLE_PROPS.includes(prop)) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Mutating ${String(prop)} on this Array is not allowed.`);\n        }\n      })(CONTEXT.editable) : {};\n      return false;\n    }\n    if (prop === 'length') {\n      if (!CONTEXT.transaction && value === 0) {\n        CONTEXT.transaction = true;\n        CONTEXT.mutate(target, receiver, 'length 0', [], CONTEXT.signal);\n        CONTEXT.transaction = false;\n        return true;\n      } else if (CONTEXT.transaction) {\n        return Reflect.set(target, prop, value);\n      } else {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          {\n            throw new Error(`unexpected length set`);\n          }\n        })() : {};\n      }\n    }\n    if (isContextProp(prop)) {\n      // @ts-expect-error\n      CONTEXT[prop] = value;\n      return true;\n    }\n    if (CONTEXT.data && prop in CONTEXT.data) {\n      CONTEXT.data[prop] = value || null;\n      return true;\n    }\n\n    // TODO move this to subclass\n    if (prop === 'isUpdating') {\n      IS_UPDATING_DESC.set.call(receiver, value);\n      return true;\n    }\n    if (isExtensionProp(CONTEXT.extensions, prop)) {\n      return performExtensionSet(receiver, CONTEXT.extensions, CONTEXT.signals, prop, value);\n    }\n    const index = convertToInt$1(prop);\n\n    // we do not allow \"holey\" arrays and so if the index is\n    // greater than length then we will disallow setting it.\n    // however, there is a special case for \"unshift\" with more than\n    // one item being inserted since current items will be moved to the\n    // new indices first.\n    // we \"loosely\" detect this by just checking whether we are in\n    // a transaction.\n    if (index === null || index > target.length) {\n      if (index !== null && CONTEXT.transaction) {\n        const identifier = recordIdentifierFor(value);\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Cannot set index ${index} past the end of the array.`);\n          }\n        })(isResourceKey(identifier)) : {};\n        target[index] = identifier;\n        return true;\n      } else if (CONTEXT.features && prop in CONTEXT.features) {\n        CONTEXT.features[prop] = value;\n        return true;\n      }\n      return false;\n    }\n    const original = target[index];\n    const newIdentifier = extractIdentifierFromRecord$2(value);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected a record`);\n      }\n    })(newIdentifier && isResourceKey(newIdentifier)) : {};\n    // We generate \"transactions\" whenever a setter method on the array\n    // is called and might bulk update multiple array cells. Fundamentally,\n    // all array operations decompose into individual cell replacements.\n    // e.g. a push is really a \"replace cell at next index with new value\"\n    // or a splice is \"shift all values left/right by X and set out of new\n    // bounds cells to undefined\"\n    //\n    // so, if we are in a transaction, then this is not a user generated change\n    // but one generated by a setter method. In this case we want to only apply\n    // the change to the target array and not call the MUTATE method.\n    // If there is no transaction though, then this means the user themselves has\n    // directly changed the value of a specific index and we need to thus generate\n    // a mutation for that change.\n    // e.g. \"arr.push(newVal)\" is handled by a \"addToRelatedRecords\" mutation within\n    // a transaction.\n    // while \"arr[arr.length] = newVal;\" is handled by this replace cell code path.\n    if (!CONTEXT.transaction) {\n      CONTEXT.mutate(target, receiver, 'replace cell', [index, original, newIdentifier], CONTEXT.signal);\n    } else {\n      target[index] = newIdentifier;\n    }\n    return true;\n  },\n  deleteProperty(target, prop) {\n    const CONTEXT = target[Context];\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Deleting keys on managed arrays is disallowed`);\n      }\n    })(CONTEXT.transaction) : {};\n    if (!CONTEXT.transaction) {\n      return false;\n    }\n    return Reflect.deleteProperty(target, prop);\n  },\n  getPrototypeOf() {\n    return Array.prototype;\n  }\n};\nconst ILLEGAL_MUTATION = () => {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    {\n      throw new Error(`ILLEGAL OPERATION: This ReactiveResourceArray is immutable`);\n    }\n  })() : {};\n};\nfunction createReactiveResourceArray(options) {\n  const TARGET = options.source;\n  const context = {\n    store: options.store,\n    manager: options.manager,\n    editable: options.editable,\n    source: options.source,\n    data: options.data,\n    features: options.features,\n    extensions: options.extensions,\n    options: options.options,\n    destroy: options.destroy || destroy,\n    mutate: options.mutate || ILLEGAL_MUTATION,\n    signals: null,\n    signal: null,\n    isDestroying: false,\n    isDestroyed: false,\n    transaction: false,\n    boundFns: new Map()\n  };\n  TARGET[Context] = context;\n  const proxy = new NativeProxy(TARGET, ArrayHandler);\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    Object.defineProperty(TARGET, '__SHOW_ME_THE_DATA_(debug mode only)__', {\n      enumerable: false,\n      configurable: true,\n      get() {\n        return proxy.slice();\n      }\n    });\n  }\n\n  // we entangle the signal on the returned proxy since that is\n  // the object that other code will be interfacing with.\n  // when a mutation occurs\n  // we track all mutations within the call\n  // and forward them as one\n  withSignalStore(proxy);\n  context.signal = createInternalSignal(context.signals, proxy, ARRAY_SIGNAL, undefined);\n  return proxy;\n}\n\n// Ensure instanceof works correctly\n// Object.setPrototypeOf(IdentifierArray.prototype, Array.prototype);\n\nfunction extractIdentifierFromRecord$2(record) {\n  if (!record) {\n    return null;\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`All elements of a ReactiveResourceArray must be instances of a ReactiveResource, you passed $${typeof record}`);\n    }\n  })(function () {\n    try {\n      recordIdentifierFor(record);\n      return true;\n    } catch {\n      return false;\n    }\n  }()) : {};\n  return recordIdentifierFor(record);\n}\nfunction destroy(clear) {\n  const context = this[Context];\n  this.isDestroying = !clear;\n  // changing the reference breaks the Proxy\n  // this[SOURCE] = [];\n  context.source.length = 0;\n  notifyInternalSignal(context.signal);\n  this.isDestroyed = !clear;\n}\nfunction createRequestCollection(config) {\n  return createReactiveResourceArray({\n    store: config.store,\n    manager: config.manager,\n    editable: false,\n    source: config.source,\n    data: null,\n    features: null,\n    extensions: null,\n    options: config.options,\n    destroy: null,\n    mutate: null\n  });\n}\n\n/**\n * The options for {@link createLegacyLiveArray}\n *\n * @private\n */\n/**\n * Creates a {@link LegacyLiveArray}\n *\n * @internal\n */\nfunction createLegacyLiveArray(options) {\n  return createReactiveResourceArray({\n    store: options.store,\n    manager: options.manager,\n    editable: false,\n    source: options.source,\n    data: null,\n    features: {\n      modelName: options.type,\n      update,\n      _update: _updateLiveArray,\n      save,\n      DEPRECATED_CLASS_NAME: 'LiveArray',\n      isUpdating: false,\n      isLoaded: true,\n      _updatingPromise: null\n    },\n    extensions: null,\n    options: null,\n    destroy: null,\n    mutate: null\n  });\n}\nfunction _updateLiveArray() {\n  const context = this[Context];\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`_update cannot be used with this array`);\n    }\n  })(this.modelName) : {};\n  // @ts-expect-error typescript is unable to handle the complexity of\n  //   T = unknown, modelName = string\n  //   T extends TypedRecordInstance, modelName = TypeFromInstance<T>\n  // both being valid options to pass through here.\n  return context.store.findAll(this.modelName, {\n    reload: true\n  });\n}\n\n/**\n * The options for {@link createLegacyQueryArray}\n *\n * See also {@link LegacyLiveArrayCreateOptions} which\n * this extends.\n *\n * @internal\n */\n/**\n * Creates a {@link LegacyQueryArray}\n *\n * Options: {@link LegacyQueryArrayCreateOptions}\n *\n * @internal\n */\nfunction createLegacyQueryArray(options) {\n  return createReactiveResourceArray({\n    store: options.store,\n    manager: options.manager,\n    editable: false,\n    source: options.source,\n    data: {\n      links: options.links,\n      meta: options.meta\n    },\n    features: {\n      query: options.query,\n      modelName: options.type,\n      update,\n      _update: _updateCollection,\n      save,\n      DEPRECATED_CLASS_NAME: 'LegacyQueryArray',\n      isUpdating: false,\n      isLoaded: options.isLoaded,\n      _updatingPromise: null\n    },\n    extensions: null,\n    options: null,\n    destroy: destroyCollection,\n    mutate: null\n  });\n}\nfunction _updateCollection() {\n  const context = this[Context];\n  const {\n    query\n  } = this;\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`update cannot be used with this array`);\n    }\n  })(this.modelName) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`update cannot be used with no query`);\n    }\n  })(query) : {};\n  // @ts-expect-error typescript is unable to handle the complexity of\n  //   T = unknown, modelName = string\n  //   T extends TypedRecordInstance, modelName = TypeFromInstance<T>\n  // both being valid options to pass through here.\n  const promise = context.store.query(this.modelName, query, {\n    _recordArray: this\n  });\n  return promise;\n}\nfunction destroyCollection(clear) {\n  destroy.call(this, clear ?? false);\n  const {\n    manager\n  } = this[Context];\n  manager._managed.delete(this);\n  manager._pending.delete(this);\n}\nconst FAKE_ARR = getOrSetGlobal('FAKE_ARR', {});\nconst SLICE_BATCH_SIZE = 4761;\n/**\n * This is a clever optimization.\n *\n * clever optimizations rarely stand the test of time, so if you're\n * ever curious or think something better is possible please benchmark\n * and discuss. The benchmark for this at the time of writing is in\n * `scripts/benchmark-push.js`\n *\n * This approach turns out to be 150x faster in Chrome and node than\n * simply using push or concat. It's highly susceptible to the specifics\n * of the batch size, and may require tuning.\n *\n * Clever optimizations should always come with a `why`. This optimization\n * exists for two reasons.\n *\n * 1) array.push(...objects) and Array.prototype.push.apply(arr, objects)\n *   are susceptible to stack overflows. The size of objects at which this\n *   occurs varies by environment, browser, and current stack depth and memory\n *   pressure; however, it occurs in all browsers in fairly pristine conditions\n *   somewhere around 125k to 200k elements. Since WarpDrive regularly encounters\n *   arrays larger than this in size, we cannot use push.\n *\n * 2) `array.concat` or simply setting the array to a new reference is often an\n *   easier approach; however, native Proxy to an array cannot swap it's target array\n *   and attempts at juggling multiple array sources have proven to be victim to a number\n *   of browser implementation bugs. Should these bugs be addressed then we could\n *   simplify to using `concat`, however, do note this is currently 150x faster\n *   than concat, and due to the overloaded signature of concat will likely always\n *   be faster.\n *\n * Sincerely,\n *   - runspired (Chris Thoburn) 08/21/2022\n *\n * @private\n * @param target the array to push into\n * @param source the items to push into target\n */\nfunction fastPush(target, source) {\n  let batch;\n  while (source.length > SLICE_BATCH_SIZE) {\n    batch = source.splice(0, SLICE_BATCH_SIZE);\n    target.push(...batch);\n  }\n  target.push(...source);\n}\n/**\n  @hideconstructor\n  @private\n*/\nclass RecordArrayManager {\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /**\n   * LiveArray (peekAll/findAll) array instances\n   * keyed by their ResourceType.\n   *\n   * @internal\n   */\n\n  /** @internal */\n\n  /**\n   * Buffered changes to apply keyed by the array to\n   * which to apply them to.\n   *\n   * @internal\n   */\n\n  /**\n   * An inverse map from ResourceKey to the list\n   * of arrays it can be found in, useful for fast updates\n   * when state changes to a resource occur.\n   *\n   * @internal\n   */\n\n  /**\n   * When we do not yet have a LiveArray, this keeps track of\n   * the added/removed identifiers to enable us to more efficiently\n   * produce the LiveArray later.\n   *\n   * It's possible that using a Set and only storing additions instead of\n   * additions and deletes would be more efficient.\n   *\n   * @internal\n   */\n\n  /** @internal */\n\n  /** @internal */\n\n  /**\n   * KeyedArrays are arrays associated to a specific RequestKey.\n   * @internal\n   */\n\n  /**\n   * The visibility set tracks whether a given identifier should\n   * be shown in RecordArrays. It is used to dedupe added/removed\n   * and state change events.\n   *\n   * As a Map, it grows to be very large - there may be ways to\n   * reduce its size by instead migrating to it functioning as\n   * an exclusion list. Any entry not in the list would be considered\n   * visible.\n   * @internal\n   */\n\n  constructor(options) {\n    this.store = options.store;\n    this.isDestroying = false;\n    this.isDestroyed = false;\n    this._live = new Map();\n    this._managed = new Set();\n    this._pending = new Map();\n    this._staged = new Map();\n    this._keyedArrays = new Map();\n    this._identifiers = new Map();\n    this._set = new Map();\n    this._visibilitySet = new Map();\n    this._documentSubscription = this.store.notifications.subscribe('document', (identifier, type) => {\n      if (type === 'updated' && this._keyedArrays.has(identifier.lid)) {\n        const array = this._keyedArrays.get(identifier.lid);\n        this.dirtyArray(array, 0, true);\n      }\n    });\n    this._subscribeToResourceChanges();\n  }\n\n  /** @internal */\n  _subscribeToResourceChanges() {\n    this._subscription = this.store.notifications.subscribe('resource', (identifier, type) => {\n      const schema = this.store.schema.resource?.(identifier);\n      // If we are a polaris mode schema\n      // and we are in the `isNew` state, we are kept hidden from\n      // record arrays.\n      if (schema && (!('legacy' in schema) || !schema.legacy)) {\n        if (this.store.cache.isNew(identifier)) {\n          return;\n        }\n      }\n      if (type === 'added') {\n        this._visibilitySet.set(identifier, true);\n        this.identifierAdded(identifier);\n      } else if (type === 'removed') {\n        this._visibilitySet.set(identifier, false);\n        this.identifierRemoved(identifier);\n      } else if (type === 'state') {\n        this.identifierChanged(identifier);\n      }\n    });\n  }\n\n  /** @internal */\n  _syncArray(array) {\n    const pending = this._pending.get(array);\n    const isLegacyQuery = isLegacyQueryArray(array);\n    if (isLegacyQuery && !pending || this.isDestroying || this.isDestroyed) {\n      return;\n    }\n\n    // first flush any staged changes\n    if (pending) {\n      sync(array, pending, this._set.get(array));\n      this._pending.delete(array);\n    }\n\n    // then pull new state if required\n    if (!isLegacyQuery && !isLegacyLiveArray(array)) {\n      const context = array[Context];\n      const signal = context.signal;\n      const identifier = context.options.requestKey;\n\n      // we only need to rebuild the array from cache if a full sync is required\n      // due to notification that the cache has changed\n      if (signal.value === 'cache-sync') {\n        const doc = this.store.cache.peek(identifier);\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Expected to find a document for ${identifier.lid} but found none`);\n          }\n        })(doc) : {};\n        const data = !('data' in doc) || !Array.isArray(doc.data) ? [] : doc.data;\n        // TODO technically we should destroy here if\n        // !('data' in doc) || !Array.isArray(doc.data)\n        // is true.\n        this.populateManagedArray(array, data, null);\n      }\n    }\n  }\n  mutate(mutation) {\n    this.store.cache.mutate(mutation);\n  }\n\n  /**\n    Get the `RecordArray` for a modelName, which contains all loaded records of\n    given modelName.\n     @private\n  */\n  liveArrayFor(type) {\n    let array = this._live.get(type);\n    const identifiers = [];\n    const staged = this._staged.get(type);\n    if (staged) {\n      staged.forEach((value, key) => {\n        if (value === 'add') {\n          identifiers.push(key);\n        }\n      });\n      this._staged.delete(type);\n    }\n    if (!array) {\n      array = createLegacyLiveArray({\n        store: this.store,\n        manager: this,\n        source: identifiers,\n        type\n      });\n      this._live.set(type, array);\n      this._set.set(array, new Set(identifiers));\n    }\n    return array;\n  }\n  getCollection(config) {\n    if ('requestKey' in config && this._keyedArrays.has(config.requestKey.lid)) {\n      return this._keyedArrays.get(config.requestKey.lid);\n    }\n    let array = null;\n    if ('requestKey' in config) {\n      const options = {\n        store: this.store,\n        manager: this,\n        source: config.source,\n        options: {\n          requestKey: config.requestKey\n        }\n      };\n      array = createRequestCollection(options);\n      this._keyedArrays.set(config.requestKey.lid, array);\n      this._set.set(array, new Set(config.source));\n      associate(this._identifiers, array, config.source);\n    } else if ('query' in config) {\n      const options = {\n        store: this.store,\n        manager: this,\n        source: [],\n        type: config.type,\n        query: config.query,\n        isLoaded: false,\n        links: null,\n        meta: null\n      };\n      array = createLegacyQueryArray(options);\n      this._set.set(array, new Set());\n    } else {\n      const options = {\n        store: this.store,\n        manager: this,\n        source: config.source,\n        options: null\n      };\n      array = createRequestCollection(options);\n      this._set.set(array, new Set(config.source));\n      associate(this._identifiers, array, config.source);\n    }\n    this._managed.add(array);\n    return array;\n  }\n\n  /** @internal */\n  dirtyArray(array, delta, shouldSyncFromCache) {\n    if (array === FAKE_ARR) {\n      return;\n    }\n    const signal = array[Context].signal;\n    if (!signal.isStale || delta > 0) {\n      notifyInternalSignal(signal);\n\n      // when the cache has updated for our array, we need to\n      // do a full rebuild of the array\n      signal.value = shouldSyncFromCache ? 'cache-sync' : 'patch';\n    }\n  }\n\n  /** @internal */\n  _getPendingFor(identifier, includeManaged, isRemove) {\n    if (this.isDestroying || this.isDestroyed) {\n      return;\n    }\n    const liveArray = this._live.get(identifier.type);\n    const allPending = this._pending;\n    const pending = new Map();\n    if (includeManaged) {\n      const managed = this._identifiers.get(identifier);\n      if (managed) {\n        managed.forEach(arr => {\n          let changes = allPending.get(arr);\n          if (!changes) {\n            changes = new Map();\n            allPending.set(arr, changes);\n          }\n          pending.set(arr, changes);\n        });\n      }\n    }\n\n    // during unloadAll we can ignore removes since we've already\n    // cleared the array.\n    if (liveArray && liveArray[Context].source.length === 0 && isRemove) {\n      const pendingLive = allPending.get(liveArray);\n      if (!pendingLive || pendingLive.size === 0) {\n        return pending;\n      }\n    }\n    if (!liveArray) {\n      // start building a changeset for when we eventually\n      // do have a live array\n      let changes = this._staged.get(identifier.type);\n      if (!changes) {\n        changes = new Map();\n        this._staged.set(identifier.type, changes);\n      }\n      pending.set(FAKE_ARR, changes);\n    } else {\n      let changes = allPending.get(liveArray);\n      if (!changes) {\n        changes = new Map();\n        allPending.set(liveArray, changes);\n      }\n      pending.set(liveArray, changes);\n    }\n    return pending;\n  }\n\n  /**\n   * @private\n   */\n  populateManagedArray(array, identifiers, payload) {\n    this._pending.delete(array);\n    const source = array[Context].source;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`The new state of the collection should not be using the same array reference as the original state.`);\n      }\n    })(source !== identifiers) : {};\n    const old = source.slice();\n    source.length = 0;\n    fastPush(source, identifiers);\n    this._set.set(array, new Set(identifiers));\n    if (isLegacyQueryArray(array)) {\n      notifyInternalSignal(array[Context].signal);\n      array.meta = payload?.meta || null;\n      array.links = payload?.links || null;\n      array.isLoaded = true;\n    }\n    disassociate(this._identifiers, array, old);\n    associate(this._identifiers, array, identifiers);\n  }\n\n  /** @internal */\n  identifierAdded(identifier) {\n    const changeSets = this._getPendingFor(identifier, false);\n    if (changeSets) {\n      changeSets.forEach((changes, array) => {\n        const existing = changes.get(identifier);\n        if (existing === 'del') {\n          changes.delete(identifier);\n        } else {\n          changes.set(identifier, 'add');\n          this.dirtyArray(array, changes.size, false);\n        }\n      });\n    }\n  }\n\n  /** @internal */\n  identifierRemoved(identifier) {\n    const changeSets = this._getPendingFor(identifier, true, true);\n    if (changeSets) {\n      changeSets.forEach((changes, array) => {\n        const existing = changes.get(identifier);\n        if (existing === 'add') {\n          changes.delete(identifier);\n        } else {\n          changes.set(identifier, 'del');\n          this.dirtyArray(array, changes.size, false);\n        }\n      });\n    }\n  }\n\n  /** @internal */\n  identifierChanged(identifier) {\n    const newState = this.store._instanceCache.recordIsLoaded(identifier, true);\n\n    // if the change matches the most recent direct added/removed\n    // state, then we can ignore it\n    if (this._visibilitySet.get(identifier) === newState) {\n      return;\n    }\n    if (newState) {\n      this.identifierAdded(identifier);\n    } else {\n      this.identifierRemoved(identifier);\n    }\n  }\n  pause() {\n    this.store.notifications.unsubscribe(this._subscription);\n  }\n  resume() {\n    this._subscribeToResourceChanges();\n  }\n\n  /**\n   * @internal\n   */\n  clear(isClear = true) {\n    for (const array of this._live.values()) {\n      array.destroy(isClear);\n    }\n    for (const array of this._managed.values()) {\n      array.destroy(isClear);\n    }\n    this._managed.clear();\n    this._identifiers.clear();\n    this._pending.clear();\n    for (const set of this._set.values()) {\n      set.clear();\n    }\n    this._visibilitySet.clear();\n  }\n  destroy() {\n    this.isDestroying = true;\n    this.clear(false);\n    this._live.clear();\n    this.store.notifications.unsubscribe(this._subscription);\n    this.store.notifications.unsubscribe(this._documentSubscription);\n    this.isDestroyed = true;\n  }\n}\n\n/**\n * This type exists for internal use only for\n * where intimate contracts still exist either for\n * the Test Suite or for Legacy code.\n *\n * @private\n */\n\nfunction associate(ArraysCache, array, identifiers) {\n  for (let i = 0; i < identifiers.length; i++) {\n    const identifier = identifiers[i];\n    let cache = ArraysCache.get(identifier);\n    if (!cache) {\n      cache = new Set();\n      ArraysCache.set(identifier, cache);\n    }\n    cache.add(array);\n  }\n}\nfunction disassociate(ArraysCache, array, identifiers) {\n  for (let i = 0; i < identifiers.length; i++) {\n    disassociateIdentifier(ArraysCache, array, identifiers[i]);\n  }\n}\nfunction disassociateIdentifier(ArraysCache, array, identifier) {\n  const cache = ArraysCache.get(identifier);\n  if (cache) {\n    cache.delete(array);\n  }\n}\nfunction sync(array, changes, arraySet) {\n  const state = array[Context].source;\n  const adds = [];\n  const removes = [];\n  changes.forEach((value, key) => {\n    if (value === 'add') {\n      // likely we want to keep a Set along-side\n      if (arraySet.has(key)) {\n        return;\n      }\n      adds.push(key);\n      arraySet.add(key);\n    } else {\n      if (arraySet.has(key)) {\n        removes.push(key);\n        arraySet.delete(key);\n      }\n    }\n  });\n  if (removes.length) {\n    if (removes.length === state.length) {\n      state.length = 0;\n      // changing the reference breaks the Proxy\n      // state = array[SOURCE] = [];\n    } else {\n      removes.forEach(i => {\n        const index = state.indexOf(i);\n        if (index !== -1) {\n          state.splice(index, 1);\n          arraySet.delete(i);\n        }\n      });\n    }\n  }\n  if (adds.length) {\n    fastPush(state, adds);\n    // changing the reference breaks the Proxy\n    // else we could do this\n    /*\n    if (state.length === 0) {\n      array[SOURCE] = adds;\n    } else {\n      array[SOURCE] = state.concat(adds);\n    }\n    */\n  }\n}\nfunction isLegacyQueryArray(array) {\n  const context = array[Context];\n  return context.features !== null && context.features.DEPRECATED_CLASS_NAME === 'LegacyQueryArray';\n}\nfunction isLegacyLiveArray(array) {\n  const context = array[Context];\n  return context.features !== null && context.features.DEPRECATED_CLASS_NAME === 'LiveArray';\n}\nconst Touching = getOrSetGlobal('Touching', Symbol('touching'));\nconst RequestPromise = getOrSetGlobal('RequestPromise', Symbol('promise'));\nconst EMPTY_ARR = macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? Object.freeze([]) : [];\nfunction hasRecordIdentifier(op) {\n  return 'recordIdentifier' in op;\n}\n\n/**\n * The RequestStateService is used to track the state of requests\n * for fetching or updating known resource identifies that are inflight.\n *\n * @hideconstructor\n * @public\n */\nclass RequestStateService {\n  /** @internal */\n  _pending = new Map();\n  /** @internal */\n  _done = new Map();\n  /** @internal */\n  _subscriptions = new Map();\n  /** @internal */\n  _toFlush = [];\n  /** @internal */\n  _store;\n  constructor(store) {\n    this._store = store;\n  }\n  /** @internal */\n  _clearEntries(identifier) {\n    this._done.delete(identifier);\n  }\n  /** @internal */\n  _enqueue(promise, queryRequest) {\n    const query = queryRequest.data[0];\n    if (hasRecordIdentifier(query)) {\n      const identifier = query.recordIdentifier;\n      const type = query.op === 'saveRecord' ? 'mutation' : 'query';\n      if (!this._pending.has(identifier)) {\n        this._pending.set(identifier, []);\n      }\n      const request = {\n        state: 'pending',\n        request: queryRequest,\n        type\n      };\n      request[Touching] = [query.recordIdentifier];\n      request[RequestPromise] = promise;\n      this._pending.get(identifier).push(request);\n      this._triggerSubscriptions(request);\n      return promise.then(result => {\n        this._dequeue(identifier, request);\n        const finalizedRequest = {\n          state: 'fulfilled',\n          request: queryRequest,\n          type,\n          response: {\n            data: result\n          }\n        };\n        finalizedRequest[Touching] = request[Touching];\n        this._addDone(finalizedRequest);\n        this._triggerSubscriptions(finalizedRequest);\n        return result;\n      }, error => {\n        this._dequeue(identifier, request);\n        const finalizedRequest = {\n          state: 'rejected',\n          request: queryRequest,\n          type,\n          response: {\n            data: error\n          }\n        };\n        finalizedRequest[Touching] = request[Touching];\n        this._addDone(finalizedRequest);\n        this._triggerSubscriptions(finalizedRequest);\n        throw error;\n      });\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`Expected a well formed  query`);\n      }\n    })() : {};\n  }\n\n  /** @internal */\n  _triggerSubscriptions(req) {\n    if (req.state === 'pending') {\n      this._flushRequest(req);\n      return;\n    }\n    this._toFlush.push(req);\n    if (this._toFlush.length === 1) {\n      this._store.notifications._onNextFlush(() => {\n        this._flush();\n      });\n    }\n  }\n\n  /** @internal */\n  _flush() {\n    this._toFlush.forEach(req => {\n      this._flushRequest(req);\n    });\n    this._toFlush = [];\n  }\n\n  /** @internal */\n  _flushRequest(req) {\n    req[Touching].forEach(identifier => {\n      const subscriptions = this._subscriptions.get(identifier);\n      if (subscriptions) {\n        subscriptions.forEach(callback => callback(req));\n      }\n    });\n  }\n\n  /** @internal */\n  _dequeue(identifier, request) {\n    const pending = this._pending.get(identifier);\n    this._pending.set(identifier, pending.filter(req => req !== request));\n  }\n\n  /** @internal */\n  _addDone(request) {\n    request[Touching].forEach(identifier => {\n      // TODO add support for multiple\n      const requestDataOp = request.request.data[0].op;\n      let requests = this._done.get(identifier);\n      if (requests) {\n        requests = requests.filter(req => {\n          // TODO add support for multiple\n          let data;\n          if (Array.isArray(req.request.data)) {\n            data = req.request.data[0];\n          } else {\n            data = req.request.data;\n          }\n          return data.op !== requestDataOp;\n        });\n      }\n      requests = requests || [];\n      requests.push(request);\n      this._done.set(identifier, requests);\n    });\n  }\n\n  /**\n   * Subscribe to requests for a given resource identity.\n   *\n   * The callback will receive the current state of the request.\n   *\n   * ```ts\n   * interface RequestState {\n   *   state: 'pending' | 'fulfilled' | 'rejected';\n   *   type: 'query' | 'mutation';\n   *   request: Request;\n   *   response?: { data: unknown };\n   * }\n   * ```\n   *\n   * Note: It should be considered dangerous to use this API for more than simple\n   * state derivation or debugging. The `request` and `response` properties are poorly\n   * spec'd and may change unexpectedly when shifting what Handlers are in use or how\n   * requests are issued from the Store.\n   *\n   * We expect to revisit this API in the near future as we continue to refine the\n   * RequestManager ergonomics, as a simpler but more powerful direct integration\n   * with the RequestManager for these purposes is likely to be a better long-term\n   * design.\n   *\n   * @public\n   * @param {ResourceKey} identifier\n   * @param {(state: RequestCacheRequestState) => void} callback\n   */\n  subscribeForRecord(identifier, callback) {\n    let subscriptions = this._subscriptions.get(identifier);\n    if (!subscriptions) {\n      subscriptions = [];\n      this._subscriptions.set(identifier, subscriptions);\n    }\n    subscriptions.push(callback);\n  }\n\n  /**\n   * Retrieve all active requests for a given resource identity.\n   *\n   * @public\n   * @param {ResourceKey} identifier\n   * @return {RequestCacheRequestState[]} an array of request states for any pending requests for the given identifier\n   */\n  getPendingRequestsForRecord(identifier) {\n    return this._pending.get(identifier) || EMPTY_ARR;\n  }\n\n  /**\n   * Retrieve the last completed request for a given resource identity.\n   *\n   * @public\n   * @param {ResourceKey} identifier\n   * @return {RequestCacheRequestState | null} the state of the most recent request for the given identifier\n   */\n  getLastRequestForRecord(identifier) {\n    const requests = this._done.get(identifier);\n    if (requests) {\n      return requests[requests.length - 1];\n    }\n    return null;\n  }\n}\n\n/**\n * This type exists for internal use only for\n * where intimate contracts still exist either for\n * the Test Suite or for Legacy code.\n *\n * @private\n */\n\n// this import location is deprecated but breaks in 4.8 and older\nif (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {\n  // @ts-expect-error adding to globalThis\n  globalThis.setWarpDriveLogging = setLogging;\n\n  // @ts-expect-error adding to globalThis\n  globalThis.getWarpDriveRuntimeConfig = getRuntimeConfig;\n}\nif (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_METRIC_COUNTS)) {\n  if (getGlobalConfig().WarpDrive.debug.LOG_METRIC_COUNTS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_METRIC_COUNTS) {\n    // @ts-expect-error adding to globalThis\n    // eslint-disable-next-line\n    globalThis.__WarpDriveMetricCountData = globalThis.__WarpDriveMetricCountData || {};\n\n    // @ts-expect-error adding to globalThis\n    globalThis.getWarpDriveMetricCounts = () => {\n      // @ts-expect-error\n      // eslint-disable-next-line\n      return structuredClone(globalThis.__WarpDriveMetricCountData);\n    };\n\n    // @ts-expect-error adding to globalThis\n    globalThis.resetWarpDriveMetricCounts = () => {\n      // @ts-expect-error\n      globalThis.__WarpDriveMetricCountData = {};\n    };\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.__INTERNAL_LOG_NATIVE_MAP_SET_COUNTS)) {\n      if (getGlobalConfig().WarpDrive.debug.__INTERNAL_LOG_NATIVE_MAP_SET_COUNTS || globalThis.getWarpDriveRuntimeConfig().debug.__INTERNAL_LOG_NATIVE_MAP_SET_COUNTS) {\n        // @ts-expect-error adding to globalThis\n        globalThis.__primitiveInstanceId = 0;\n        function interceptAndLog(klassName, methodName) {\n          const klass = globalThis[klassName];\n          if (methodName === 'constructor') {\n            const instantiationLabel = `new ${klassName}()`;\n            // @ts-expect-error\n            globalThis[klassName] = class extends klass {\n              // @ts-expect-error\n              constructor(...args) {\n                // eslint-disable-next-line\n                super(...args);\n                // @ts-expect-error\n\n                const instanceId = globalThis.__primitiveInstanceId++;\n                // @ts-expect-error\n                // eslint-disable-next-line\n                globalThis.__WarpDriveMetricCountData[instantiationLabel] =\n                // @ts-expect-error\n                // eslint-disable-next-line\n                (globalThis.__WarpDriveMetricCountData[instantiationLabel] || 0) + 1;\n                // @ts-expect-error\n                this.instanceName = `${klassName}:${instanceId} - ${new Error().stack?.split('\\n')[2]}`;\n              }\n            };\n          } else {\n            // @ts-expect-error\n            // eslint-disable-next-line\n            const original = klass.prototype[methodName];\n            const logName = `${klassName}.${methodName}`;\n\n            // @ts-expect-error\n            klass.prototype[methodName] = function (...args) {\n              // @ts-expect-error\n              // eslint-disable-next-line\n              globalThis.__WarpDriveMetricCountData[logName] = (globalThis.__WarpDriveMetricCountData[logName] || 0) + 1;\n              // @ts-expect-error\n              const {\n                instanceName\n              } = this;\n              if (!instanceName) {\n                // @ts-expect-error\n                const instanceId = globalThis.__primitiveInstanceId++;\n                // @ts-expect-error\n                this.instanceName = `${klassName}.${methodName}:${instanceId} - ${new Error().stack?.split('\\n')[2]}`;\n              }\n              const instanceLogName = `${logName} (${instanceName})`;\n              // @ts-expect-error\n              // eslint-disable-next-line\n              globalThis.__WarpDriveMetricCountData[instanceLogName] =\n              // @ts-expect-error\n              // eslint-disable-next-line\n              (globalThis.__WarpDriveMetricCountData[instanceLogName] || 0) + 1;\n              // eslint-disable-next-line\n              return original.apply(this, args);\n            };\n          }\n        }\n        interceptAndLog('Set', 'constructor');\n        interceptAndLog('Set', 'add');\n        interceptAndLog('Set', 'delete');\n        interceptAndLog('Set', 'has');\n        interceptAndLog('Set', 'set');\n        interceptAndLog('Set', 'get');\n        interceptAndLog('Map', 'constructor');\n        interceptAndLog('Map', 'set');\n        interceptAndLog('Map', 'delete');\n        interceptAndLog('Map', 'has');\n        interceptAndLog('Map', 'add');\n        interceptAndLog('Map', 'get');\n        interceptAndLog('WeakSet', 'constructor');\n        interceptAndLog('WeakSet', 'add');\n        interceptAndLog('WeakSet', 'delete');\n        interceptAndLog('WeakSet', 'has');\n        interceptAndLog('WeakSet', 'set');\n        interceptAndLog('WeakSet', 'get');\n        interceptAndLog('WeakMap', 'constructor');\n        interceptAndLog('WeakMap', 'set');\n        interceptAndLog('WeakMap', 'delete');\n        interceptAndLog('WeakMap', 'has');\n        interceptAndLog('WeakMap', 'add');\n        interceptAndLog('WeakMap', 'get');\n      }\n    }\n  }\n}\n\n// `AwaitedKeys` is needed here to resolve any promise types like `PromiseBelongsTo`.\n\n/**\n * Currently only records that extend object can be created via\n * store.createRecord. This is a limitation of the current API,\n * but can be worked around by creating a new identifier, running\n * the cache.clientDidCreate method, and then peeking the record\n * for the identifier.\n *\n * To assign primary key to a record during creation, only `id` will\n * work correctly for `store.createRecord`, other primary key may be\n * handled by updating the record after creation or using the flow\n * described above.\n *\n * TODO: These are limitations we want to (and can) address. If you\n * have need of lifting these limitations, please open an issue.\n *\n */\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nconst EmptyClass = class {\n  // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n  constructor(args) {}\n};\nconst _BaseClass = macroCondition(dependencySatisfies('ember-source', '*')) ? macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_STORE_EXTENDS_EMBER_OBJECT) ? importSync('@ember/object') : EmptyClass : EmptyClass;\nconst BaseClass = _BaseClass.default ? _BaseClass.default : _BaseClass;\nif (BaseClass !== EmptyClass) {\n  deprecate(`The Store class extending from EmberObject is deprecated.\nPlease remove usage of EmberObject APIs and mark your class as not requiring it.\n\nTo mark the class as no longer extending from EmberObject, in ember-cli-build.js\nset the following config:\n\n\\`\\`\\`js\nconst app = new EmberApp(defaults, {\n  emberData: {\n    deprecations: {\n      DEPRECATE_STORE_EXTENDS_EMBER_OBJECT: false\n    }\n  }\n});\n\\`\\`\\`\n`, false, {\n    id: 'ember-data:deprecate-store-extends-ember-object',\n    until: '6.0',\n    for: 'ember-data',\n    url: 'https://deprecations.emberjs.com/id/ember-data-deprecate-store-extends-ember-object',\n    since: {\n      available: '4.13',\n      enabled: '5.4'\n    }\n  });\n}\n/**\n * ```ts\n * import { Store } from '@warp-drive/core';\n * ```\n *\n * The `Store` is the central piece of the ***Warp*Drive** experience. It connects\n * requests for data with schemas, caching and reactivity.\n *\n * While it's easy to use ***just*** ***Warp*Drive**'s request management, most projects will find they\n * require far more than basic fetch management. For this reason it's often best to start with a `Store`\n * even when you aren't sure yet.\n *\n * Most projects will only have a single `Store`, though using multiple distinct stores\n * is possible.\n *\n * @public\n * @hideconstructor\n */\nclass Store extends BaseClass {\n  /** @internal */\n\n  /**\n   * Provides access to the {@link NotificationManager} associated\n   * with this Store instance.\n   *\n   * The NotificationManager can be used to subscribe to\n   * changes to the cache.\n   *\n   * @public\n   */\n\n  /**\n   * Provides access to the SchemaService instance\n   * for this Store instance.\n   *\n   * The SchemaService can be used to query for\n   * information about the schema of a resource.\n   *\n   * @public\n   */\n  get schema() {\n    if (!this._schema) {\n      this._schema = this.createSchemaService();\n    }\n    return this._schema;\n  }\n  /** @internal */\n\n  /**\n   * Provides access to the CacheKeyManager\n   * for this store.\n   *\n   * The CacheKeyManager can be used to generate or\n   * retrieve a stable unique CacheKey for any resource\n   * or request.\n   *\n   * @public\n   */\n\n  /**\n   * Provides access to the {@link RequestManager} instance associated\n   * with this Store instance.\n   *\n   * See also:\n   * - {@link Fetch}\n   * - {@link CacheHandlerInterface | CacheHandler (Interface)}\n   * - {@link CacheHandler | CacheHandler (Class)}\n   *\n   * ```ts\n   * import { CacheHandler, Fetch, RequestManager, Store } from '@warp-drive/core';\n   *\n   * class AppStore extends Store {\n   *   requestManager = new RequestManager()\n   *    .use([Fetch])\n   *    .useCache(CacheHandler);\n   * }\n   * ```\n   *\n   * @public\n   */\n\n  /**\n   * A Property which an App may set to provide a CachePolicy\n   * to control when a cached request becomes stale.\n   *\n   * Note, when defined, these methods will only be invoked if a\n   * cache key exists for the request, either because the request\n   * contains `cacheOptions.key` or because the {@link CacheKeyManager}\n   * was able to generate a key for the request using the configured\n   * {@link setIdentifierGenerationMethod | generation method}.\n   *\n   * `isSoftExpired` will only be invoked if `isHardExpired` returns `false`.\n   *\n   * ```ts\n   * store.lifetimes = {\n   *   // make the request and ignore the current cache state\n   *   isHardExpired(key: RequestKey): boolean {\n   *     return false;\n   *   }\n   *\n   *   // make the request in the background if true, return cache state\n   *   isSoftExpired(key: RequestKey): boolean {\n   *     return false;\n   *   }\n   * }\n   * ```\n   *\n   * @public\n   */\n\n  // Private\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /**\n   * Async flush buffers notifications until flushed\n   * by finalization of a future configured by store.request\n   *\n   * This is useful for ensuring that notifications are delivered\n   * prior to the promise resolving but without risk of promise\n   * interleaving.\n   *\n   * @internal\n   */\n\n  /**\n   * Available in DEBUG Only\n   * @internal\n   */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @private */\n  get isDestroying() {\n    return this._isDestroying;\n  }\n  /** @internal */\n  set isDestroying(value) {\n    this._isDestroying = value;\n  }\n  /** @private */\n  get isDestroyed() {\n    return this._isDestroyed;\n  }\n  /** @internal */\n  set isDestroyed(value) {\n    this._isDestroyed = value;\n  }\n\n  /** @deprecated use {@link Store.cacheKeyManager} */\n  get identifierCache() {\n    return this.cacheKeyManager;\n  }\n\n  /**\n    @private\n  */\n  constructor(createArgs) {\n    super(createArgs);\n    Object.assign(this, createArgs);\n    this.cacheKeyManager = new CacheKeyManager();\n    this.notifications = new NotificationManager(this);\n\n    // private but maybe useful to be here, somewhat intimate\n    this.recordArrayManager = new RecordArrayManager({\n      store: this\n    });\n\n    // private\n    this._requestCache = new RequestStateService(this);\n    this._instanceCache = new InstanceCache(this);\n    this.isDestroying = false;\n    this.isDestroyed = false;\n  }\n\n  /** @internal */\n  _run(cb) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`WarpDrive should never encounter a nested run`);\n      }\n    })(!this._cbs) : {};\n    const _cbs = this._cbs = {};\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      try {\n        cb();\n        if (_cbs.coalesce) {\n          _cbs.coalesce();\n        }\n        if (_cbs.sync) {\n          _cbs.sync();\n        }\n        if (_cbs.notify) {\n          _cbs.notify();\n        }\n      } finally {\n        this._cbs = null;\n      }\n    } else {\n      cb();\n      if (_cbs.coalesce) {\n        _cbs.coalesce();\n      }\n      if (_cbs.sync) {\n        _cbs.sync();\n      }\n      if (_cbs.notify) {\n        _cbs.notify();\n      }\n      this._cbs = null;\n    }\n  }\n\n  /**\n   * Executes the callback, ensurng that any work that calls\n   * store._schedule is executed after in the right order.\n   *\n   * When queues already exist, scheduled callbacks will\n   * join the existing queue.\n   *\n   * @internal\n   */\n  _join(cb) {\n    if (this._cbs) {\n      cb();\n    } else {\n      this._run(cb);\n    }\n  }\n\n  /** @internal */\n  _schedule(name, cb) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`WarpDrive expects to schedule only when there is an active run`);\n      }\n    })(!!this._cbs) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`WarpDrive expects only one flush per queue name, cannot schedule ${name}`);\n      }\n    })(!this._cbs[name]) : {};\n    this._cbs[name] = cb;\n  }\n\n  /**\n   * Retrieve the RequestStateService instance\n   * associated with this Store.\n   *\n   * This can be used to query the status of requests\n   * that have been initiated for a given identifier.\n   *\n   * @return {RequestStateService}\n   * @public\n   */\n  getRequestStateService() {\n    return this._requestCache;\n  }\n\n  /** @internal */\n  _getAllPending() {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {\n      const all = [];\n      const pending = this._requestCache._pending;\n      pending.forEach(requests => {\n        all.push(...requests.map(v => v[RequestPromise]));\n      });\n      this.requestManager._pending.forEach(v => all.push(v));\n      const promise = Promise.allSettled(all);\n      promise.length = all.length;\n      return promise;\n    }\n  }\n\n  /**\n   * ::: tip 💡 For a more complete overview see the [Request Guide](/guides/2-requests/1-overview)\n   * :::\n   *\n   * Issue a request via the configured {@link RequestManager},\n   * inserting the response into the {@link Store.cache | cache} and handing\n   * back a {@link Future} which resolves to a {@link ReactiveDocument | ReactiveDocument}\n   *\n   * #### Request Cache Keys\n   *\n   * Only {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Methods/GET | GET} requests with a url or requests with an explicit\n   * {@link CacheOptions.key | cache key} will have the request result\n   * and document cached.\n   *\n   * The cache key used is {@link RequestInfo.cacheOptions.key | RequestInfo.cacheOptions.key}\n   * if present, falling back to {@link RequestInfo.url}.\n   *\n   * Params are not serialized as part of the cache-key, so\n   * either ensure they are already in the url or utilize\n   * `requestConfig.cacheOptions.key`. For queries issued\n   * via the {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Methods/POST | POST} method `requestConfig.cacheOptions.key`\n   * MUST be supplied for the document to be cached.\n   *\n   * #### Requesting Without a Cache Key\n   *\n   * Resource data within the request is always updated in the cache,\n   * regardless of whether a cache key is present for the request.\n   *\n   * #### Fulfilling From Cache\n   *\n   * When a cache-key is determined, the request may fulfill\n   * from cache provided the cache is not stale.\n   *\n   * Cache staleness is determined by the configured {@link CachePolicy}\n   * with priority given to the  {@link CacheOptions.reload} and\n   * {@link CacheOptions.backgroundReload} on the request if present.\n   *\n   * If the cache data has soft expired or the request asks for a background\n   * reload, the request will fulfill from cache if possible and\n   * make a non-blocking request in the background to update the cache.\n   *\n   * If the cache data has hard expired or the request asks for a reload,\n   * the request will not fulfill from cache and will make a blocking\n   * request to update the cache.\n   *\n   * #### The Response\n   *\n   * The primary difference between {@link RequestManager.request} and `store.request`\n   * is that `store.request` will convert the response into a {@link ReactiveDocument}\n   * containing {@link Store.instantiateRecord | ReactiveResources}.\n   *\n   * @public\n   */\n  request(requestConfig) {\n    // we lazily set the cache handler when we issue the first request\n    // because constructor doesn't allow for this to run after\n    // the user has had the chance to set the prop.\n    const opts = {\n      store: this,\n      [EnableHydration]: requestConfig[EnableHydration] ?? true\n    };\n    if (requestConfig.records) {\n      const cacheKeyManager = this.cacheKeyManager;\n      opts.records = requestConfig.records.map(r => cacheKeyManager.getOrCreateRecordIdentifier(r));\n    }\n    if (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {\n      if (this.DISABLE_WAITER) {\n        opts.disableTestWaiter = typeof requestConfig.disableTestWaiter === 'boolean' ? requestConfig.disableTestWaiter : true;\n      }\n    }\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_REQUESTS)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_REQUESTS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REQUESTS) {\n        let options;\n        try {\n          options = JSON.parse(JSON.stringify(requestConfig));\n        } catch {\n          options = requestConfig;\n        }\n        // eslint-disable-next-line no-console\n        console.log(`request: [[START]] ${requestConfig.op && !requestConfig.url ? '(LEGACY) ' : ''}${requestConfig.op || '<unknown operation>'} ${requestConfig.url || '<empty url>'}  ${requestConfig.method || '<empty method>'}`, options);\n      }\n    }\n    const request = Object.assign({}, requestConfig, opts);\n    const future = this.requestManager.request(request);\n    future.onFinalize(() => {\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_REQUESTS)) {\n        if (getGlobalConfig().WarpDrive.debug.LOG_REQUESTS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REQUESTS) {\n          // eslint-disable-next-line no-console\n          console.log(`request: [[FINALIZE]] ${requestConfig.op && !requestConfig.url ? '(LEGACY) ' : ''}${requestConfig.op || '<unknown operation>'} ${requestConfig.url || '<empty url>'}  ${requestConfig.method || '<empty method>'}`);\n        }\n      }\n      // skip flush for legacy belongsTo\n      if (requestConfig.op === 'findBelongsTo' && !requestConfig.url) {\n        return;\n      }\n      this.notifications._flush();\n    });\n    return future;\n  }\n\n  /**\n    Creates a new record in the current store.\n     > [!CAUTION]\n    > This should not be used to mock records or to create\n    > a record representing data that could be fetched from\n    > the API.\n     The properties passed to this method are set on\n    the newly created record.\n     For instance: to create a new `post`:\n     ```js\n    store.createRecord('post', {\n      title: 'WarpDrive is Stellar!'\n    });\n    ```\n     Relationships can be set during create. For instance,\n    to create a new `post` that has an existing user as\n    it's author:\n     ```js\n    const user = store.peekRecord('user', '1');\n     store.createRecord('post', {\n      title: 'WarpDrive is Stellar!',\n      user: user\n    });\n    ```\n     ### lid handling\n     All new records are assigned an `lid` that can be used to handle\n    transactional saves of multiple records, or to link the data to\n    other data in scenarios involving eventual-consistency or remote\n    syncing.\n     ```ts\n    const post = store.createRecord('post', {\n      title: 'WarpDrive is Stellar!'\n    });\n    const { lid } = recordIdentifierFor(post);\n    ```\n     The `lid` defaults to a uuidv4 string.\n     In order to support receiving knowledge about unpersisted creates\n    from other sources (say a different tab in the same web-browser),\n    createRecord allows for the `lid` to be provided as part of an\n    optional third argument. **If this lid already exists in the store\n    an error will be thrown.**\n     ```ts\n    const post = store.createRecord(\n      'post',\n      { title: 'WarpDrive is Stellar!' },\n      { lid: '4d47bb88-931f-496e-986d-c4888cef7373' }\n    );\n    ```\n     @public\n    @param type the name of the resource\n    @param inputProperties a hash of properties to set on the\n      newly created record.\n    @return a record in the \"isNew\" state\n  */\n\n  createRecord(type, inputProperties, context) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      assertDestroyingStore(this, 'createRecord');\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You need to pass a model name to the store's createRecord method`);\n      }\n    })(type) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${type}`);\n      }\n    })(typeof type === 'string') : {};\n\n    // This is wrapped in a `run.join` so that in test environments users do not need to manually wrap\n    //   calls to `createRecord`. The run loop usage here is because we batch the joining and updating\n    //   of record-arrays via ember's run loop, not our own.\n    //\n    //   to remove this, we would need to move to a new `async` API.\n    let record;\n    this._join(() => {\n      const normalizedModelName = normalizeModelName(type);\n      const properties = {\n        ...inputProperties\n      };\n\n      // If the passed properties do not include a primary key,\n      // give the adapter an opportunity to generate one. Typically,\n      // client-side ID generators will use something like uuid.js\n      // to avoid conflicts.\n      let id = null;\n      if (properties.id === null || properties.id === undefined) {\n        const adapter = this.adapterFor?.(normalizedModelName, true);\n        if (adapter && adapter.generateIdForRecord) {\n          id = properties.id = coerceId(adapter.generateIdForRecord(this, normalizedModelName, properties));\n        } else {\n          id = properties.id = null;\n        }\n      } else {\n        id = properties.id = coerceId(properties.id);\n      }\n      const resource = {\n        type: normalizedModelName,\n        id\n      };\n      if (resource.id) {\n        const identifier = this.cacheKeyManager.peekResourceKey(resource);\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`The id ${String(properties.id)} has already been used with another '${normalizedModelName}' record.`);\n          }\n        })(!identifier) : {};\n      }\n      if (context?.lid) {\n        const identifier = this.cacheKeyManager.peekResourceKey({\n          lid: context?.lid\n        });\n        resource.lid = context.lid;\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`The lid ${context.lid} has already been used with another '${identifier?.type}' record.`);\n          }\n        })(!identifier) : {};\n      }\n      const identifier = this.cacheKeyManager.createIdentifierForNewRecord(resource);\n      const cache = this.cache;\n      const createOptions = normalizeProperties(this, identifier, properties);\n      const resultProps = cache.clientDidCreate(identifier, createOptions);\n      record = getNewRecord(this._instanceCache, identifier, resultProps);\n    });\n    return record;\n  }\n\n  /**\n    For symmetry, a record can be deleted via the store.\n     Example\n     ```javascript\n    let post = store.createRecord('post', {\n      title: 'Ember is awesome!'\n    });\n     store.deleteRecord(post);\n    ```\n     @public\n    @param {unknown} record\n  */\n  deleteRecord(record) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      assertDestroyingStore(this, 'deleteRecord');\n    }\n    const identifier = peekResourceKey(record);\n    const cache = this.cache;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`expected the record to be connected to a cache`);\n      }\n    })(identifier) : {};\n    this._join(() => {\n      cache.setIsDeleted(identifier, true);\n      if (cache.isNew(identifier)) {\n        this._instanceCache.unloadRecord(identifier);\n      }\n    });\n  }\n\n  /**\n    For symmetry, a record can be unloaded via the store.\n    This will cause the record to be destroyed and freed up for garbage collection.\n     Example\n     ```javascript\n    const { content: { data: post } } = await store.request(findRecord({ type: 'post', id: '1' }));\n    store.unloadRecord(post);\n    ```\n     @public\n    @param {Model} record\n  */\n  unloadRecord(record) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      assertDestroyingStore(this, 'unloadRecord');\n    }\n    const identifier = peekResourceKey(record);\n    if (identifier) {\n      this._instanceCache.unloadRecord(identifier);\n    }\n  }\n\n  /**\n    Get a record by a given type and ID without triggering a fetch.\n     This method will synchronously return the record if it is available in the store,\n    otherwise it will return `null`. A record is available if it has been fetched earlier, or\n    pushed manually into the store.\n     **Example 1**\n     ```ts\n    const post = store.peekRecord('post', '1');\n     post.id; // '1'\n    ```\n     `peekRecord` can be called with a single identifier argument instead of the combination\n    of `type` (modelName) and `id` as separate arguments. You may recognize this combo as\n    the typical pairing from [JSON:API](https://jsonapi.org/format/#document-resource-object-identification)\n     **Example 2**\n     ```ts\n    const post = store.peekRecord({ type: 'post', id: '1' });\n    post.id; // '1'\n    ```\n     If you have previously received an lid from an Identifier for this record, you can lookup the record again using\n    just the lid.\n     **Example 3**\n     ```js\n    let post = store.peekRecord({ lid });\n    post.id; // '1'\n    ```\n     @since 1.13.0\n    @public\n    @param type - either a string representing the modelName or a ResourceIdentifier object containing both the type (a string) and the id (a string) for the record or an lid (a string) of an existing record\n    @param id - optional only if the first param is a ResourceIdentifier, else the string id of the record to be retrieved.\n  */\n\n  peekRecord(identifier, id) {\n    if (arguments.length === 1 && isMaybeIdentifier(identifier)) {\n      const stableIdentifier = this.cacheKeyManager.peekResourceKey(identifier);\n      const isLoaded = stableIdentifier && this._instanceCache.recordIsLoaded(stableIdentifier);\n      // TODO come up with a better mechanism for determining if we have data and could peek.\n      // this is basically an \"are we not empty\" query.\n      return isLoaded ? this._instanceCache.getRecord(stableIdentifier) : null;\n    }\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      assertDestroyingStore(this, 'peekRecord');\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You need to pass a model name to the store's peekRecord method`);\n      }\n    })(identifier) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${String(identifier)}`);\n      }\n    })(typeof identifier === 'string') : {};\n    const type = normalizeModelName(identifier);\n    const normalizedId = ensureStringId(id);\n    const resource = {\n      type,\n      id: normalizedId\n    };\n    const stableIdentifier = this.cacheKeyManager.peekResourceKey(resource);\n    const isLoaded = stableIdentifier && this._instanceCache.recordIsLoaded(stableIdentifier);\n    return isLoaded ? this._instanceCache.getRecord(stableIdentifier) : null;\n  }\n\n  /**\n    This method returns the {@link LegacyLiveArray} that contains all of the\n    known records for a given type in the store. Each ResourceType has only\n    one LiveArray instance, so multiple calls to `peekAll` with the same type\n    will always return the same instance.\n     Note that because it's a LiveArray, the result will contain any\n    locally created records of the type, however, it will not make a\n    request to the backend to retrieve additional records.\n     Example\n     ```ts\n    const allPosts = store.peekAll('post');\n    ```\n     @since 1.13.0\n    @public\n    @param type the name of the resource\n  */\n\n  peekAll(type) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      assertDestroyingStore(this, 'peekAll');\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You need to pass a model name to the store's peekAll method`);\n      }\n    })(type) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${type}`);\n      }\n    })(typeof type === 'string') : {};\n    return this.recordArrayManager.liveArrayFor(normalizeModelName(type));\n  }\n\n  /**\n    This method unloads all records in the store.\n    It schedules unloading to happen during the next run loop.\n     Optionally you can pass a type which unload all records for a given type.\n     ```javascript\n    store.unloadAll();\n    store.unloadAll('post');\n    ```\n     @param {String} type the name of the resource\n    @public\n  */\n\n  unloadAll(type) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      assertDestroyedStoreOnly(this, 'unloadAll');\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${String(type)}`);\n      }\n    })(!type || typeof type === 'string') : {};\n    this._join(() => {\n      this._enableAsyncFlush = true;\n      if (type === undefined) {\n        this.recordArrayManager.pause();\n        // destroy the graph before unloadAll\n        // since then we avoid churning relationships\n        // during unload\n        this._graph?.identifiers.clear();\n        this.recordArrayManager.clear();\n        this._instanceCache.clear();\n      } else {\n        this._instanceCache.clear(normalizeModelName(type));\n      }\n      this._enableAsyncFlush = null;\n      this.notifications._flush();\n      if (type === undefined) {\n        this.recordArrayManager.resume();\n      }\n    });\n  }\n\n  /**\n    Push some data for a given type into the store.\n     This method expects normalized [JSON API](http://jsonapi.org/) document. This means you have to follow [JSON API specification](http://jsonapi.org/format/) with few minor adjustments:\n    - record's `type` should always be in singular, dasherized form\n    - members (properties) should be camelCased\n     [Your primary data should be wrapped inside `data` property](http://jsonapi.org/format/#document-top-level):\n     ```js\n    store.push({\n      data: {\n        // primary data for single record of type `Person`\n        id: '1',\n        type: 'person',\n        attributes: {\n          firstName: 'Daniel',\n          lastName: 'Kmak'\n        }\n      }\n    });\n    ```\n     [Demo.](http://ember-twiddle.com/fb99f18cd3b4d3e2a4c7)\n     `data` property can also hold an array (of records):\n     ```js\n    store.push({\n      data: [\n        // an array of records\n        {\n          id: '1',\n          type: 'person',\n          attributes: {\n            firstName: 'Daniel',\n            lastName: 'Kmak'\n          }\n        },\n        {\n          id: '2',\n          type: 'person',\n          attributes: {\n            firstName: 'Tom',\n            lastName: 'Dale'\n          }\n        }\n      ]\n    });\n    ```\n     [Demo.](http://ember-twiddle.com/69cdbeaa3702159dc355)\n     There are some typical properties for `JSONAPI` payload:\n    * `id` - mandatory, unique record's key\n    * `type` - mandatory string which matches `model`'s dasherized name in singular form\n    * `attributes` - object which holds data for record attributes - `attr`'s declared in model\n    * `relationships` - object which must contain any of the following properties under each relationships' respective key (example path is `relationships.achievements.data`):\n      - [`links`](http://jsonapi.org/format/#document-links)\n      - [`data`](http://jsonapi.org/format/#document-resource-object-linkage) - place for primary data\n      - [`meta`](http://jsonapi.org/format/#document-meta) - object which contains meta-information about relationship\n     For this model:\n     ```js [app/models/person.js]\n    import Model, { attr, hasMany } from '@warp-drive/legacy/model';\n     export default class PersonRoute extends Route {\n      @attr('string') firstName;\n      @attr('string') lastName;\n       @hasMany('person') children;\n    }\n    ```\n     To represent the children as IDs:\n     ```js\n    {\n      data: {\n        id: '1',\n        type: 'person',\n        attributes: {\n          firstName: 'Tom',\n          lastName: 'Dale'\n        },\n        relationships: {\n          children: {\n            data: [\n              {\n                id: '2',\n                type: 'person'\n              },\n              {\n                id: '3',\n                type: 'person'\n              },\n              {\n                id: '4',\n                type: 'person'\n              }\n            ]\n          }\n        }\n      }\n    }\n    ```\n     [Demo.](http://ember-twiddle.com/343e1735e034091f5bde)\n     To represent the children relationship as a URL:\n     ```js\n    {\n      data: {\n        id: '1',\n        type: 'person',\n        attributes: {\n          firstName: 'Tom',\n          lastName: 'Dale'\n        },\n        relationships: {\n          children: {\n            links: {\n              related: '/people/1/children'\n            }\n          }\n        }\n      }\n    }\n    ```\n     If you're streaming data, or implementing response handling, make sure\n    that you have converted the incoming data into this form.\n     This method can be used both to push in brand new\n    records, as well as to update existing records.\n     See also {@link Cache.patch}\n     @public\n    @param data\n    @return the primary record(s) that created or updated.\n  */\n\n  push(data) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      assertDestroyingStore(this, 'push');\n    }\n    const pushed = this._push(data, false);\n    if (Array.isArray(pushed)) {\n      return pushed.map(identifier => this._instanceCache.getRecord(identifier));\n    }\n    if (pushed === null) {\n      return null;\n    }\n    return this._instanceCache.getRecord(pushed);\n  }\n\n  /**\n    Push some data in the form of a json-api document into the store,\n    without creating materialized records.\n     @private\n    @return identifiers for the primary records that had data loaded\n  */\n  _push(jsonApiDoc, asyncFlush) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      assertDestroyingStore(this, '_push');\n    }\n    if (asyncFlush) {\n      this._enableAsyncFlush = true;\n    }\n    let ret;\n    this._join(() => {\n      ret = this.cache.put({\n        content: jsonApiDoc\n      });\n    });\n    this._enableAsyncFlush = null;\n    return 'data' in ret ? ret.data : null;\n  }\n\n  /**\n   * Returns the cache instance associated to this Store, instantiates the Cache\n   * if necessary via `Store.createCache`\n   *\n   * @public\n   */\n  get cache() {\n    let {\n      cache\n    } = this._instanceCache;\n    if (!cache) {\n      cache = this._instanceCache.cache = this.createCache(this._instanceCache._storeWrapper);\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        cache = this._instanceCache.cache = new CacheManager(cache);\n      }\n    }\n    return cache;\n  }\n\n  /** @private */\n  destroy() {\n    if (this.isDestroyed) {\n      // @ember/test-helpers will call destroy multiple times\n      return;\n    }\n    this.isDestroying = true;\n    this._graph?.destroy();\n    this._graph = undefined;\n    this.notifications.destroy();\n    this.recordArrayManager.destroy();\n    this.cacheKeyManager.destroy();\n    this._instanceCache.clear();\n    this.isDestroyed = true;\n  }\n\n  /**\n   * This method\n   *\n   * @private\n   */\n  static create(args) {\n    return new this(args);\n  }\n}\n\n/**\n * This type exists for internal use only for\n * where intimate contracts still exist either for\n * the Test Suite or for Legacy code.\n *\n * @private\n */\n\n/**\n * Upgrade the type for Store to PrivateStore, which will also\n * upgrade any associated types to their private equivalents.\n *\n * @private\n */\nfunction assertPrivateStore(store) {}\n/**\n * Upgrade the type for Store to PrivateStore, which will also\n * upgrade any associated types to their private equivalents.\n *\n * @private\n */\nfunction isPrivateStore(store) {\n  return store;\n}\nif (macroCondition(getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_SCHEMA_SERVICE)) {\n  Store.prototype.getSchemaDefinitionService = function () {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You must registerSchemaDefinitionService with the store to use custom model classes`);\n      }\n    })(this._schema) : {};\n    deprecate(`Use \\`store.schema\\` instead of \\`store.getSchemaDefinitionService()\\``, false, {\n      id: 'ember-data:schema-service-updates',\n      until: '6.0',\n      for: 'ember-data',\n      since: {\n        available: '4.13',\n        enabled: '5.4'\n      }\n    });\n    return this._schema;\n  };\n  Store.prototype.registerSchemaDefinitionService = function (schema) {\n    deprecate(`Use \\`store.createSchemaService\\` instead of \\`store.registerSchemaDefinitionService()\\``, false, {\n      id: 'ember-data:schema-service-updates',\n      until: '6.0',\n      for: 'ember-data',\n      since: {\n        available: '4.13',\n        enabled: '5.4'\n      }\n    });\n    this._schema = schema;\n  };\n  Store.prototype.registerSchema = function (schema) {\n    deprecate(`Use \\`store.createSchemaService\\` instead of \\`store.registerSchema()\\``, false, {\n      id: 'ember-data:schema-service-updates',\n      until: '6.0',\n      for: 'ember-data',\n      since: {\n        available: '4.13',\n        enabled: '5.4'\n      }\n    });\n    this._schema = schema;\n  };\n}\nlet assertDestroyingStore;\nlet assertDestroyedStoreOnly;\nif (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n  // eslint-disable-next-line @typescript-eslint/no-shadow\n  assertDestroyingStore = function assertDestroyingStore(store, method) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to call store.${method}(), but the store instance has already been destroyed.`);\n      }\n    })(!(store.isDestroying || store.isDestroyed)) : {};\n  };\n  // eslint-disable-next-line @typescript-eslint/no-shadow\n  assertDestroyedStoreOnly = function assertDestroyedStoreOnly(store, method) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to call store.${method}(), but the store instance has already been destroyed.`);\n      }\n    })(!store.isDestroyed) : {};\n  };\n}\nfunction isMaybeIdentifier(maybeIdentifier) {\n  return Boolean(maybeIdentifier !== null && typeof maybeIdentifier === 'object' && ('id' in maybeIdentifier && 'type' in maybeIdentifier && maybeIdentifier.id && maybeIdentifier.type || maybeIdentifier.lid));\n}\nfunction normalizeProperties(store, identifier, properties) {\n  // assert here\n  if (properties !== undefined) {\n    if ('id' in properties) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`expected id to be a string or null`);\n        }\n      })(properties.id !== undefined) : {};\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You passed '${typeof properties}' as properties for record creation instead of an object.`);\n      }\n    })(typeof properties === 'object' && properties !== null) : {};\n    const {\n      type\n    } = identifier;\n\n    // convert relationship Records to RecordDatas before passing to RecordData\n    const defs = store.schema.fields({\n      type\n    });\n    if (defs.size) {\n      const keys = Object.keys(properties);\n      for (let i = 0; i < keys.length; i++) {\n        const prop = keys[i];\n        const field = defs.get(prop);\n        if (!field) continue;\n        if (field.kind === 'hasMany') {\n          if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n            assertRecordsPassedToHasMany(properties[prop]);\n          }\n          properties[prop] = extractIdentifiersFromRecords$1(properties[prop]);\n        } else if (field.kind === 'belongsTo') {\n          properties[prop] = extractIdentifierFromRecord$1(properties[prop]);\n        }\n      }\n    }\n  }\n  return properties;\n}\nfunction assertRecordsPassedToHasMany(records) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You must pass an array of records to set a hasMany relationship`);\n    }\n  })(Array.isArray(records)) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`All elements of a hasMany relationship must be instances of Model, you passed ${records.map(r => `${typeof r}`).join(', ')}`);\n    }\n  })(function () {\n    return records.every(record => {\n      try {\n        recordIdentifierFor(record);\n        return true;\n      } catch {\n        return false;\n      }\n    });\n  }()) : {};\n}\nfunction extractIdentifiersFromRecords$1(records) {\n  return records.map(record => extractIdentifierFromRecord$1(record));\n}\nfunction extractIdentifierFromRecord$1(recordOrPromiseRecord) {\n  if (!recordOrPromiseRecord) {\n    return null;\n  }\n  const extract = recordIdentifierFor;\n  return extract(recordOrPromiseRecord);\n}\n\n/*\n    When a find request is triggered on the store, the user can optionally pass in\n    attributes and relationships to be preloaded. These are meant to behave as if they\n    came back from the server, except the user obtained them out of band and is informing\n    the store of their existence. The most common use case is for supporting client side\n    nested URLs, such as `/posts/1/comments/2` so the user can do\n    `store.findRecord('comment', 2, { preload: { post: 1 } })` without having to fetch the post.\n\n    Preloaded data can be attributes and relationships passed in either as IDs or as actual\n    models.\n  */\nfunction preloadData(store, identifier, preload) {\n  const jsonPayload = {};\n  //TODO(Igor) consider the polymorphic case\n  const schemas = store.schema;\n  const fields = schemas.fields(identifier);\n  Object.keys(preload).forEach(key => {\n    const preloadValue = preload[key];\n    const field = fields.get(key);\n    if (field && (field.kind === 'hasMany' || field.kind === 'belongsTo')) {\n      if (!jsonPayload.relationships) {\n        jsonPayload.relationships = {};\n      }\n      jsonPayload.relationships[key] = preloadRelationship(field, preloadValue);\n    } else {\n      if (!jsonPayload.attributes) {\n        jsonPayload.attributes = {};\n      }\n      jsonPayload.attributes[key] = preloadValue;\n    }\n  });\n  const cache = store.cache;\n  const hasRecord = Boolean(store._instanceCache.peek(identifier));\n  cache.upsert(identifier, jsonPayload, hasRecord);\n}\nfunction preloadRelationship(schema, preloadValue) {\n  const relatedType = schema.type;\n  if (schema.kind === 'hasMany') {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error('You need to pass in an array to set a hasMany property on a record');\n      }\n    })(Array.isArray(preloadValue)) : {};\n    return {\n      data: preloadValue.map(value => _convertPreloadRelationshipToJSON(value, relatedType))\n    };\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error('You should not pass in an array to set a belongsTo property on a record');\n    }\n  })(!Array.isArray(preloadValue)) : {};\n  return {\n    data: preloadValue ? _convertPreloadRelationshipToJSON(preloadValue, relatedType) : null\n  };\n}\n\n/*\n  findRecord('user', '1', { preload: { friends: ['1'] }});\n  findRecord('user', '1', { preload: { friends: [record] }});\n*/\nfunction _convertPreloadRelationshipToJSON(value, type) {\n  if (typeof value === 'string' || typeof value === 'number') {\n    return {\n      type,\n      id: ensureStringId(value)\n    };\n  }\n  // TODO if not a record instance assert it's an identifier\n  // and allow identifiers to be used\n  return recordIdentifierFor(value);\n}\n\n/**\n * Minimum subset of static schema methods and properties on the\n * \"model\" class.\n *\n * Only used when using the legacy schema-service implementation\n * for @warp-drive/legacy/model or when wrapping schema for legacy\n * Adapters/Serializers.\n *\n */\n\nfunction _resourceIsFullDeleted(identifier, cache) {\n  return cache.isDeletionCommitted(identifier) || cache.isNew(identifier) && cache.isDeleted(identifier);\n}\nfunction resourceIsFullyDeleted(instanceCache, identifier) {\n  const cache = instanceCache.cache;\n  return !cache || _resourceIsFullDeleted(identifier, cache);\n}\n\n/**\n   A `RecordReference` is a low-level API that allows users and\n   addon authors to perform meta-operations on a record.\n\n   @hideconstructor\n   @public\n*/\nclass RecordReference {\n  /** @internal */\n\n  // unsubscribe token given to us by the notification manager\n  /** @internal */\n  ___token;\n  /** @internal */\n  ___identifier;\n  /** @internal */\n\n  constructor(store, identifier) {\n    this.store = store;\n    this.___identifier = identifier;\n    this.___token = store.notifications.subscribe(identifier, (_, bucket, notifiedKey) => {\n      if (bucket === 'identity' || bucket === 'attributes' && notifiedKey === 'id') {\n        this._ref++;\n      }\n    });\n  }\n\n  /** @internal */\n  destroy() {\n    this.store.notifications.unsubscribe(this.___token);\n  }\n  get type() {\n    return this.identifier().type;\n  }\n\n  /**\n     The `id` of the record that this reference refers to.\n      Together, the `type` and `id` properties form a composite key for\n     the identity map.\n      Example\n      ```javascript\n     let userRef = store.getReference('user', 1);\n      userRef.id(); // '1'\n     ```\n     @public\n    @return The id of the record.\n  */\n  id() {\n    // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n    this._ref; // consume the tracked prop\n    return this.___identifier.id;\n  }\n\n  /**\n     The `identifier` of the record that this reference refers to.\n      Together, the `type` and `id` properties form a composite key for\n     the identity map.\n      Example\n      ```javascript\n     let userRef = store.getReference('user', 1);\n      userRef.identifier(); // '1'\n     ```\n     @public\n    @return The identifier of the record.\n  */\n  identifier() {\n    return this.___identifier;\n  }\n\n  /**\n     How the reference will be looked up when it is loaded. Currently\n     this always returns `identity` to signify that a record will be\n     loaded by its `type` and `id`.\n      Example\n      ```javascript\n     const userRef = store.getReference('user', 1);\n      userRef.remoteType(); // 'identity'\n     ```\n      @public\n  */\n  remoteType() {\n    return 'identity';\n  }\n\n  /**\n    This API allows you to provide a reference with new data. The\n    simplest usage of this API is similar to `store.push`: you provide a\n    normalized hash of data and the object represented by the reference\n    will update.\n     If you pass a promise to `push`, WarpDrive will not ask the adapter\n    for the data if another attempt to fetch it is made in the\n    interim. When the promise resolves, the underlying object is updated\n    with the new data, and the promise returned by *this function* is resolved\n    with that object.\n     For example, `recordReference.push(promise)` will be resolved with a\n    record.\n      Example\n      ```javascript\n     let userRef = store.getReference('user', 1);\n      // provide data for reference\n     userRef.push({\n       data: {\n         id: \"1\",\n         type: \"user\",\n         attributes: {\n           username: \"@user\"\n         }\n       }\n     }).then(function(user) {\n       userRef.value() === user;\n     });\n     ```\n     @public\n    @param objectOrPromise a JSON:API ResourceDocument or a promise resolving to one\n    @return a promise for the value (record or relationship)\n  */\n  push(objectOrPromise) {\n    // TODO @deprecate pushing unresolved payloads\n    return Promise.resolve(objectOrPromise).then(data => {\n      return this.store.push(data);\n    });\n  }\n\n  /**\n    If the entity referred to by the reference is already loaded, it is\n    present as `reference.value`. Otherwise the value returned by this function\n    is `null`.\n      Example\n      ```javascript\n     let userRef = store.getReference('user', 1);\n      userRef.value(); // user\n     ```\n     @public\n    @return the record for this RecordReference\n  */\n  value() {\n    return this.store.peekRecord(this.___identifier);\n  }\n\n  /**\n     Triggers a fetch for the backing entity based on its `remoteType`\n     (see `remoteType` definitions per reference type).\n      Example\n      ```javascript\n     let userRef = store.getReference('user', 1);\n      // load user (via store.find)\n     userRef.load().then(...)\n     ```\n     @public\n    @return the record for this RecordReference\n  */\n  load() {\n    const id = this.id();\n    if (id !== null) {\n      return this.store.findRecord(this.type, id);\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`Unable to fetch record of type ${this.type} without an id`);\n      }\n    })() : {};\n  }\n\n  /**\n     Reloads the record if it is already loaded. If the record is not\n     loaded it will load the record via `store.findRecord`\n      Example\n      ```javascript\n     let userRef = store.getReference('user', 1);\n      // or trigger a reload\n     userRef.reload().then(...)\n     ```\n     @public\n    @return the record for this RecordReference\n  */\n  reload() {\n    const id = this.id();\n    if (id !== null) {\n      return this.store.findRecord(this.type, id, {\n        reload: true\n      });\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`Unable to fetch record of type ${this.type} without an id`);\n      }\n    })() : {};\n  }\n}\ndefineSignal(RecordReference.prototype, '_ref');\n\n// if modelFor turns out to be a bottleneck we should replace with a Map\n// and clear it during store teardown.\nconst AvailableShims = getOrSetGlobal('AvailableShims', new WeakMap());\nfunction getShimClass(store, modelName) {\n  let shims = AvailableShims.get(store);\n  if (!shims) {\n    shims = Object.create(null);\n    AvailableShims.set(store, shims);\n  }\n  let shim = shims[modelName];\n  if (shim === undefined) {\n    shim = shims[modelName] = new ShimModelClass(store, modelName);\n  }\n  return shim;\n}\n\n// Mimics the static apis of @warp-drive/legacy/model\nclass ShimModelClass {\n  constructor(store, modelName) {\n    this.__store = store;\n    this.modelName = modelName;\n  }\n  get fields() {\n    const fields = new Map();\n    const fieldSchemas = this.__store.schema.fields({\n      type: this.modelName\n    });\n    fieldSchemas.forEach((schema, key) => {\n      if (schema.kind === 'attribute' || schema.kind === 'belongsTo' || schema.kind === 'hasMany') {\n        fields.set(key, schema.kind);\n      }\n    });\n    return fields;\n  }\n  get attributes() {\n    const attrs = new Map();\n    const fields = this.__store.schema.fields({\n      type: this.modelName\n    });\n    fields.forEach((schema, key) => {\n      if (schema.kind === 'attribute') {\n        attrs.set(key, schema);\n      }\n    });\n    return attrs;\n  }\n  get relationshipsByName() {\n    const rels = new Map();\n    const fields = this.__store.schema.fields({\n      type: this.modelName\n    });\n    fields.forEach((schema, key) => {\n      if (schema.kind === 'belongsTo' || schema.kind === 'hasMany') {\n        rels.set(key, schema);\n      }\n    });\n    return rels;\n  }\n  eachAttribute(callback, binding) {\n    this.__store.schema.fields({\n      type: this.modelName\n    }).forEach((schema, key) => {\n      if (schema.kind === 'attribute') {\n        callback.call(binding, key, schema);\n      }\n    });\n  }\n  eachRelationship(callback, binding) {\n    this.__store.schema.fields({\n      type: this.modelName\n    }).forEach((schema, key) => {\n      if (schema.kind === 'belongsTo' || schema.kind === 'hasMany') {\n        callback.call(binding, key, schema);\n      }\n    });\n  }\n  eachTransformedAttribute(callback, binding) {\n    this.__store.schema.fields({\n      type: this.modelName\n    }).forEach((schema, key) => {\n      if (schema.kind === 'attribute') {\n        const type = schema.type;\n        if (type) callback.call(binding, key, type);\n      }\n    });\n  }\n}\nif (macroCondition(getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_REQUEST_METHODS)) {\n  Store.prototype.findRecord = function (resource, id, options) {\n    deprecate(`store.findRecord is deprecated. Use store.request instead.`, false, {\n      id: 'warp-drive:deprecate-legacy-request-methods',\n      until: '6.0',\n      for: '@warp-drive/core',\n      url: 'https://docs.warp-drive.io/api/@warp-drive/core/build-config/deprecations/variables/ENABLE_LEGACY_REQUEST_METHODS',\n      since: {\n        enabled: '5.7',\n        available: '5.7'\n      }\n    });\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to call store.findRecord(), but the store instance has already been destroyed.`);\n      }\n    })(!(this.isDestroying || this.isDestroyed)) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You need to pass a modelName or resource identifier as the first argument to the store's findRecord method`);\n      }\n    })(resource) : {};\n    if (isMaybeIdentifier(resource)) {\n      options = id;\n    } else {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${resource}`);\n        }\n      })(typeof resource === 'string') : {};\n      const type = normalizeModelName(resource);\n      const normalizedId = ensureStringId(id);\n      resource = constructResource(type, normalizedId);\n    }\n    const identifier = this.cacheKeyManager.getOrCreateRecordIdentifier(resource);\n    options = options || {};\n    if (options.preload) {\n      // force reload if we preload to ensure we don't resolve the promise\n      // until we are complete, else we will end up background-reloading\n      // even for initial load.\n      if (!this._instanceCache.recordIsLoaded(identifier)) {\n        options.reload = true;\n      }\n      this._join(() => {\n        preloadData(this, identifier, options.preload);\n      });\n    }\n    const promise = this.request({\n      op: 'findRecord',\n      data: {\n        record: identifier,\n        options\n      },\n      cacheOptions: {\n        [SkipCache]: true\n      }\n    });\n    return promise.then(document => {\n      return document.content;\n    });\n  };\n  Store.prototype.findAll = function (type, options = {}) {\n    deprecate(`store.findAll is deprecated. Use store.request instead.`, false, {\n      id: 'warp-drive:deprecate-legacy-request-methods',\n      until: '6.0',\n      for: '@warp-drive/core',\n      url: 'https://docs.warp-drive.io/api/@warp-drive/core/build-config/deprecations/variables/ENABLE_LEGACY_REQUEST_METHODS',\n      since: {\n        enabled: '5.7',\n        available: '5.7'\n      }\n    });\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to call store.findAll(), but the store instance has already been destroyed.`);\n      }\n    })(!(this.isDestroying || this.isDestroyed)) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You need to pass a model name to the store's findAll method`);\n      }\n    })(type) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${type}`);\n      }\n    })(typeof type === 'string') : {};\n    const promise = this.request({\n      op: 'findAll',\n      data: {\n        type: normalizeModelName(type),\n        options: options || {}\n      },\n      cacheOptions: {\n        [SkipCache]: true\n      }\n    });\n    return promise.then(document => document.content);\n  };\n  Store.prototype.query = function (type, query, options = {}) {\n    deprecate(`store.query is deprecated. Use store.request instead.`, false, {\n      id: 'warp-drive:deprecate-legacy-request-methods',\n      until: '6.0',\n      for: '@warp-drive/core',\n      url: 'https://docs.warp-drive.io/api/@warp-drive/core/build-config/deprecations/variables/ENABLE_LEGACY_REQUEST_METHODS',\n      since: {\n        enabled: '5.7',\n        available: '5.7'\n      }\n    });\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to call store.query(), but the store instance has already been destroyed.`);\n      }\n    })(!(this.isDestroying || this.isDestroyed)) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You need to pass a model name to the store's query method`);\n      }\n    })(type) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You need to pass a query hash to the store's query method`);\n      }\n    })(query) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${type}`);\n      }\n    })(typeof type === 'string') : {};\n    const promise = this.request({\n      op: 'query',\n      data: {\n        type: normalizeModelName(type),\n        query,\n        options: options\n      },\n      cacheOptions: {\n        [SkipCache]: true\n      }\n    });\n    return promise.then(document => document.content);\n  };\n  Store.prototype.queryRecord = function (type, query, options) {\n    deprecate(`store.queryRecord is deprecated. Use store.request instead.`, false, {\n      id: 'warp-drive:deprecate-legacy-request-methods',\n      until: '6.0',\n      for: '@warp-drive/core',\n      url: 'https://docs.warp-drive.io/api/@warp-drive/core/build-config/deprecations/variables/ENABLE_LEGACY_REQUEST_METHODS',\n      since: {\n        enabled: '5.7',\n        available: '5.7'\n      }\n    });\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to call store.queryRecord(), but the store instance has already been destroyed.`);\n      }\n    })(!(this.isDestroying || this.isDestroyed)) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You need to pass a model name to the store's queryRecord method`);\n      }\n    })(type) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You need to pass a query hash to the store's queryRecord method`);\n      }\n    })(query) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${type}`);\n      }\n    })(typeof type === 'string') : {};\n    const promise = this.request({\n      op: 'queryRecord',\n      data: {\n        type: normalizeModelName(type),\n        query,\n        options: options || {}\n      },\n      cacheOptions: {\n        [SkipCache]: true\n      }\n    });\n    return promise.then(document => document.content);\n  };\n  Store.prototype.getReference = function (resource, id) {\n    deprecate(`store.getReference is deprecated. There is no direct replacement. For working with the cache and relationships, use the cache with the appropriate identifiers. To load, use store.request.`, false, {\n      id: 'warp-drive:deprecate-legacy-request-methods',\n      until: '6.0',\n      for: '@warp-drive/core',\n      url: 'https://docs.warp-drive.io/api/@warp-drive/core/build-config/deprecations/variables/ENABLE_LEGACY_REQUEST_METHODS',\n      since: {\n        enabled: '5.7',\n        available: '5.7'\n      }\n    });\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to call store.getReference(), but the store instance has already been destroyed.`);\n      }\n    })(!(this.isDestroying || this.isDestroyed)) : {};\n    let resourceIdentifier;\n    if (arguments.length === 1 && isMaybeIdentifier(resource)) {\n      resourceIdentifier = resource;\n    } else {\n      const type = normalizeModelName(resource);\n      const normalizedId = ensureStringId(id);\n      resourceIdentifier = constructResource(type, normalizedId);\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error('getReference expected to receive either a resource identifier or type and id as arguments');\n      }\n    })(isMaybeIdentifier(resourceIdentifier)) : {};\n    const identifier = this.cacheKeyManager.getOrCreateRecordIdentifier(resourceIdentifier);\n    const cache = upgradeInstanceCaches(this._instanceCache.__instances).reference;\n    let reference = cache.get(identifier);\n    if (!reference) {\n      reference = new RecordReference(this, identifier);\n      cache.set(identifier, reference);\n    }\n    return reference;\n  };\n  Store.prototype.modelFor = function (type) {\n    deprecate(`store.modelFor is deprecated, please use store.schema.fields({ type: '${type}' }) to access schema information instead.`, false, {\n      id: 'warp-drive:deprecate-legacy-request-methods',\n      until: '6.0',\n      for: '@warp-drive/core',\n      url: 'https://docs.warp-drive.io/api/@warp-drive/core/build-config/deprecations/variables/ENABLE_LEGACY_REQUEST_METHODS',\n      since: {\n        enabled: '5.7',\n        available: '5.7'\n      }\n    });\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to call store.modelFor(), but the store instance has already been destroyed.`);\n      }\n    })(!this.isDestroyed) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You need to pass <type> to the store's modelFor method`);\n      }\n    })(typeof type === 'string' && type.length) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`No model was found for '${type}' and no schema handles the type`);\n      }\n    })(this.schema.hasResource({\n      type\n    })) : {};\n    return getShimClass(this, type);\n  };\n  Store.prototype.saveRecord = function (record, options = {}) {\n    deprecate(`store.saveRecord is deprecated, please use store.request to initiate a save request instead.`, false, {\n      id: 'warp-drive:deprecate-legacy-request-methods',\n      until: '6.0',\n      for: '@warp-drive/core',\n      url: 'https://docs.warp-drive.io/api/@warp-drive/core/build-config/deprecations/variables/ENABLE_LEGACY_REQUEST_METHODS',\n      since: {\n        enabled: '5.7',\n        available: '5.7'\n      }\n    });\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to call store.saveRecord(), but the store instance has already been destroyed.`);\n      }\n    })(!(this.isDestroying || this.isDestroyed)) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Unable to initiate save for a record in a disconnected state`);\n      }\n    })(storeFor(record, true)) : {};\n    const identifier = recordIdentifierFor(record);\n    const cache = this.cache;\n    if (!identifier) {\n      // this commonly means we're disconnected\n      // but just in case we reject here to prevent bad things.\n      return Promise.reject(new Error(`Record Is Disconnected`));\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot initiate a save request for an unloaded record: ${identifier.lid}`);\n      }\n    })(this._instanceCache.recordIsLoaded(identifier)) : {};\n    if (resourceIsFullyDeleted(this._instanceCache, identifier)) {\n      return Promise.resolve(record);\n    }\n    if (!options) {\n      options = {};\n    }\n    let operation = 'updateRecord';\n    if (cache.isNew(identifier)) {\n      operation = 'createRecord';\n    } else if (cache.isDeleted(identifier)) {\n      operation = 'deleteRecord';\n    }\n    const request = {\n      op: operation,\n      data: {\n        options,\n        record: identifier\n      },\n      records: [identifier],\n      cacheOptions: {\n        [SkipCache]: true\n      }\n    };\n    return this.request(request).then(document => document.content);\n  };\n}\nfunction upgradeInstanceCaches(cache) {\n  const withReferences = cache;\n  if (!withReferences.reference) {\n    withReferences.reference = new WeakMap();\n  }\n  return withReferences;\n}\nconst MUTATION_OPS$1 = new Set(['createRecord', 'updateRecord', 'deleteRecord']);\nfunction calcShouldFetch(store, request, hasCachedValue, identifier) {\n  const {\n    cacheOptions\n  } = request;\n  return request.op && MUTATION_OPS$1.has(request.op) || cacheOptions?.reload || !hasCachedValue || (store.lifetimes && identifier ? store.lifetimes.isHardExpired(identifier, store) : false);\n}\nfunction calcShouldBackgroundFetch(store, request, willFetch, identifier) {\n  const {\n    cacheOptions\n  } = request;\n  return cacheOptions?.backgroundReload || (store.lifetimes && identifier ? store.lifetimes.isSoftExpired(identifier, store) : false);\n}\nfunction isMutation(request) {\n  return Boolean(request.op && MUTATION_OPS$1.has(request.op));\n}\nfunction isCacheAffecting(document) {\n  if (!isMutation(document.request)) {\n    return true;\n  }\n  // a mutation combined with a 204 has no cache impact when no known records were involved\n  // a createRecord with a 201 with an empty response and no known records should similarly\n  // have no cache impact\n\n  if (document.request.op === 'createRecord' && document.response?.status === 201) {\n    return document.content ? Object.keys(document.content).length > 0 : false;\n  }\n  return document.response?.status !== 204;\n}\nfunction isAggregateError(error) {\n  return error instanceof AggregateError || error.name === 'AggregateError' && Array.isArray(error.errors);\n}\n// TODO @runspired, consider if we should deep freeze errors (potentially only in debug) vs cloning them\nfunction cloneError(error) {\n  const isAggregate = isAggregateError(error);\n  const cloned = isAggregate ? new AggregateError(structuredClone(error.errors), error.message) : new Error(error.message);\n  cloned.stack = error.stack;\n  cloned.error = error.error;\n\n  // copy over enumerable properties\n  Object.assign(cloned, error);\n  return cloned;\n}\nfunction getPriority(identifier, deduped, priority) {\n  if (identifier) {\n    const existing = deduped.get(identifier);\n    if (existing) {\n      return existing.priority;\n    }\n  }\n  return priority;\n}\n\n/**\n * A CacheHandler that adds support for using an WarpDrive Cache with a RequestManager.\n *\n * This handler will only run when a request has supplied a `store` instance. Requests\n * issued by the store via `store.request()` will automatically have the `store` instance\n * attached to the request.\n *\n * ```ts\n * requestManager.request({\n *   store: store,\n *   url: '/api/posts',\n *   method: 'GET'\n * });\n * ```\n *\n * When this handler elects to handle a request, it will return the raw `StructuredDocument`\n * unless the request has `[EnableHydration]` set to `true`. In this case, the handler will\n * return a `Document` instance that will automatically update the UI when the cache is updated\n * in the future and will hydrate any identifiers in the StructuredDocument into Record instances.\n *\n * When issuing a request via the store, [EnableHydration] is automatically set to `true`. This\n * means that if desired you can issue requests that utilize the cache without needing to also\n * utilize Record instances if desired.\n *\n * Said differently, you could elect to issue all requests via a RequestManager, without ever using\n * the store directly, by setting [EnableHydration] to `true` and providing a store instance. Not\n * necessarily the most useful thing, but the decoupled nature of the RequestManager and incremental-feature\n * approach of WarpDrive allows for this flexibility.\n *\n * ```ts\n * import { EnableHydration } from '@warp-drive/core/types/request';\n *\n * requestManager.request({\n *   store: store,\n *   url: '/api/posts',\n *   method: 'GET',\n *   [EnableHydration]: true\n * });\n *\n */\nconst CacheHandler = {\n  request(context, next) {\n    // if we have no cache or no cache-key skip cache handling\n    if (!context.request.store || context.request.cacheOptions?.[SkipCache]) {\n      return next(context.request);\n    }\n    const {\n      store\n    } = context.request;\n    const identifier = store.cacheKeyManager.getOrCreateDocumentIdentifier(context.request);\n    if (identifier) {\n      context.setIdentifier(identifier);\n    }\n\n    // used to dedupe existing requests that match\n    const DEDUPE = store.requestManager._deduped;\n    const activeRequest = identifier && DEDUPE.get(identifier);\n    const peeked = identifier ? store.cache.peekRequest(identifier) : null;\n\n    // determine if we should skip cache\n    if (calcShouldFetch(store, context.request, !!peeked, identifier)) {\n      if (activeRequest) {\n        activeRequest.priority = {\n          blocking: true\n        };\n        if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_REQUESTS)) {\n          if (getGlobalConfig().WarpDrive.debug.LOG_REQUESTS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REQUESTS) {\n            log('request', '', 'DEDUPED', identifier.lid, 'blocking', '');\n          }\n        }\n        return activeRequest.promise;\n      }\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_REQUESTS)) {\n        if (getGlobalConfig().WarpDrive.debug.LOG_REQUESTS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REQUESTS) {\n          log('request', '', 'ISSUED', identifier?.lid ?? context.request.url ?? context.request.op ?? '<unknown request>', 'blocking', '');\n        }\n      }\n      let promise = fetchContentAndHydrate(next, context, identifier, {\n        blocking: true\n      });\n      if (identifier) {\n        promise = promise.finally(() => {\n          DEDUPE.delete(identifier);\n          store.notifications.notify(identifier, 'state', null);\n        });\n        DEDUPE.set(identifier, {\n          priority: {\n            blocking: true\n          },\n          promise\n        });\n        queueMicrotask(() => {\n          store.notifications.notify(identifier, 'state', null);\n        });\n      }\n      store.requestManager._pending.set(context.id, promise);\n      return promise;\n    }\n\n    // if we have not skipped cache, determine if we should update behind the scenes\n    if (calcShouldBackgroundFetch(store, context.request, false, identifier)) {\n      let promise = activeRequest?.promise || fetchContentAndHydrate(next, context, identifier, {\n        blocking: false\n      });\n      if (identifier && !activeRequest) {\n        promise = promise.finally(() => {\n          DEDUPE.delete(identifier);\n          store.notifications.notify(identifier, 'state', null);\n        });\n        DEDUPE.set(identifier, {\n          priority: {\n            blocking: false\n          },\n          promise\n        });\n        queueMicrotask(() => {\n          store.notifications.notify(identifier, 'state', null);\n        });\n      }\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_REQUESTS)) {\n        if (getGlobalConfig().WarpDrive.debug.LOG_REQUESTS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REQUESTS) {\n          if (activeRequest && identifier) {\n            log('request', '', 'DEDUPED', identifier.lid, activeRequest.priority.blocking ? 'blocking' : 'non-blocking', '');\n          } else {\n            log('request', '', 'ISSUED', identifier?.lid ?? context.request.url ?? context.request.op ?? '<unknown request>', 'non-blocking', '');\n          }\n        }\n      }\n      store.requestManager._pending.set(context.id, promise);\n    }\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_REQUESTS)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_REQUESTS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REQUESTS) {\n        log('request', '', 'CACHE-HIT', identifier?.lid ?? context.request.url ?? context.request.op ?? '<unknown request>', 'cached', '');\n      }\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected a peeked request to be present`);\n      }\n    })(peeked) : {};\n    const shouldHydrate = context.request[EnableHydration] || false;\n    context.setResponse(peeked.response);\n    if ('error' in peeked) {\n      const content = shouldHydrate ? maybeUpdateUiObjects(store, context.request, {\n        shouldHydrate,\n        identifier\n      }, peeked.content) : peeked.content;\n      const newError = cloneError(peeked);\n      newError.content = content;\n      throw newError;\n    }\n    const result = shouldHydrate ? maybeUpdateUiObjects(store, context.request, {\n      shouldHydrate,\n      identifier\n    }, peeked.content) : peeked.content;\n    return result;\n  }\n};\nfunction maybeUpdateUiObjects(store, request, options, document) {\n  const {\n    identifier\n  } = options;\n  if (!document || !options.shouldHydrate) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`The CacheHandler expected response content but none was found`);\n      }\n    })(!options.shouldHydrate) : {};\n    return document ?? null;\n  }\n  if (identifier) {\n    return store._instanceCache.getDocument(identifier);\n  }\n\n  // if we don't have an identifier, we give the document\n  // its own local cache\n  return createReactiveDocument(store, null, {\n    request,\n    document\n  });\n}\nfunction updateCacheForSuccess(store, request, options, document) {\n  let response = null;\n  if (isMutation(request)) {\n    if (Array.isArray(request.records)) {\n      response = store.cache.didCommit(request.records, document);\n    } else if (request.data?.record) {\n      // legacy fallback, the data option should no longer be used for this\n      response = store.cache.didCommit(request.data.record, document);\n\n      // a mutation combined with a 204 has no cache impact when no known records were involved\n      // a createRecord with a 201 with an empty response and no known records should similarly\n      // have no cache impact\n    } else if (isCacheAffecting(document)) {\n      response = store.cache.put(document);\n    }\n  } else {\n    response = store.cache.put(document);\n  }\n  return maybeUpdateUiObjects(store, request, options, response);\n}\nfunction handleFetchSuccess(store, context, options, document) {\n  const {\n    request\n  } = context;\n  store.requestManager._pending.delete(context.id);\n  store._enableAsyncFlush = true;\n  let response;\n  store._join(() => {\n    response = updateCacheForSuccess(store, request, options, document);\n  });\n  store._enableAsyncFlush = null;\n  if (store.lifetimes?.didRequest) {\n    store.lifetimes.didRequest(context.request, document.response, options.identifier, store);\n  }\n  const finalPriority = getPriority(options.identifier, store.requestManager._deduped, options.priority);\n  if (finalPriority.blocking) {\n    return response;\n  } else {\n    store.notifications._flush();\n  }\n}\nfunction updateCacheForError(store, context, options, error) {\n  let response;\n  if (isMutation(context.request)) {\n    // TODO similar to didCommit we should spec this to be similar to cache.put for handling full response\n    // currently we let the response remain undefiend.\n    const errors = error && error.content && typeof error.content === 'object' && 'errors' in error.content && Array.isArray(error.content.errors) ? error.content.errors : undefined;\n    if (Array.isArray(context.request.records)) {\n      store.cache.commitWasRejected(context.request.records, errors);\n    } else if (context.request.data?.record) {\n      // legacy fallback, the data option should no longer be used for this\n      store.cache.commitWasRejected(context.request.data.record, errors);\n    } else {\n      store.cache.put(error);\n    }\n  } else {\n    response = store.cache.put(error);\n    return maybeUpdateUiObjects(store, context.request, options, response);\n  }\n}\nfunction handleFetchError(store, context, options, error) {\n  store.requestManager._pending.delete(context.id);\n  if (context.request.signal?.aborted) {\n    throw error;\n  }\n  store._enableAsyncFlush = true;\n  let response;\n  store._join(() => {\n    response = updateCacheForError(store, context, options, error);\n  });\n  store._enableAsyncFlush = null;\n  if (options.identifier && store.lifetimes?.didRequest) {\n    store.lifetimes.didRequest(context.request, error.response, options.identifier, store);\n  }\n  if (isMutation(context.request)) {\n    throw error;\n  }\n  const finalPriority = getPriority(options.identifier, store.requestManager._deduped, options.priority);\n  if (finalPriority.blocking) {\n    const newError = cloneError(error);\n    newError.content = response;\n    throw newError;\n  } else {\n    store.notifications._flush();\n  }\n}\nfunction fetchContentAndHydrate(next, context, identifier, priority) {\n  const {\n    store\n  } = context.request;\n  const shouldHydrate = context.request[EnableHydration] || false;\n  const options = {\n    shouldHydrate,\n    identifier,\n    priority\n  };\n  let isMut = false;\n  if (isMutation(context.request)) {\n    isMut = true;\n    if (Array.isArray(context.request.records)) {\n      context.request.records.forEach(record => {\n        store.cache.willCommit(record, context);\n      });\n    } else if (context.request.data?.record) {\n      // legacy fallback, the data option should no longer be used for this\n      store.cache.willCommit(context.request.data.record, context);\n    }\n  }\n  if (store.lifetimes?.willRequest) {\n    store.lifetimes.willRequest(context.request, identifier, store);\n  }\n  const promise = next(context.request).then(document => {\n    return handleFetchSuccess(store, context, options, document);\n  }, error => {\n    return handleFetchError(store, context, options, error);\n  });\n  if (!isMut) {\n    return promise;\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected a mutation`);\n    }\n  })(isMutation(context.request)) : {};\n\n  // for mutations we need to enqueue the promise with the requestStateService\n  // TODO should we enque a request per record in records?\n  const record = context.request.data?.record || context.request.records?.[0];\n  return store._requestCache._enqueue(promise, {\n    data: [{\n      op: 'saveRecord',\n      recordIdentifier: record,\n      options: undefined\n    }]\n  });\n}\nfunction isNonEmptyString(str) {\n  return Boolean(str && typeof str === 'string');\n}\nfunction constructResource(type, id, lid) {\n  if (typeof type === 'object' && type !== null) {\n    const resource = type;\n    if (isResourceKey(resource)) {\n      return resource;\n    }\n    if ('id' in resource) {\n      resource.id = coerceId(resource.id);\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error('Expected either id or lid to be a valid string');\n      }\n    })('id' in resource && isNonEmptyString(resource.id) || isNonEmptyString(resource.lid)) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error('if id is present, the type must be a string');\n      }\n    })(!('id' in resource) || typeof resource.type === 'string') : {};\n    return resource;\n  } else {\n    const trueId = coerceId(id);\n    if (!isNonEmptyString(trueId)) {\n      if (isNonEmptyString(lid)) {\n        return {\n          lid\n        };\n      }\n      throw new Error('Expected either id or lid to be a valid string');\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error('type must be a string');\n      }\n    })(typeof type === 'string') : {};\n    if (isNonEmptyString(lid)) {\n      return {\n        type,\n        id: trueId,\n        lid\n      };\n    }\n    return {\n      type,\n      id: trueId\n    };\n  }\n}\n\n/**\n * The options for {@link createLegacyManyArray}\n *\n * @private\n */\n/**\n * Creates a {@link LegacyManyArray}\n *\n * @private\n */\nfunction createLegacyManyArray(options) {\n  const extensions = options.store.schema.CAUTION_MEGA_DANGER_ZONE_arrayExtensions ? options.store.schema.CAUTION_MEGA_DANGER_ZONE_arrayExtensions(options.field) : null;\n  return createReactiveResourceArray({\n    store: options.store,\n    manager: options.manager,\n    editable: options.editable,\n    source: options.source,\n    data: {\n      links: options.links,\n      meta: options.meta\n    },\n    features: {\n      modelName: options.type,\n      save,\n      DEPRECATED_CLASS_NAME: 'ManyArray',\n      isLoaded: options.isLoaded,\n      isAsync: options.isAsync,\n      isPolymorphic: options.isPolymorphic,\n      identifier: options.identifier,\n      key: options.field.name,\n      reload,\n      createRecord,\n      notify\n    },\n    extensions,\n    options: null,\n    destroy: destroyLegacyManyArray,\n    mutate: _MUTATE\n  });\n}\nfunction _MUTATE(target, receiver, prop, args, _SIGNAL) {\n  const collection = receiver;\n  switch (prop) {\n    case 'length 0':\n      {\n        Reflect.set(target, 'length', 0);\n        mutateReplaceRelatedRecords(collection, [], _SIGNAL);\n        return true;\n      }\n    case 'replace cell':\n      {\n        const [index, prior, value] = args;\n        target[index] = value;\n        mutateReplaceRelatedRecord(collection, {\n          value,\n          prior,\n          index\n        }, _SIGNAL);\n        return true;\n      }\n    case 'push':\n      {\n        const newValues = extractIdentifiersFromRecords(args);\n        assertNoDuplicates(collection, target, currentState => currentState.push(...newValues), `Cannot push duplicates to a hasMany's state.`);\n        if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_MANY_ARRAY_DUPLICATES)) {\n          // dedupe\n          const seen = new Set(target);\n          const unique = new Set();\n          args.forEach(item => {\n            const identifier = recordIdentifierFor(item);\n            if (!seen.has(identifier)) {\n              seen.add(identifier);\n              unique.add(item);\n            }\n          });\n          const newArgs = Array.from(unique);\n          const result = Reflect.apply(target[prop], receiver, newArgs);\n          if (newArgs.length) {\n            mutateAddToRelatedRecords(collection, {\n              value: extractIdentifiersFromRecords(newArgs)\n            }, _SIGNAL);\n          }\n          return result;\n        }\n\n        // else, no dedupe, error on duplicates\n        const result = Reflect.apply(target[prop], receiver, args);\n        if (newValues.length) {\n          mutateAddToRelatedRecords(collection, {\n            value: newValues\n          }, _SIGNAL);\n        }\n        return result;\n      }\n    case 'pop':\n      {\n        const result = Reflect.apply(target[prop], receiver, args);\n        if (result) {\n          mutateRemoveFromRelatedRecords(collection, {\n            value: recordIdentifierFor(result)\n          }, _SIGNAL);\n        }\n        return result;\n      }\n    case 'unshift':\n      {\n        const newValues = extractIdentifiersFromRecords(args);\n        assertNoDuplicates(collection, target, currentState => currentState.unshift(...newValues), `Cannot unshift duplicates to a hasMany's state.`);\n        if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_MANY_ARRAY_DUPLICATES)) {\n          // dedupe\n          const seen = new Set(target);\n          const unique = new Set();\n          args.forEach(item => {\n            const identifier = recordIdentifierFor(item);\n            if (!seen.has(identifier)) {\n              seen.add(identifier);\n              unique.add(item);\n            }\n          });\n          const newArgs = Array.from(unique);\n          const result = Reflect.apply(target[prop], receiver, newArgs);\n          if (newArgs.length) {\n            mutateAddToRelatedRecords(collection, {\n              value: extractIdentifiersFromRecords(newArgs),\n              index: 0\n            }, _SIGNAL);\n          }\n          return result;\n        }\n\n        // else, no dedupe, error on duplicates\n        const result = Reflect.apply(target[prop], receiver, args);\n        if (newValues.length) {\n          mutateAddToRelatedRecords(collection, {\n            value: newValues,\n            index: 0\n          }, _SIGNAL);\n        }\n        return result;\n      }\n    case 'shift':\n      {\n        const result = Reflect.apply(target[prop], receiver, args);\n        if (result) {\n          mutateRemoveFromRelatedRecords(collection, {\n            value: recordIdentifierFor(result),\n            index: 0\n          }, _SIGNAL);\n        }\n        return result;\n      }\n    case 'sort':\n      {\n        const result = Reflect.apply(target[prop], receiver, args);\n        mutateSortRelatedRecords(collection, result.map(recordIdentifierFor), _SIGNAL);\n        return result;\n      }\n    case 'splice':\n      {\n        const [start, deleteCount, ...adds] = args;\n\n        // detect a full replace\n        if (start === 0 && deleteCount === collection[Context].source.length) {\n          const newValues = extractIdentifiersFromRecords(adds);\n          assertNoDuplicates(collection, target, currentState => currentState.splice(start, deleteCount, ...newValues), `Cannot replace a hasMany's state with a new state that contains duplicates.`);\n          if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_MANY_ARRAY_DUPLICATES)) {\n            // dedupe\n            const current = new Set(adds);\n            const unique = Array.from(current);\n            const newArgs = [start, deleteCount].concat(unique);\n            const result = Reflect.apply(target[prop], receiver, newArgs);\n            mutateReplaceRelatedRecords(collection, extractIdentifiersFromRecords(unique), _SIGNAL);\n            return result;\n          }\n\n          // else, no dedupe, error on duplicates\n          const result = Reflect.apply(target[prop], receiver, args);\n          mutateReplaceRelatedRecords(collection, newValues, _SIGNAL);\n          return result;\n        }\n        const newValues = extractIdentifiersFromRecords(adds);\n        assertNoDuplicates(collection, target, currentState => currentState.splice(start, deleteCount, ...newValues), `Cannot splice a hasMany's state with a new state that contains duplicates.`);\n        if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_MANY_ARRAY_DUPLICATES)) {\n          // dedupe\n          const currentState = target.slice();\n          currentState.splice(start, deleteCount);\n          const seen = new Set(currentState);\n          const unique = [];\n          adds.forEach(item => {\n            const identifier = recordIdentifierFor(item);\n            if (!seen.has(identifier)) {\n              seen.add(identifier);\n              unique.push(item);\n            }\n          });\n          const newArgs = [start, deleteCount, ...unique];\n          const result = Reflect.apply(target[prop], receiver, newArgs);\n          if (deleteCount > 0) {\n            mutateRemoveFromRelatedRecords(collection, {\n              value: result.map(recordIdentifierFor),\n              index: start\n            }, _SIGNAL);\n          }\n          if (unique.length > 0) {\n            mutateAddToRelatedRecords(collection, {\n              value: extractIdentifiersFromRecords(unique),\n              index: start\n            }, _SIGNAL);\n          }\n          return result;\n        }\n\n        // else, no dedupe, error on duplicates\n        const result = Reflect.apply(target[prop], receiver, args);\n        if (deleteCount > 0) {\n          mutateRemoveFromRelatedRecords(collection, {\n            value: result.map(recordIdentifierFor),\n            index: start\n          }, _SIGNAL);\n        }\n        if (newValues.length > 0) {\n          mutateAddToRelatedRecords(collection, {\n            value: newValues,\n            index: start\n          }, _SIGNAL);\n        }\n        return result;\n      }\n    default:\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        {\n          throw new Error(`unable to convert ${prop} into a transaction that updates the cache state for this record array`);\n        }\n      })() : {};\n  }\n}\nfunction notify() {\n  notifyInternalSignal(this[Context].signal);\n}\nfunction reload(options) {\n  const {\n    manager\n  } = this[Context];\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected the manager for ManyArray to implement reloadHasMany`);\n    }\n  })(typeof manager.reloadHasMany === 'function') : {};\n  // TODO this is odd, we don't ask the store for anything else like this?\n  return manager.reloadHasMany(this.key, options);\n}\nfunction createRecord(hash) {\n  const {\n    store\n  } = this[Context];\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected modelName to be set`);\n    }\n  })(this.modelName) : {};\n  const record = store.createRecord(this.modelName, hash);\n  this.push(record);\n  return record;\n}\nfunction destroyLegacyManyArray() {\n  destroy.call(this, false);\n}\nfunction assertRecordPassedToHasMany(record) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`All elements of a hasMany relationship must be instances of Model, you passed ${typeof record}`);\n    }\n  })(function () {\n    try {\n      recordIdentifierFor(record);\n      return true;\n    } catch {\n      return false;\n    }\n  }()) : {};\n}\nfunction extractIdentifiersFromRecords(records) {\n  return records.map(extractIdentifierFromRecord);\n}\nfunction extractIdentifierFromRecord(recordOrPromiseRecord) {\n  assertRecordPassedToHasMany(recordOrPromiseRecord);\n  return recordIdentifierFor(recordOrPromiseRecord);\n}\nfunction assertNoDuplicates(collection, target, callback, reason) {\n  const identifier = collection[Context].features.identifier;\n  const state = target.slice();\n  callback(state);\n  if (state.length !== new Set(state).size) {\n    const duplicates = state.filter((currentValue, currentIndex) => state.indexOf(currentValue) !== currentIndex);\n    if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_MANY_ARRAY_DUPLICATES)) {\n      deprecate(`${reason} This behavior is deprecated. Found duplicates for the following records within the new state provided to \\`<${identifier.type}:${identifier.id || identifier.lid}>.${collection.key}\\`\\n\\t- ${Array.from(new Set(duplicates)).map(r => isResourceKey(r) ? r.lid : recordIdentifierFor(r).lid).sort((a, b) => a.localeCompare(b)).join('\\n\\t- ')}`, false, {\n        id: 'ember-data:deprecate-many-array-duplicates',\n        for: 'ember-data',\n        until: '6.0',\n        since: {\n          enabled: '5.3',\n          available: '4.13'\n        }\n      });\n    } else {\n      throw new Error(`${reason} Found duplicates for the following records within the new state provided to \\`<${identifier.type}:${identifier.id || identifier.lid}>.${collection.key}\\`\\n\\t- ${Array.from(new Set(duplicates)).map(r => isResourceKey(r) ? r.lid : recordIdentifierFor(r).lid).sort((a, b) => a.localeCompare(b)).join('\\n\\t- ')}`);\n    }\n  }\n}\nfunction mutateAddToRelatedRecords(collection, operationInfo, _SIGNAL) {\n  const identifier = collection[Context].features.identifier;\n\n  // FIXME field needs to use sourceKey\n  mutate(collection, {\n    op: 'add',\n    record: identifier,\n    field: collection.key,\n    ...operationInfo\n  }, _SIGNAL);\n}\nfunction mutateRemoveFromRelatedRecords(collection, operationInfo, _SIGNAL) {\n  const identifier = collection[Context].features.identifier;\n\n  // FIXME field needs to use sourceKey\n  mutate(collection, {\n    op: 'remove',\n    record: identifier,\n    field: collection.key,\n    ...operationInfo\n  }, _SIGNAL);\n}\nfunction mutateReplaceRelatedRecord(collection, operationInfo, _SIGNAL) {\n  const identifier = collection[Context].features.identifier;\n\n  // FIXME field needs to use sourceKey\n  mutate(collection, {\n    op: 'replaceRelatedRecord',\n    record: identifier,\n    field: collection.key,\n    ...operationInfo\n  }, _SIGNAL);\n}\nfunction mutateReplaceRelatedRecords(collection, value, _SIGNAL) {\n  const identifier = collection[Context].features.identifier;\n\n  // FIXME field needs to use sourceKey\n  mutate(collection, {\n    op: 'replaceRelatedRecords',\n    record: identifier,\n    field: collection.key,\n    value\n  }, _SIGNAL);\n}\nfunction mutateSortRelatedRecords(collection, value, _SIGNAL) {\n  const identifier = collection[Context].features.identifier;\n\n  // FIXME field needs to use sourceKey\n  mutate(collection, {\n    op: 'sortRelatedRecords',\n    record: identifier,\n    field: collection.key,\n    value\n  }, _SIGNAL);\n}\nfunction mutate(collection, mutation, _SIGNAL) {\n  const {\n    manager\n  } = collection[Context];\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected the manager for ManyArray to implement mutate`);\n    }\n  })(typeof manager.mutate === 'function') : {};\n  manager.mutate(mutation);\n  notifyInternalSignal(_SIGNAL);\n}\nfunction getAliasField(context) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    {\n      throw new Error(`Alias field access is not implemented`);\n    }\n  })() : {};\n}\nfunction setAliasField(context) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    {\n      throw new Error(`Alias field setting is not implemented`);\n    }\n  })() : {};\n  return false;\n}\nconst ARRAY_GETTER_METHODS = new Set([Symbol.iterator, 'concat', 'entries', 'every', 'fill', 'filter', 'find', 'findIndex', 'flat', 'flatMap', 'forEach', 'includes', 'indexOf', 'join', 'keys', 'lastIndexOf', 'map', 'reduce', 'reduceRight', 'slice', 'some', 'values']);\n// const ARRAY_SETTER_METHODS = new Set<KeyType>(['push', 'pop', 'unshift', 'shift', 'splice', 'sort']);\nconst SYNC_PROPS = new Set(['[]', 'length']);\nfunction isArrayGetter(prop) {\n  return ARRAY_GETTER_METHODS.has(prop);\n}\nconst ARRAY_SETTER_METHODS = new Set(['push', 'pop', 'unshift', 'shift', 'splice', 'sort']);\nfunction isArraySetter(prop) {\n  return ARRAY_SETTER_METHODS.has(prop);\n}\n\n// function isSelfProp<T extends object>(self: T, prop: KeyType): prop is keyof T {\n//   return prop in self;\n// }\n\nfunction convertToInt(prop) {\n  if (typeof prop === 'symbol') return null;\n  const num = Number(prop);\n  if (isNaN(num)) return null;\n  return num % 1 === 0 ? num : null;\n}\nfunction safeForEach(instance, arr, store, callback, target) {\n  if (target === undefined) {\n    target = null;\n  }\n  // clone to prevent mutation\n  arr = arr.slice();\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error('`forEach` expects a function as first argument.');\n    }\n  })(typeof callback === 'function') : {};\n\n  // because we retrieveLatest above we need not worry if array is mutated during iteration\n  // by unloadRecord/rollbackAttributes\n  // push/add/removeObject may still be problematic\n  // but this is a more traditionally expected forEach bug.\n  const length = arr.length; // we need to access length to ensure we are consumed\n\n  for (let index = 0; index < length; index++) {\n    callback.call(target, arr[index], index, instance);\n  }\n  return instance;\n}\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nclass ManagedArray {\n  constructor(context, owner, data) {\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    const self = this;\n    this[SOURCE] = data?.slice();\n    const IS_EDITABLE = context.editable ?? false;\n    this[Context] = context;\n    const schema = context.store.schema;\n    const cache = context.store.cache;\n    const {\n      field\n    } = context;\n    const signals = withSignalStore(this);\n    let _SIGNAL = null;\n    const boundFns = new Map();\n    this.identifier = context.resourceKey;\n    this.path = context.path;\n    this.owner = owner;\n    let transaction = false;\n    const KeyMode = field.options?.key ?? '@identity';\n    // listener.\n    const RefStorage = KeyMode === '@identity' ? WeakMap :\n    // CAUTION CAUTION CAUTION\n    // this is a pile of lies\n    // the Map is Map<string, WeakRef<ReactiveResource>>\n    // but TS does not understand how to juggle modes like this\n    // internal to a method like ours without us duplicating the code\n    // into two separate methods.\n    Map;\n    const ManagedRecordRefs = field.kind === 'schema-array' ? new RefStorage() : null;\n    const extensions = context.legacy ? schema.CAUTION_MEGA_DANGER_ZONE_arrayExtensions(field) : null;\n    const proxy = new Proxy(this[SOURCE], {\n      get(target, prop, receiver) {\n        if (prop === ARRAY_SIGNAL) {\n          return _SIGNAL;\n        }\n        if (prop === 'identifier') {\n          return self.identifier;\n        }\n        if (prop === 'owner') {\n          return self.owner;\n        }\n        if (prop === Context) {\n          return self[Context];\n        }\n        const index = convertToInt(prop);\n        if (_SIGNAL.isStale && (index !== null || SYNC_PROPS.has(prop) || isArrayGetter(prop))) {\n          _SIGNAL.isStale = false;\n          const newData = cache.getAttr(context.resourceKey, context.path);\n          if (newData && newData !== self[SOURCE]) {\n            self[SOURCE].length = 0;\n            self[SOURCE].push(...newData);\n          }\n        }\n        if (prop === 'length') {\n          return consumeInternalSignal(_SIGNAL), target.length;\n        }\n        if (prop === '[]') return consumeInternalSignal(_SIGNAL), receiver;\n        if (index !== null) {\n          if (!transaction) {\n            consumeInternalSignal(_SIGNAL);\n          }\n          const rawValue = target[index];\n          if (field.kind === 'array') {\n            if (field.type) {\n              const transform = schema.transformation(field);\n              return transform.hydrate(rawValue, field.options ?? null, self.owner);\n            }\n            return rawValue;\n          }\n\n          /**\n           * When the array is polymorphic, we need to determine the real type\n           * in order to apply the correct identity as schema-object identity\n           * is only required to be unique by type\n           */\n          let objectType;\n          if (field.options?.polymorphic) {\n            const typePath = field.options.type ?? 'type';\n            // if we are polymorphic, then context.field.options.type will\n            // either specify a path on the rawValue to use as the type, defaulting to \"type\" or\n            // the special string \"@hash\" which tells us to treat field.type as a hashFn name with which\n            // to calc the type.\n            if (typePath === '@hash') {\n              macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n                if (!test) {\n                  throw new Error(`Expected the field to define a hashFn as its type`);\n                }\n              })(field.type) : {};\n              const hashFn = schema.hashFn({\n                type: field.type\n              });\n              // TODO consider if there are better options and name args we could provide.\n              objectType = hashFn(rawValue, null, null);\n            } else {\n              objectType = rawValue[typePath];\n              macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n                if (!test) {\n                  throw new Error(`Expected the type path for the field to be a value on the raw object`);\n                }\n              })(typePath && objectType && typeof objectType === 'string') : {};\n            }\n          } else {\n            macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n              if (!test) {\n                throw new Error(`A non-polymorphic SchemaArrayField must provide a SchemaObject type in its definition`);\n              }\n            })(field.type) : {};\n            objectType = field.type;\n          }\n\n          /**\n           * When KeyMode=@hash the ReactiveResource is keyed into\n           * ManagedRecordRefs by the return value of @hash on the rawValue.\n           *\n           * This means that we could find a way to only recompute the identity\n           * when ARRAY_SIGNAL is dirty if hash performance becomes a bottleneck.\n           */\n          let schemaObjectKeyValue;\n          if (KeyMode === '@hash') {\n            const hashField = schema.resource({\n              type: objectType\n            }).identity;\n            const hashFn = schema.hashFn(hashField);\n            schemaObjectKeyValue = hashFn(rawValue, hashField.options ?? null, hashField.name);\n          } else {\n            // if mode is not @identity or @index, then access the key path.\n            // we should assert that `mode` is a string\n            // it should read directly from the cache value for that field (e.g. no derivation, no transformation)\n            // and, we likely should lookup the associated field and throw an error IF\n            // the given field does not exist OR\n            // the field is anything other than a GenericField or LegacyAttributeField.\n            if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n              const isPathKeyMode = KeyMode !== '@identity' && KeyMode !== '@index';\n              if (isPathKeyMode) {\n                macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n                  if (!test) {\n                    throw new Error('mode must be a string');\n                  }\n                })(typeof KeyMode === 'string' && KeyMode !== '') : {};\n                const modeField = schema.fields({\n                  type: objectType\n                }).get(KeyMode);\n                macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n                  if (!test) {\n                    throw new Error('field must exist in schema');\n                  }\n                })(modeField) : {};\n                macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n                  if (!test) {\n                    throw new Error('field must be a GenericField or LegacyAttributeField');\n                  }\n                })(modeField.kind === 'field' || modeField.kind === 'attribute') : {};\n              }\n            }\n            schemaObjectKeyValue = KeyMode === '@identity' ? rawValue : KeyMode === '@index' ? index : rawValue[KeyMode];\n          }\n          if (!schemaObjectKeyValue && schemaObjectKeyValue !== 0) {\n            macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n              {\n                throw new Error(`Unexpected out of bounds access on SchemaArray`);\n              }\n            })() : {};\n            return undefined;\n          }\n          const recordRef = ManagedRecordRefs.get(schemaObjectKeyValue);\n          const record = recordRef?.value.deref();\n\n          // confirm the type and key still match\n          if (record && recordRef.type === objectType && recordRef.identity === schemaObjectKeyValue) {\n            if (recordRef.index !== index) {\n              recordRef.index = index;\n              recordRef.context.path[recordRef.context.path.length - 1] = index;\n            }\n            return record;\n          } else if (record) {\n            // TODO schedule idle once we can\n            void Promise.resolve().then(() => {\n              record[Destroy]();\n            });\n          }\n          const recordPath = context.path.slice();\n          // this is a dirty lie since path is string[] but really we\n          // should change the types for paths to `Array<string | number>`\n          recordPath.push(index);\n          const objectContext = {\n            store: context.store,\n            resourceKey: context.resourceKey,\n            modeName: context.modeName,\n            legacy: context.legacy,\n            editable: context.editable,\n            path: recordPath,\n            field: field,\n            value: objectType\n          };\n          const schemaObject = new ReactiveResource(objectContext);\n          ManagedRecordRefs.set(schemaObjectKeyValue, {\n            type: objectType,\n            identity: schemaObjectKeyValue,\n            index,\n            context: objectContext,\n            value: new WeakRef(schemaObject)\n          });\n          return schemaObject;\n        }\n        if (isArrayGetter(prop)) {\n          let fn = boundFns.get(prop);\n          if (fn === undefined) {\n            if (prop === 'forEach') {\n              fn = function () {\n                consumeInternalSignal(_SIGNAL);\n                transaction = true;\n                const result = safeForEach(receiver, target, context.store, arguments[0], arguments[1]);\n                transaction = false;\n                return result;\n              };\n            } else {\n              fn = function () {\n                consumeInternalSignal(_SIGNAL);\n                // array functions must run through Reflect to work properly\n                // binding via other means will not work.\n                transaction = true;\n                const result = Reflect.apply(target[prop], receiver, arguments);\n                transaction = false;\n                return result;\n              };\n            }\n            boundFns.set(prop, fn);\n          }\n          return fn;\n        }\n        if (isArraySetter(prop)) {\n          let fn = boundFns.get(prop);\n          if (fn === undefined) {\n            fn = function () {\n              if (!IS_EDITABLE) {\n                throw new Error(`Mutating this array via ${String(prop)} is not allowed because the ReactiveResource is not editable`);\n              }\n              consumeInternalSignal(_SIGNAL);\n              transaction = true;\n              const result = Reflect.apply(target[prop], receiver, arguments);\n              transaction = false;\n              return result;\n            };\n            boundFns.set(prop, fn);\n          }\n          return fn;\n        }\n        if (isExtensionProp(extensions, prop)) {\n          return performArrayExtensionGet(receiver, extensions, signals, prop, _SIGNAL, boundFns, v => void (transaction = v));\n        }\n        return Reflect.get(target, prop, receiver);\n      },\n      set(target, prop, value, receiver) {\n        if (!IS_EDITABLE) {\n          let errorPath = context.resourceKey.type;\n          if (context.path) {\n            errorPath = context.path[context.path.length - 1];\n          }\n          macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n            {\n              throw new Error(`Cannot set ${String(prop)} on ${errorPath} because the ReactiveResource is not editable`);\n            }\n          })() : {};\n          return false;\n        }\n        if (prop === 'identifier') {\n          self.identifier = value;\n          return true;\n        }\n        if (prop === 'owner') {\n          self.owner = value;\n          return true;\n        }\n        if (isExtensionProp(extensions, prop)) {\n          return performExtensionSet(receiver, extensions, signals, prop, value);\n        }\n        const reflect = Reflect.set(target, prop, value, receiver);\n        if (reflect) {\n          if (!field.type) {\n            cache.setAttr(context.resourceKey, context.path, self[SOURCE]);\n            _SIGNAL.isStale = true;\n            return true;\n          }\n          let rawValue = self[SOURCE];\n          if (field.kind !== 'schema-array') {\n            const transform = schema.transformation(field);\n            if (!transform) {\n              throw new Error(`No '${field.type}' transform defined for use by ${context.resourceKey.type}.${String(prop)}`);\n            }\n            rawValue = self[SOURCE].map(item => transform.serialize(item, field.options ?? null, self.owner));\n          }\n          cache.setAttr(context.resourceKey, context.path, rawValue);\n          _SIGNAL.isStale = true;\n        }\n        return reflect;\n      },\n      has(target, prop) {\n        if (prop === 'identifier' || prop === 'owner' || prop === ARRAY_SIGNAL) {\n          return true;\n        }\n        return Reflect.has(target, prop);\n      }\n    });\n\n    // we entangle the signal on the returned proxy since that is\n    // the object that other code will be interfacing with.\n    _SIGNAL = entangleSignal(signals, proxy, ARRAY_SIGNAL, undefined);\n    return proxy;\n  }\n}\n\n// this will error if someone tries to call\n// A(identifierArray) since it is not configurable\n// which is preferable to the `meta` override we used\n// before which required importing all of Ember\nconst desc = {\n  enumerable: true,\n  configurable: false,\n  get: function () {\n    // here to support computed chains\n    // and {{#each}}\n    if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_COMPUTED_CHAINS)) {\n      return this;\n    }\n  }\n};\n// compat(desc);\nObject.defineProperty(ManagedArray.prototype, '[]', desc);\nfunction getArrayField(context) {\n  const signal = entangleSignal(context.signals, context.record, context.path.at(-1), null);\n  // the thing we hand out needs to know its owner and path in a private manner\n  // its \"address\" is the parent identifier (identifier) + field name (field.name)\n  //  in the nested object case field name here is the full dot path from root resource to this value\n  // its \"key\" is the field on the parent record\n  // its \"owner\" is the parent record\n  const {\n    record\n  } = context;\n  let managedArray = signal.value;\n  if (managedArray) {\n    // if the signal is stale, we need to check the rawValue has not become\n    // `null`.\n    if (signal.isStale) {\n      const {\n        store,\n        resourceKey,\n        path,\n        field\n      } = context;\n      const {\n        cache\n      } = store;\n      const rawValue = cache.getAttr(resourceKey, path);\n      // if the rawValue is null or the rawValue is undefined and the field has no defaultValue\n      // we need to reset the managedArray to null\n      if (rawValue === null || !rawValue && typeof rawValue === 'undefined' && !field.options?.defaultValue) {\n        signal.value = null;\n        // TODO once we fix schema-object GC we should run Destroy here on the managed array\n        return null;\n      }\n    }\n    return managedArray;\n  } else {\n    const {\n      store,\n      resourceKey,\n      path,\n      field\n    } = context;\n    const {\n      cache\n    } = store;\n    let rawValue = context.editable ? cache.getAttr(resourceKey, path) : cache.getRemoteAttr(resourceKey, path);\n\n    // we only apply the defaultValue if the rawValue is undefined, this allows\n    // use of explicit null for the field.\n    if (!rawValue && typeof rawValue === 'undefined' && field.options?.defaultValue) {\n      rawValue = [];\n    }\n    if (!rawValue) {\n      return null;\n    }\n    managedArray = new ManagedArray(context, record, rawValue);\n    signal.value = managedArray;\n  }\n  return managedArray;\n}\nfunction setArrayField(context) {\n  const {\n    field,\n    record,\n    value\n  } = context;\n  const {\n    cache,\n    schema\n  } = context.store;\n  const fieldSignal = peekInternalSignal(context.signals, context.path.at(-1));\n  const peeked = fieldSignal?.value;\n  const transform = field.type ? schema.transformation(field) : null;\n  // prettier-ignore\n  const rawValue = value === null ? null : field.type ? value.map(item => transform.serialize(item, field.options ?? null, record)) : value?.slice();\n  cache.setAttr(context.resourceKey, context.path, rawValue);\n  if (peeked) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected the peekManagedArray for ${field.kind} to return a ManagedArray`);\n      }\n    })(ARRAY_SIGNAL in peeked) : {};\n    const arrSignal = peeked[ARRAY_SIGNAL];\n    arrSignal.isStale = true;\n    // TODO run array destroy?\n  }\n  if (!Array.isArray(rawValue) && fieldSignal) {\n    fieldSignal.value = null;\n  }\n  return true;\n}\nfunction getAttributeField(context) {\n  entangleInitiallyStaleSignal(context.signals, context.record, context.path.at(-1), null);\n  const {\n    cache\n  } = context.store;\n  return context.editable ? cache.getAttr(context.resourceKey, context.path) : cache.getRemoteAttr(context.resourceKey, context.path);\n}\nfunction setAttributeField(context) {\n  context.store.cache.setAttr(context.resourceKey, context.path, context.value);\n  return true;\n}\nconst InvalidKinds = ['alias', 'derived', '@local'];\nfunction isInvalidKind(kind) {\n  return InvalidKinds.includes(kind);\n}\nfunction isNonIdentityCacheableField(field) {\n  return !isInvalidKind(field.kind) && field.kind !== '@id' && field.kind !== '@hash';\n}\nfunction getFieldCacheKeyStrict(field) {\n  return field.sourceKey || field.name;\n}\nfunction getFieldCacheKey(field) {\n  return 'sourceKey' in field && field.sourceKey ? field.sourceKey : field.name;\n}\nfunction getBelongsToField(context) {\n  entangleSignal(context.signals, context.record, context.path.at(-1), null);\n  const {\n    field,\n    resourceKey,\n    store\n  } = context;\n  const {\n    schema,\n    cache\n  } = store;\n  if (field.options.linksMode) {\n    const rawValue = context.editable ? cache.getRelationship(resourceKey, getFieldCacheKeyStrict(field)) : cache.getRemoteRelationship(resourceKey, getFieldCacheKeyStrict(field));\n    return rawValue.data ? store.peekRecord(rawValue.data) : null;\n  }\n\n  // FIXME move this to a \"LegacyMode\" make this part of \"PolarisMode\"\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Can only use belongsTo fields when the resource is in legacy mode`);\n    }\n  })(context.legacy) : {};\n  return schema._kind('@legacy', 'belongsTo').get(store, context.record, resourceKey, field);\n}\nfunction setBelongsToField(context) {\n  const {\n    store\n  } = context;\n  const {\n    schema\n  } = store;\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Can only mutate belongsTo fields when the resource is in legacy mode`);\n    }\n  })(context.legacy) : {};\n  schema._kind('@legacy', 'belongsTo').set(store, context.record, context.resourceKey, context.field, context.value);\n  return true;\n}\nfunction getCollectionField(context) {\n  entangleSignal(context.signals, context.record, context.path.at(-1), null);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    {\n      throw new Error(`Accessing collection fields is not yet implemented`);\n    }\n  })() : {};\n}\nfunction setCollectionField(context) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    {\n      throw new Error(`Setting collection fields is not yet implemented`);\n    }\n  })() : {};\n  return false;\n}\nfunction getDerivedField(context) {\n  const {\n    schema\n  } = context.store;\n  return schema.derivation(context.field)(context.record, context.field.options ?? null, context.field.name);\n}\nfunction setDerivedField(context) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    {\n      throw new Error(`ILLEGAL SET: Cannot set '${context.path.join('.')}' on '${context.resourceKey.type}' as ${context.field.kind} fields are not mutable`);\n    }\n  })() : {};\n  return false;\n}\nfunction getGenericField(context) {\n  const signal = entangleInitiallyStaleSignal(context.signals, context.record, context.path.at(-1), null);\n  // FIXME we should be able to cache the computation here, but some tests fail.\n  // if (!signal.isStale) {\n  //   return signal.value;\n  // }\n  signal.isStale = false;\n  const {\n    cache,\n    schema\n  } = context.store;\n  const rawValue = context.editable ? cache.getAttr(context.resourceKey, context.path) : cache.getRemoteAttr(context.resourceKey, context.path);\n  const {\n    field\n  } = context;\n  if (!field.type) {\n    // signal.value = rawValue;\n    return rawValue;\n  }\n  const transform = schema.transformation(field);\n  // signal.value = transform.hydrate(rawValue, field.options ?? null, context.record);\n  // return signal.value;\n  return transform.hydrate(rawValue, field.options ?? null, context.record);\n}\nfunction setGenericField(context) {\n  const {\n    cache,\n    schema\n  } = context.store;\n  const {\n    field\n  } = context;\n  if (!field.type) {\n    cache.setAttr(context.resourceKey, context.path, context.value);\n    return true;\n  }\n  const transform = schema.transformation(field);\n  const rawValue = transform.serialize(context.value, field.options ?? null, context.record);\n  cache.setAttr(context.resourceKey, context.path, rawValue);\n  return true;\n}\nclass ManyArrayManager {\n  constructor(record, editable) {\n    const context = record[Context];\n    this.record = record;\n    this.store = context.store;\n    this.identifier = context.resourceKey;\n    this.editable = editable;\n  }\n  _syncArray(array) {\n    const method = this.editable ? 'getRelationship' : 'getRemoteRelationship';\n    // FIXME field needs to use sourceKey\n    const rawValue = this.store.cache[method](this.identifier, array.key);\n    if (rawValue.meta) {\n      array.meta = rawValue.meta;\n    }\n    if (rawValue.links) {\n      array.links = rawValue.links;\n    }\n    const currentState = array[Context].source;\n\n    // unlike in the normal RecordArray case, we don't need to divorce the reference\n    // because we don't need to worry about associate/disassociate since the graph\n    // takes care of that for us\n    if (currentState !== rawValue.data) {\n      currentState.length = 0;\n      fastPush(currentState, rawValue.data);\n    }\n  }\n  reloadHasMany(key, options) {\n    // FIXME field needs to use sourceKey\n    const field = this.store.schema.fields(this.identifier).get(key);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected a hasMany field for ${key}`);\n      }\n    })(field?.kind === 'hasMany') : {};\n    const cacheOptions = options ? extractCacheOptions(options) : {\n      reload: true\n    };\n    cacheOptions.types = [field.type];\n    const rawValue = this.store.cache.getRelationship(this.identifier, key);\n    const req = {\n      url: getRelatedLink(rawValue),\n      op: 'findHasMany',\n      method: 'GET',\n      records: rawValue.data,\n      cacheOptions,\n      options: {\n        field,\n        identifier: this.identifier,\n        links: rawValue.links,\n        meta: rawValue.meta\n      },\n      [EnableHydration]: false\n    };\n    return this.store.request(req);\n  }\n  mutate(mutation) {\n    this.store.cache.mutate(mutation);\n  }\n}\nfunction getRelatedLink(resource) {\n  const related = resource.links?.related;\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected a related link`);\n    }\n  })(related) : {};\n  return typeof related === 'object' ? related.href : related;\n}\nfunction extractCacheOptions(options) {\n  const cacheOptions = {};\n  if ('reload' in options) {\n    cacheOptions.reload = options.reload;\n  }\n  if ('backgroundReload' in options) {\n    cacheOptions.backgroundReload = options.backgroundReload;\n  }\n  return cacheOptions;\n}\nfunction getHasManyField(context) {\n  const signal = entangleSignal(context.signals, context.record, context.path.at(-1), null);\n  const {\n    store,\n    field\n  } = context;\n  if (field.options.linksMode) {\n    const {\n      record\n    } = context;\n    // the thing we hand out needs to know its owner and path in a private manner\n    // its \"address\" is the parent identifier (identifier) + field name (field.name)\n    //  in the nested object case field name here is the full dot path from root resource to this value\n    // its \"key\" is the field on the parent record\n    // its \"owner\" is the parent record\n\n    const cached = signal.value;\n    if (cached) {\n      return cached;\n    }\n    const {\n      editable,\n      resourceKey\n    } = context;\n    const {\n      cache\n    } = store;\n    const rawValue = cache.getRelationship(resourceKey, getFieldCacheKeyStrict(field));\n    if (!rawValue) {\n      return null;\n    }\n    const managedArray = createLegacyManyArray({\n      store,\n      manager: new ManyArrayManager(record, editable),\n      source: rawValue.data?.slice() ?? [],\n      type: field.type,\n      isLoaded: true,\n      editable,\n      isAsync: field.options.async ?? false,\n      isPolymorphic: field.options.polymorphic ?? false,\n      field,\n      identifier: resourceKey,\n      links: rawValue.links || null,\n      meta: rawValue.meta || null\n    });\n    signal.value = managedArray;\n    return managedArray;\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Can only use hasMany fields when the resource is in legacy mode`);\n    }\n  })(context.legacy) : {};\n  return store.schema._kind('@legacy', 'hasMany').get(store, context.record, context.resourceKey, field);\n}\nfunction setHasManyField(context) {\n  const {\n    store\n  } = context;\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Can only use hasMany fields when the resource is in legacy mode`);\n    }\n  })(context.legacy) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You must pass an array of records to set a hasMany relationship`);\n    }\n  })(Array.isArray(context.value)) : {};\n  store.schema._kind('@legacy', 'hasMany').set(store, context.record, context.resourceKey, context.field, context.value);\n  return true;\n}\nfunction getHashField(context) {\n  const {\n    field,\n    path,\n    resourceKey\n  } = context;\n  const {\n    schema,\n    cache\n  } = context.store;\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Cannot use a ${field.kind} directly on a resource.`);\n    }\n  })(Array.isArray(path) && path.length > 1) : {};\n  const realPath = path.slice(0, -1);\n  const rawData = context.editable ? cache.getAttr(resourceKey, realPath) : cache.getRemoteAttr(resourceKey, realPath);\n  return schema.hashFn(field)(rawData, field.options ?? null, field.name ?? null);\n}\nfunction setHashField(context) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    {\n      throw new Error(`ILLEGAL SET: Cannot set '${Array.isArray(context.path) ? context.path.join('.') : context.path}' on '${context.resourceKey.type}' as ${context.field.kind} fields are not mutable`);\n    }\n  })() : {};\n  return false;\n}\nfunction getIdentityField(context) {\n  entangleSignal(context.signals, context.record, '@identity', null);\n  return context.resourceKey.id;\n}\nfunction setIdentityField(context) {\n  const {\n    value,\n    resourceKey,\n    store\n  } = context;\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected to receive a string id`);\n    }\n  })(typeof value === 'string' && value.length) : {};\n  const normalizedId = String(value);\n  const didChange = normalizedId !== resourceKey.id;\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Cannot set ${resourceKey.type} record's id to ${normalizedId}, because id is already ${resourceKey.id}`);\n    }\n  })(!didChange || resourceKey.id === null) : {};\n  if (normalizedId !== null && didChange) {\n    store._instanceCache.setRecordId(resourceKey, normalizedId);\n    store.notifications.notify(resourceKey, 'identity', null);\n  }\n  return true;\n}\nfunction getLocalField(context) {\n  const {\n    field\n  } = context;\n  const signal = getOrCreateInternalSignal(context.signals, context.record, field.name, field.options?.defaultValue ?? null);\n  consumeInternalSignal(signal);\n  return signal.value;\n}\nfunction setLocalField(context) {\n  const {\n    value\n  } = context;\n  const signal = getOrCreateInternalSignal(context.signals, context.record, context.field.name, value);\n  if (signal.value !== value) {\n    signal.value = value;\n    notifyInternalSignal(signal);\n  }\n  return true;\n}\nconst ObjectSymbols = new Set([OBJECT_SIGNAL, Context, SOURCE]);\n\n// const ignoredGlobalFields = new Set<string>(['setInterval', 'nodeType', 'nodeName', 'length', 'document', STRUCTURED]);\n\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nclass ManagedObject {\n  constructor(context) {\n    const {\n      field,\n      path\n    } = context;\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    const self = this;\n    this[SOURCE] = Object.assign({}, context.value);\n    const signals = withSignalStore(this);\n    const _SIGNAL = this[OBJECT_SIGNAL] = entangleSignal(signals, this, OBJECT_SIGNAL, undefined);\n    this[Context] = context;\n    const identifier = context.resourceKey;\n    const {\n      cache,\n      schema\n    } = context.store;\n\n    // prettier-ignore\n    const extensions = !context.legacy ? null : schema.CAUTION_MEGA_DANGER_ZONE_objectExtensions(field, null);\n    const proxy = new Proxy(this[SOURCE], {\n      ownKeys() {\n        return Object.keys(self[SOURCE]);\n      },\n      has(target, prop) {\n        return prop in self[SOURCE];\n      },\n      getOwnPropertyDescriptor(target, prop) {\n        return {\n          writable: context.editable,\n          enumerable: true,\n          configurable: true\n        };\n      },\n      get(target, prop, receiver) {\n        if (ObjectSymbols.has(prop)) {\n          return self[prop];\n        }\n        if (prop === Symbol.toPrimitive) {\n          return () => null;\n        }\n        if (prop === Symbol.toStringTag) {\n          return `ManagedObject<${identifier.type}:${identifier.id} (${identifier.lid})>`;\n        }\n        if (prop === 'constructor') {\n          return Object;\n        }\n        if (prop === 'toString') {\n          return function () {\n            return `ManagedObject<${identifier.type}:${identifier.id} (${identifier.lid})>`;\n          };\n        }\n        if (prop === 'toHTML') {\n          return function () {\n            return '<span>ManagedObject</span>';\n          };\n        }\n        if (_SIGNAL.isStale) {\n          _SIGNAL.isStale = false;\n          let newData = cache.getAttr(identifier, path);\n          if (newData && newData !== self[SOURCE]) {\n            if (field.type) {\n              const transform = schema.transformation(field);\n              newData = transform.hydrate(newData, field.options ?? null, context.record);\n            }\n            self[SOURCE] = Object.assign({}, newData); // Add type assertion for newData\n          }\n        }\n\n        // toJSON and extensions need to come after we update data if stale\n        if (prop === 'toJSON') {\n          return function () {\n            return structuredClone(self[SOURCE]);\n          };\n        }\n\n        // we always defer to data before extensions\n        if (prop in self[SOURCE]) {\n          consumeInternalSignal(_SIGNAL);\n          return self[SOURCE][prop];\n        }\n        if (isExtensionProp(extensions, prop)) {\n          return performObjectExtensionGet(receiver, extensions, signals, prop);\n        }\n        return Reflect.get(target, prop, receiver);\n      },\n      set(target, prop, value, receiver) {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Cannot set read-only property '${String(prop)}' on ManagedObject`);\n          }\n        })(context.editable) : {};\n\n        // since objects function as dictionaries, we can't defer to schema/data before extensions\n        // unless the prop is in the existing data.\n        if (!(prop in self[SOURCE]) && isExtensionProp(extensions, prop)) {\n          return performExtensionSet(receiver, extensions, signals, prop, value);\n        }\n        const reflect = Reflect.set(target, prop, value, receiver);\n        if (!reflect) {\n          return false;\n        }\n        if (!field.type) {\n          cache.setAttr(identifier, path, self[SOURCE]);\n        } else {\n          const transform = schema.transformation(field);\n          const val = transform.serialize(self[SOURCE], field.options ?? null, context.record);\n          cache.setAttr(identifier, path, val);\n        }\n        _SIGNAL.isStale = true;\n        return true;\n      }\n    });\n    return proxy;\n  }\n}\nconst ManagedObjectMap = getOrSetGlobal('ManagedObjectMap', new Map());\nfunction peekManagedObject(record, field) {\n  const managedObjectMapForRecord = ManagedObjectMap.get(record);\n  if (managedObjectMapForRecord) {\n    return managedObjectMapForRecord.get(field.name);\n  }\n}\nfunction getObjectField(context) {\n  entangleSignal(context.signals, context.record, context.path.at(-1), null);\n  const {\n    record,\n    field\n  } = context;\n  const managedObjectMapForRecord = ManagedObjectMap.get(record);\n  let managedObject;\n  if (managedObjectMapForRecord) {\n    managedObject = managedObjectMapForRecord.get(field.name);\n  }\n  if (managedObject) {\n    return managedObject;\n  } else {\n    const {\n      store,\n      resourceKey,\n      path\n    } = context;\n    const {\n      cache,\n      schema\n    } = store;\n    let rawValue = context.editable ? cache.getAttr(resourceKey, path) : cache.getRemoteAttr(resourceKey, path);\n    if (!rawValue) {\n      return null;\n    }\n    if (field.type) {\n      const transform = schema.transformation(field);\n      rawValue = transform.hydrate(rawValue, field.options ?? null, record);\n    }\n    managedObject = new ManagedObject({\n      store,\n      resourceKey,\n      modeName: context.modeName,\n      legacy: context.legacy,\n      editable: context.editable,\n      path,\n      field,\n      record,\n      signals: context.signals,\n      value: rawValue\n    });\n    if (!managedObjectMapForRecord) {\n      ManagedObjectMap.set(record, new Map([[field.name, managedObject]]));\n    } else {\n      managedObjectMapForRecord.set(field.name, managedObject);\n    }\n  }\n  return managedObject;\n}\nfunction setObjectField(context) {\n  const {\n    field,\n    value,\n    record\n  } = context;\n  const {\n    cache,\n    schema\n  } = context.store;\n  if (!field.type) {\n    let newValue = value;\n    if (value !== null) {\n      newValue = {\n        ...value\n      };\n    } else {\n      ManagedObjectMap.delete(record);\n    }\n    cache.setAttr(context.resourceKey, context.path, newValue);\n    const peeked = peekManagedObject(record, field);\n    if (peeked) {\n      const objSignal = peeked[OBJECT_SIGNAL];\n      objSignal.isStale = true;\n    }\n    return true;\n  }\n  const transform = schema.transformation(field);\n  const rawValue = transform.serialize({\n    ...value\n  }, field.options ?? null, record);\n  cache.setAttr(context.resourceKey, context.path, rawValue);\n  const peeked = peekManagedObject(record, field);\n  if (peeked) {\n    const objSignal = peeked[OBJECT_SIGNAL];\n    objSignal.isStale = true;\n  }\n  return true;\n}\n\n// TODO probably this should just be a Document\n// but its separate until we work out the lid situation\nclass ResourceRelationship {\n  constructor(context) {\n    const {\n      store,\n      resourceKey\n    } = context;\n    const {\n      cache\n    } = store;\n    const name = getFieldCacheKeyStrict(context.field);\n    const rawValue = context.editable ? cache.getRelationship(resourceKey, name) : cache.getRemoteRelationship(resourceKey, name);\n\n    // TODO setup true lids for relationship documents\n    // @ts-expect-error we need to give relationship documents a lid\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n    this.lid = rawValue.lid ?? rawValue.links?.self ?? `relationship:${resourceKey.lid}.${name}`;\n    this.data = rawValue.data ? store.peekRecord(rawValue.data) : null;\n    this.name = name;\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      this.links = Object.freeze(Object.assign({}, rawValue.links));\n      this.meta = Object.freeze(Object.assign({}, rawValue.meta));\n    } else {\n      this.links = rawValue.links ?? {};\n      this.meta = rawValue.meta ?? {};\n    }\n    this[Context] = context;\n  }\n  fetch(options) {\n    const url = options?.url ?? getHref(this.links.related) ?? getHref(this.links.self) ?? null;\n    if (!url) {\n      throw new Error(`Cannot ${options?.method ?? 'fetch'} ${this[Context].resourceKey.type}.${String(this.name)} because it has no related link`);\n    }\n    const request = Object.assign({\n      url,\n      method: 'GET'\n    }, options);\n    return this[Context].store.request(request);\n  }\n}\ndefineSignal(ResourceRelationship.prototype, 'data', null);\ndefineSignal(ResourceRelationship.prototype, 'links', null);\ndefineSignal(ResourceRelationship.prototype, 'meta', null);\nfunction getHref(link) {\n  if (!link) {\n    return null;\n  }\n  if (typeof link === 'string') {\n    return link;\n  }\n  return link.href;\n}\nfunction getResourceField(context) {\n  entangleSignal(context.signals, context.record, context.path.at(-1), null);\n  return new ResourceRelationship(context);\n}\nfunction setResourceField(context) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    {\n      throw new Error(`setting resource relationships is not yet supported`);\n    }\n  })() : {};\n  return false;\n}\nfunction setSchemaArrayField(context) {\n  const arrayValue = context.value === null ? null : context.value?.slice();\n  const fieldSignal = peekInternalSignal(context.signals, context.path.at(-1));\n  const peeked = fieldSignal?.value;\n  context.store.cache.setAttr(context.resourceKey, context.path, arrayValue);\n  if (peeked) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected the peekManagedArray for ${context.field.kind} to return a ManagedArray`);\n      }\n    })(ARRAY_SIGNAL in peeked) : {};\n    const arrSignal = peeked[ARRAY_SIGNAL];\n    arrSignal.isStale = true;\n    if (!Array.isArray(arrayValue)) {\n      fieldSignal.value = null;\n    }\n  }\n  return true;\n}\nfunction getSchemaObjectField(context) {\n  const signal = entangleSignal(context.signals, context.record, context.path.at(-1), null);\n  const {\n    store,\n    resourceKey,\n    path,\n    field\n  } = context;\n  const {\n    cache\n  } = store;\n  let rawValue = context.editable ? cache.getAttr(resourceKey, path) : cache.getRemoteAttr(resourceKey, path);\n  if (!rawValue && !field.options?.polymorphic && field.options?.defaultValue) {\n    rawValue = {};\n  }\n  if (!rawValue) {\n    if (signal.value) {\n      const value = signal.value;\n      // TODO if we had idle scheduling this should be done there.\n      void Promise.resolve().then(() => {\n        value.value[Destroy]();\n      });\n      signal.value = null;\n    }\n    return null;\n  }\n  const {\n    schema\n  } = store;\n  let objectType;\n  if (field.options?.polymorphic) {\n    const typePath = field.options.type ?? 'type';\n    // if we are polymorphic, then context.field.options.type will\n    // either specify a path on the rawValue to use as the type, defaulting to \"type\" or\n    // the special string \"@hash\" which tells us to treat field.type as a hashFn name with which\n    // to calc the type.\n    if (typePath === '@hash') {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected the field to define a hashFn as its type`);\n        }\n      })(field.type) : {};\n      const hashFn = schema.hashFn({\n        type: field.type\n      });\n      // TODO consider if there are better options and name args we could provide.\n      objectType = hashFn(rawValue, null, null);\n    } else {\n      objectType = rawValue[typePath];\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected the type path for the field to be a value on the raw object`);\n        }\n      })(typePath && objectType && typeof objectType === 'string') : {};\n    }\n  } else {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`A non-polymorphic SchemaObjectField must provide a SchemaObject type in its definition`);\n      }\n    })(field.type) : {};\n    objectType = field.type;\n  }\n  const hashField = schema.resource({\n    type: objectType\n  }).identity;\n  const identity = hashField ? schema.hashFn(hashField)(rawValue, hashField.options ?? null, hashField.name) : field.name;\n  const cachedSchemaObject = signal.value;\n  if (cachedSchemaObject) {\n    if (cachedSchemaObject.type === objectType && cachedSchemaObject.identity === identity) {\n      return cachedSchemaObject.value;\n    } else {\n      // TODO if we had idle scheduling this should be done there.\n      void Promise.resolve().then(() => {\n        cachedSchemaObject.value[Destroy]();\n      });\n    }\n  }\n  const schemaObject = new ReactiveResource({\n    store: context.store,\n    resourceKey: context.resourceKey,\n    modeName: context.modeName,\n    legacy: context.legacy,\n    editable: context.editable,\n    path: context.path,\n    field: context.field,\n    value: objectType\n  });\n  signal.value = {\n    type: objectType,\n    identity: identity,\n    value: schemaObject\n  };\n  return schemaObject;\n}\nfunction setSchemaObjectField(context) {\n  const {\n    store,\n    value\n  } = context;\n  let newValue = value;\n  if (value !== null) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected value to be an object`);\n      }\n    })(typeof value === 'object') : {};\n    newValue = {\n      ...value\n    };\n    // FIXME the case of field.type to string here is likely incorrect\n    const schemaFields = store.schema.fields({\n      type: context.field.type\n    });\n    for (const key of Object.keys(newValue)) {\n      if (!schemaFields.has(key)) {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          {\n            throw new Error(`Field ${key} does not exist on schema object ${context.field.type}`);\n          }\n        })() : {};\n        return false;\n      }\n    }\n  } else {\n    ManagedObjectMap.delete(context.record);\n  }\n  store.cache.setAttr(context.resourceKey, context.path, newValue);\n  // const peeked = peekManagedObject(self, field);\n  // if (peeked) {\n  //   const objSignal = peeked[OBJECT_SIGNAL];\n  //   objSignal.isStale = true;\n  // }\n  return true;\n}\nconst DefaultMode = {\n  '@hash': {\n    get: getHashField,\n    set: setHashField,\n    mutable: false,\n    enumerable: false,\n    serializable: false\n  },\n  '@id': {\n    get: getIdentityField,\n    set: setIdentityField,\n    mutable: true,\n    enumerable: true,\n    serializable: true\n  },\n  '@local': {\n    get: getLocalField,\n    set: setLocalField,\n    mutable: true,\n    enumerable: false,\n    serializable: false\n  },\n  alias: {\n    get: getAliasField,\n    set: setAliasField,\n    mutable: true,\n    enumerable: true,\n    serializable: false\n  },\n  array: {\n    get: getArrayField,\n    set: setArrayField,\n    mutable: true,\n    enumerable: true,\n    serializable: true\n  },\n  attribute: {\n    get: getAttributeField,\n    set: setAttributeField,\n    mutable: true,\n    enumerable: true,\n    serializable: true\n  },\n  belongsTo: {\n    get: getBelongsToField,\n    set: setBelongsToField,\n    mutable: true,\n    enumerable: true,\n    serializable: true\n  },\n  collection: {\n    get: getCollectionField,\n    set: setCollectionField,\n    mutable: true,\n    enumerable: true,\n    serializable: true\n  },\n  derived: {\n    get: getDerivedField,\n    set: setDerivedField,\n    mutable: true,\n    enumerable: true,\n    serializable: false\n  },\n  field: {\n    get: getGenericField,\n    set: setGenericField,\n    mutable: true,\n    enumerable: true,\n    serializable: true\n  },\n  hasMany: {\n    get: getHasManyField,\n    set: setHasManyField,\n    mutable: true,\n    enumerable: true,\n    serializable: true\n  },\n  object: {\n    get: getObjectField,\n    set: setObjectField,\n    mutable: true,\n    enumerable: true,\n    serializable: true\n  },\n  resource: {\n    get: getResourceField,\n    set: setResourceField,\n    mutable: true,\n    enumerable: true,\n    serializable: true\n  },\n  'schema-array': {\n    get: getArrayField,\n    set: setSchemaArrayField,\n    mutable: true,\n    enumerable: true,\n    serializable: true\n  },\n  'schema-object': {\n    get: getSchemaObjectField,\n    set: setSchemaObjectField,\n    mutable: true,\n    enumerable: true,\n    serializable: true\n  }\n};\nconst IgnoredGlobalFields = new Set(['length', 'nodeType', 'then', 'setInterval', 'document', STRUCTURED]);\nconst symbolList = [Context, Destroy, RecordStore, Checkout, Commit];\nconst RecordSymbols = new Set(symbolList);\nfunction isPathMatch(a, b) {\n  return a.length === b.length && a.every((v, i) => v === b[i]);\n}\nfunction isNonEnumerableProp(prop) {\n  return prop === 'constructor' || prop === 'prototype' || prop === '__proto__' || prop === 'toString' || prop === 'toJSON' || prop === 'toHTML' || typeof prop === 'symbol';\n}\nconst Editables = new Map();\n\n/**\n * @private\n */\n\n/**\n * A class that uses a the ResourceSchema for a ResourceType\n * and a ResourceKey to transform data from the cache into a rich, reactive\n * object.\n *\n * This class is not directly instantiable. To use it, you should\n * configure the store's `instantiateRecord` and `teardownRecord` hooks\n * with the matching hooks provided by this package.\n *\n * @hideconstructor\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nclass ReactiveResource {\n  constructor(context) {\n    const resourceKey = context.resourceKey;\n    const isEmbedded = context.path !== null;\n    const schema = context.store.schema;\n    const objectType = isEmbedded ? context.value : resourceKey.type;\n    const ResourceSchema = schema.resource(isEmbedded ? {\n      type: objectType\n    } : resourceKey);\n    const identityField = ResourceSchema.identity;\n    const BoundFns = new Map();\n\n    // prettier-ignore\n    const extensions = !context.legacy ? null : isEmbedded ? schema.CAUTION_MEGA_DANGER_ZONE_objectExtensions(context.field, objectType) : schema.CAUTION_MEGA_DANGER_ZONE_resourceExtensions(resourceKey);\n    this[Context] = context;\n    this[RecordStore] = context.store;\n    const fields = isEmbedded ? schema.fields({\n      type: objectType\n    }) : schema.fields(resourceKey);\n    const method = typeof schema.cacheFields === 'function' ? 'cacheFields' : 'fields';\n    const cacheFields = isEmbedded ? schema[method]({\n      type: objectType\n    }) : schema[method](resourceKey);\n    const signals = withSignalStore(this);\n    this.___notifications = context.store.notifications.subscribe(resourceKey, (_, type, key) => {\n      switch (type) {\n        case 'identity':\n          {\n            if (isEmbedded || !identityField) return; // base paths never apply to embedded records\n\n            if (identityField.name && identityField.kind === '@id') {\n              const signal = signals.get('@identity');\n              if (signal) {\n                notifyInternalSignal(signal);\n              }\n            }\n            break;\n          }\n        case 'attributes':\n          if (key) {\n            if (Array.isArray(key)) {\n              if (context.path === null) return; // deep paths will be handled by embedded records\n              // TODO we should have the notification manager\n              // ensure it is safe for each callback to mutate this array\n              if (isPathMatch(context.path, key)) {\n                // handle the notification\n                // TODO we should likely handle this notification here\n                // also we should add a LOGGING flag\n                // eslint-disable-next-line no-console\n                console.warn(`Notification unhandled for ${key.join(',')} on ${resourceKey.type}`, proxy);\n                return;\n              }\n\n              // TODO we should add a LOGGING flag\n              // console.log(`Deep notification skipped for ${key.join('.')} on ${identifier.type}`, proxy);\n              // deep notify the key path\n            } else {\n              if (isEmbedded) return; // base paths never apply to embedded records\n\n              // TODO determine what LOGGING flag to wrap this in if any\n              // console.log(`Notification for ${key} on ${identifier.type}`, proxy);\n              const signal = signals.get(key);\n              if (signal) {\n                notifyInternalSignal(signal);\n              }\n              const field = cacheFields.get(key);\n              if (field?.kind === 'array' || field?.kind === 'schema-array') {\n                const peeked = signal?.value;\n                if (peeked) {\n                  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n                    if (!test) {\n                      throw new Error(`Expected the peekManagedArray for ${field.kind} to return a ManagedArray`);\n                    }\n                  })(ARRAY_SIGNAL in peeked) : {};\n                  const arrSignal = peeked[ARRAY_SIGNAL];\n                  notifyInternalSignal(arrSignal);\n                }\n              }\n              if (field?.kind === 'object') {\n                const peeked = peekManagedObject(proxy, field);\n                if (peeked) {\n                  const objSignal = peeked[OBJECT_SIGNAL];\n                  notifyInternalSignal(objSignal);\n                }\n              }\n            }\n          }\n          break;\n        case 'relationships':\n          if (key) {\n            if (Array.isArray(key)) ;else {\n              if (isEmbedded) return; // base paths never apply to embedded records\n\n              const field = cacheFields.get(key);\n              macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n                if (!test) {\n                  throw new Error(`Expected relationship ${key} to be the name of a field`);\n                }\n              })(field) : {};\n              if (field.kind === 'belongsTo') {\n                // TODO determine what LOGGING flag to wrap this in if any\n                // console.log(`Notification for ${key} on ${identifier.type}`, proxy);\n                const signal = signals.get(key);\n                if (signal) {\n                  notifyInternalSignal(signal);\n                }\n                // FIXME\n              } else if (field.kind === 'resource') ;else if (field.kind === 'hasMany') {\n                if (field.options.linksMode) {\n                  const signal = signals.get(key);\n                  if (signal) {\n                    const peeked = signal.value;\n                    if (peeked) {\n                      notifyInternalSignal(peeked[Context].signal);\n                    }\n                  }\n                  return;\n                }\n                macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n                  if (!test) {\n                    throw new Error(`Can only use hasMany fields when the resource is in legacy mode`);\n                  }\n                })(context.legacy) : {};\n                if (schema._kind('@legacy', 'hasMany').notify(context.store, proxy, resourceKey, field)) {\n                  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n                    if (!test) {\n                      throw new Error(`Expected options to exist on relationship meta`);\n                    }\n                  })(field.options) : {};\n                  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n                    if (!test) {\n                      throw new Error(`Expected async to exist on relationship meta options`);\n                    }\n                  })('async' in field.options) : {};\n                  if (field.options.async) {\n                    const signal = signals.get(key);\n                    if (signal) {\n                      notifyInternalSignal(signal);\n                    }\n                  }\n                }\n              } else if (field.kind === 'collection') ;\n            }\n          }\n          break;\n      }\n    });\n    const proxy = new Proxy(this, {\n      ownKeys() {\n        const identityKey = identityField?.name;\n        const keys = Array.from(fields.keys());\n        if (identityKey) {\n          keys.unshift(identityKey);\n        }\n        return keys;\n      },\n      has(target, prop) {\n        if (prop === Destroy || prop === Checkout) {\n          return true;\n        }\n        return fields.has(prop);\n      },\n      getOwnPropertyDescriptor(target, prop) {\n        const schemaForField = prop === identityField?.name ? identityField : fields.get(prop);\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`No field named ${String(prop)} on ${resourceKey.type}`);\n          }\n        })(schemaForField) : {};\n        if (isNonEnumerableProp(prop)) {\n          return {\n            writable: false,\n            enumerable: false,\n            configurable: true\n          };\n        }\n        switch (schemaForField.kind) {\n          case 'derived':\n            return {\n              writable: false,\n              enumerable: true,\n              configurable: true\n            };\n          case '@id':\n            return {\n              writable: resourceKey.id === null,\n              enumerable: true,\n              configurable: true\n            };\n          case '@hash':\n            return schemaForField.name ? {\n              writable: false,\n              enumerable: true,\n              configurable: true\n            } : {\n              writable: false,\n              enumerable: false,\n              configurable: false\n            };\n          case '@local':\n          case 'field':\n          case 'attribute':\n          case 'resource':\n          case 'alias':\n          case 'belongsTo':\n          case 'hasMany':\n          case 'collection':\n          case 'schema-array':\n          case 'array':\n          case 'schema-object':\n          case 'object':\n            return {\n              writable: context.editable,\n              enumerable: true,\n              configurable: true\n            };\n          default:\n            return {\n              writable: false,\n              enumerable: false,\n              configurable: false\n            };\n        }\n      },\n      get(target, prop, receiver) {\n        if (RecordSymbols.has(prop)) {\n          if (prop === Destroy) {\n            return () => _DESTROY(receiver);\n          }\n          if (prop === Checkout) {\n            return () => Promise.resolve(_CHECKOUT(receiver));\n          }\n          if (prop === Commit) {\n            return () => Promise.resolve(_COMMIT(receiver));\n          }\n          return target[prop];\n        }\n        if (prop === Signals) {\n          return signals;\n        }\n\n        // TODO make this a symbol\n        if (prop === '___notifications') {\n          return target.___notifications;\n        }\n\n        // ReactiveResource reserves use of keys that begin with these characters\n        // for its own usage.\n        // _, @, $, *\n\n        const maybeField = prop === identityField?.name ? identityField : fields.get(prop);\n        if (!maybeField) {\n          if (IgnoredGlobalFields.has(prop)) {\n            return undefined;\n          }\n\n          /////////////////////////////////////////////////////////////\n          //// Note these bound function behaviors are essentially ////\n          //// built-in but overrideable derivations.              ////\n          ////                                                     ////\n          //// The bar for this has to be \"basic expectations of   ////\n          ///  an object\" – very, very high                        ////\n          /////////////////////////////////////////////////////////////\n\n          if (prop === Symbol.toStringTag || prop === 'toString') {\n            let fn = BoundFns.get('toString');\n            if (!fn) {\n              fn = function () {\n                entangleSignal(signals, receiver, '@identity', null);\n                return `Record<${resourceKey.type}:${resourceKey.id} (${resourceKey.lid})>`;\n              };\n              BoundFns.set(prop, fn);\n            }\n            return fn;\n          }\n          if (prop === 'toHTML') {\n            let fn = BoundFns.get('toHTML');\n            if (!fn) {\n              fn = function () {\n                entangleSignal(signals, receiver, '@identity', null);\n                return `<span>Record<${resourceKey.type}:${resourceKey.id} (${resourceKey.lid})></span>`;\n              };\n              BoundFns.set(prop, fn);\n            }\n            return fn;\n          }\n          if (prop === 'toJSON') {\n            let fn = BoundFns.get('toJSON');\n            if (!fn) {\n              fn = function () {\n                const json = {};\n                for (const key in receiver) {\n                  json[key] = receiver[key];\n                }\n                return json;\n              };\n              BoundFns.set(prop, fn);\n            }\n            return fn;\n          }\n          if (prop === Symbol.toPrimitive) return () => null;\n          if (prop === Symbol.iterator) {\n            let fn = BoundFns.get(Symbol.iterator);\n            if (!fn) {\n              fn = function* () {\n                for (const key in receiver) {\n                  yield [key, receiver[key]];\n                }\n              };\n              BoundFns.set(Symbol.iterator, fn);\n            }\n            return fn;\n          }\n          if (prop === 'constructor') {\n            return ReactiveResource;\n          }\n          if (isExtensionProp(extensions, prop)) {\n            return performObjectExtensionGet(receiver, extensions, signals, prop);\n          }\n\n          // too many things check for random symbols\n          if (typeof prop === 'symbol') return undefined;\n          macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n            {\n              throw new Error(`No field named ${String(prop)} on ${context.path ? context.value : resourceKey.type}`);\n            }\n          })() : {};\n          return undefined;\n        }\n        const field = maybeField.kind === 'alias' ? maybeField.options : maybeField;\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Alias fields cannot alias '@id' '@local' '@hash' or 'derived' fields`);\n          }\n        })(maybeField.kind !== 'alias' || !['@id', '@local', '@hash', 'derived'].includes(maybeField.options.kind)) : {};\n        /**\n         * Prop Array is the path from a resource to the field including\n         * intermediate \"links\" on arrays,objects,schema-arrays and schema-objects.\n         *\n         * E.g. in the following\n         *\n         * ```\n         * const user = {\n         *   addresses: [{\n         *     street: 'Sunset Blvd',\n         *     zip: 90210\n         *   }]\n         * }\n         * ```\n         *\n         * The propArray for \"street\" is ['addresses', 0, 'street']\n         *\n         * Prop Array follows the `cache` path to the value, not the ui path.\n         * Thus, if `addresses` has a sourceKey of `user_addresses` and\n         * `zip` has a sourceKey of `zip_code` then the propArray for \"zip\" is\n         * ['user_addresses', 0, 'zip_code']\n         */\n        const propArray = context.path?.slice() ?? [];\n        // we use the field.name instead of prop here because we want to use the cache-path not\n        // the record path.\n        // SAFETY: we lie as string here because if we were to get null\n        // we would be in a field kind that won't use the propArray below.\n        const fieldCacheKey = getFieldCacheKey(field);\n        propArray.push(fieldCacheKey);\n        switch (field.kind) {\n          case '@id':\n          case '@hash':\n          case '@local':\n          case 'derived':\n          case 'field':\n          case 'attribute':\n          case 'schema-array':\n          case 'array':\n          case 'schema-object':\n          case 'object':\n          case 'resource':\n          case 'belongsTo':\n          case 'hasMany':\n          case 'collection':\n            return DefaultMode[field.kind].get({\n              store: context.store,\n              resourceKey: resourceKey,\n              modeName: context.modeName,\n              legacy: context.legacy,\n              editable: context.editable,\n              path: propArray,\n              field: field,\n              record: receiver,\n              signals,\n              value: null\n            });\n          default:\n            assertNeverField(resourceKey, field, propArray);\n        }\n      },\n      set(target, prop, value, receiver) {\n        // the only \"editable\" prop as it is currently a proxy for \"isDestroyed\"\n        if (prop === '___notifications') {\n          target[prop] = value;\n          return true;\n        }\n        if (!context.editable) {\n          macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n            {\n              throw new Error(`Cannot set ${String(prop)} on ${context.path !== null ? context.value : resourceKey.type} because the ReactiveResource is not editable`);\n            }\n          })() : {};\n          return false;\n        }\n        const maybeField = prop === identityField?.name ? identityField : fields.get(prop);\n        if (!maybeField) {\n          const type = context.path !== null ? context.value : resourceKey.type;\n          if (isExtensionProp(extensions, prop)) {\n            return performExtensionSet(receiver, extensions, signals, prop, value);\n          }\n          macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n            {\n              throw new Error(`There is no settable field named ${String(prop)} on ${type}`);\n            }\n          })() : {};\n          return false;\n        }\n        const field = maybeField.kind === 'alias' ? maybeField.options : maybeField;\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Alias fields cannot alias '@id' '@local' '@hash' or 'derived' fields`);\n          }\n        })(maybeField.kind !== 'alias' || !['@id', '@local', '@hash', 'derived'].includes(maybeField.options.kind)) : {};\n        /**\n         * Prop Array is the path from a resource to the field including\n         * intermediate \"links\" on arrays,objects,schema-arrays and schema-objects.\n         *\n         * E.g. in the following\n         *\n         * ```\n         * const user = {\n         *   addresses: [{\n         *     street: 'Sunset Blvd',\n         *     zip: 90210\n         *   }]\n         * }\n         * ```\n         *\n         * The propArray for \"street\" is ['addresses', 0, 'street']\n         *\n         * Prop Array follows the `cache` path to the value, not the ui path.\n         * Thus, if `addresses` has a sourceKey of `user_addresses` and\n         * `zip` has a sourceKey of `zip_code` then the propArray for \"zip\" is\n         * ['user_addresses', 0, 'zip_code']\n         */\n        const propArray = context.path?.slice() ?? [];\n        // we use the field.name instead of prop here because we want to use the cache-path not\n        // the record path.\n        // SAFETY: we lie as string here because if we were to get null\n        // we would be in a field kind that won't use the propArray below.\n        const fieldCacheKey = getFieldCacheKey(field);\n        propArray.push(fieldCacheKey);\n        switch (field.kind) {\n          case '@id':\n          case '@hash':\n          case '@local':\n          case 'field':\n          case 'attribute':\n          case 'derived':\n          case 'array':\n          case 'schema-array':\n          case 'schema-object':\n          case 'object':\n          case 'resource':\n          case 'belongsTo':\n          case 'hasMany':\n          case 'collection':\n            return DefaultMode[field.kind].set({\n              store: context.store,\n              resourceKey: resourceKey,\n              modeName: context.modeName,\n              legacy: context.legacy,\n              editable: context.editable,\n              path: propArray,\n              field: field,\n              record: receiver,\n              signals,\n              value\n            });\n          default:\n            return assertNeverField(resourceKey, field, propArray);\n        }\n      }\n    });\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      Object.defineProperty(this, '__SHOW_ME_THE_DATA_(debug mode only)__', {\n        enumerable: false,\n        configurable: true,\n        get() {\n          const data = {};\n          for (const key of fields.keys()) {\n            data[key] = proxy[key];\n          }\n          return data;\n        }\n      });\n    }\n    return proxy;\n  }\n}\nasync function _COMMIT(record) {\n  await Promise.resolve();\n  const context = record[Context];\n  context.store.cache.willCommit(context.resourceKey, null);\n  context.store.cache.didCommit(context.resourceKey, null);\n}\nfunction _CHECKOUT(record) {\n  const context = record[Context];\n\n  // IF we are already the editable record, throw an error\n  if (context.editable) {\n    throw new Error(`Cannot checkout an already editable record`);\n  }\n  const editable = Editables.get(record);\n  if (editable) {\n    return editable;\n  }\n  if (context.path !== null) {\n    throw new Error(`Cannot checkout an embedded record`);\n  }\n  const editableRecord = new ReactiveResource({\n    store: context.store,\n    resourceKey: context.resourceKey,\n    modeName: context.legacy ? 'legacy' : 'polaris',\n    legacy: context.legacy,\n    editable: true,\n    path: null,\n    field: null,\n    value: null\n  });\n  setRecordIdentifier(editableRecord, recordIdentifierFor(record));\n  Editables.set(record, editableRecord);\n  return editableRecord;\n}\nfunction _DESTROY(record) {\n  if (record[Context].legacy) {\n    // @ts-expect-error\n    record.isDestroying = true;\n    // @ts-expect-error\n    record.isDestroyed = true;\n  } else if (!record[Context].editable) {\n    const editable = Editables.get(record);\n    if (editable) {\n      _DESTROY(editable);\n      removeRecordIdentifier(editable);\n    }\n  }\n  record[Context].store.notifications.unsubscribe(record.___notifications);\n  record.___notifications = null;\n\n  // FIXME we need a way to also unsubscribe all SchemaObjects when the primary\n  // resource is destroyed.\n}\nfunction assertNeverField(identifier, field, path) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    {\n      throw new Error(`Cannot use unknown field kind ${field.kind} on <${identifier.type}>.${Array.isArray(path) ? path.join('.') : path}`);\n    }\n  })() : {};\n  return false;\n}\n\n/**\n * Checkout an immutable resource for editing.\n *\n * {@link ReactiveResource | ReactiveResources} are not editable by default. This method\n * creates an editable copy of the resource.\n *\n * This returns a promise which resolves with the editable\n * version of the resource.\n *\n * ```ts\n * import { checkout } from '@warp-drive/core/reactive';\n *\n * const immutable = store.peekRecord('user', '1');\n * const editable = await checkout(immutable);\n * ```\n *\n * Edits to editable resources will be automatically committed if a new\n * payload from the cache matches their existing value.\n *\n * @public\n *\n * @returns a promise that resolves to the editable resource\n * @throws if the resource is already editable or if resource is an embedded object\n */\nfunction checkout(resource) {\n  return resource[Checkout]();\n}\n\n/**\n * Forcibly commit all local changes on an editable resource to\n * the remote (immutable) version.\n *\n * This API should only be used cautiously. Typically a better\n * approach is for either the API or a Handler to reflect saved\n * changes back to update the cache.\n *\n * @public\n */\nfunction commit(record) {\n  return record[Commit]();\n}\nfunction instantiateRecord(store, identifier, createArgs) {\n  const schema = store.schema;\n  const resourceSchema = schema.resource(identifier);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected a resource schema`);\n    }\n  })(isResourceSchema(resourceSchema)) : {};\n  const legacy = resourceSchema?.legacy ?? false;\n  const editable = legacy;\n  const record = new ReactiveResource({\n    store,\n    resourceKey: identifier,\n    modeName: legacy ? 'legacy' : 'polaris',\n    legacy: legacy,\n    editable: editable,\n    path: null,\n    field: null,\n    value: null\n  });\n  if (createArgs && editable) {\n    Object.assign(record, createArgs);\n  }\n  return record;\n}\nfunction assertReactiveResource(record) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error('Expected a ReactiveResource');\n    }\n  })(record && typeof record === 'object' && Destroy in record) : {};\n}\nfunction teardownRecord(record) {\n  assertReactiveResource(record);\n  record[Destroy]();\n}\nconst Support = getOrSetGlobal('Support', new WeakMap());\nconst ConstructorField = {\n  type: '@constructor',\n  name: 'constructor',\n  kind: 'derived'\n};\nconst TypeField = {\n  type: '@identity',\n  name: '$type',\n  kind: 'derived',\n  options: {\n    key: 'type'\n  }\n};\nconst DefaultIdentityField = {\n  name: 'id',\n  kind: '@id'\n};\nfunction _constructor(record) {\n  let state = Support.get(record);\n  if (!state) {\n    state = {};\n    Support.set(record, state);\n  }\n  return state._constructor = state._constructor || {\n    name: `ReactiveResource<${recordIdentifierFor(record).type}>`,\n    get modelName() {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        {\n          throw new Error(`record.constructor.modelName is not available outside of legacy mode`);\n        }\n      })() : {};\n      return undefined;\n    }\n  };\n}\n_constructor[Type] = '@constructor';\n\n/**\n * Extensions allow providing non-schema driven behaviors to\n * ReactiveResources, ReactiveArrays, and ReactiveObjects.\n *\n * This should only be used for temporary migration purposes\n * to the new schema system when migrating from either Model\n * or ModelFragments.\n */\n\nconst BannedKeys = ['constructor', '__proto__'];\nfunction processExtension(extension) {\n  const {\n    kind,\n    name\n  } = extension;\n  const features = new Map();\n  const baseFeatures = typeof extension.features === 'function' ? extension.features.prototype : extension.features;\n  for (const key of Object.getOwnPropertyNames(baseFeatures)) {\n    if (BannedKeys.includes(key)) continue;\n    const decl = Object.getOwnPropertyDescriptor(baseFeatures, key);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected to find a declaration for ${key} on extension ${name}`);\n      }\n    })(decl) : {};\n    if (decl.value) {\n      const {\n        value\n      } = decl;\n      features.set(key, typeof value === 'function' ? {\n        kind: 'method',\n        fn: value\n      } : decl.writable ? {\n        kind: 'mutable-value',\n        value\n      } : {\n        kind: 'readonly-value',\n        value\n      });\n      continue;\n    }\n    if (decl.get || decl.set) {\n      const {\n        get,\n        set\n      } = decl;\n      features.set(key,\n      // prettier-ignore\n      get && set ? {\n        kind: 'mutable-field',\n        get,\n        set\n      } : get ? {\n        kind: 'readonly-field',\n        get\n      } : {\n        kind: 'writeonly-field',\n        set: set\n      });\n      continue;\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`The feature ${key} on extension ${name} is of an unknown variety.`);\n      }\n    })() : {};\n  }\n  return {\n    kind,\n    name,\n    features\n  };\n}\nfunction getExt(extCache, type, extName) {\n  const ext = extCache[type].get(extName);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`expected to have an extension named ${String(extName)} available for ${type}s`);\n    }\n  })(ext) : {};\n  return ext?.features ?? null;\n}\nfunction hasObjectSchema(field) {\n  return 'kind' in field && (field.kind === 'schema-array' || field.kind === 'schema-object');\n}\nfunction processExtensions(schema, field, scenario, resolvedType) {\n  // if we're looking up extensions for a resource, there is no\n  // merging required so if we have no objectExtensions\n  // we are done.\n  if (scenario === 'resource') {\n    if (!('objectExtensions' in field || !field.objectExtensions?.length)) {\n      return null;\n    }\n  }\n  const type = scenario === 'resource' ? 'object' : scenario;\n  const extCache = schema._extensions;\n  const fieldCache = schema._cachedFieldExtensionsByField;\n  if (fieldCache[type].has(field)) {\n    return fieldCache[type].get(field);\n  }\n\n  // prettier-ignore\n  const extensions = (scenario === 'resource' ? field.objectExtensions : scenario === 'object' ? field.options?.objectExtensions : field.options?.arrayExtensions) || null;\n\n  // if we are a resource scenario, we know from the first check we do have extensions\n  // if we are an object scenario, we can now return the resource scenario.\n  // if we are an array scenario, there is nothing more to process.\n  if (!extensions) {\n    if (scenario === 'array') return null;\n    if (!hasObjectSchema(field)) {\n      return null;\n    }\n    return schema.CAUTION_MEGA_DANGER_ZONE_resourceExtensions(resolvedType ? {\n      type: resolvedType\n    } : field);\n  }\n\n  // if we have made it here, we have extensions, lets check if there's\n  // a cached version we can use\n  const baseExtensions = scenario === 'resource' && hasObjectSchema(field) ? schema.CAUTION_MEGA_DANGER_ZONE_resourceExtensions(field) : scenario === 'object' && hasObjectSchema(field) ? schema.CAUTION_MEGA_DANGER_ZONE_resourceExtensions(resolvedType ? {\n    type: resolvedType\n  } : field) : null;\n  if (!baseExtensions && extensions.length === 1) {\n    const value = getExt(extCache, type, extensions[0]);\n    fieldCache[type].set(field, value);\n    return value;\n  }\n  const features = new Map(baseExtensions);\n  for (const extName of extensions) {\n    const value = getExt(extCache, type, extName);\n    if (value) {\n      for (const [feature, desc] of value) {\n        features.set(feature, desc);\n      }\n    }\n  }\n  const value = features.size ? features : null;\n  fieldCache[type].set(field, value);\n  return value;\n}\n\n/**\n * Utility for constructing a ResourceSchema with the recommended\n * fields for the PolarisMode experience.\n *\n * Using this requires registering the PolarisMode derivations\n *\n * ```ts\n * import { registerDerivations } from '@warp-drive/schema-record';\n *\n * registerDerivations(schema);\n * ```\n *\n * @public\n * @param schema\n * @return {PolarisResourceSchema}\n */\nfunction withDefaults(schema) {\n  schema.identity = schema.identity || DefaultIdentityField;\n\n  // because fields gets iterated in definition order,\n  // we add TypeField to the beginning so that it will\n  // appear right next to the identity field\n  schema.fields.unshift(TypeField);\n  schema.fields.push(ConstructorField);\n  return schema;\n}\n/**\n * A derivation that computes its value from the\n * record's identity.\n *\n * It can be used via a derived field definition like:\n *\n * ```ts\n * {\n *   kind: 'derived',\n *   name: 'id',\n *   type: '@identity',\n *   options: { key: 'id' }\n * }\n * ```\n *\n * Valid keys are `'id'`, `'lid'`, `'type'`, and `'^'`.\n *\n * `^` returns the entire identifier object.\n *\n * @public\n */\nconst fromIdentity = (record, options, key) => {\n  const context = record[Context];\n  const identifier = context.resourceKey;\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Cannot compute @identity for a record without an identifier`);\n    }\n  })(identifier) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected to receive a key to compute @identity, but got ${String(options)}`);\n    }\n  })(options?.key && ['lid', 'id', 'type', '^'].includes(options.key)) : {};\n  return options.key === '^' ? identifier : identifier[options.key];\n};\nfromIdentity[Type] = '@identity';\n\n/**\n * Registers the default derivations for records that want\n * to use the PolarisMode defaults provided by\n *\n * ```ts\n * import { withDefaults } from '@warp-drive/schema-record';\n * ```\n *\n * @public\n */\nfunction registerDerivations(schema) {\n  schema.registerDerivation(fromIdentity);\n  schema.registerDerivation(_constructor);\n}\n/**\n * Wraps a derivation in a new function with Derivation signature but that looks\n * up the value in the cache before recomputing.\n *\n * @internal\n */\nfunction makeCachedDerivation(derivation) {\n  const memoizedDerivation = (record, options, prop) => {\n    const signals = withSignalStore(record);\n    let signal = signals.get(prop);\n    if (!signal) {\n      signal = createInternalMemo(signals, record, prop, () => {\n        return derivation(record, options, prop);\n      }); // a total lie, for convenience of reusing the storage\n    }\n    return signal();\n  };\n  memoizedDerivation[Type] = derivation[Type];\n  return memoizedDerivation;\n}\n/**\n * A SchemaService designed to work with dynamically registered schemas.\n *\n * @public\n */\nclass SchemaService {\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  constructor() {\n    this._schemas = new Map();\n    this._transforms = new Map();\n    this._hashFns = new Map();\n    this._derivations = new Map();\n    this._traits = new Map();\n    this._modes = new Map();\n    this._extensions = {\n      object: new Map(),\n      array: new Map()\n    };\n    this._cachedFieldExtensionsByField = {\n      object: new Map(),\n      array: new Map()\n    };\n  }\n  resourceTypes() {\n    return Array.from(this._schemas.keys());\n  }\n  hasTrait(type) {\n    return this._traits.has(type);\n  }\n  resourceHasTrait(resource, trait) {\n    return this._schemas.get(resource.type).traits.has(trait);\n  }\n  transformation(field) {\n    const kind = 'kind' in field ? field.kind : '<unknown kind>';\n    const name = 'name' in field ? field.name : '<unknown name>';\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`'${kind}' fields cannot be transformed. Only fields of kind 'field' 'object' or 'array' can specify a transformation. Attempted to find '${field.type ?? '<unknown type>'}' on field '${name}'.`);\n      }\n    })(!('kind' in field) || ['field', 'object', 'array'].includes(kind)) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected the '${kind}' field '${name}' to specify a transformation via 'field.type', but none was present`);\n      }\n    })(field.type) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`No transformation registered with name '${field.type}' for '${kind}' field '${name}'`);\n      }\n    })(this._transforms.has(field.type)) : {};\n    return this._transforms.get(field.type);\n  }\n  derivation(field) {\n    const kind = 'kind' in field ? field.kind : '<unknown kind>';\n    const name = 'name' in field ? field.name : '<unknown name>';\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`The '${kind}' field '${name}' is not derived and so cannot be used to lookup a derivation`);\n      }\n    })(!('kind' in field) || kind === 'derived') : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected the '${kind}' field '${name}' to specify a derivation via 'field.type', but no value was present`);\n      }\n    })(field.type) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`No '${field.type}' derivation registered for use by the '${kind}' field '${name}'`);\n      }\n    })(this._derivations.has(field.type)) : {};\n    return this._derivations.get(field.type);\n  }\n  hashFn(field) {\n    const kind = 'kind' in field ? field.kind : '<unknown kind>';\n    const name = 'name' in field ? field.name : '<unknown name>';\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`The '${kind}' field '${name}' is not a HashField and so cannot be used to lookup a hash function`);\n      }\n    })(!('kind' in field) || kind === '@hash') : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected the '${kind}' field '${name}' to specify a hash function via 'field.type', but no value was present`);\n      }\n    })(field.type) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`No '${field.type}' hash function is registered for use by the '${kind}' field '${name}'`);\n      }\n    })(this._hashFns.has(field.type)) : {};\n    return this._hashFns.get(field.type);\n  }\n  resource(resource) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`No resource registered with name '${resource.type}'`);\n      }\n    })(this._schemas.has(resource.type)) : {};\n    return this._schemas.get(resource.type).original;\n  }\n  registerResources(schemas) {\n    schemas.forEach(schema => {\n      this.registerResource(schema);\n    });\n  }\n  registerResource(schema) {\n    const fields = new Map();\n    const relationships = {};\n    const attributes = {};\n    for (const field of schema.fields) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`${field.kind} is not valid inside a ResourceSchema's fields.`);\n        }\n      })(\n      // @ts-expect-error we are checking for mistakes at runtime\n      field.kind !== '@id' && field.kind !== '@hash') : {};\n      fields.set(field.name, field);\n      if (field.kind === 'attribute') {\n        attributes[field.name] = field;\n      } else if (field.kind === 'belongsTo' || field.kind === 'hasMany') {\n        relationships[field.name] = field;\n      }\n    }\n    const cacheFields = null;\n    const traits = new Set(isResourceSchema(schema) ? schema.traits : []);\n    const finalized = traits.size === 0;\n    const internalSchema = {\n      original: schema,\n      finalized,\n      fields,\n      cacheFields,\n      relationships,\n      attributes,\n      traits\n    };\n    if (traits.size === 0) {\n      internalSchema.cacheFields = getCacheFields(internalSchema);\n    }\n    this._schemas.set(schema.type, internalSchema);\n  }\n\n  /**\n   * Registers a {@link Trait} for use by resource schemas.\n   *\n   * Traits are re-usable collections of fields that can be composed to\n   * build up a resource schema. Often they represent polymorphic behaviors\n   * a resource should exhibit.\n   *\n   * When we finalize a resource, we walk its traits and apply their fields\n   * to the resource's fields. All specified traits must be registered by\n   * this time or an error will be thrown.\n   *\n   * Traits are applied left-to-right, with traits of traits being applied in the same\n   * way. Thus for the most part, application of traits is a post-order graph traversal\n   * problem.\n   *\n   * A trait is only ever processed once. If multiple traits (A, B, C) have the same\n   * trait (D) as a dependency, D will be included only once when first encountered by\n   * A.\n   *\n   * If a cycle exists such that trait A has trait B which has Trait A, trait A will\n   * be applied *after* trait B in production. In development a cycle error will be thrown.\n   *\n   * Fields are finalized on a \"last wins principle\". Thus traits appearing higher in\n   * the tree and further to the right of a traits array take precedence, with the\n   * resource's fields always being applied last and winning out.\n   *\n   * @public\n   */\n  registerTrait(trait) {\n    const internalTrait = Object.assign({}, trait, {\n      fields: new Map()\n    });\n    for (const field of trait.fields) {\n      internalTrait.fields.set(field.name, field);\n    }\n    this._traits.set(trait.name, internalTrait);\n  }\n  registerTransformation(transformation) {\n    this._transforms.set(transformation[Type], transformation);\n  }\n  registerDerivation(derivation) {\n    this._derivations.set(derivation[Type], makeCachedDerivation(derivation));\n  }\n  CAUTION_MEGA_DANGER_ZONE_registerExtension(extension) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`an extension named ${extension.name} for ${extension.kind} already exists!`);\n      }\n    })(!this._extensions[extension.kind].has(extension.name)) : {};\n    this._extensions[extension.kind].set(extension.name, processExtension(extension));\n  }\n  CAUTION_MEGA_DANGER_ZONE_resourceExtensions(resource) {\n    const schema = this.resource(resource);\n    return processExtensions(this, schema, 'resource', null);\n  }\n  CAUTION_MEGA_DANGER_ZONE_objectExtensions(field, resolvedType) {\n    return processExtensions(this, field, 'object', resolvedType);\n  }\n  CAUTION_MEGA_DANGER_ZONE_arrayExtensions(field) {\n    return processExtensions(this, field, 'array', null);\n  }\n  CAUTION_MEGA_DANGER_ZONE_hasExtension(ext) {\n    return this._extensions[ext.kind].has(ext.name);\n  }\n\n  /**\n   * This is an internal method used to register behaviors for legacy mode.\n   * It is not intended for public use.\n   *\n   * We do think a generalized `kind` registration system would be useful,\n   * but we have not yet designed it.\n   *\n   * See https://github.com/warp-drive-data/warp-drive/issues/9534\n   *\n   * @internal\n   */\n  _registerMode(mode, kinds) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Mode '${mode}' is already registered`);\n      }\n    })(!this._modes.has(mode)) : {};\n    this._modes.set(mode, kinds);\n  }\n\n  /**\n   * This is an internal method used to enable legacy behaviors for legacy mode.\n   * It is not intended for public use.\n   *\n   * We do think a generalized `kind` registration system would be useful,\n   * but we have not yet designed it.\n   *\n   * See https://github.com/warp-drive-data/warp-drive/issues/9534\n   *\n   * @internal\n   */\n  _kind(mode, kind) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Mode '${mode}' is not registered`);\n      }\n    })(this._modes.has(mode)) : {};\n    const kinds = this._modes.get(mode);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Kind '${kind}' is not registered for mode '${mode}'`);\n      }\n    })(kinds[kind]) : {};\n    return kinds[kind];\n  }\n\n  /**\n   * Registers a {@link HashFn} for use with a {@link HashField} for\n   * either {@link ObjectSchema} identity or polymorphic type calculation.\n   *\n   * @public\n   */\n  registerHashFn(hashFn) {\n    this._hashFns.set(hashFn[Type], hashFn);\n  }\n  fields({\n    type\n  }) {\n    const schema = this._schemas.get(type);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`No schema defined for ${type}`);\n      }\n    })(schema) : {};\n    if (!schema.finalized) {\n      finalizeResource(this, schema);\n    }\n    return schema.fields;\n  }\n  cacheFields({\n    type\n  }) {\n    const schema = this._schemas.get(type);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`No schema defined for ${type}`);\n      }\n    })(schema) : {};\n    if (!schema.finalized) {\n      finalizeResource(this, schema);\n    }\n    return schema.cacheFields;\n  }\n  hasResource(resource) {\n    return this._schemas.has(resource.type);\n  }\n}\nif (macroCondition(getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_SCHEMA_SERVICE)) {\n  SchemaService.prototype.attributesDefinitionFor = function ({\n    type\n  }) {\n    deprecate(`Use \\`schema.fields({ type })\\` instead of \\`schema.attributesDefinitionFor({ type })\\``, false, {\n      id: 'ember-data:schema-service-updates',\n      until: '6.0',\n      for: 'ember-data',\n      since: {\n        available: '4.13',\n        enabled: '5.4'\n      }\n    });\n    const schema = this._schemas.get(type);\n    if (!schema) {\n      throw new Error(`No schema defined for ${type}`);\n    }\n    return schema.attributes;\n  };\n  SchemaService.prototype.relationshipsDefinitionFor = function ({\n    type\n  }) {\n    deprecate(`Use \\`schema.fields({ type })\\` instead of \\`schema.relationshipsDefinitionFor({ type })\\``, false, {\n      id: 'ember-data:schema-service-updates',\n      until: '6.0',\n      for: 'ember-data',\n      since: {\n        available: '4.13',\n        enabled: '5.4'\n      }\n    });\n    const schema = this._schemas.get(type);\n    if (!schema) {\n      throw new Error(`No schema defined for ${type}`);\n    }\n    return schema.relationships;\n  };\n  SchemaService.prototype.doesTypeExist = function (type) {\n    deprecate(`Use \\`schema.hasResource({ type })\\` instead of \\`schema.doesTypeExist(type)\\``, false, {\n      id: 'ember-data:schema-service-updates',\n      until: '6.0',\n      for: 'ember-data',\n      since: {\n        available: '4.13',\n        enabled: '5.4'\n      }\n    });\n    return this._schemas.has(type);\n  };\n}\n\n/**\n * When we finalize a resource, we walk its traits and apply their fields\n * to the resource's fields.\n *\n * Traits are applied left-to-right, with traits of traits being applied in the same\n * way. Thus for the most part, application of traits is a post-order graph traversal\n * problem.\n *\n * A trait is only ever processed once. If multiple traits (A, B, C) have the same\n * trait (D) as a dependency, D will be included only once when first encountered by\n * A.\n *\n * If a cycle exists such that trait A has trait B which has Trait A, trait A will\n * be applied *after* trait B in production. In development a cycle error will be thrown.\n *\n * Fields are finalized on a \"last wins principle\". Thus traits appearing higher in\n * the tree and further to the right of a traits array take precedence, with the\n * resource's fields always being applied last and winning out.\n */\nfunction finalizeResource(schema, resource) {\n  const fields = new Map();\n  const seen = new Set();\n  for (const traitName of resource.traits) {\n    const trait = schema._traits.get(traitName);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`The trait ${traitName} MUST be supplied before the resource ${resource.original.type} can be finalized for use.`);\n      }\n    })(trait) : {};\n    walkTrait(schema, trait, fields, seen, resource.original.type, macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? [] : null);\n  }\n  mergeMap(fields, resource.fields);\n  resource.fields = fields;\n  resource.cacheFields = getCacheFields(resource);\n  resource.finalized = true;\n}\nfunction getCacheFields(resource) {\n  const {\n    fields\n  } = resource;\n  const cacheFields = new Map();\n  for (const [key, value] of fields) {\n    if (isNonIdentityCacheableField(value)) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`The sourceKey '${value.sourceKey}' for the field '${key}' on ${resource.original.type} is invalid because it matches the name of an existing field`);\n        }\n      })(!value.sourceKey || value.sourceKey === key || !fields.has(value.sourceKey)) : {};\n      const cacheKey = getFieldCacheKeyStrict(value);\n      cacheFields.set(cacheKey, value);\n    }\n  }\n  return cacheFields;\n}\nfunction walkTrait(schema, trait, fields, seen, type, debugPath) {\n  if (seen.has(trait)) {\n    // if the trait is in the current path, we throw a cycle error in dev.\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      if (debugPath.includes(trait.name)) {\n        throw new Error(`CycleError: The Trait '${trait.name}' utilized by the Resource '${type}' includes the following circular reference \"${debugPath.join(' > ')} > ${trait.name}\"`);\n      }\n    }\n    return;\n  }\n  const ownPath = macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? [...debugPath, trait.name] : null;\n\n  // immediately mark as seen to prevent cycles\n  // further down the tree from looping back\n  seen.add(trait);\n\n  // first apply any child traits\n  if (trait.traits?.length) {\n    for (const traitName of trait.traits) {\n      const subtrait = schema._traits.get(traitName);\n      if (macroCondition(getGlobalConfig().WarpDrive.features.ENFORCE_STRICT_RESOURCE_FINALIZATION)) {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`The trait ${traitName} used by the trait ${trait.name} MUST be supplied before the resource ${type} can be finalized for use.`);\n          }\n        })(subtrait) : {};\n      } else {\n        warn(`The trait ${traitName} used by the trait ${trait.name} MUST be supplied before the resource ${type} can be finalized for use.`, !!subtrait, {\n          id: 'warp-drive:missing-trait-schema-for-resource'\n        });\n      }\n      if (!subtrait) continue;\n      walkTrait(schema, subtrait, fields, seen, type, ownPath);\n    }\n  }\n\n  // then apply our own fields\n  mergeMap(fields, trait.fields);\n}\nfunction mergeMap(base, toApply) {\n  for (const [key, value] of toApply) {\n    base.set(key, value);\n  }\n}\n\n// Lazily close over fetch to avoid breaking Mirage\nconst _fetch = typeof fetch !== 'undefined' ? (...args) => fetch(...args) : typeof FastBoot !== 'undefined' ? (...args) => FastBoot.require('node-fetch')(...args) : () => {\n  throw new Error('No Fetch Implementation Found');\n};\n\n// clones a response in a way that should still\n// allow it to stream\nfunction cloneResponse(response, overrides) {\n  const props = cloneResponseProperties(response);\n  return new Response(response.body, Object.assign(props, overrides));\n}\nlet IS_MAYBE_MIRAGE = () => false;\nif (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n  IS_MAYBE_MIRAGE = () => Boolean(typeof window !== 'undefined' && (window.server?.pretender || window.fetch.toString().replace(/\\s+/g, '') !== 'function fetch() { [native code] }'.replace(/\\s+/g, '')));\n}\nconst MUTATION_OPS = new Set(['updateRecord', 'createRecord', 'deleteRecord']);\nconst ERROR_STATUS_CODE_FOR = new Map([[400, 'Bad Request'], [401, 'Unauthorized'], [402, 'Payment Required'], [403, 'Forbidden'], [404, 'Not Found'], [405, 'Method Not Allowed'], [406, 'Not Acceptable'], [407, 'Proxy Authentication Required'], [408, 'Request Timeout'], [409, 'Conflict'], [410, 'Gone'], [411, 'Length Required'], [412, 'Precondition Failed'], [413, 'Payload Too Large'], [414, 'URI Too Long'], [415, 'Unsupported Media Type'], [416, 'Range Not Satisfiable'], [417, 'Expectation Failed'], [419, 'Page Expired'], [420, 'Enhance Your Calm'], [421, 'Misdirected Request'], [422, 'Unprocessable Entity'], [423, 'Locked'], [424, 'Failed Dependency'], [425, 'Too Early'], [426, 'Upgrade Required'], [428, 'Precondition Required'], [429, 'Too Many Requests'], [430, 'Request Header Fields Too Large'], [431, 'Request Header Fields Too Large'], [450, 'Blocked By Windows Parental Controls'], [451, 'Unavailable For Legal Reasons'], [500, 'Internal Server Error'], [501, 'Not Implemented'], [502, 'Bad Gateway'], [503, 'Service Unavailable'], [504, 'Gateway Timeout'], [505, 'HTTP Version Not Supported'], [506, 'Variant Also Negotiates'], [507, 'Insufficient Storage'], [508, 'Loop Detected'], [509, 'Bandwidth Limit Exceeded'], [510, 'Not Extended'], [511, 'Network Authentication Required']]);\n\n/**\n * ```ts\n * import { Fetch } from '@warp-drive/core';\n * ```\n *\n * A basic Fetch Handler which converts a request into a\n * `fetch` call presuming the response to be `json`.\n *\n * ```ts\n * import { RequestManager, Fetch } from '@warp-drive/core';\n *\n * const manager = new RequestManager()\n *   .use([Fetch]);\n * ```\n *\n * @public\n */\nconst Fetch = {\n  async request(context) {\n    let response;\n    try {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error('The Fetch handler expects the request to have a URL, none was provided.');\n        }\n      })(context.request.url && typeof context.request.url === 'string') : {};\n      response = await _fetch(context.request.url, context.request);\n    } catch (e) {\n      if (e instanceof DOMException && e.name === 'AbortError') {\n        e.statusText = 'Aborted';\n        e.status = 20;\n        e.isRequestError = true;\n      } else {\n        e.statusText = 'Unknown Network Error';\n        e.status = 0;\n        if (!(e instanceof DOMException)) {\n          e.code = 0;\n        }\n        e.isRequestError = true;\n      }\n      throw e;\n    }\n    const isError = !response.ok || response.status >= 400;\n    const op = context.request.op;\n    const isMutationOp = Boolean(op && MUTATION_OPS.has(op));\n    if (!isError && !isMutationOp && response.status !== 204 && !response.headers.has('date')) {\n      if (IS_MAYBE_MIRAGE()) {\n        response.headers.set('date', new Date().toUTCString());\n      } else {\n        const headers = new Headers(response.headers);\n        headers.set('date', new Date().toUTCString());\n        response = cloneResponse(response, {\n          headers\n        });\n      }\n    }\n    context.setResponse(response);\n    if (response.status === 204) {\n      return null;\n    }\n    let text = '';\n    // if we are in a mirage context, we cannot support streaming\n    if (IS_MAYBE_MIRAGE()) {\n      text = await response.text();\n    } else {\n      const reader = response.body.getReader();\n      const decoder = new TextDecoder();\n      let isStreaming = context.hasRequestedStream;\n      let stream = isStreaming ? new TransformStream() : null;\n      let writer = stream?.writable.getWriter();\n      if (isStreaming) {\n        // Listen for the abort event on the AbortSignal\n        context.request.signal?.addEventListener('abort', () => {\n          if (!isStreaming) {\n            return;\n          }\n          void stream.writable.abort('Request Aborted');\n          void stream.readable.cancel('Request Aborted');\n        });\n        context.setStream(stream.readable);\n      }\n      while (true) {\n        // we manually read the stream instead of using `response.json()`\n        // or `response.text()` because if we need to stream the body\n        // we need to be able to pass the stream along efficiently.\n        const {\n          done,\n          value\n        } = await reader.read();\n        if (done) {\n          if (isStreaming) {\n            isStreaming = false;\n            await writer.ready;\n            await writer.close();\n          }\n          break;\n        }\n        text += decoder.decode(value, {\n          stream: true\n        });\n\n        // if we are streaming, we want to pass the stream along\n        if (isStreaming) {\n          await writer.ready;\n          await writer.write(value);\n        } else if (context.hasRequestedStream) {\n          const encode = new TextEncoder();\n          isStreaming = true;\n          stream = new TransformStream();\n          // Listen for the abort event on the AbortSignal\n          // eslint-disable-next-line @typescript-eslint/no-loop-func\n          context.request.signal?.addEventListener('abort', () => {\n            if (!isStreaming) {\n              return;\n            }\n            void stream.writable.abort('Request Aborted');\n            void stream.readable.cancel('Request Aborted');\n          });\n          context.setStream(stream.readable);\n          writer = stream.writable.getWriter();\n          await writer.ready;\n          await writer.write(encode.encode(text));\n          await writer.ready;\n          await writer.write(value);\n        }\n      }\n      if (isStreaming) {\n        isStreaming = false;\n        await writer.ready;\n        await writer.close();\n      }\n    }\n    // if we are an error, we will want to throw\n    if (isError) {\n      let errorPayload;\n      try {\n        errorPayload = JSON.parse(text);\n      } catch {\n        // void;\n      }\n      // attempt errors discovery\n      const errors = Array.isArray(errorPayload) ? errorPayload : isDict(errorPayload) && Array.isArray(errorPayload.errors) ? errorPayload.errors : null;\n      const statusText = response.statusText || ERROR_STATUS_CODE_FOR.get(response.status) || 'Unknown Request Error';\n      const msg = `[${response.status} ${statusText}] ${context.request.method ?? 'GET'} (${response.type}) - ${response.url}`;\n      const error = errors ? new AggregateError(errors, msg) : new Error(msg);\n      error.status = response.status;\n      error.statusText = statusText;\n      error.isRequestError = true;\n      error.code = error.status;\n      error.name = error.statusText.replaceAll(' ', '') + 'Error';\n      error.content = errorPayload;\n      throw error;\n    } else {\n      return JSON.parse(text);\n    }\n  }\n};\nfunction isDict(v) {\n  return v !== null && typeof v === 'object';\n}\nclass RequestManager {\n  /** @internal */\n\n  /** @internal */\n\n  /**\n   * A map of pending requests from request.id to their\n   * associated CacheHandler promise.\n   *\n   * This queue is managed by the CacheHandler\n   *\n   * @internal\n   */\n\n  /** @internal */\n\n  constructor(options) {\n    Object.assign(this, options);\n    this._pending = new Map();\n    this._deduped = new Map();\n    this._handlers = [];\n  }\n\n  /**\n   * Register a handler to use for primary cache intercept.\n   *\n   * Only one such handler may exist. If using the same\n   * RequestManager as the Store instance the Store\n   * registers itself as a Cache handler.\n   *\n   * @public\n   */\n  useCache(cacheHandler) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      if (this._hasCacheHandler) {\n        throw new Error(`\\`RequestManager.useCache(<handler>)\\` May only be invoked once.`);\n      }\n      if (Object.isFrozen(this._handlers)) {\n        throw new Error(`\\`RequestManager.useCache(<handler>)\\` May only be invoked prior to any request having been made.`);\n      }\n      this._hasCacheHandler = true;\n    }\n    cacheHandler[IS_CACHE_HANDLER] = true;\n    this._handlers.unshift(cacheHandler);\n    return this;\n  }\n\n  /**\n   * Register handler(s) to use when a request is issued.\n   *\n   * Handlers will be invoked in the order they are registered.\n   * Each Handler is given the opportunity to handle the request,\n   * curry the request, or pass along a modified request.\n   *\n   * @public\n   */\n  use(newHandlers) {\n    const handlers = this._handlers;\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      if (Object.isFrozen(handlers)) {\n        throw new Error(`Cannot add a Handler to a RequestManager after a request has been made`);\n      }\n      if (!Array.isArray(newHandlers)) {\n        throw new Error(`\\`RequestManager.use(<Handler[]>)\\` expects an array of handlers, but was called with \\`${typeof newHandlers}\\``);\n      }\n      newHandlers.forEach((handler, index) => {\n        if (!handler || typeof handler !== 'function' && typeof handler !== 'object' || typeof handler.request !== 'function') {\n          throw new Error(`\\`RequestManager.use(<Handler[]>)\\` expected to receive an array of handler objects with request methods, by the handler at index ${index} does not conform.`);\n        }\n      });\n    }\n    handlers.push(...newHandlers);\n    return this;\n  }\n\n  /**\n   * Issue a Request.\n   *\n   * Returns a Future that fulfills with a StructuredDocument\n   *\n   * @public\n   */\n  request(request) {\n    const handlers = this._handlers;\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      if (!Object.isFrozen(handlers)) {\n        Object.freeze(handlers);\n      }\n      assertValidRequest(request, true);\n    }\n    const controller = request.controller || new AbortController();\n    if (request.controller) {\n      delete request.controller;\n    }\n    const requestId = peekUniversalTransient('REQ_ID') ?? 0;\n    setUniversalTransient('REQ_ID', requestId + 1);\n    const context = {\n      controller,\n      response: null,\n      stream: null,\n      hasRequestedStream: false,\n      id: requestId,\n      identifier: null,\n      requester: request[EnableHydration] && request.store ? request.store : this\n    };\n    const promise = executeNextHandler(handlers, request, 0, context);\n\n    // the cache handler will set the result of the request synchronously\n    // if it is able to fulfill the request from the cache\n    const cacheResult = getRequestResult(requestId);\n    if (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {\n      if (!request.disableTestWaiter) {\n        const newPromise = waitFor(promise);\n        const finalPromise = upgradePromise(newPromise.then(result => {\n          setPromiseResult(finalPromise, {\n            isError: false,\n            result\n          });\n          clearRequestResult(requestId);\n          return result;\n        }, error => {\n          setPromiseResult(finalPromise, {\n            isError: true,\n            result: error\n          });\n          clearRequestResult(requestId);\n          throw error;\n        }), promise);\n        if (cacheResult) {\n          setPromiseResult(finalPromise, cacheResult);\n        }\n        return finalPromise;\n      }\n    }\n\n    // const promise1 = store.request(myRequest);\n    // const promise2 = store.request(myRequest);\n    // promise1 === promise2; // false\n    // either we need to make promise1 === promise2, or we need to make sure that\n    // we need to have a way to key from request to result\n    // such that we can lookup the result here and return it if it exists\n    const finalPromise = upgradePromise(promise.then(result => {\n      setPromiseResult(finalPromise, {\n        isError: false,\n        result\n      });\n      clearRequestResult(requestId);\n      return result;\n    }, error => {\n      setPromiseResult(finalPromise, {\n        isError: true,\n        result: error\n      });\n      clearRequestResult(requestId);\n      throw error;\n    }), promise);\n    if (cacheResult) {\n      setPromiseResult(finalPromise, cacheResult);\n    }\n    return finalPromise;\n  }\n\n  /**\n   * This method exists so that the RequestManager can be created\n   * can be created by container/factory systems that expect to\n   * call a static `create` method to instantiate the class.\n   *\n   * Using `new RequestManager()` directly is preferred.\n   *\n   * @private\n   */\n  static create(options) {\n    return new this(options);\n  }\n}\n\n/**\n * This type exists for internal use only for\n * where intimate contracts still exist either for\n * the Test Suite or for Legacy code.\n *\n * @private\n */\n\n/**\n * @module\n * @mergeModuleWith <project>\n */\n\nif (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {\n  // @ts-expect-error adding to globalThis\n  globalThis.setWarpDriveLogging = setLogging;\n\n  // @ts-expect-error adding to globalThis\n  globalThis.getWarpDriveRuntimeConfig = getRuntimeConfig;\n}\n\n/**\n * Options for setting up a Store instance with `useRecommendedStore`.\n */\n\n/**\n * Creates a configured Store class with recommended defaults\n * for schema handling, reactivity, caching, and request management.\n *\n * ```ts\n * import { useRecommendedStore } from '@warp-drive/core';\n * import { JSONAPICache } from '@warp-drive/json-api';\n *\n * export const Store = useRecommendedStore({\n *   cache: JSONAPICache,\n *   schemas: [],\n * });\n * ```\n */\nfunction useRecommendedStore(options, StoreKlass = Store) {\n  return class AppStore extends StoreKlass {\n    requestManager = new RequestManager().use([...(options.handlers ?? []), Fetch]).useCache(CacheHandler);\n    lifetimes = options.policy ?? new DefaultCachePolicy({\n      apiCacheHardExpires: 15 * 60 * 1000,\n      // 15 minutes\n      apiCacheSoftExpires: 1 * 30 * 1000,\n      // 30 seconds\n      constraints: {\n        headers: {\n          'X-WarpDrive-Expires': true,\n          'Cache-Control': true,\n          Expires: true\n        }\n      }\n    });\n    createSchemaService() {\n      const schema = new SchemaService();\n      registerDerivations(schema);\n      if (options.schemas) schema.registerResources(options.schemas);\n      if (options.traits) {\n        for (const trait of options.traits) {\n          schema.registerTrait(trait);\n        }\n      }\n      if (options.derivations) {\n        for (const derivation of options.derivations) {\n          schema.registerDerivation(derivation);\n        }\n      }\n      if (options.transformations) {\n        for (const transformation of options.transformations) {\n          schema.registerTransformation(transformation);\n        }\n      }\n      if (options.hashFns) {\n        for (const hashFn of options.hashFns) {\n          schema.registerHashFn(hashFn);\n        }\n      }\n      if (options.CAUTION_MEGA_DANGER_ZONE_extensions) {\n        for (const extension of options.CAUTION_MEGA_DANGER_ZONE_extensions) {\n          schema.CAUTION_MEGA_DANGER_ZONE_registerExtension(extension);\n        }\n      }\n      return schema;\n    }\n    createCache(capabilities) {\n      // eslint-disable-next-line new-cap\n      return new options.cache(capabilities);\n    }\n    instantiateRecord(key, createArgs) {\n      return instantiateRecord(this, key, createArgs);\n    }\n    teardownRecord(record) {\n      return teardownRecord(record);\n    }\n  };\n}\nexport { useRecommendedStore as A, setIdentifierGenerationMethod as B, CacheHandler as C, setIdentifierUpdateMethod as D, setIdentifierForgetMethod as E, Fetch as F, setIdentifierResetMethod as G, setKeyInfoForResource as H, RecordArrayManager as R, Store as S, _clearCaches as _, isRequestKey as a, coerceId as b, constructResource as c, assertPrivateStore as d, ensureStringId as e, fastPush as f, isPrivateStore as g, assertPrivateCapabilities as h, isResourceKey as i, setRecordIdentifier as j, StoreMap as k, createLegacyManyArray as l, log as m, normalizeModelName as n, logGroup as o, checkout as p, instantiateRecord as q, recordIdentifierFor as r, storeFor as s, teardownRecord as t, SchemaService as u, fromIdentity as v, withDefaults as w, registerDerivations as x, commit as y, RequestManager as z };","// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n/**\n * Options signature for Legacy Attributes.\n */\n\n/**\n * A generic \"field\" that can be used to define\n * primitive value fields.\n *\n * Replaces \"attribute\" for primitive value fields.\n * Can also be used to eject from deep-tracking of\n * objects or arrays.\n *\n * A major difference between \"field\" and \"attribute\"\n * is that \"type\" points to a legacy transform on\n * \"attribute\" that a serializer *might* use, while\n * \"type\" points to a new-style transform on \"field\"\n * that a record implmentation *must* use.\n *\n * @public\n */\n\n/**\n * A field that can be used to alias one key to another\n * key present in the cache version of the resource.\n *\n * Unlike DerivedField, an AliasField may write to its\n * source when a record is in an editable mode.\n *\n * ~~AliasFields may utilize a transform, specified by type,\n * to pre/post process the raw data for the field.~~ (not yet implemented)\n *\n * An AliasField may also specify a `kind` via options.\n * `kind` may be any other valid field kind other than\n *\n * - `@hash`\n * - `@id`\n * - `@local`\n * - `derived`\n *\n * This allows an AliasField to rename any field in the cache.\n *\n * Alias fields are generally intended to be used to support migrating\n * between different schemas, though there are times where they are useful\n * as a form of advanced derivation when used with a transform. For instance,\n * an AliasField could be used to expose both a string and a Date version of the\n * same field, with both being capable of being written to.\n *\n * @public\n */\n\n/**\n * A field that can be used to alias one key to another\n * key present in the cache version of the resource.\n *\n * Unlike DerivedField, an AliasField may write to its\n * source when a record is in an editable mode.\n *\n * ~~AliasFields may utilize a transform, specified by type,\n * to pre/post process the raw data for the field.~~ (not yet implemented)\n *\n * An AliasField may also specify a `kind` via options.\n * `kind` may be any other valid field kind other than\n *\n * - `@hash`\n * - `@id`\n * - `@local`\n * - `derived`\n *\n * This allows an AliasField to rename any field in the cache.\n *\n * Alias fields are generally intended to be used to support migrating\n * between different schemas, though there are times where they are useful\n * as a form of advanced derivation when used with a transform. For instance,\n * an AliasField could be used to expose both a string and a Date version of the\n * same field, with both being capable of being written to.\n *\n * @public\n */\n\n/**\n * A field that can be used to alias one key to another\n * key present in the cache version of the resource.\n *\n * Unlike DerivedField, an AliasField may write to its\n * source when a record is in an editable mode.\n *\n * AliasFields may utilize a transform, specified by type,\n * to pre/post process the field.\n *\n * An AliasField may also specify a `kind` via options.\n * `kind` may be any other valid field kind other than\n *\n * - `@hash`\n * - `@id`\n * - `@local`\n * - `derived`\n *\n * This allows an AliasField to rename any field in the cache.\n *\n * Alias fields are generally intended to be used to support migrating\n * between different schemas, though there are times where they are useful\n * as a form of advanced derivation when used with a transform. For instance,\n * an AliasField could be used to expose both a string and a Date version of the\n * same field, with both being capable of being written to.\n *\n * @public\n */\n\n/**\n * Represents a field whose value is the primary\n * key of the resource.\n *\n * This allows any field to serve as the primary\n * key while still being able to drive identity\n * needs within the system.\n *\n * This is useful for resources that use for instance\n * 'uuid', 'urn' or 'entityUrn' or 'primaryKey' as their\n * primary key field instead of 'id'.\n *\n * @public\n */\n\n/**\n * Represents a specialized field whose computed value\n * will be used as the primary key of a schema-object\n * for serializability and comparison purposes.\n *\n * This field functions similarly to derived fields in that\n * it is non-settable, derived state but differs in that\n * it is only able to compute off of cache state and is given\n * no access to a record instance.\n *\n * This means that if a hashing function wants to compute its value\n * taking into account transformations and derivations it must\n * perform those itself.\n *\n * A schema-array can declare its \"key\" value to be `@hash` if\n * the schema-objects it contains have such a field.\n *\n * Only one hash field is permittable per schema-object, and\n * it should be placed in the `ResourceSchema`'s `@id` field\n * in place of an `IdentityField`.\n *\n * @public\n */\n\n/**\n * Represents a field whose value is a local\n * value that is not stored in the cache, nor\n * is it sent to the server.\n *\n * Local fields can be written to, and their\n * value is both memoized and reactive (though\n * not deep-tracked).\n *\n * Because their state is not derived from the cache\n * data or the server, they represent a divorced\n * uncanonical source of state.\n *\n * For this reason Local fields should be used sparingly.\n *\n * Currently, while we document this feature here,\n * only allow our own ReactiveResource default fields to\n * utilize them and the feature should be considered private.\n *\n * Example use cases that drove the creation of local\n * fields are states like `isDestroying` and `isDestroyed`\n * which are specific to a record instance but not\n * stored in the cache. We wanted to be able to drive\n * these fields from schema the same as all other fields.\n *\n * Don't make us regret this decision.\n *\n * @public\n */\n\n/**\n * Represents a field whose value is an object\n * with keys pointing to values that are primitive\n * values.\n *\n * If values of the keys are not primitives, or\n * if the key/value pairs have well-defined shape,\n * use 'schema-object' instead.\n *\n * @public\n */\n\n/**\n * Represents a field whose value is an object\n * with a well-defined structure described by\n * a schema-object (a non-resource schema).\n *\n * If the object's structure is not well-defined,\n * use 'object' instead.\n *\n * By default, a SchemaObject within\n *\n * @public\n */\n\n/**\n * Represents a field whose value is an array\n * of primitive values.\n *\n * If the array's elements are not primitive\n * values, use 'schema-array' instead.\n *\n * @public\n */\n\n/**\n * Represents a field whose value is an array\n * of objects with a well-defined structure\n * described by a non-resource schema.\n *\n * If the array's elements are not well-defined,\n * use 'array' instead.\n *\n * @public\n */\n\n/**\n * Represents a field whose value is derived\n * from other fields in the schema.\n *\n * The value is read-only, and is not stored\n * in the cache, nor is it sent to the server.\n *\n * Usage of derived fields should be minimized\n * to scenarios where the derivation is known\n * to be safe. For instance, derivations that\n * required fields that are not always loaded\n * or that require access to related resources\n * that may not be loaded should be avoided.\n *\n * @public\n */\n\n/**\n * Represents a field that is a reference to\n * another resource.\n *\n * SUPPORT FOR THIS FEATURE IS NOT YET IMPLEMENTED\n * BY ReactiveResource\n *\n * @public\n */\n\n/**\n * Represents a field that is a reference to\n * a collection of other resources, potentially\n * paginate.\n *\n * SUPPORT FOR THIS FEATURE IS NOT YET IMPLEMENTED\n * BY ReactiveResource\n *\n * @public\n */\n\n/**\n * > [!CAUTION]\n * > This Field is LEGACY\n * > It cannot be used with PolarisMode\n *\n * A generic \"field\" that can be used to define\n * primitive value fields.\n *\n * If the field points to an object or array,\n * it will not be deep-tracked.\n *\n * Transforms when defined are legacy transforms\n * that a serializer *might* use, but their usage\n * is not guaranteed.\n *\n * @public\n */\n\n/**\n * > [!CAUTION]\n * > This Field is LEGACY\n *\n * Represents a field that is a reference to\n * another resource.\n *\n * This is the legacy version of the `ResourceField`.\n *\n * @public\n */\n\n/**\n * > [!CAUTION]\n * > This Field is LEGACY\n *\n * Represents a field that is a reference to\n * another resource.\n *\n * This is the legacy version of the `ResourceField`.\n *\n * @public\n */\n\n/**\n * > [!CAUTION]\n * > This Field is LEGACY\n *\n * Represents a field that is a reference to\n * a collection of other resources.\n *\n * This is the legacy version of the `CollectionField`.\n *\n * @public\n */\n\n/**\n * > [!CAUTION]\n * > This Field is LEGACY\n *\n * Represents a field that is a reference to\n * a collection of other resources.\n *\n * This is the legacy version of the `CollectionField`.\n *\n * @public\n */\n\n/**\n * A union of all possible LegacyMode field schemas.\n *\n * Available field schemas are:\n *\n * - {@link GenericField}\n * - {@link LegacyAliasField}\n * - {@link LocalField}\n * - {@link ObjectField}\n * - {@link SchemaObjectField}\n * - {@link ArrayField}\n * - {@link SchemaArrayField}\n * - {@link DerivedField}\n * - {@link ResourceField | ResourceField (not yet implemented)}\n * - {@link CollectionField | CollectionField (not yet implemented)}\n * - {@link LegacyAttributeField}\n * - {@link LegacyBelongsToField}\n * - {@link LegacyHasManyField}\n *\n * @public\n */\n\n/**\n * A union of all possible PolarisMode field schemas.\n *\n * Available field schemas are:\n *\n * - {@link GenericField}\n * - {@link PolarisAliasField}\n * - {@link LocalField}\n * - {@link ObjectField}\n * - {@link SchemaObjectField}\n * - {@link ArrayField}\n * - {@link SchemaArrayField}\n * - {@link DerivedField}\n * - {@link ResourceField | ResourceField (not yet implemented)}\n * - {@link CollectionField | CollectionField (not yet implemented)}\n * - {@link LinksModeBelongsToField}\n * - {@link LinksModeHasManyField}\n *\n * @public\n */\n\n/**\n * A union of all possible LegacyMode and PolarisMode\n * field schemas.\n *\n * You likely will want to use PolarisModeFieldSchema,\n * LegacyModeFieldSchema, or ObjectFieldSchema instead\n * as appropriate as they are more specific and will\n * provide better guidance around what is valid.\n *\n * @public\n */\n\n/**\n * A union of all possible LegacyMode and PolarisMode\n * field schemas that represent data that could be in\n * the cache.\n *\n * In other words this will not include types like alias\n * fields, local fields, or derived fields.\n *\n * @public\n */\n\n/**\n * A union of all possible field schemas that can be\n * used in an ObjectSchema.\n *\n * @public\n */\n\n/**\n * Represents a schema for a primary resource in PolarisMode.\n *\n * Primary resources are objects with a unique identity of their\n * own which may allow them to appear in relationships, or in multiple\n * response documents.\n *\n * @public\n */\n\n/**\n * Represents a schema for a primary resource in LegacyMode\n *\n * Primary resources are objects with a unique identity of their\n * own which may allow them to appear in relationships, or in multiple\n * response documents.\n *\n * @public\n */\n\n/**\n * A type which represents a valid JSON schema\n * definition for either a PolarisMode or a\n * LegacyMode resource.\n *\n * Note, this is separate from the type returned\n * by the SchemaService which provides fields as a Map\n * instead of as an Array.\n *\n * @public\n */\n\n/**\n * Represents a schema for an object that is not\n * a primary resource (has no unique identity of its own).\n *\n * ObjectSchemas may not currently contain relationships.\n *\n * @public\n */\n\n/**\n * A trait for use on a PolarisMode record\n */\n\n/**\n * A trait for use on a LegacyMode record\n */\n\n/**\n * A union of\n * - {@link LegacyTrait}\n * - {@link PolarisTrait}\n */\n\n/**\n * A no-op type utility that enables type-checking resource schema\n * definitions.\n *\n * Will return the passed in schema.\n *\n * This will not validate relationship inverses or related types,\n * as doing so would require a full schema graph to be passed in\n * and no cycles in the graph to be present.\n *\n * @public\n */\nfunction resourceSchema(schema) {\n  return schema;\n}\n\n/**\n * A no-op type utility that enables type-checking object schema\n * definitions.\n *\n * Will return the passed in schema.\n *\n * @public\n */\nfunction objectSchema(schema) {\n  return schema;\n}\n\n/**\n * A type utility to narrow a schema to a ResourceSchema\n *\n * @public\n */\nfunction isResourceSchema(schema) {\n  return schema?.identity?.kind === '@id';\n}\n\n/**\n * A type utility to narrow a schema to LegacyResourceSchema\n *\n * @public\n */\nfunction isLegacyResourceSchema(schema) {\n  return isResourceSchema(schema) && schema.legacy === true;\n}\nexport { isLegacyResourceSchema, isResourceSchema, objectSchema, resourceSchema };","export { c as createDeferred, g as getPromiseResult, s as setPromiseResult } from \"./future-BKkJJkj7.js\";\n\n/**\n * Brands the supplied object with the supplied response type.\n *\n * ```ts\n * import type { ReactiveDataDocument } from '@warp-drive/core/reactive';\n * import { withResponseType } from '@warp-drive/core/request';\n * import type { User } from '#/data/user.ts'\n *\n * const result = await store.request(\n *  withResponseType<ReactiveDataDocument<User>>({ url: '/users/1' })\n * );\n *\n * result.content.data; // will have type User\n * ```\n *\n */\nfunction withResponseType(obj) {\n  return obj;\n}\n\n/**\n * Brands the supplied object with the supplied response type\n * wrapped in {@link ReactiveDataDocument}. This is a convenience for\n * the common case of using {@link withResponseType} with `ReactiveDataDocument`.\n *\n * ```ts\n * import { withReactiveResponse } from '@warp-drive/core/request';\n * import type { User } from '#/data/user.ts'\n *\n * const result = await store.request(\n *   withReactiveResponse<User>({ url: '/users/1' })\n * );\n *\n * result.content.data; // will have type User\n * ```\n *\n * @public\n */\nfunction withReactiveResponse(obj) {\n  return obj;\n}\n\n/**\n * @deprecated use {@link withResponseType} instead\n */\nconst withBrand = withResponseType;\nexport { withBrand, withReactiveResponse, withResponseType };","import { getOrSetGlobal } from './types/-private.js';\n\n///////////////////\n///// WARNING /////\n///////////////////\n\n// Great, got your attention with that warning didn't we?\n// Good. Here's the deal: typescript treats symbols as unique types.\n// If by accident a module creating a symbol is processed more than\n// once, the symbol will be different in each processing. This will\n// cause a type error.\n// It could also cause a runtime error if the symbol is used innapropriately.\n// However, this case is extremely hard to hit and would require other things\n// to go wrong first.\n//\n// So, why do the warning? And why do we lie about the types of the symbols?\n//\n// Because we intentionally create multiple copies of them within the types\n// at build time. This is because we rollup our d.ts files in order to give\n// our consumers a better experience.\n//\n// However, no tool today supports rolling up d.ts files with multiple entry\n// points correctly. The tool we use currently (vite-plugin-dts) uses @microsoft/api-extractor\n// which creates a fully unique stand-alone types file per-entry-point. Thus\n// every entry point that uses one of these symbols somewhere will have accidentally\n// created a new symbol type.\n//\n// This cast allows us to rollup these types using this tool while not encountering\n// the unique symbol type issue.\n//\n// Note that none of these symbols are part of the public API, these are used for\n// debugging DX and as a safe way to provide an intimate contract on public objects.\n\nconst SOURCE = getOrSetGlobal('SOURCE', Symbol('#source'));\nconst Destroy = getOrSetGlobal('Destroy', Symbol.dispose || Symbol.for('Dispose'));\nconst Checkout = getOrSetGlobal('Checkout', Symbol('Checkout'));\nconst Commit = getOrSetGlobal('Commit', Symbol('Commit'));\nconst Context = getOrSetGlobal('Context', Symbol('Context'));\nexport { Checkout as C, Destroy as D, SOURCE as S, Context as a, Commit as b };","import { macroCondition, getGlobalConfig } from '@embroider/macros';\nconst name = \"@warp-drive/core\";\nconst version = \"5.8.2\";\n\n// in testing mode, we utilize globals to ensure only one copy exists of\n// these maps, due to bugs in ember-auto-import\n\nconst GlobalRef = globalThis;\nconst UniversalCache = GlobalRef.__warpDrive_universalCache = GlobalRef.__warpDrive_universalCache ?? {};\n\n// in order to support mirror packages, we ensure that each\n// unique package name has its own global cache\nGlobalRef[name] = GlobalRef[name] ?? {\n  __version: version\n};\nconst GlobalSink = GlobalRef[name];\nif (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n  if (GlobalSink.__version !== version) {\n    throw new Error('Multiple versions of WarpDrive detected, the application will malfunction.');\n  }\n}\nconst ModuleScopedCaches = GlobalSink.__warpDrive_ModuleScopedCaches ?? {};\nif (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {\n  if (!GlobalSink.__warpDrive_ModuleScopedCaches) {\n    GlobalSink.__warpDrive_ModuleScopedCaches = ModuleScopedCaches;\n  } else {\n    // eslint-disable-next-line no-console\n    console.warn(`\nMultiple copies of WarpDrive have been detected. This may be due to a bug in ember-auto-import\n  in which test assets get their own copy of some v2-addons. This can cause the application to\n  malfunction as each copy will maintain its own separate state.`);\n  }\n} else {\n  if (GlobalSink.__warpDrive_hasOtherCopy) {\n    throw new Error('Multiple copies of WarpDrive detected, the application will malfunction.');\n  }\n  GlobalSink.__warpDrive_hasOtherCopy = true;\n}\nfunction getOrSetGlobal(key, value) {\n  if (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {\n    const existing = ModuleScopedCaches[key];\n    if (existing === undefined) {\n      return ModuleScopedCaches[key] = value;\n    } else {\n      return existing;\n    }\n  } else {\n    return value;\n  }\n}\nfunction peekTransient(key) {\n  const globalKey = `(transient) ${key}`;\n  return ModuleScopedCaches[globalKey] ?? null;\n}\nfunction setTransient(key, value) {\n  const globalKey = `(transient) ${key}`;\n  return ModuleScopedCaches[globalKey] = value;\n}\nfunction getOrSetUniversal(key, value) {\n  if (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {\n    const existing = UniversalCache[key];\n    if (existing === undefined) {\n      return UniversalCache[key] = value;\n    } else {\n      return existing;\n    }\n  } else {\n    return value;\n  }\n}\nfunction peekUniversalTransient(key) {\n  const globalKey = `(transient) ${key}`;\n  return UniversalCache[globalKey] ?? null;\n}\nfunction setUniversalTransient(key, value) {\n  const globalKey = `(transient) ${key}`;\n  return UniversalCache[globalKey] = value;\n}\nexport { getOrSetGlobal, getOrSetUniversal, peekTransient, peekUniversalTransient, setTransient, setUniversalTransient };","import { getOrSetUniversal, getOrSetGlobal } from './-private.js';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\nconst SkipCache = getOrSetUniversal('SkipCache', Symbol.for('wd:skip-cache'));\nconst EnableHydration = getOrSetUniversal('EnableHydration', Symbol.for('wd:enable-hydration'));\nconst IS_FUTURE = getOrSetGlobal('IS_FUTURE', Symbol('IS_FUTURE'));\nconst STRUCTURED = getOrSetGlobal('DOC', Symbol('DOC'));\n\n/**\n * Use these options to adjust {@link CacheHandler} behavior for a request\n * via {@link RequestInfo.cacheOptions}.\n *\n */\n\n/**\n * When a {@link Future} resolves, it returns an object\n * containing the original {@link RequestInfo | request},\n * the {@link Response | response} set by the handler chain (if any), and\n * the processed content.\n */\n\n/**\n * When a {@link Future} rejects, it throws either an {@link Error}\n * an {@link AggregateError} or a {@link DOMException} that maintains\n * the `{ request, response, content }` shape but is also an Error instance\n * itself.\n *\n * If using the error originates from the {@link Fetch | Fetch Handler}\n * the error will be a {@link FetchError}\n */\n\n/**\n * A union of the resolve/reject data types for the {@link Future}\n * returned by {@link Store.request | request}\n *\n * See also the docs for:\n *\n * - {@link Future}\n * - {@link StructuredDataDocument} (resolved/successful requests)\n * - {@link StructuredErrorDocument} (rejected/failed requests)\n */\n\n/**\n * The {@link RequestInit} interface accepted by the native {@link fetch} API.\n *\n * WarpDrive provides our own typings due to incompleteness in the native typings.\n *\n * @privateRemarks\n * - [MDN Reference (fetch)](https://developer.mozilla.org/docs/Web/API/Window/fetch)\n * - [MDN Reference (RequestInit)](https://developer.mozilla.org/en-US/docs/Web/API/RequestInit)\n * - [MDN Reference (Request)](https://developer.mozilla.org/docs/Web/API/Request)\n *\n */\n\n/**\n * Extends JavaScript's native {@link fetch} {@link NativeRequestInit | RequestInit} with additional\n * properties specific to the {@link RequestManager | RequestManager's} capabilities.\n *\n * This interface is used to define the shape of a request that can be made via\n * either the {@link RequestManager.request} or {@link Store.request} methods.\n *\n * @privateRemarks\n * - [MDN Reference (fetch)](https://developer.mozilla.org/docs/Web/API/Window/fetch)\n * - [MDN Reference (RequestInit)](https://developer.mozilla.org/en-US/docs/Web/API/RequestInit)\n * - [MDN Reference (Request)](https://developer.mozilla.org/docs/Web/API/Request)\n *\n * @public\n * @since 4.12\n */\n\n/**\n * Immutable version of {@link RequestInfo}. This is what is passed to handlers.\n *\n */\n\nexport { EnableHydration, IS_FUTURE, STRUCTURED, SkipCache };","import { getOrSetUniversal } from './-private.js';\nconst RuntimeConfig = getOrSetUniversal('WarpDriveRuntimeConfig', {\n  debug: {}\n});\nfunction trySessionStorage() {\n  // This works even when sessionStorage is not available.\n  // See https://github.com/warp-drive-data/warp-drive/issues/9784\n  try {\n    return globalThis.sessionStorage;\n  } catch {\n    return undefined;\n  }\n}\nconst storage = trySessionStorage();\nconst settings = storage?.getItem('WarpDriveRuntimeConfig');\nif (settings) {\n  Object.assign(RuntimeConfig, JSON.parse(settings));\n}\nfunction getRuntimeConfig() {\n  return RuntimeConfig;\n}\n\n/**\n * Upserts the specified logging configuration into the runtime\n * config.\n *\n * globalThis.setWarpDriveLogging({ LOG_CACHE: true } });\n *\n */\nfunction setLogging(config) {\n  Object.assign(RuntimeConfig.debug, config);\n  storage?.setItem('WarpDriveRuntimeConfig', JSON.stringify(RuntimeConfig));\n}\nexport { getRuntimeConfig, setLogging };","import { getOrSetGlobal } from './-private.js';\nconst RecordStore = getOrSetGlobal('Store', Symbol('Store'));\n\n/**\n * Symbol for the name of a resource, transformation\n * or derivation.\n *\n * ### With Resources\n *\n * This is an optional feature that can be used by\n * record implementations to provide a typescript\n * hint for the type of the resource.\n *\n * When used, WarpDrive APIs can\n * take advantage of this to provide better type\n * safety and intellisense.\n *\n * ### With Derivations\n *\n * Required for derivations registered with\n * `store.registerDerivation(derivation)`.\n *\n * ```ts\n * function concat(record: object, options: ObjectValue | null, prop: string): string {}\n * concat[Name] = 'concat';\n * ```\n *\n * ### With Transforms\n *\n * Required for new-style transformations registered\n * with `store.registerTransform(transform)`.\n *\n * For legacy transforms, if not used,\n * `attr<Transform>('name')` will allow any string name.\n * `attr('name')` will always allow any string name.\n *\n * If used, `attr<Transform>('name')` will enforce\n * that the name is the same as the transform name.\n *\n * @type {Symbol}\n */\nconst Type = getOrSetGlobal('$type', Symbol('$type'));\n\n/**\n * Symbol for the type of a resource.\n *\n * This is an optional feature that can be used by\n * record implementations to provide a typescript\n * hint for the type of the resource.\n *\n * When used, WarpDrive APIs can\n * take advantage of this to provide better type\n * safety and intellisense.\n *\n * @type {Symbol}\n */\nconst ResourceType = Type;\n\n/**\n * Symbol for the name of a transform.\n *\n * This is an optional feature that can be used by\n * transform implementations to provide a typescript\n * hint for the name of the transform.\n *\n * If not used, `attr<Transform>('name')` will\n * allow any string name. `attr('name')` will always\n * allow any string name.\n *\n * If used, `attr<Transform>('name')` will enforce\n * that the name is the same as the transform name.\n *\n * @type {Symbol}\n */\nconst TransformName = Type;\n\n/**\n * Symbol for use by builders to indicate the return type\n * generic to use for store.request()\n *\n * @type {Symbol}\n */\nconst RequestSignature = getOrSetGlobal('RequestSignature', Symbol('RequestSignature'));\nexport { RecordStore, RequestSignature, ResourceType, TransformName, Type };","import { macroCondition, getGlobalConfig } from '@embroider/macros';\nconst DEFAULT_MAX_CACHE_SIZE = 10_000;\n\n/**\n * An LRUCache implementation with upsert semantics.\n *\n * This implementation is *not* generic, but focuses on\n * performance tuning for the string transformation cases\n * where the key maps to the value very simply.\n *\n * It takes a work function that should generate a new value\n * for a given key when called. It will be called when the key\n * is not found in the cache.\n *\n * It keeps track of the number of hits, misses, and ejections\n * in DEBUG envs, which is useful for tuning the cache size.\n *\n * This is an internal utility class for use by this module\n * and by `@warp-drive/utilities/string`. It is not intended\n * for use outside of these modules at this time.\n *\n * @private\n */\nclass LRUCache {\n  // debug stats\n\n  constructor(doWork, size) {\n    this.size = size || DEFAULT_MAX_CACHE_SIZE;\n    this.state = new Map();\n    this.doWork = doWork;\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      this._hits = 0;\n      this._misses = 0;\n      this._ejected = 0;\n    }\n  }\n  get(key) {\n    const value = this.state.get(key);\n    if (value) {\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        this._hits++;\n      }\n      this.state.delete(key);\n      this.state.set(key, value);\n      return value;\n    }\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      this._misses++;\n    }\n    const newValue = this.doWork(key);\n    this.set(key, newValue);\n    return newValue;\n  }\n  set(key, value) {\n    if (this.state.size === this.size) {\n      for (const [k] of this.state) {\n        if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n          this._ejected++;\n        }\n        this.state.delete(k);\n        break;\n      }\n    }\n    this.state.set(key, value);\n  }\n  clear() {\n    this.state.clear();\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      this._hits = 0;\n      this._misses = 0;\n      this._ejected = 0;\n    }\n  }\n}\nconst STRING_DASHERIZE_REGEXP = /[ _]/g;\nconst STRING_DECAMELIZE_REGEXP = /([a-z\\d])([A-Z])/g;\nconst STRING_DASHERIZE_CACHE = new LRUCache(key => key.replace(STRING_DECAMELIZE_REGEXP, '$1_$2').toLowerCase().replace(STRING_DASHERIZE_REGEXP, '-'));\n\n/**\n * This is an internal utility function that converts a string\n * to a dasherized format. Library consumers should use the\n * re-exported version from `@warp-drive/utilities/string` instead.\n *\n * This version is only in this location to support a deprecated\n * behavior in the core package and will be removed in a future.\n *\n * @private\n */\nfunction dasherize(str) {\n  return STRING_DASHERIZE_CACHE.get(str);\n}\nexport { LRUCache, STRING_DASHERIZE_CACHE, dasherize };","import { tagForProperty } from '@ember/-internals/metal';\nimport { _backburner } from '@ember/runloop';\nimport { createCache, track, updateTag, consumeTag, getValue, dirtyTag } from '@glimmer/validator';\nimport { macroCondition, getGlobalConfig, importSync } from '@embroider/macros';\nimport { setupSignals } from '@warp-drive/core/configure';\n\nconst emberDirtyTag = dirtyTag;\nfunction buildSignalConfig(options) {\n  const ARRAY_SIGNAL = options.wellknown.Array;\n  return {\n    createSignal(obj, key) {\n      if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_COMPUTED_CHAINS)) {\n        if (key === ARRAY_SIGNAL) {\n          return [tagForProperty(obj, key), tagForProperty(obj, 'length'), tagForProperty(obj, '[]')];\n        }\n      }\n      return tagForProperty(obj, key);\n    },\n    consumeSignal(signal) {\n      if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_COMPUTED_CHAINS)) {\n        if (Array.isArray(signal)) {\n          consumeTag(signal[0]);\n          consumeTag(signal[1]);\n          consumeTag(signal[2]);\n          return;\n        }\n      }\n      consumeTag(signal);\n    },\n    notifySignal(signal) {\n      if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_COMPUTED_CHAINS)) {\n        if (Array.isArray(signal)) {\n          emberDirtyTag(signal[0]);\n          emberDirtyTag(signal[1]);\n          emberDirtyTag(signal[2]);\n          return;\n        }\n      }\n      emberDirtyTag(signal);\n    },\n    createMemo: (object, key, fn) => {\n      if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_COMPUTED_CHAINS)) {\n        const propertyTag = tagForProperty(object, key);\n        const memo = createCache(fn);\n        let ret;\n        const wrappedFn = () => {\n          ret = getValue(memo);\n        };\n        return () => {\n          const tag = track(wrappedFn);\n          updateTag(propertyTag, tag);\n          consumeTag(tag);\n          return ret;\n        };\n      } else {\n        const memo = createCache(fn);\n        return () => getValue(memo);\n      }\n    },\n    willSyncFlushWatchers: () => {\n      //@ts-expect-error\n      return !!_backburner.currentInstance && _backburner._autorun !== true;\n    },\n    waitFor: async promise => {\n      if (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {\n        const {\n          waitForPromise\n        } = importSync('@ember/test-waiters');\n        return waitForPromise(promise);\n      }\n      return promise;\n    }\n  };\n}\nsetupSignals(buildSignalConfig);\n\nexport { buildSignalConfig };\n","import { Context } from '@warp-drive/core/reactive/-private';\nimport { warn } from '@ember/debug';\nimport { createDeferred } from '@warp-drive/core/request';\nimport { waitFor } from '@warp-drive/core/signals/-leaked';\nimport { assertPrivateStore, coerceId } from '@warp-drive/core/store/-private';\nimport { getOrSetGlobal } from '@warp-drive/core/types/-private';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\n\n/**\n  SnapshotRecordArray is not directly instantiable.\n  Instances are provided to consuming application's\n  adapters for certain `findAll` requests.\n\n  @hideconstructor\n  @public\n*/\nclass SnapshotRecordArray {\n  /**\n   * An array of snapshots\n   *\n   * @internal\n   */\n\n  /** @internal */\n\n  /**\n   * The ResourceType of the underlying records for the {@link Snapshot | Snapshots} in the array\n   */\n\n  /** @internal */\n\n  /**\n   *  A hash of adapter options passed into the store method for this request.\n       Example\n       ```js [app/adapters/post.js]\n      import MyCustomAdapter from './custom-adapter';\n       export default class PostAdapter extends MyCustomAdapter {\n        findAll(store, type, sinceToken, snapshotRecordArray) {\n          if (snapshotRecordArray.adapterOptions.subscribe) {\n            // ...\n          }\n          // ...\n        }\n      }\n      ```\n   */\n\n  /**\n   * The relationships to include for this request.\n       Example\n       ```js [app/adapters/application.js]\n      import Adapter from '@ember-data/adapter';\n       export default class ApplicationAdapter extends Adapter {\n        findAll(store, type, snapshotRecordArray) {\n          let url = `/${type.modelName}?include=${encodeURIComponent(snapshotRecordArray.include)}`;\n           return fetch(url).then((response) => response.json())\n        }\n      }\n      ```\n   */\n\n  /**\n    SnapshotRecordArray is not directly instantiable.\n    Instances are provided to consuming application's\n    adapters and serializers for certain requests.\n     @private\n    @constructor\n    @param {Store} store\n    @param {String} type\n    @param options\n   */\n  constructor(store, type, options = {}) {\n    this.__store = store;\n    this._snapshots = null;\n    this.modelName = type;\n    this.adapterOptions = options.adapterOptions;\n    this.include = options.include;\n  }\n\n  /**\n    An array of records\n     @internal\n  */\n  get _recordArray() {\n    return this.__store.peekAll(this.modelName);\n  }\n\n  /**\n      Number of records in the array\n       Example\n       ```js [app/adapters/post.js]\n      import JSONAPIAdapter from '@ember-data/adapter/json-api';\n       export default class PostAdapter extends JSONAPIAdapter {\n        shouldReloadAll(store, snapshotRecordArray) {\n          return !snapshotRecordArray.length;\n        }\n      });\n      ```\n    */\n  get length() {\n    return this._recordArray.length;\n  }\n\n  /**\n    Get snapshots of the underlying record array\n     Example\n     ```js [app/adapters/post.js]\n    import JSONAPIAdapter from '@ember-data/adapter/json-api';\n     export default class PostAdapter extends JSONAPIAdapter {\n      shouldReloadAll(store, snapshotArray) {\n        let snapshots = snapshotArray.snapshots();\n         return snapshots.any(function(ticketSnapshot) {\n          let timeDiff = moment().diff(ticketSnapshot.attr('lastAccessedAt'), 'minutes');\n          if (timeDiff > 20) {\n            return true;\n          } else {\n            return false;\n          }\n        });\n      }\n    }\n    ```\n     @public\n    @return Array of snapshots\n  */\n  snapshots() {\n    if (this._snapshots !== null) {\n      return this._snapshots;\n    }\n    upgradeStore(this.__store);\n    const {\n      _fetchManager\n    } = this.__store;\n    const LiveArrayContext = this._recordArray[Context];\n    this._snapshots = LiveArrayContext.source.map(identifier => _fetchManager.createSnapshot(identifier));\n    return this._snapshots;\n  }\n}\nfunction assertIdentifierHasId(identifier) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Attempted to schedule a fetch for a record without an id.`);\n    }\n  })(identifier && identifier.id !== null) : {};\n}\nfunction iterateData(data, fn) {\n  if (Array.isArray(data)) {\n    return data.map(fn);\n  } else {\n    return fn(data, 0);\n  }\n}\nfunction payloadIsNotBlank(adapterPayload) {\n  if (Array.isArray(adapterPayload)) {\n    return true;\n  } else {\n    return Object.keys(adapterPayload || {}).length !== 0;\n  }\n}\n\n/**\n  This is a helper method that validates a JSON API top-level document\n\n  The format of a document is described here:\n  http://jsonapi.org/format/#document-top-level\n\n  @internal\n*/\nfunction validateDocumentStructure(doc) {\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    const errors = [];\n    if (!doc || typeof doc !== 'object') {\n      errors.push('Top level of a JSON API document must be an object');\n    } else {\n      if (!('data' in doc) && !('errors' in doc) && !('meta' in doc)) {\n        errors.push('One or more of the following keys must be present: \"data\", \"errors\", \"meta\".');\n      } else {\n        if ('data' in doc && 'errors' in doc) {\n          errors.push('Top level keys \"errors\" and \"data\" cannot both be present in a JSON API document');\n        }\n      }\n      if ('data' in doc) {\n        if (!(doc.data === null || Array.isArray(doc.data) || typeof doc.data === 'object')) {\n          errors.push('data must be null, an object, or an array');\n        }\n      }\n      if ('meta' in doc) {\n        if (typeof doc.meta !== 'object') {\n          errors.push('meta must be an object');\n        }\n      }\n      if ('errors' in doc) {\n        if (!Array.isArray(doc.errors)) {\n          errors.push('errors must be an array');\n        }\n      }\n      if ('links' in doc) {\n        if (typeof doc.links !== 'object') {\n          errors.push('links must be an object');\n        }\n      }\n      if ('jsonapi' in doc) {\n        if (typeof doc.jsonapi !== 'object') {\n          errors.push('jsonapi must be an object');\n        }\n      }\n      if ('included' in doc) {\n        if (typeof doc.included !== 'object') {\n          errors.push('included must be an array');\n        }\n      }\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Response must be normalized to a valid JSON API document:\\n\\t* ${errors.join('\\n\\t* ')}`);\n      }\n    })(errors.length === 0) : {};\n  }\n}\nfunction normalizeResponseHelper(serializer, store, modelClass, payload, id, requestType) {\n  const normalizedResponse = serializer ? serializer.normalizeResponse(store, modelClass, payload, id, requestType) : payload;\n  validateDocumentStructure(normalizedResponse);\n  return normalizedResponse;\n}\n\n/**\n  Snapshot is not directly instantiable.\n  Instances are provided to a consuming application's\n  adapters and serializers for certain requests.\n\n  Snapshots are only available when using `@ember-data/legacy-compat`\n  for legacy compatibility with adapters and serializers.\n\n  For serialization of records in modern paradigms, request data from\n  the cache or off the record directly.\n\n  @hideconstructor\n  @public\n*/\nclass Snapshot {\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /**\n    The unique ResourceKey associated with this Snapshot.\n     @public\n  */\n\n  /**\n   The ResourceType of the underlying record for this Snapshot, as a string.\n     @public\n  */\n\n  /**\n   The id of the snapshot's underlying record\n     Example\n     ```js\n    // store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });\n    postSnapshot.id; // => '1'\n    ```\n     @public\n  */\n\n  /**\n   If `include` was passed to the options for the request, the value\n   would be available here.\n    @public\n  */\n\n  /**\n   The adapterOptions passed to the request which generated this Snapshot, if any\n    @public\n  */\n\n  constructor(options, identifier, store) {\n    this._store = store;\n    this.__attributes = null;\n    this._belongsToRelationships = Object.create(null);\n    this._belongsToIds = Object.create(null);\n    this._hasManyRelationships = Object.create(null);\n    this._hasManyIds = Object.create(null);\n    assertPrivateStore(store);\n    const hasRecord = !!store._instanceCache.peek(identifier);\n    this.modelName = identifier.type;\n    this.identifier = identifier;\n\n    /*\n      If the we do not yet have a record, then we are\n      likely a snapshot being provided to a find request, so we\n      populate __attributes lazily. Else, to preserve the \"moment\n      in time\" in which a snapshot is created, we greedily grab\n      the values.\n     */\n    if (hasRecord) {\n      // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n      this._attributes;\n    }\n    this.id = identifier.id;\n    this.adapterOptions = options.adapterOptions;\n    this.include = options.include;\n    this.modelName = identifier.type;\n    if (hasRecord) {\n      const cache = this._store.cache;\n      this._changedAttributes = cache.changedAttrs(identifier);\n    }\n  }\n\n  /**\n   The underlying record for this snapshot. Can be used to access methods and\n   properties defined on the record.\n    ```js\n   const someValue = snapshot.record.someProp;\n   ```\n    @property record\n   @public\n   */\n  get record() {\n    const record = this._store.peekRecord(this.identifier);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Record ${this.identifier.type} ${this.identifier.id} (${this.identifier.lid}) is not yet loaded and thus cannot be accessed from the Snapshot during serialization`);\n      }\n    })(record !== null) : {};\n    return record;\n  }\n\n  /** @internal */\n  get _attributes() {\n    if (this.__attributes !== null) {\n      return this.__attributes;\n    }\n    const attributes = this.__attributes = Object.create(null);\n    const {\n      identifier\n    } = this;\n    const cache = this._store.cache;\n    this.eachAttribute((key, meta) => {\n      attributes[key] = cache.getAttr(identifier, key);\n    });\n    return attributes;\n  }\n  get isNew() {\n    const cache = this._store.cache;\n    return cache?.isNew(this.identifier) || false;\n  }\n\n  /**\n   Returns the value of an attribute.\n    Example\n    ```javascript\n   // store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });\n   postSnapshot.attr('author'); // => 'Tomster'\n   postSnapshot.attr('title'); // => 'Ember.js rocks'\n   ```\n    Note: Values are loaded eagerly and cached when the snapshot is created.\n    @return The attribute value or undefined\n   @public\n   */\n  attr(keyName) {\n    if (keyName in this._attributes) {\n      return this._attributes[keyName];\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(`Model '${this.identifier.lid}' has no attribute named '${keyName}' defined.`);\n      }\n    })() : {};\n  }\n\n  /**\n   Returns all attributes and their corresponding values.\n    ::: warning ⚠️ WARNING\n   Attributes are SHALLOW copied from the cache.\n   Because they are NOT deep copied from the cache, mutating\n   any object or array fields will cause unintended side-effects\n   and bugs.\n   :::\n    Example\n    ```js\n   // store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });\n   postSnapshot.attributes(); // => { author: 'Tomster', title: 'Ember.js rocks' }\n   ```\n    @return All attributes of the current snapshot\n   @public\n   */\n  attributes() {\n    return {\n      ...this._attributes\n    };\n  }\n\n  /**\n   Returns all changed attributes and their old and new values.\n    Example\n    ```js\n   // store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });\n   postModel.set('title', 'Ember.js rocks!');\n   postSnapshot.changedAttributes(); // => { title: ['Ember.js rocks', 'Ember.js rocks!'] }\n   ```\n    @return All changed attributes of the current snapshot\n   @public\n   */\n  changedAttributes() {\n    const changedAttributes = Object.create(null);\n    if (!this._changedAttributes) {\n      return changedAttributes;\n    }\n    const changedAttributeKeys = Object.keys(this._changedAttributes);\n    for (let i = 0, length = changedAttributeKeys.length; i < length; i++) {\n      const key = changedAttributeKeys[i];\n      changedAttributes[key] = this._changedAttributes[key].slice();\n    }\n    return changedAttributes;\n  }\n\n  /**\n   Returns the current value of a belongsTo relationship.\n    `belongsTo` takes an optional hash of options as a second parameter,\n   currently supported options are:\n    - `id`: set to `true` if you only want the ID of the related record to be\n   returned.\n    Example\n    ```js\n   // store.push('post', { id: 1, title: 'Hello World' });\n   // store.createRecord('comment', { body: 'Lorem ipsum', post: post });\n   commentSnapshot.belongsTo('post'); // => Snapshot\n   commentSnapshot.belongsTo('post', { id: true }); // => '1'\n    // store.push('comment', { id: 1, body: 'Lorem ipsum' });\n   commentSnapshot.belongsTo('post'); // => undefined\n   ```\n    Calling `belongsTo` will return a new Snapshot as long as there's any known\n   data for the relationship available, such as an ID. If the relationship is\n   known but unset, `belongsTo` will return `null`. If the contents of the\n   relationship is unknown `belongsTo` will return `undefined`.\n    Note: Relationships are loaded lazily and cached upon first access.\n    @public\n   @return A snapshot or ID of a known relationship or null if the\n   relationship is known but unset. undefined will be returned if the\n   contents of the relationship are unknown.\n   */\n  belongsTo(keyName, options) {\n    const returnModeIsId = !!(options && options.id);\n    let result;\n    const store = this._store;\n    if (returnModeIsId === true && keyName in this._belongsToIds) {\n      return this._belongsToIds[keyName];\n    }\n    if (returnModeIsId === false && keyName in this._belongsToRelationships) {\n      return this._belongsToRelationships[keyName];\n    }\n    const relationshipMeta = store.schema.fields({\n      type: this.modelName\n    }).get(keyName);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Model '${this.identifier.lid}' has no belongsTo relationship named '${keyName}' defined.`);\n      }\n    })(relationshipMeta && relationshipMeta.kind === 'belongsTo') : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`snapshot.belongsTo only supported when using a cache that supports the graph`);\n      }\n    })(this._store._graph) : {};\n    const {\n      identifier\n    } = this;\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      const relationship = this._store.schema.fields(identifier)?.get(keyName);\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`You looked up the ${keyName} belongsTo relationship for { type: ${identifier.type}, id: ${identifier.id || ''}, lid: ${identifier.lid} but no such relationship was found.`);\n        }\n      })(relationship) : {};\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`You looked up the ${keyName} belongsTo relationship for { type: ${identifier.type}, id: ${identifier.id || ''}, lid: ${identifier.lid} but that relationship is a hasMany.`);\n        }\n      })(relationship.kind === 'belongsTo') : {};\n    }\n    const value = this._store.cache.getRelationship(identifier, keyName);\n    const data = value && value.data;\n    const inverseIdentifier = data ? store.cacheKeyManager.getOrCreateRecordIdentifier(data) : null;\n    if (value && value.data !== undefined) {\n      const cache = store.cache;\n      if (inverseIdentifier && !cache.isDeleted(inverseIdentifier)) {\n        if (returnModeIsId) {\n          result = inverseIdentifier.id;\n        } else {\n          result = store._fetchManager.createSnapshot(inverseIdentifier);\n        }\n      } else {\n        result = null;\n      }\n    }\n    if (returnModeIsId) {\n      this._belongsToIds[keyName] = result;\n    } else {\n      this._belongsToRelationships[keyName] = result;\n    }\n    return result;\n  }\n\n  /**\n   Returns the current value of a hasMany relationship.\n    `hasMany` takes an optional hash of options as a second parameter,\n   currently supported options are:\n    - `ids`: set to `true` if you only want the IDs of the related records to be\n   returned.\n    Example\n    ```javascript\n   // store.push('post', { id: 1, title: 'Hello World', comments: [2, 3] });\n   postSnapshot.hasMany('comments'); // => [Snapshot, Snapshot]\n   postSnapshot.hasMany('comments', { ids: true }); // => ['2', '3']\n    // store.push('post', { id: 1, title: 'Hello World' });\n   postSnapshot.hasMany('comments'); // => undefined\n   ```\n    Note: Relationships are loaded lazily and cached upon first access.\n    @public\n   @return An array of snapshots or IDs of a known\n   relationship or an empty array if the relationship is known but unset.\n   undefined will be returned if the contents of the relationship is unknown.\n   */\n  hasMany(keyName, options) {\n    const returnModeIsIds = !!(options && options.ids);\n    let results;\n    const cachedIds = this._hasManyIds[keyName];\n    const cachedSnapshots = this._hasManyRelationships[keyName];\n    if (returnModeIsIds === true && keyName in this._hasManyIds) {\n      return cachedIds;\n    }\n    if (returnModeIsIds === false && keyName in this._hasManyRelationships) {\n      return cachedSnapshots;\n    }\n    const store = this._store;\n    const relationshipMeta = store.schema.fields({\n      type: this.modelName\n    }).get(keyName);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Model '${this.identifier.lid}' has no hasMany relationship named '${keyName}' defined.`);\n      }\n    })(relationshipMeta && relationshipMeta.kind === 'hasMany') : {};\n\n    // TODO @runspired it seems this code branch would not work with CUSTOM_MODEL_CLASSes\n    // this check is not a regression in behavior because relationships don't currently\n    // function without access to intimate API contracts between RecordData and Model.\n    // This is a requirement we should fix as soon as the relationship layer does not require\n    // this intimate API usage.\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`snapshot.hasMany only supported when using a cache that supports the graph`);\n      }\n    })(this._store._graph) : {};\n    const {\n      identifier\n    } = this;\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      const relationship = this._store.schema.fields(identifier)?.get(keyName);\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`You looked up the ${keyName} hasMany relationship for { type: ${identifier.type}, id: ${identifier.id || ''}, lid: ${identifier.lid} but no such relationship was found.`);\n        }\n      })(relationship) : {};\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`You looked up the ${keyName} hasMany relationship for { type: ${identifier.type}, id: ${identifier.id || ''}, lid: ${identifier.lid} but that relationship is a belongsTo.`);\n        }\n      })(relationship.kind === 'hasMany') : {};\n    }\n    const value = this._store.cache.getRelationship(identifier, keyName);\n    if (value.data) {\n      results = [];\n      value.data.forEach(member => {\n        const inverseIdentifier = store.cacheKeyManager.getOrCreateRecordIdentifier(member);\n        const cache = store.cache;\n        if (!cache.isDeleted(inverseIdentifier)) {\n          if (returnModeIsIds) {\n            results.push(inverseIdentifier.id);\n          } else {\n            results.push(store._fetchManager.createSnapshot(inverseIdentifier));\n          }\n        }\n      });\n    }\n\n    // we assign even if `undefined` so that we don't reprocess the relationship\n    // on next access. This works with the `keyName in` checks above.\n    if (returnModeIsIds) {\n      this._hasManyIds[keyName] = results;\n    } else {\n      this._hasManyRelationships[keyName] = results;\n    }\n    return results;\n  }\n\n  /**\n    Iterates through all the attributes of the model, calling the passed\n    function on each attribute.\n     Example\n     ```javascript\n    snapshot.eachAttribute(function(name, meta) {\n      // ...\n    });\n    ```\n     @param callback the callback to execute\n    @param binding the optional value to which the callback's `this` should be bound\n    @public\n  */\n  eachAttribute(callback, binding) {\n    // if the store has a modelFor implementation, we use it to iterate attributes. This allows\n    // a custom \"ModelSchema\" class for legacy serializers to adapt to new fields if desired.\n    if (typeof this._store.modelFor === 'function') {\n      const modelSchema = this._store.modelFor(this.identifier.type);\n      modelSchema.eachAttribute(callback, binding);\n    } else {\n      const fields = this._store.schema.fields(this.identifier);\n      fields.forEach((field, key) => {\n        if (field.kind === 'attribute') {\n          callback.call(binding, key, field);\n        }\n      });\n    }\n  }\n\n  /**\n    Iterates through all the relationships of the model, calling the passed\n    function on each relationship.\n     Example\n     ```javascript\n    snapshot.eachRelationship(function(name, relationship) {\n      // ...\n    });\n    ```\n     @param callback the callback to execute\n    @param binding the optional value to which the callback's `this` should be bound\n    @public\n  */\n  eachRelationship(callback, binding) {\n    // if the store has a modelFor implementation, we use it to iterate relationships. This allows\n    // a custom \"ModelSchema\" class for legacy serializers to adapt to new fields if desired.\n    if (typeof this._store.modelFor === 'function') {\n      const modelSchema = this._store.modelFor(this.identifier.type);\n      modelSchema.eachRelationship(callback, binding);\n    } else {\n      const fields = this._store.schema.fields(this.identifier);\n      fields.forEach((field, key) => {\n        if (field.kind === 'belongsTo' || field.kind === 'hasMany') {\n          callback.call(binding, key, field);\n        }\n      });\n    }\n  }\n\n  /**\n    Serializes the snapshot using the serializer for the model.\n     Example\n     ```js [app/adapters/application.js]\n    import Adapter from '@ember-data/adapter';\n     export default Adapter.extend({\n      createRecord(store, type, snapshot) {\n        let data = snapshot.serialize({ includeId: true });\n        let url = `/${type.modelName}`;\n         return fetch(url, {\n          method: 'POST',\n          body: data,\n        }).then((response) => response.json())\n      }\n    });\n    ```\n     @return an object whose values are primitive JSON values only\n    @public\n   */\n  serialize(options) {\n    upgradeStore(this._store);\n    const serializer = this._store.serializerFor(this.modelName);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot serialize record, no serializer found`);\n      }\n    })(serializer) : {};\n    return serializer.serialize(this, options);\n  }\n}\nconst SaveOp = getOrSetGlobal('SaveOp', Symbol('SaveOp'));\n/**\n * @private\n */\nclass FetchManager {\n  /**\n   * @internal\n   */\n\n  /** @internal */\n\n  // fetches pending in the runloop, waiting to be coalesced\n  /**\n   * @internal\n   */\n\n  /** @internal */\n\n  constructor(store) {\n    assertPrivateStore(store);\n    this._store = store;\n    // used to keep track of all the find requests that need to be coalesced\n    this._pendingFetch = new Map();\n    this.requestCache = store.getRequestStateService();\n    this.isDestroyed = false;\n  }\n  createSnapshot(identifier, options = {}) {\n    return new Snapshot(options, identifier, this._store);\n  }\n\n  /**\n    This method is called by `record.save`, and gets passed a\n    resolver for the promise that `record.save` returns.\n     It schedules saving to happen at the end of the run loop.\n     @private\n  */\n  scheduleSave(identifier, options) {\n    const resolver = createDeferred();\n    const query = {\n      op: 'saveRecord',\n      recordIdentifier: identifier,\n      options\n    };\n    const queryRequest = {\n      data: [query]\n    };\n    const snapshot = this.createSnapshot(identifier, options);\n    const pendingSaveItem = {\n      snapshot: snapshot,\n      resolver: resolver,\n      identifier,\n      options,\n      queryRequest\n    };\n    const monitored = this.requestCache._enqueue(resolver.promise, pendingSaveItem.queryRequest);\n    _flushPendingSave(this._store, pendingSaveItem);\n    return monitored;\n  }\n  scheduleFetch(identifier, options, request) {\n    const query = {\n      op: 'findRecord',\n      recordIdentifier: identifier,\n      options\n    };\n    const queryRequest = {\n      data: [query]\n    };\n    const pendingFetch = this.getPendingFetch(identifier, options);\n    if (pendingFetch) {\n      return pendingFetch;\n    }\n    const modelName = identifier.type;\n    const resolver = createDeferred();\n    const pendingFetchItem = {\n      identifier,\n      resolver,\n      options,\n      queryRequest\n    };\n    const resolverPromise = resolver.promise;\n    const store = this._store;\n    const isInitialLoad = !store._instanceCache.recordIsLoaded(identifier); // we don't use isLoading directly because we are the request\n\n    const monitored = this.requestCache._enqueue(resolverPromise, pendingFetchItem.queryRequest);\n    let promise = monitored.then(payload => {\n      // ensure that regardless of id returned we assign to the correct record\n      if (payload.data && !Array.isArray(payload.data)) {\n        payload.data.lid = identifier.lid;\n      }\n\n      // additional data received in the payload\n      // may result in the merging of identifiers (and thus records)\n      const potentiallyNewIm = store._push(payload, options.reload);\n      if (potentiallyNewIm && !Array.isArray(potentiallyNewIm)) {\n        return potentiallyNewIm;\n      }\n      return identifier;\n    }, error => {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Async Leak Detected: Expected the store to not be destroyed`);\n        }\n      })(!store.isDestroyed) : {};\n      const cache = store.cache;\n      if (!cache || cache.isEmpty(identifier) || isInitialLoad) {\n        let isReleasable = true;\n        if (store._graph) {\n          const graph = store._graph;\n          if (!cache) {\n            isReleasable = graph.isReleasable(identifier);\n            if (!isReleasable) {\n              graph.unload(identifier, true);\n            }\n          }\n        }\n        if (cache || isReleasable) {\n          store._enableAsyncFlush = true;\n          store._instanceCache.unloadRecord(identifier);\n          store._enableAsyncFlush = null;\n        }\n      }\n      throw error;\n    });\n    if (this._pendingFetch.size === 0) {\n      void new Promise(resolve => setTimeout(resolve, 0)).then(() => {\n        this.flushAllPendingFetches();\n      });\n    }\n    const fetchesByType = this._pendingFetch;\n    let fetchesById = fetchesByType.get(modelName);\n    if (!fetchesById) {\n      fetchesById = new Map();\n      fetchesByType.set(modelName, fetchesById);\n    }\n    let requestsForIdentifier = fetchesById.get(identifier);\n    if (!requestsForIdentifier) {\n      requestsForIdentifier = [];\n      fetchesById.set(identifier, requestsForIdentifier);\n    }\n    requestsForIdentifier.push(pendingFetchItem);\n    if (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {\n      if (!request.disableTestWaiter) {\n        promise = waitFor(promise);\n      }\n    }\n    pendingFetchItem.promise = promise;\n    return promise;\n  }\n  getPendingFetch(identifier, options) {\n    const pendingFetches = this._pendingFetch.get(identifier.type)?.get(identifier);\n\n    // We already have a pending fetch for this\n    if (pendingFetches) {\n      const matchingPendingFetch = pendingFetches.find(fetch => isSameRequest(options, fetch.options));\n      if (matchingPendingFetch) {\n        return matchingPendingFetch.promise;\n      }\n    }\n  }\n  flushAllPendingFetches() {\n    if (this.isDestroyed) {\n      return;\n    }\n    const store = this._store;\n    this._pendingFetch.forEach((fetchItem, type) => _flushPendingFetchForType(store, fetchItem, type));\n    this._pendingFetch.clear();\n  }\n  fetchDataIfNeededForIdentifier(identifier, options = {}, request) {\n    // pre-loading will change the isEmpty value\n    const isEmpty = _isEmpty(this._store._instanceCache, identifier);\n    const isLoading = _isLoading(this._store._instanceCache, identifier);\n    let promise;\n    if (isEmpty) {\n      assertIdentifierHasId(identifier);\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        promise = this.scheduleFetch(identifier, Object.assign({}, options, {\n          reload: true\n        }), request);\n      } else {\n        options.reload = true;\n        promise = this.scheduleFetch(identifier, options, request);\n      }\n    } else if (isLoading) {\n      promise = this.getPendingFetch(identifier, options);\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected to find a pending request for a record in the loading state, but found none`);\n        }\n      })(promise) : {};\n    } else {\n      promise = Promise.resolve(identifier);\n    }\n    return promise;\n  }\n  destroy() {\n    this.isDestroyed = true;\n  }\n}\n\n/**\n * This type exists for internal use only for\n * where intimate contracts still exist either for\n * the Test Suite or for Legacy code.\n *\n * @private\n */\n\nfunction _isEmpty(instanceCache, identifier) {\n  const cache = instanceCache.cache;\n  if (!cache) {\n    return true;\n  }\n  const isNew = cache.isNew(identifier);\n  const isDeleted = cache.isDeleted(identifier);\n  const isEmpty = cache.isEmpty(identifier);\n  return (!isNew || isDeleted) && isEmpty;\n}\nfunction _isLoading(cache, identifier) {\n  const req = cache.store.getRequestStateService();\n  // const fulfilled = req.getLastRequestForRecord(identifier);\n  const isLoaded = cache.recordIsLoaded(identifier);\n  return !isLoaded &&\n  // fulfilled === null &&\n  req.getPendingRequestsForRecord(identifier).some(r => r.type === 'query');\n}\nfunction includesSatisfies(current, existing) {\n  // if we have no includes we are good\n  if (!current?.length) {\n    return true;\n  }\n\n  // if we are here we have includes,\n  // and if existing has no includes then we will need a new request\n  if (!existing?.length) {\n    return false;\n  }\n  const arrCurrent = (Array.isArray(current) ? current : current.split(',')).sort();\n  const arrExisting = (Array.isArray(existing) ? existing : existing.split(',')).sort();\n\n  // includes are identical\n  if (arrCurrent.join(',') === arrExisting.join(',')) {\n    return true;\n  }\n\n  // if all of current includes are in existing includes then we are good\n  // so if we find one that is not in existing then we need a new request\n  for (let i = 0; i < arrCurrent.length; i++) {\n    if (!arrExisting.includes(arrCurrent[i])) {\n      return false;\n    }\n  }\n  return true;\n}\nfunction optionsSatisfies(current, existing) {\n  return !current || current === existing || Object.keys(current).length === 0;\n}\n\n// this function helps resolve whether we have a pending request that we should use instead\nfunction isSameRequest(options = {}, existingOptions = {}) {\n  return optionsSatisfies(options.adapterOptions, existingOptions.adapterOptions) && includesSatisfies(options.include, existingOptions.include);\n}\nfunction _findMany(store, adapter, modelName, snapshots) {\n  const modelClass = store.modelFor(modelName); // `adapter.findMany` gets the modelClass still\n  const promise = Promise.resolve().then(() => {\n    const ids = snapshots.map(s => s.id);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot fetch a record without an id`);\n      }\n    })(ids.every(v => v !== null)) : {};\n    // eslint-disable-next-line @typescript-eslint/unbound-method\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected this adapter to implement findMany for coalescing`);\n      }\n    })(adapter.findMany) : {};\n    const ret = adapter.findMany(store, modelClass, ids, snapshots);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error('adapter.findMany returned undefined, this was very likely a mistake');\n      }\n    })(ret !== undefined) : {};\n    return ret;\n  });\n  return promise.then(adapterPayload => {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You made a 'findMany' request for '${modelName}' records with ids '[${snapshots.map(s => s.id).join(',')}]', but the adapter's response did not have any data`);\n      }\n    })(!!payloadIsNotBlank(adapterPayload)) : {};\n    const serializer = store.serializerFor(modelName);\n    const payload = normalizeResponseHelper(serializer, store, modelClass, adapterPayload, null, 'findMany');\n    return payload;\n  });\n}\nfunction rejectFetchedItems(fetchMap, snapshots, error) {\n  for (let i = 0, l = snapshots.length; i < l; i++) {\n    const snapshot = snapshots[i];\n    const pair = fetchMap.get(snapshot);\n    if (pair) {\n      pair.resolver.reject(error || new Error(`Expected: '<${snapshot.modelName}:${snapshot.id}>' to be present in the adapter provided payload, but it was not found.`));\n    }\n  }\n}\nfunction handleFoundRecords(store, fetchMap, snapshots, coalescedPayload) {\n  /*\n    It is possible that the same ID is included multiple times\n    via multiple snapshots. This happens when more than one\n    options hash was supplied, each of which must be uniquely\n    accounted for.\n     However, since we can't map from response to a specific\n    options object, we resolve all snapshots by id with\n    the first response we see.\n  */\n  const snapshotsById = new Map();\n  for (let i = 0; i < snapshots.length; i++) {\n    const id = snapshots[i].id;\n    let snapshotGroup = snapshotsById.get(id);\n    if (!snapshotGroup) {\n      snapshotGroup = [];\n      snapshotsById.set(id, snapshotGroup);\n    }\n    snapshotGroup.push(snapshots[i]);\n  }\n  const included = Array.isArray(coalescedPayload.included) ? coalescedPayload.included : [];\n\n  // resolve found records\n  const resources = coalescedPayload.data;\n  for (let i = 0, l = resources.length; i < l; i++) {\n    const resource = resources[i];\n    const snapshotGroup = snapshotsById.get(resource.id);\n    snapshotsById.delete(resource.id);\n    if (!snapshotGroup) {\n      // TODO consider whether this should be a deprecation/assertion\n      included.push(resource);\n    } else {\n      snapshotGroup.forEach(snapshot => {\n        const pair = fetchMap.get(snapshot);\n        const resolver = pair.resolver;\n        resolver.resolve({\n          data: resource\n        });\n      });\n    }\n  }\n  if (included.length > 0) {\n    store._push({\n      data: null,\n      included\n    }, true);\n  }\n  if (snapshotsById.size === 0) {\n    return;\n  }\n\n  // reject missing records\n  const rejected = [];\n  snapshotsById.forEach(snapshotArray => {\n    rejected.push(...snapshotArray);\n  });\n  warn('Ember Data expected to find records with the following ids in the adapter response from findMany but they were missing: [ \"' + [...snapshotsById.values()].map(r => r[0].id).join('\", \"') + '\" ]', {\n    id: 'ds.store.missing-records-from-adapter'\n  });\n  rejectFetchedItems(fetchMap, rejected);\n}\nfunction _fetchRecord(store, adapter, fetchItem) {\n  const identifier = fetchItem.identifier;\n  const modelName = identifier.type;\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You tried to find a record but you have no adapter (for ${modelName})`);\n    }\n  })(adapter) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You tried to find a record but your adapter (for ${modelName}) does not implement 'findRecord'`);\n    }\n  })(typeof adapter.findRecord === 'function') : {};\n  const snapshot = store._fetchManager.createSnapshot(identifier, fetchItem.options);\n  const klass = store.modelFor(identifier.type);\n  const id = identifier.id;\n  let promise = Promise.resolve().then(() => {\n    return adapter.findRecord(store, klass, identifier.id, snapshot);\n  });\n  promise = promise.then(adapterPayload => {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Async Leak Detected: Expected the store to not be destroyed`);\n      }\n    })(!(store.isDestroyed || store.isDestroying)) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You made a 'findRecord' request for a '${modelName}' with id '${id}', but the adapter's response did not have any data`);\n      }\n    })(!!payloadIsNotBlank(adapterPayload)) : {};\n    const serializer = store.serializerFor(modelName);\n    const payload = normalizeResponseHelper(serializer, store, klass, adapterPayload, id, 'findRecord');\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Ember Data expected the primary data returned from a 'findRecord' response to be an object but instead it found an array.`);\n      }\n    })(!Array.isArray(payload.data)) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`The 'findRecord' request for ${modelName}:${id} resolved indicating success but contained no primary data. To indicate a 404 not found you should either reject the promise returned by the adapter's findRecord method or throw a NotFoundError.`);\n      }\n    })('data' in payload && payload.data !== null && typeof payload.data === 'object') : {};\n    warn(`You requested a record of type '${modelName}' with id '${id}' but the adapter returned a payload with primary data having an id of '${payload.data.id}'. Use 'store.findRecord()' when the requested id is the same as the one returned by the adapter. In other cases use 'store.queryRecord()' instead.`, coerceId(payload.data.id) === coerceId(id), {\n      id: 'ds.store.findRecord.id-mismatch'\n    });\n    return payload;\n  });\n  fetchItem.resolver.resolve(promise);\n}\nfunction _processCoalescedGroup(store, fetchMap, group, adapter, modelName) {\n  if (group.length > 1) {\n    _findMany(store, adapter, modelName, group).then(payloads => {\n      handleFoundRecords(store, fetchMap, group, payloads);\n    }).catch(error => {\n      rejectFetchedItems(fetchMap, group, error);\n    });\n  } else if (group.length === 1) {\n    _fetchRecord(store, adapter, fetchMap.get(group[0]));\n  } else {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      {\n        throw new Error(\"You cannot return an empty array from adapter's method groupRecordsForFindMany\");\n      }\n    })() : {};\n  }\n}\nfunction _flushPendingFetchForType(store, pendingFetchMap, modelName) {\n  const adapter = store.adapterFor(modelName);\n  const shouldCoalesce = !!adapter.findMany && adapter.coalesceFindRequests;\n  if (shouldCoalesce) {\n    const pendingFetchItems = [];\n    pendingFetchMap.forEach((requestsForIdentifier, identifier) => {\n      if (requestsForIdentifier.length > 1) {\n        return;\n      }\n\n      // remove this entry from the map so it's not processed again\n      pendingFetchMap.delete(identifier);\n      pendingFetchItems.push(requestsForIdentifier[0]);\n    });\n    const totalItems = pendingFetchItems.length;\n    if (totalItems > 1) {\n      const snapshots = new Array(totalItems);\n      const fetchMap = new Map();\n      for (let i = 0; i < totalItems; i++) {\n        const fetchItem = pendingFetchItems[i];\n        snapshots[i] = store._fetchManager.createSnapshot(fetchItem.identifier, fetchItem.options);\n        fetchMap.set(snapshots[i], fetchItem);\n      }\n      let groups;\n      if (adapter.groupRecordsForFindMany) {\n        groups = adapter.groupRecordsForFindMany(store, snapshots);\n      } else {\n        groups = [snapshots];\n      }\n      for (let i = 0, l = groups.length; i < l; i++) {\n        _processCoalescedGroup(store, fetchMap, groups[i], adapter, modelName);\n      }\n    } else if (totalItems === 1) {\n      _fetchRecord(store, adapter, pendingFetchItems[0]);\n    }\n  }\n  pendingFetchMap.forEach(pendingFetchItems => {\n    pendingFetchItems.forEach(pendingFetchItem => {\n      _fetchRecord(store, adapter, pendingFetchItem);\n    });\n  });\n}\nfunction _flushPendingSave(store, pending) {\n  const {\n    snapshot,\n    resolver,\n    identifier,\n    options\n  } = pending;\n  const adapter = store.adapterFor(identifier.type);\n  const operation = options[SaveOp];\n  const modelName = snapshot.modelName;\n  const modelClass = store.modelFor(modelName);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You tried to update a record but you have no adapter (for ${modelName})`);\n    }\n  })(adapter) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You tried to update a record but your adapter (for ${modelName}) does not implement '${operation}'`);\n    }\n  })(typeof adapter[operation] === 'function') : {};\n  let promise = Promise.resolve().then(() => adapter[operation](store, modelClass, snapshot));\n  const serializer = store.serializerFor(modelName);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Your adapter's '${operation}' method must return a value, but it returned 'undefined'`);\n    }\n  })(promise !== undefined) : {};\n  promise = promise.then(adapterPayload => {\n    if (adapterPayload) {\n      return normalizeResponseHelper(serializer, store, modelClass, adapterPayload, snapshot.id, operation);\n    }\n  });\n  resolver.resolve(promise);\n}\n\n/**\n * Utilities - often temporary - for maintaining backwards compatibility with\n * older parts of WarpDrive.\n *\n  @module\n*/\nfunction upgradeStore(store) {}\nexport { FetchManager as F, SaveOp as S, assertIdentifierHasId as a, SnapshotRecordArray as b, Snapshot as c, iterateData as i, normalizeResponseHelper as n, payloadIsNotBlank as p, upgradeStore as u };","import { getOrSetGlobal } from '@warp-drive/core/types/-private';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\n\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n/**\n  ## Overview\n\n  :::danger\n    ⚠️ **This is LEGACY documentation** for a feature that is no longer encouraged to be used.\n    If starting a new app or thinking of implementing a new adapter, consider writing a\n    {@link Handler} instead to be used with the {@link RequestManager}\n  :::\n\n  An `AdapterError` is used by an adapter to signal that an error occurred\n  during a request to an external API. It indicates a generic error, and\n  subclasses are used to indicate specific error states.\n\n  To create a custom error to signal a specific error state in communicating\n  with an external API, extend the `AdapterError`. For example, if the\n  external API exclusively used HTTP `503 Service Unavailable` to indicate\n  it was closed for maintenance:\n\n  ```js [app/adapters/maintenance-error.js]\n  import AdapterError from '@warp-drive/legacy/adapter/error';\n\n  export default AdapterError.extend({ message: \"Down for maintenance.\" });\n  ```\n\n  This error would then be returned by an adapter's `handleResponse` method:\n\n  ```js [app/adapters/application.js]\n  import JSONAPIAdapter from '@warp-drive/legacy/adapter/json-api';\n  import MaintenanceError from './maintenance-error';\n\n  export default class ApplicationAdapter extends JSONAPIAdapter {\n    handleResponse(status) {\n      if (503 === status) {\n        return new MaintenanceError();\n      }\n\n      return super.handleResponse(...arguments);\n    }\n  }\n  ```\n\n  And can then be detected in an application and used to send the user to an\n  `under-maintenance` route:\n\n  ```js [app/routes/application.js]\n  import MaintenanceError from '../adapters/maintenance-error';\n\n  export default class ApplicationRoute extends Route {\n    actions: {\n      error(error, transition) {\n        if (error instanceof MaintenanceError) {\n          this.transitionTo('under-maintenance');\n          return;\n        }\n\n        // ...other error handling logic\n      }\n    }\n  }\n  ```\n\n  @class AdapterError\n  @public\n*/\nfunction _AdapterError(errors, message = 'Adapter operation failed') {\n  this.isAdapterError = true;\n  const error = Error.call(this, message);\n  if (error) {\n    this.stack = error.stack;\n    // @ts-expect-error untyped\n    this.description = error.description;\n    // @ts-expect-error untyped\n    this.fileName = error.fileName;\n    // @ts-expect-error untyped\n    this.lineNumber = error.lineNumber;\n    this.message = error.message;\n    this.name = error.name;\n    // @ts-expect-error untyped\n    this.number = error.number;\n  }\n  this.errors = errors || [{\n    title: 'Adapter Error',\n    detail: message\n  }];\n}\n_AdapterError.prototype = Object.create(Error.prototype);\n_AdapterError.prototype.code = 'AdapterError';\n_AdapterError.extend = extendFn(_AdapterError);\nconst AdapterError = getOrSetGlobal('AdapterError', _AdapterError);\nfunction extendFn(ErrorClass) {\n  return function ({\n    message: defaultMessage\n  } = {}) {\n    return extend(ErrorClass, defaultMessage);\n  };\n}\nfunction extend(ParentErrorClass, defaultMessage) {\n  const ErrorClass = function (errors, message) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error('`AdapterError` expects json-api formatted errors array.');\n      }\n    })(Array.isArray(errors || [])) : {};\n    ParentErrorClass.call(this, errors, message || defaultMessage);\n  };\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n  ErrorClass.prototype = Object.create(ParentErrorClass.prototype);\n  ErrorClass.extend = extendFn(ErrorClass);\n  return ErrorClass;\n}\n\n/**\n  A `InvalidError` is used by an adapter to signal the external API\n  was unable to process a request because the content was not\n  semantically correct or meaningful per the API. Usually, this means a\n  record failed some form of server-side validation. When a promise\n  from an adapter is rejected with a `InvalidError` the record will\n  transition to the `invalid` state and the errors will be set to the\n  `errors` property on the record.\n\n  For WarpDrive to correctly map errors to their corresponding\n  properties on the model, WarpDrive expects each error to be\n  a valid JSON-API error object with a `source/pointer` that matches\n  the property name. For example, if you had a Post model that\n  looked like this.\n\n  ```js [app/models/post.js]\n  import { Model, attr } from '@warp-drive/legacy/model';\n\n  export default class PostModel extends Model {\n    @attr('string') title;\n    @attr('string') content;\n  }\n  ```\n\n  To show an error from the server related to the `title` and\n  `content` properties your adapter could return a promise that\n  rejects with a `InvalidError` object that looks like this:\n\n  ```js [app/adapters/post.js]\n  import RSVP from 'RSVP';\n  import RESTAdapter from '@warp-drive/legacy/adapter/rest';\n  import { InvalidError } from '@warp-drive/legacy/adapter/error';\n\n  export default class ApplicationAdapter extends RESTAdapter {\n    updateRecord() {\n      // Fictional adapter that always rejects\n      return RSVP.reject(new InvalidError([\n        {\n          detail: 'Must be unique',\n          source: { pointer: '/data/attributes/title' }\n        },\n        {\n          detail: 'Must not be blank',\n          source: { pointer: '/data/attributes/content'}\n        }\n      ]));\n    }\n  }\n  ```\n\n  Your backend may use different property names for your records the\n  store will attempt to extract and normalize the errors using the\n  serializer's `extractErrors` method before the errors get added to\n  the model. As a result, it is safe for the `InvalidError` to\n  wrap the error payload unaltered.\n\n  @class InvalidError\n  @public\n*/\n// TODO @deprecate extractError documentation\n\nconst InvalidError = getOrSetGlobal('InvalidError', extend(AdapterError, 'The adapter rejected the commit because it was invalid'));\nInvalidError.prototype.code = 'InvalidError';\n\n/**\n  A `TimeoutError` is used by an adapter to signal that a request\n  to the external API has timed out. I.e. no response was received from\n  the external API within an allowed time period.\n\n  An example use case would be to warn the user to check their internet\n  connection if an adapter operation has timed out:\n\n  ```js [app/routes/application.js]\n  import { TimeoutError } from '@warp-drive/legacy/adapter/error';\n\n  export default class ApplicationRoute extends Route {\n    @action\n    error(error, transition) {\n      if (error instanceof TimeoutError) {\n        // alert the user\n        alert('Are you still connected to the Internet?');\n        return;\n      }\n\n      // ...other error handling logic\n    }\n  }\n  ```\n\n  @class TimeoutError\n  @public\n*/\n\nconst TimeoutError = getOrSetGlobal('TimeoutError', extend(AdapterError, 'The adapter operation timed out'));\nTimeoutError.prototype.code = 'TimeoutError';\n\n/**\n  A `AbortError` is used by an adapter to signal that a request to\n  the external API was aborted. For example, this can occur if the user\n  navigates away from the current page after a request to the external API\n  has been initiated but before a response has been received.\n\n  @class AbortError\n  @public\n*/\n\nconst AbortError = getOrSetGlobal('AbortError', extend(AdapterError, 'The adapter operation was aborted'));\nAbortError.prototype.code = 'AbortError';\n\n/**\n  A `UnauthorizedError` equates to a HTTP `401 Unauthorized` response\n  status. It is used by an adapter to signal that a request to the external\n  API was rejected because authorization is required and has failed or has not\n  yet been provided.\n\n  An example use case would be to redirect the user to a login route if a\n  request is unauthorized:\n\n  ```js [app/routes/application.js]\n  import { UnauthorizedError } from '@warp-drive/legacy/adapter/error';\n\n  export default class ApplicationRoute extends Route {\n    @action\n    error(error, transition) {\n      if (error instanceof UnauthorizedError) {\n        // go to the login route\n        this.transitionTo('login');\n        return;\n      }\n\n      // ...other error handling logic\n    }\n  }\n  ```\n\n  @class UnauthorizedError\n  @public\n*/\n\nconst UnauthorizedError = getOrSetGlobal('UnauthorizedError', extend(AdapterError, 'The adapter operation is unauthorized'));\nUnauthorizedError.prototype.code = 'UnauthorizedError';\n\n/**\n  A `ForbiddenError` equates to a HTTP `403 Forbidden` response status.\n  It is used by an adapter to signal that a request to the external API was\n  valid but the server is refusing to respond to it. If authorization was\n  provided and is valid, then the authenticated user does not have the\n  necessary permissions for the request.\n\n  @class ForbiddenError\n  @public\n*/\n\nconst ForbiddenError = getOrSetGlobal('ForbiddenError', extend(AdapterError, 'The adapter operation is forbidden'));\nForbiddenError.prototype.code = 'ForbiddenError';\n\n/**\n  A `NotFoundError` equates to a HTTP `404 Not Found` response status.\n  It is used by an adapter to signal that a request to the external API\n  was rejected because the resource could not be found on the API.\n\n  An example use case would be to detect if the user has entered a route\n  for a specific model that does not exist. For example:\n\n  ```js [app/routes/post.js]\n  import { NotFoundError } from '@warp-drive/legacy/adapter/error';\n\n  export default class PostRoute extends Route {\n    @service store;\n    model(params) {\n      return this.store.findRecord('post', params.post_id);\n    }\n    @action\n    error(error, transition) {\n      if (error instanceof NotFoundError) {\n        // redirect to a list of all posts instead\n        this.transitionTo('posts');\n      } else {\n        // otherwise let the error bubble\n        return true;\n      }\n    }\n  }\n  ```\n\n  @class NotFoundError\n  @public\n*/\n\nconst NotFoundError = getOrSetGlobal('NotFoundError', extend(AdapterError, 'The adapter could not find the resource'));\nNotFoundError.prototype.code = 'NotFoundError';\n\n/**\n  A `ConflictError` equates to a HTTP `409 Conflict` response status.\n  It is used by an adapter to indicate that the request could not be processed\n  because of a conflict in the request. An example scenario would be when\n  creating a record with a client-generated ID but that ID is already known\n  to the external API.\n\n  @class ConflictError\n  @public\n*/\n\nconst ConflictError = getOrSetGlobal('ConflictError', extend(AdapterError, 'The adapter operation failed due to a conflict'));\nConflictError.prototype.code = 'ConflictError';\n\n/**\n  A `ServerError` equates to a HTTP `500 Internal Server Error` response\n  status. It is used by the adapter to indicate that a request has failed\n  because of an error in the external API.\n\n  @class ServerError\n  @public\n*/\n\nconst ServerError = getOrSetGlobal('ServerError', extend(AdapterError, 'The adapter operation failed due to a server error'));\nServerError.prototype.code = 'ServerError';\nexport { AbortError, AdapterError, ConflictError, ForbiddenError, InvalidError, NotFoundError, ServerError, TimeoutError, UnauthorizedError };","const deferred = /* @__PURE__ */new WeakMap();\nfunction deferDecorator(proto, prop, desc) {\n  let map = deferred.get(proto);\n  if (!map) {\n    map = /* @__PURE__ */new Map();\n    deferred.set(proto, map);\n  }\n  map.set(prop, desc);\n}\nfunction findDeferredDecorator(target, prop) {\n  var _a;\n  let cursor = target.prototype;\n  while (cursor) {\n    let desc = (_a = deferred.get(cursor)) == null ? void 0 : _a.get(prop);\n    if (desc) {\n      return desc;\n    }\n    cursor = cursor.prototype;\n  }\n}\nfunction decorateFieldV2(prototype, prop, decorators, initializer) {\n  let desc = {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: null\n  };\n  if (initializer) {\n    desc.initializer = initializer;\n  }\n  for (let decorator of decorators) {\n    desc = decorator(prototype, prop, desc) || desc;\n  }\n  if (desc.initializer === void 0) {\n    Object.defineProperty(prototype, prop, desc);\n  } else {\n    deferDecorator(prototype, prop, desc);\n  }\n}\nfunction decorateMethodV2(prototype, prop, decorators) {\n  const origDesc = Object.getOwnPropertyDescriptor(prototype, prop);\n  let desc = {\n    ...origDesc\n  };\n  for (let decorator of decorators) {\n    desc = decorator(prototype, prop, desc) || desc;\n  }\n  if (desc.initializer !== void 0) {\n    desc.value = desc.initializer ? desc.initializer.call(prototype) : void 0;\n    desc.initializer = void 0;\n  }\n  Object.defineProperty(prototype, prop, desc);\n}\nfunction initializeDeferredDecorator(target, prop) {\n  let desc = findDeferredDecorator(target.constructor, prop);\n  if (desc) {\n    Object.defineProperty(target, prop, {\n      enumerable: desc.enumerable,\n      configurable: desc.configurable,\n      writable: desc.writable,\n      value: desc.initializer ? desc.initializer.call(target) : void 0\n    });\n  }\n}\nexport { decorateFieldV2 as a, decorateMethodV2 as d, initializeDeferredDecorator as i };","'use strict';\n\nObject.defineProperty(exports, Symbol.toStringTag, {\n  value: 'Module'\n});\nconst DEFAULT_MAX_CACHE_SIZE = 10_000;\n\n/**\n * An LRUCache implementation with upsert semantics.\n *\n * This implementation is *not* generic, but focuses on\n * performance tuning for the string transformation cases\n * where the key maps to the value very simply.\n *\n * It takes a work function that should generate a new value\n * for a given key when called. It will be called when the key\n * is not found in the cache.\n *\n * It keeps track of the number of hits, misses, and ejections\n * in DEBUG envs, which is useful for tuning the cache size.\n *\n * This is an internal utility class for use by this module\n * and by `@warp-drive/utilities/string`. It is not intended\n * for use outside of these modules at this time.\n *\n * @private\n */\nclass LRUCache {\n  // debug stats\n\n  constructor(doWork, size) {\n    this.size = size || DEFAULT_MAX_CACHE_SIZE;\n    this.state = new Map();\n    this.doWork = doWork;\n  }\n  get(key) {\n    const value = this.state.get(key);\n    if (value) {\n      this.state.delete(key);\n      this.state.set(key, value);\n      return value;\n    }\n    const newValue = this.doWork(key);\n    this.set(key, newValue);\n    return newValue;\n  }\n  set(key, value) {\n    if (this.state.size === this.size) {\n      for (const [k] of this.state) {\n        this.state.delete(k);\n        break;\n      }\n    }\n    this.state.set(key, value);\n  }\n  clear() {\n    this.state.clear();\n  }\n}\nconst STRING_DASHERIZE_REGEXP = /[ _]/g;\nconst STRING_DECAMELIZE_REGEXP = /([a-z\\d])([A-Z])/g;\nconst STRING_DASHERIZE_CACHE = new LRUCache(key => key.replace(STRING_DECAMELIZE_REGEXP, '$1_$2').toLowerCase().replace(STRING_DASHERIZE_REGEXP, '-'));\n\n/**\n * This is an internal utility function that converts a string\n * to a dasherized format. Library consumers should use the\n * re-exported version from `@warp-drive/utilities/string` instead.\n *\n * This version is only in this location to support a deprecated\n * behavior in the core package and will be removed in a future.\n *\n * @private\n */\nfunction dasherize$1(str) {\n  return STRING_DASHERIZE_CACHE.get(str);\n}\nconst defaultRules = {\n  plurals: [[/$/, 's'], [/s$/i, 's'], [/^(ax|test)is$/i, '$1es'], [/(octop|vir)us$/i, '$1i'], [/(octop|vir)i$/i, '$1i'], [/(alias|status|bonus)$/i, '$1es'], [/(bu)s$/i, '$1ses'], [/(buffal|tomat)o$/i, '$1oes'], [/([ti])um$/i, '$1a'], [/([ti])a$/i, '$1a'], [/sis$/i, 'ses'], [/(?:([^f])fe|([lr])f)$/i, '$1$2ves'], [/(hive)$/i, '$1s'], [/([^aeiouy]|qu)y$/i, '$1ies'], [/(x|ch|ss|sh)$/i, '$1es'], [/(matr|vert|ind)(?:ix|ex)$/i, '$1ices'], [/^(m|l)ouse$/i, '$1ice'], [/^(m|l)ice$/i, '$1ice'], [/^(ox)$/i, '$1en'], [/^(oxen)$/i, '$1'], [/(quiz)$/i, '$1zes']],\n  singular: [[/s$/i, ''], [/(ss)$/i, '$1'], [/(n)ews$/i, '$1ews'], [/([ti])a$/i, '$1um'], [/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(sis|ses)$/i, '$1sis'], [/(^analy)(sis|ses)$/i, '$1sis'], [/([^f])ves$/i, '$1fe'], [/(hive)s$/i, '$1'], [/(tive)s$/i, '$1'], [/([lr])ves$/i, '$1f'], [/([^aeiouy]|qu)ies$/i, '$1y'], [/(s)eries$/i, '$1eries'], [/(m)ovies$/i, '$1ovie'], [/(x|ch|ss|sh)es$/i, '$1'], [/^(m|l)ice$/i, '$1ouse'], [/(bus)(es)?$/i, '$1'], [/(o)es$/i, '$1'], [/(shoe)s$/i, '$1'], [/(cris|test)(is|es)$/i, '$1is'], [/^(a)x[ie]s$/i, '$1xis'], [/(octop|vir)(us|i)$/i, '$1us'], [/(alias|status|bonus)(es)?$/i, '$1'], [/^(ox)en/i, '$1'], [/(vert|ind)ices$/i, '$1ex'], [/(matr)ices$/i, '$1ix'], [/(quiz)zes$/i, '$1'], [/(database)s$/i, '$1']],\n  irregularPairs: [['person', 'people'], ['man', 'men'], ['child', 'children'], ['sex', 'sexes'], ['move', 'moves'], ['cow', 'kine'], ['zombie', 'zombies']],\n  uncountable: ['equipment', 'information', 'rice', 'money', 'species', 'series', 'fish', 'sheep', 'jeans', 'police']\n};\n\n// eslint-disable-next-line no-useless-escape\nconst STRING_CAMELIZE_REGEXP_1 = /(\\-|\\_|\\.|\\s)+(.)?/g;\nconst STRING_CAMELIZE_REGEXP_2 = /(^|\\/)([A-Z])/g;\nconst CAMELIZE_CACHE = new LRUCache(key => key.replace(STRING_CAMELIZE_REGEXP_1, (_match, _separator, chr) => chr ? chr.toUpperCase() : '').replace(STRING_CAMELIZE_REGEXP_2, (match /*, separator, chr */) => match.toLowerCase()));\nconst STRING_UNDERSCORE_REGEXP_1 = /([a-z\\d])([A-Z]+)/g;\n// eslint-disable-next-line no-useless-escape\nconst STRING_UNDERSCORE_REGEXP_2 = /\\-|\\s+/g;\nconst UNDERSCORE_CACHE = new LRUCache(str => str.replace(STRING_UNDERSCORE_REGEXP_1, '$1_$2').replace(STRING_UNDERSCORE_REGEXP_2, '_').toLowerCase());\nconst STRING_CAPITALIZE_REGEXP = /(^|\\/)([a-z\\u00C0-\\u024F])/g;\nconst CAPITALIZE_CACHE = new LRUCache(str => str.replace(STRING_CAPITALIZE_REGEXP, (match /*, separator, chr */) => match.toUpperCase()));\n\n/**\n * Replaces underscores, spaces, or camelCase with dashes.\n *\n * ```js\n * import { dasherize } from '@warp-drive/utilities/string';\n *\n * dasherize('innerHTML');                // 'inner-html'\n * dasherize('action_name');              // 'action-name'\n * dasherize('css-class-name');           // 'css-class-name'\n * dasherize('my favorite items');        // 'my-favorite-items'\n * dasherize('privateDocs/ownerInvoice';  // 'private-docs/owner-invoice'\n * ```\n *\n * @public\n * @since 4.13.0\n */\nconst dasherize = dasherize$1;\n\n/**\n * Returns the lowerCamelCase form of a string.\n *\n * ```js\n * import { camelize } from '@warp-drive/utilities/string';\n *\n * camelize('innerHTML');                   // 'innerHTML'\n * camelize('action_name');                 // 'actionName'\n * camelize('css-class-name');              // 'cssClassName'\n * camelize('my favorite items');           // 'myFavoriteItems'\n * camelize('My Favorite Items');           // 'myFavoriteItems'\n * camelize('private-docs/owner-invoice');  // 'privateDocs/ownerInvoice'\n * ```\n *\n * @public\n * @since 4.13.0\n */\nfunction camelize(str) {\n  return CAMELIZE_CACHE.get(str);\n}\n\n/**\n * Returns the lower\\_case\\_and\\_underscored form of a string.\n *\n * ```js\n * import { underscore } from '@warp-drive/utilities/string';\n *\n * underscore('innerHTML');                 // 'inner_html'\n * underscore('action_name');               // 'action_name'\n * underscore('css-class-name');            // 'css_class_name'\n * underscore('my favorite items');         // 'my_favorite_items'\n * underscore('privateDocs/ownerInvoice');  // 'private_docs/owner_invoice'\n * ```\n *\n * @public\n * @since 4.13.0\n */\nfunction underscore(str) {\n  return UNDERSCORE_CACHE.get(str);\n}\n\n/**\n * Returns the Capitalized form of a string\n *\n * ```js\n * import { capitalize } from '@warp-drive/utilities/string';\n *\n * capitalize('innerHTML')                 // 'InnerHTML'\n * capitalize('action_name')               // 'Action_name'\n * capitalize('css-class-name')            // 'Css-class-name'\n * capitalize('my favorite items')         // 'My favorite items'\n * capitalize('privateDocs/ownerInvoice'); // 'PrivateDocs/ownerInvoice'\n * ```\n *\n * @public\n * @since 4.13.0\n */\nfunction capitalize(str) {\n  return CAPITALIZE_CACHE.get(str);\n}\n\n/**\n * Sets the maximum size of the LRUCache for all string transformation functions.\n * The default size is 10,000.\n *\n * @public\n * @since 4.13.0\n */\nfunction setMaxLRUCacheSize(size) {\n  CAMELIZE_CACHE.size = size;\n  UNDERSCORE_CACHE.size = size;\n  CAPITALIZE_CACHE.size = size;\n  STRING_DASHERIZE_CACHE.size = size;\n}\nconst BLANK_REGEX = /^\\s*$/;\nconst LAST_WORD_DASHED_REGEX = /([\\w/-]+[_/\\s-])([a-z\\d]+$)/;\nconst LAST_WORD_CAMELIZED_REGEX = /([\\w/\\s-]+)([A-Z][a-z\\d]*$)/;\nconst CAMELIZED_REGEX = /[A-Z][a-z\\d]*$/;\nconst SINGULARS = new LRUCache(word => {\n  return _singularize(word);\n});\nconst PLURALS = new LRUCache(word => {\n  return _pluralize(word);\n});\nconst UNCOUNTABLE = new Set(defaultRules.uncountable);\nconst IRREGULAR = new Map();\nconst INVERSE_IRREGULAR = new Map();\nconst SINGULAR_RULES = new Map(defaultRules.singular.reverse());\nconst PLURAL_RULES = new Map(defaultRules.plurals.reverse());\n\n/**\n * Marks a word as uncountable. Uncountable words are not pluralized\n * or singularized.\n *\n * @public\n * @since 4.13.0\n */\nfunction uncountable(word) {\n  UNCOUNTABLE.add(word.toLowerCase());\n}\n\n/**\n * Marks a list of words as uncountable. Uncountable words are not pluralized\n * or singularized.\n *\n * @public\n * @since 4.13.0\n */\nfunction loadUncountable(uncountables) {\n  uncountables.forEach(word => {\n    uncountable(word);\n  });\n}\n\n/**\n * Marks a word as irregular. Irregular words have unique\n * pluralization and singularization rules.\n *\n * @public\n * @since 4.13.0\n */\nfunction irregular(single, plur) {\n  //pluralizing\n  IRREGULAR.set(single.toLowerCase(), plur);\n  IRREGULAR.set(plur.toLowerCase(), plur);\n\n  //singularizing\n  INVERSE_IRREGULAR.set(plur.toLowerCase(), single);\n  INVERSE_IRREGULAR.set(single.toLowerCase(), single);\n}\n\n/**\n * Marks a list of word pairs as irregular. Irregular words have unique\n * pluralization and singularization rules.\n *\n * @public\n * @since 4.13.0\n */\nfunction loadIrregular(irregularPairs) {\n  irregularPairs.forEach(pair => {\n    //pluralizing\n    IRREGULAR.set(pair[0].toLowerCase(), pair[1]);\n    IRREGULAR.set(pair[1].toLowerCase(), pair[1]);\n\n    //singularizing\n    INVERSE_IRREGULAR.set(pair[1].toLowerCase(), pair[0]);\n    INVERSE_IRREGULAR.set(pair[0].toLowerCase(), pair[0]);\n  });\n}\nloadIrregular(defaultRules.irregularPairs);\n\n/**\n * Clears the caches for singularize and pluralize.\n *\n * @public\n * @since 4.13.0\n */\nfunction clear() {\n  SINGULARS.clear();\n  PLURALS.clear();\n}\n\n/**\n * Resets the inflection rules to the defaults.\n *\n * @public\n * @since 4.13.0\n */\nfunction resetToDefaults() {\n  clearRules();\n  defaultRules.uncountable.forEach(v => UNCOUNTABLE.add(v));\n  defaultRules.singular.forEach(v => SINGULAR_RULES.set(v[0], v[1]));\n  defaultRules.plurals.forEach(v => PLURAL_RULES.set(v[0], v[1]));\n  loadIrregular(defaultRules.irregularPairs);\n}\n\n/**\n * Clears all inflection rules\n * and resets the caches for singularize and pluralize.\n *\n * @public\n * @since 4.13.0\n */\nfunction clearRules() {\n  SINGULARS.clear();\n  PLURALS.clear();\n  UNCOUNTABLE.clear();\n  IRREGULAR.clear();\n  INVERSE_IRREGULAR.clear();\n  SINGULAR_RULES.clear();\n  PLURAL_RULES.clear();\n}\n\n/**\n * Singularizes a word.\n *\n * @public\n * @since 4.13.0\n */\nfunction singularize(word) {\n  if (!word) return '';\n  return SINGULARS.get(word);\n}\n\n/**\n * Pluralizes a word.\n *\n * @public\n * @since 4.13.0\n */\nfunction pluralize(word) {\n  if (!word) return '';\n  return PLURALS.get(word);\n}\nfunction unshiftMap(v, map) {\n  // reorder\n  const rules = [v, ...map.entries()];\n  map.clear();\n  rules.forEach(rule => {\n    map.set(rule[0], rule[1]);\n  });\n}\n\n/**\n * Adds a pluralization rule.\n *\n * @public\n * @since 4.13.0\n */\nfunction plural(regex, string) {\n  // rule requires reordering if exists, so remove it first\n  if (PLURAL_RULES.has(regex)) {\n    PLURAL_RULES.delete(regex);\n  }\n\n  // reorder\n  unshiftMap([regex, string], PLURAL_RULES);\n}\n\n/**\n * Adds a singularization rule.\n *\n * @public\n * @since 4.13.0\n */\nfunction singular(regex, string) {\n  // rule requires reordering if exists, so remove it first\n  if (SINGULAR_RULES.has(regex)) {\n    SINGULAR_RULES.delete(regex);\n  }\n\n  // reorder\n  unshiftMap([regex, string], SINGULAR_RULES);\n}\nfunction _pluralize(word) {\n  return inflect(word, PLURAL_RULES, IRREGULAR);\n}\nfunction _singularize(word) {\n  return inflect(word, SINGULAR_RULES, INVERSE_IRREGULAR);\n}\nfunction inflect(word, typeRules, irregulars) {\n  // empty strings\n  const isBlank = !word || BLANK_REGEX.test(word);\n  if (isBlank) {\n    return word;\n  }\n\n  // basic uncountables\n  const lowercase = word.toLowerCase();\n  if (UNCOUNTABLE.has(lowercase)) {\n    return word;\n  }\n\n  // adv uncountables\n  const wordSplit = LAST_WORD_DASHED_REGEX.exec(word) || LAST_WORD_CAMELIZED_REGEX.exec(word);\n  const lastWord = wordSplit ? wordSplit[2].toLowerCase() : null;\n  if (lastWord && UNCOUNTABLE.has(lastWord)) {\n    return word;\n  }\n\n  // handle irregulars\n  const isCamelized = CAMELIZED_REGEX.test(word);\n  for (let [rule, substitution] of irregulars) {\n    if (lowercase.match(rule + '$')) {\n      if (isCamelized && lastWord && irregulars.has(lastWord)) {\n        substitution = capitalize(substitution);\n        rule = capitalize(rule);\n      }\n      return word.replace(new RegExp(rule, 'i'), substitution);\n    }\n  }\n\n  // do the actual inflection\n  for (const [rule, substitution] of typeRules) {\n    if (rule.test(word)) {\n      return word.replace(rule, substitution);\n    }\n  }\n  return word;\n}\nexports.camelize = camelize;\nexports.capitalize = capitalize;\nexports.clear = clear;\nexports.clearRules = clearRules;\nexports.dasherize = dasherize;\nexports.irregular = irregular;\nexports.loadIrregular = loadIrregular;\nexports.loadUncountable = loadUncountable;\nexports.plural = plural;\nexports.pluralize = pluralize;\nexports.resetToDefaults = resetToDefaults;\nexports.setMaxLRUCacheSize = setMaxLRUCacheSize;\nexports.singular = singular;\nexports.singularize = singularize;\nexports.uncountable = uncountable;\nexports.underscore = underscore;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.cardNumber = void 0;\nvar luhn10 = require(\"./luhn-10\");\nvar getCardTypes = require(\"credit-card-type\");\nfunction verification(card, isPotentiallyValid, isValid) {\n    return {\n        card: card,\n        isPotentiallyValid: isPotentiallyValid,\n        isValid: isValid,\n    };\n}\nfunction cardNumber(value, options) {\n    if (options === void 0) { options = {}; }\n    var isPotentiallyValid, isValid, maxLength;\n    if (typeof value !== \"string\" && typeof value !== \"number\") {\n        return verification(null, false, false);\n    }\n    var testCardValue = String(value).replace(/-|\\s/g, \"\");\n    if (!/^\\d*$/.test(testCardValue)) {\n        return verification(null, false, false);\n    }\n    var potentialTypes = getCardTypes(testCardValue);\n    if (potentialTypes.length === 0) {\n        return verification(null, false, false);\n    }\n    else if (potentialTypes.length !== 1) {\n        return verification(null, true, false);\n    }\n    var cardType = potentialTypes[0];\n    if (options.maxLength && testCardValue.length > options.maxLength) {\n        return verification(cardType, false, false);\n    }\n    if (options.skipLuhnValidation === true ||\n        (cardType.type === getCardTypes.types.UNIONPAY &&\n            options.luhnValidateUnionPay !== true)) {\n        isValid = true;\n    }\n    else {\n        isValid = luhn10(testCardValue);\n    }\n    maxLength = Math.max.apply(null, cardType.lengths);\n    if (options.maxLength) {\n        maxLength = Math.min(options.maxLength, maxLength);\n    }\n    for (var i = 0; i < cardType.lengths.length; i++) {\n        if (cardType.lengths[i] === testCardValue.length) {\n            isPotentiallyValid = testCardValue.length < maxLength || isValid;\n            return verification(cardType, isPotentiallyValid, isValid);\n        }\n    }\n    return verification(cardType, testCardValue.length < maxLength, false);\n}\nexports.cardNumber = cardNumber;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.cardholderName = void 0;\nvar CARD_NUMBER_REGEX = /^[\\d\\s-]*$/;\nvar MAX_LENGTH = 255;\nfunction verification(isValid, isPotentiallyValid) {\n    return { isValid: isValid, isPotentiallyValid: isPotentiallyValid };\n}\nfunction cardholderName(value) {\n    if (typeof value !== \"string\") {\n        return verification(false, false);\n    }\n    if (value.length === 0) {\n        return verification(false, true);\n    }\n    if (value.length > MAX_LENGTH) {\n        return verification(false, false);\n    }\n    if (CARD_NUMBER_REGEX.test(value)) {\n        return verification(false, true);\n    }\n    return verification(true, true);\n}\nexports.cardholderName = cardholderName;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.cvv = void 0;\nvar DEFAULT_LENGTH = 3;\nfunction includes(array, thing) {\n    for (var i = 0; i < array.length; i++) {\n        if (thing === array[i]) {\n            return true;\n        }\n    }\n    return false;\n}\nfunction max(array) {\n    var maximum = DEFAULT_LENGTH;\n    var i = 0;\n    for (; i < array.length; i++) {\n        maximum = array[i] > maximum ? array[i] : maximum;\n    }\n    return maximum;\n}\nfunction verification(isValid, isPotentiallyValid) {\n    return { isValid: isValid, isPotentiallyValid: isPotentiallyValid };\n}\nfunction cvv(value, maxLength) {\n    if (maxLength === void 0) { maxLength = DEFAULT_LENGTH; }\n    maxLength = maxLength instanceof Array ? maxLength : [maxLength];\n    if (typeof value !== \"string\") {\n        return verification(false, false);\n    }\n    if (!/^\\d*$/.test(value)) {\n        return verification(false, false);\n    }\n    if (includes(maxLength, value.length)) {\n        return verification(true, true);\n    }\n    if (value.length < Math.min.apply(null, maxLength)) {\n        return verification(false, true);\n    }\n    if (value.length > max(maxLength)) {\n        return verification(false, false);\n    }\n    return verification(true, true);\n}\nexports.cvv = cvv;\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.expirationDate = void 0;\nvar parse_date_1 = require(\"./lib/parse-date\");\nvar expiration_month_1 = require(\"./expiration-month\");\nvar expiration_year_1 = require(\"./expiration-year\");\nfunction verification(isValid, isPotentiallyValid, month, year) {\n    return {\n        isValid: isValid,\n        isPotentiallyValid: isPotentiallyValid,\n        month: month,\n        year: year,\n    };\n}\nfunction expirationDate(value, maxElapsedYear) {\n    var date;\n    if (typeof value === \"string\") {\n        value = value.replace(/^(\\d\\d) (\\d\\d(\\d\\d)?)$/, \"$1/$2\");\n        date = (0, parse_date_1.parseDate)(String(value));\n    }\n    else if (value !== null && typeof value === \"object\") {\n        var fullDate = __assign({}, value);\n        date = {\n            month: String(fullDate.month),\n            year: String(fullDate.year),\n        };\n    }\n    else {\n        return verification(false, false, null, null);\n    }\n    var monthValid = (0, expiration_month_1.expirationMonth)(date.month);\n    var yearValid = (0, expiration_year_1.expirationYear)(date.year, maxElapsedYear);\n    if (monthValid.isValid) {\n        if (yearValid.isCurrentYear) {\n            var isValidForThisYear = monthValid.isValidForThisYear;\n            return verification(isValidForThisYear, isValidForThisYear, date.month, date.year);\n        }\n        if (yearValid.isValid) {\n            return verification(true, true, date.month, date.year);\n        }\n    }\n    if (monthValid.isPotentiallyValid && yearValid.isPotentiallyValid) {\n        return verification(false, true, null, null);\n    }\n    return verification(false, false, null, null);\n}\nexports.expirationDate = expirationDate;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.expirationMonth = void 0;\nfunction verification(isValid, isPotentiallyValid, isValidForThisYear) {\n    return {\n        isValid: isValid,\n        isPotentiallyValid: isPotentiallyValid,\n        isValidForThisYear: isValidForThisYear || false,\n    };\n}\nfunction expirationMonth(value) {\n    var currentMonth = new Date().getMonth() + 1;\n    if (typeof value !== \"string\") {\n        return verification(false, false);\n    }\n    if (value.replace(/\\s/g, \"\") === \"\" || value === \"0\") {\n        return verification(false, true);\n    }\n    if (!/^\\d*$/.test(value)) {\n        return verification(false, false);\n    }\n    var month = parseInt(value, 10);\n    if (isNaN(Number(value))) {\n        return verification(false, false);\n    }\n    var result = month > 0 && month < 13;\n    return verification(result, result, result && month >= currentMonth);\n}\nexports.expirationMonth = expirationMonth;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.expirationYear = void 0;\nvar DEFAULT_VALID_NUMBER_OF_YEARS_IN_THE_FUTURE = 19;\nfunction verification(isValid, isPotentiallyValid, isCurrentYear) {\n    return {\n        isValid: isValid,\n        isPotentiallyValid: isPotentiallyValid,\n        isCurrentYear: isCurrentYear || false,\n    };\n}\nfunction expirationYear(value, maxElapsedYear) {\n    if (maxElapsedYear === void 0) { maxElapsedYear = DEFAULT_VALID_NUMBER_OF_YEARS_IN_THE_FUTURE; }\n    var isCurrentYear;\n    if (typeof value !== \"string\") {\n        return verification(false, false);\n    }\n    if (value.replace(/\\s/g, \"\") === \"\") {\n        return verification(false, true);\n    }\n    if (!/^\\d*$/.test(value)) {\n        return verification(false, false);\n    }\n    var len = value.length;\n    if (len < 2) {\n        return verification(false, true);\n    }\n    var currentYear = new Date().getFullYear();\n    if (len === 3) {\n        // 20x === 20x\n        var firstTwo = value.slice(0, 2);\n        var currentFirstTwo = String(currentYear).slice(0, 2);\n        return verification(false, firstTwo === currentFirstTwo);\n    }\n    if (len > 4) {\n        return verification(false, false);\n    }\n    var numericValue = parseInt(value, 10);\n    var twoDigitYear = Number(String(currentYear).substr(2, 2));\n    var valid = false;\n    if (len === 2) {\n        if (String(currentYear).substr(0, 2) === value) {\n            return verification(false, true);\n        }\n        isCurrentYear = twoDigitYear === numericValue;\n        valid =\n            numericValue >= twoDigitYear &&\n                numericValue <= twoDigitYear + maxElapsedYear;\n    }\n    else if (len === 4) {\n        isCurrentYear = currentYear === numericValue;\n        valid =\n            numericValue >= currentYear &&\n                numericValue <= currentYear + maxElapsedYear;\n    }\n    return verification(valid, valid, isCurrentYear);\n}\nexports.expirationYear = expirationYear;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n    if (mod && mod.__esModule) return mod;\n    var result = {};\n    if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n    __setModuleDefault(result, mod);\n    return result;\n};\nvar creditCardType = __importStar(require(\"credit-card-type\"));\nvar cardholder_name_1 = require(\"./cardholder-name\");\nvar card_number_1 = require(\"./card-number\");\nvar expiration_date_1 = require(\"./expiration-date\");\nvar expiration_month_1 = require(\"./expiration-month\");\nvar expiration_year_1 = require(\"./expiration-year\");\nvar cvv_1 = require(\"./cvv\");\nvar postal_code_1 = require(\"./postal-code\");\nvar cardValidator = {\n    creditCardType: creditCardType,\n    cardholderName: cardholder_name_1.cardholderName,\n    number: card_number_1.cardNumber,\n    expirationDate: expiration_date_1.expirationDate,\n    expirationMonth: expiration_month_1.expirationMonth,\n    expirationYear: expiration_year_1.expirationYear,\n    cvv: cvv_1.cvv,\n    postalCode: postal_code_1.postalCode,\n};\nmodule.exports = cardValidator;\n","\"use strict\";\n// Polyfill taken from <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#Polyfill>.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isArray = void 0;\nexports.isArray = Array.isArray ||\n    function (arg) {\n        return Object.prototype.toString.call(arg) === \"[object Array]\";\n    };\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseDate = void 0;\nvar expiration_year_1 = require(\"../expiration-year\");\nvar is_array_1 = require(\"./is-array\");\nfunction getNumberOfMonthDigitsInDateString(dateString) {\n    var firstCharacter = Number(dateString[0]);\n    var assumedYear;\n    /*\n      if the first character in the string starts with `0`,\n      we know that the month will be 2 digits.\n  \n      '0122' => {month: '01', year: '22'}\n    */\n    if (firstCharacter === 0) {\n        return 2;\n    }\n    /*\n      if the first character in the string starts with\n      number greater than 1, it must be a 1 digit month\n  \n      '322' => {month: '3', year: '22'}\n    */\n    if (firstCharacter > 1) {\n        return 1;\n    }\n    /*\n      if the first 2 characters make up a number between\n      13-19, we know that the month portion must be 1\n  \n      '139' => {month: '1', year: '39'}\n    */\n    if (firstCharacter === 1 && Number(dateString[1]) > 2) {\n        return 1;\n    }\n    /*\n      if the first 2 characters make up a number between\n      10-12, we check if the year portion would be considered\n      valid if we assumed that the month was 1. If it is\n      not potentially valid, we assume the month must have\n      2 digits.\n  \n      '109' => {month: '10', year: '9'}\n      '120' => {month: '1', year: '20'} // when checked in the year 2019\n      '120' => {month: '12', year: '0'} // when checked in the year 2021\n    */\n    if (firstCharacter === 1) {\n        assumedYear = dateString.substr(1);\n        return (0, expiration_year_1.expirationYear)(assumedYear).isPotentiallyValid ? 1 : 2;\n    }\n    /*\n      If the length of the value is exactly 5 characters,\n      we assume a full year was passed in, meaning the remaining\n      single leading digit must be the month value.\n  \n      '12202' => {month: '1', year: '2202'}\n    */\n    if (dateString.length === 5) {\n        return 1;\n    }\n    /*\n      If the length of the value is more than five characters,\n      we assume a full year was passed in addition to the month\n      and therefore the month portion must be 2 digits.\n  \n      '112020' => {month: '11', year: '2020'}\n    */\n    if (dateString.length > 5) {\n        return 2;\n    }\n    /*\n      By default, the month value is the first value\n    */\n    return 1;\n}\nfunction parseDate(datestring) {\n    var date;\n    if (/^\\d{4}-\\d{1,2}$/.test(datestring)) {\n        date = datestring.split(\"-\").reverse();\n    }\n    else if (/\\//.test(datestring)) {\n        date = datestring.split(/\\s*\\/\\s*/g);\n    }\n    else if (/\\s/.test(datestring)) {\n        date = datestring.split(/ +/g);\n    }\n    if ((0, is_array_1.isArray)(date)) {\n        return {\n            month: date[0] || \"\",\n            year: date.slice(1).join(),\n        };\n    }\n    var numberOfDigitsInMonth = getNumberOfMonthDigitsInDateString(datestring);\n    var month = datestring.substr(0, numberOfDigitsInMonth);\n    return {\n        month: month,\n        year: datestring.substr(month.length),\n    };\n}\nexports.parseDate = parseDate;\n","/* eslint-disable */\n/*\n * Luhn algorithm implementation in JavaScript\n * Copyright (c) 2009 Nicholas C. Zakas\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\"use strict\";\nfunction luhn10(identifier) {\n    var sum = 0;\n    var alt = false;\n    var i = identifier.length - 1;\n    var num;\n    while (i >= 0) {\n        num = parseInt(identifier.charAt(i), 10);\n        if (alt) {\n            num *= 2;\n            if (num > 9) {\n                num = (num % 10) + 1; // eslint-disable-line no-extra-parens\n            }\n        }\n        alt = !alt;\n        sum += num;\n        i--;\n    }\n    return sum % 10 === 0;\n}\nmodule.exports = luhn10;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.postalCode = void 0;\nvar DEFAULT_MIN_POSTAL_CODE_LENGTH = 3;\nvar ALPHANUM = new RegExp(/^[a-z0-9]+$/i);\nfunction verification(isValid, isPotentiallyValid) {\n    return { isValid: isValid, isPotentiallyValid: isPotentiallyValid };\n}\nfunction postalCode(value, options) {\n    if (options === void 0) { options = {}; }\n    var minLength = options.minLength || DEFAULT_MIN_POSTAL_CODE_LENGTH;\n    if (typeof value !== \"string\") {\n        return verification(false, false);\n    }\n    else if (value.length < minLength) {\n        return verification(false, true);\n    }\n    else if (!ALPHANUM.test(value.trim().slice(0, minLength))) {\n        return verification(false, true);\n    }\n    return verification(true, true);\n}\nexports.postalCode = postalCode;\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nvar cardTypes = require(\"./lib/card-types\");\nvar add_matching_cards_to_results_1 = require(\"./lib/add-matching-cards-to-results\");\nvar is_valid_input_type_1 = require(\"./lib/is-valid-input-type\");\nvar find_best_match_1 = require(\"./lib/find-best-match\");\nvar clone_1 = require(\"./lib/clone\");\nvar customCards = {};\nvar cardNames = {\n    VISA: \"visa\",\n    MASTERCARD: \"mastercard\",\n    AMERICAN_EXPRESS: \"american-express\",\n    DINERS_CLUB: \"diners-club\",\n    DISCOVER: \"discover\",\n    JCB: \"jcb\",\n    UNIONPAY: \"unionpay\",\n    MAESTRO: \"maestro\",\n    ELO: \"elo\",\n    MIR: \"mir\",\n    HIPER: \"hiper\",\n    HIPERCARD: \"hipercard\",\n};\nvar ORIGINAL_TEST_ORDER = [\n    cardNames.VISA,\n    cardNames.MASTERCARD,\n    cardNames.AMERICAN_EXPRESS,\n    cardNames.DINERS_CLUB,\n    cardNames.DISCOVER,\n    cardNames.JCB,\n    cardNames.UNIONPAY,\n    cardNames.MAESTRO,\n    cardNames.ELO,\n    cardNames.MIR,\n    cardNames.HIPER,\n    cardNames.HIPERCARD,\n];\nvar testOrder = (0, clone_1.clone)(ORIGINAL_TEST_ORDER);\nfunction findType(cardType) {\n    return customCards[cardType] || cardTypes[cardType];\n}\nfunction getAllCardTypes() {\n    return testOrder.map(function (cardType) { return (0, clone_1.clone)(findType(cardType)); });\n}\nfunction getCardPosition(name, ignoreErrorForNotExisting) {\n    if (ignoreErrorForNotExisting === void 0) { ignoreErrorForNotExisting = false; }\n    var position = testOrder.indexOf(name);\n    if (!ignoreErrorForNotExisting && position === -1) {\n        throw new Error('\"' + name + '\" is not a supported card type.');\n    }\n    return position;\n}\nfunction creditCardType(cardNumber) {\n    var results = [];\n    if (!(0, is_valid_input_type_1.isValidInputType)(cardNumber)) {\n        return results;\n    }\n    if (cardNumber.length === 0) {\n        return getAllCardTypes();\n    }\n    testOrder.forEach(function (cardType) {\n        var cardConfiguration = findType(cardType);\n        (0, add_matching_cards_to_results_1.addMatchingCardsToResults)(cardNumber, cardConfiguration, results);\n    });\n    var bestMatch = (0, find_best_match_1.findBestMatch)(results);\n    if (bestMatch) {\n        return [bestMatch];\n    }\n    return results;\n}\ncreditCardType.getTypeInfo = function (cardType) {\n    return (0, clone_1.clone)(findType(cardType));\n};\ncreditCardType.removeCard = function (name) {\n    var position = getCardPosition(name);\n    testOrder.splice(position, 1);\n};\ncreditCardType.addCard = function (config) {\n    var existingCardPosition = getCardPosition(config.type, true);\n    customCards[config.type] = config;\n    if (existingCardPosition === -1) {\n        testOrder.push(config.type);\n    }\n};\ncreditCardType.updateCard = function (cardType, updates) {\n    var originalObject = customCards[cardType] || cardTypes[cardType];\n    if (!originalObject) {\n        throw new Error(\"\\\"\".concat(cardType, \"\\\" is not a recognized type. Use `addCard` instead.'\"));\n    }\n    if (updates.type && originalObject.type !== updates.type) {\n        throw new Error(\"Cannot overwrite type parameter.\");\n    }\n    var clonedCard = (0, clone_1.clone)(originalObject);\n    clonedCard = __assign(__assign({}, clonedCard), updates);\n    customCards[clonedCard.type] = clonedCard;\n};\ncreditCardType.changeOrder = function (name, position) {\n    var currentPosition = getCardPosition(name);\n    testOrder.splice(currentPosition, 1);\n    testOrder.splice(position, 0, name);\n};\ncreditCardType.resetModifications = function () {\n    testOrder = (0, clone_1.clone)(ORIGINAL_TEST_ORDER);\n    customCards = {};\n};\ncreditCardType.types = cardNames;\nmodule.exports = creditCardType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.addMatchingCardsToResults = void 0;\nvar clone_1 = require(\"./clone\");\nvar matches_1 = require(\"./matches\");\nfunction addMatchingCardsToResults(cardNumber, cardConfiguration, results) {\n    var i, patternLength;\n    for (i = 0; i < cardConfiguration.patterns.length; i++) {\n        var pattern = cardConfiguration.patterns[i];\n        if (!(0, matches_1.matches)(cardNumber, pattern)) {\n            continue;\n        }\n        var clonedCardConfiguration = (0, clone_1.clone)(cardConfiguration);\n        if (Array.isArray(pattern)) {\n            patternLength = String(pattern[0]).length;\n        }\n        else {\n            patternLength = String(pattern).length;\n        }\n        if (cardNumber.length >= patternLength) {\n            clonedCardConfiguration.matchStrength = patternLength;\n        }\n        results.push(clonedCardConfiguration);\n        break;\n    }\n}\nexports.addMatchingCardsToResults = addMatchingCardsToResults;\n","\"use strict\";\nvar cardTypes = {\n    visa: {\n        niceType: \"Visa\",\n        type: \"visa\",\n        patterns: [4],\n        gaps: [4, 8, 12],\n        lengths: [16, 18, 19],\n        code: {\n            name: \"CVV\",\n            size: 3,\n        },\n    },\n    mastercard: {\n        niceType: \"Mastercard\",\n        type: \"mastercard\",\n        patterns: [[51, 55], [2221, 2229], [223, 229], [23, 26], [270, 271], 2720],\n        gaps: [4, 8, 12],\n        lengths: [16],\n        code: {\n            name: \"CVC\",\n            size: 3,\n        },\n    },\n    \"american-express\": {\n        niceType: \"American Express\",\n        type: \"american-express\",\n        patterns: [34, 37],\n        gaps: [4, 10],\n        lengths: [15],\n        code: {\n            name: \"CID\",\n            size: 4,\n        },\n    },\n    \"diners-club\": {\n        niceType: \"Diners Club\",\n        type: \"diners-club\",\n        patterns: [[300, 305], 36, 38, 39],\n        gaps: [4, 10],\n        lengths: [14, 16, 19],\n        code: {\n            name: \"CVV\",\n            size: 3,\n        },\n    },\n    discover: {\n        niceType: \"Discover\",\n        type: \"discover\",\n        patterns: [6011, [644, 649], 65],\n        gaps: [4, 8, 12],\n        lengths: [16, 19],\n        code: {\n            name: \"CID\",\n            size: 3,\n        },\n    },\n    jcb: {\n        niceType: \"JCB\",\n        type: \"jcb\",\n        patterns: [2131, 1800, [3528, 3589]],\n        gaps: [4, 8, 12],\n        lengths: [16, 17, 18, 19],\n        code: {\n            name: \"CVV\",\n            size: 3,\n        },\n    },\n    unionpay: {\n        niceType: \"UnionPay\",\n        type: \"unionpay\",\n        patterns: [\n            620,\n            [62100, 62182],\n            [62184, 62187],\n            [62185, 62197],\n            [62200, 62205],\n            [622010, 622999],\n            622018,\n            [62207, 62209],\n            [623, 626],\n            6270,\n            6272,\n            6276,\n            [627700, 627779],\n            [627781, 627799],\n            [6282, 6289],\n            6291,\n            6292,\n            810,\n            [8110, 8131],\n            [8132, 8151],\n            [8152, 8163],\n            [8164, 8171],\n        ],\n        gaps: [4, 8, 12],\n        lengths: [14, 15, 16, 17, 18, 19],\n        code: {\n            name: \"CVN\",\n            size: 3,\n        },\n    },\n    maestro: {\n        niceType: \"Maestro\",\n        type: \"maestro\",\n        patterns: [\n            493698,\n            [500000, 504174],\n            [504176, 506698],\n            [506779, 508999],\n            [56, 59],\n            63,\n            67,\n            6,\n        ],\n        gaps: [4, 8, 12],\n        lengths: [12, 13, 14, 15, 16, 17, 18, 19],\n        code: {\n            name: \"CVC\",\n            size: 3,\n        },\n    },\n    elo: {\n        niceType: \"Elo\",\n        type: \"elo\",\n        patterns: [\n            401178,\n            401179,\n            438935,\n            457631,\n            457632,\n            431274,\n            451416,\n            457393,\n            504175,\n            [506699, 506778],\n            [509000, 509999],\n            627780,\n            636297,\n            636368,\n            [650031, 650033],\n            [650035, 650051],\n            [650405, 650439],\n            [650485, 650538],\n            [650541, 650598],\n            [650700, 650718],\n            [650720, 650727],\n            [650901, 650978],\n            [651652, 651679],\n            [655000, 655019],\n            [655021, 655058],\n        ],\n        gaps: [4, 8, 12],\n        lengths: [16],\n        code: {\n            name: \"CVE\",\n            size: 3,\n        },\n    },\n    mir: {\n        niceType: \"Mir\",\n        type: \"mir\",\n        patterns: [[2200, 2204]],\n        gaps: [4, 8, 12],\n        lengths: [16, 17, 18, 19],\n        code: {\n            name: \"CVP2\",\n            size: 3,\n        },\n    },\n    hiper: {\n        niceType: \"Hiper\",\n        type: \"hiper\",\n        patterns: [637095, 63737423, 63743358, 637568, 637599, 637609, 637612],\n        gaps: [4, 8, 12],\n        lengths: [16],\n        code: {\n            name: \"CVC\",\n            size: 3,\n        },\n    },\n    hipercard: {\n        niceType: \"Hipercard\",\n        type: \"hipercard\",\n        patterns: [606282],\n        gaps: [4, 8, 12],\n        lengths: [16],\n        code: {\n            name: \"CVC\",\n            size: 3,\n        },\n    },\n};\nmodule.exports = cardTypes;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clone = void 0;\nfunction clone(originalObject) {\n    if (!originalObject) {\n        return null;\n    }\n    return JSON.parse(JSON.stringify(originalObject));\n}\nexports.clone = clone;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findBestMatch = void 0;\nfunction hasEnoughResultsToDetermineBestMatch(results) {\n    var numberOfResultsWithMaxStrengthProperty = results.filter(function (result) { return result.matchStrength; }).length;\n    /*\n     * if all possible results have a maxStrength property that means the card\n     * number is sufficiently long enough to determine conclusively what the card\n     * type is\n     * */\n    return (numberOfResultsWithMaxStrengthProperty > 0 &&\n        numberOfResultsWithMaxStrengthProperty === results.length);\n}\nfunction findBestMatch(results) {\n    if (!hasEnoughResultsToDetermineBestMatch(results)) {\n        return null;\n    }\n    return results.reduce(function (bestMatch, result) {\n        if (!bestMatch) {\n            return result;\n        }\n        /*\n         * If the current best match pattern is less specific than this result, set\n         * the result as the new best match\n         * */\n        if (Number(bestMatch.matchStrength) < Number(result.matchStrength)) {\n            return result;\n        }\n        return bestMatch;\n    });\n}\nexports.findBestMatch = findBestMatch;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isValidInputType = void 0;\nfunction isValidInputType(cardNumber) {\n    return typeof cardNumber === \"string\" || cardNumber instanceof String;\n}\nexports.isValidInputType = isValidInputType;\n","\"use strict\";\n/*\n * Adapted from https://github.com/polvo-labs/card-type/blob/aaab11f80fa1939bccc8f24905a06ae3cd864356/src/cardType.js#L37-L42\n * */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.matches = void 0;\nfunction matchesRange(cardNumber, min, max) {\n    var maxLengthToCheck = String(min).length;\n    var substr = cardNumber.substr(0, maxLengthToCheck);\n    var integerRepresentationOfCardNumber = parseInt(substr, 10);\n    min = parseInt(String(min).substr(0, substr.length), 10);\n    max = parseInt(String(max).substr(0, substr.length), 10);\n    return (integerRepresentationOfCardNumber >= min &&\n        integerRepresentationOfCardNumber <= max);\n}\nfunction matchesPattern(cardNumber, pattern) {\n    pattern = String(pattern);\n    return (pattern.substring(0, cardNumber.length) ===\n        cardNumber.substring(0, pattern.length));\n}\nfunction matches(cardNumber, pattern) {\n    if (Array.isArray(pattern)) {\n        return matchesRange(cardNumber, pattern[0], pattern[1]);\n    }\n    return matchesPattern(cardNumber, pattern);\n}\nexports.matches = matches;\n","import { helper as buildHelper } from '@ember/component/helper';\n\nexport function assign(params) {\n  return Object.assign({}, ...params);\n}\n\nexport default buildHelper(assign);\n","interface ScrollDeltas {\n  deltaX: number;\n  deltaY: number;\n}\ninterface ScrollInformation {\n  element: Element;\n  scrollLeft: number;\n  scrollTop: number;\n}\n\n/**\n * Mode that expresses the deltas in pixels.\n */\nexport const DOM_DELTA_PIXEL = 0;\n/**\n * Mode that expresses the deltas in lines.\n *\n * This only happens in Firefox for Windows.\n *\n * Reference: https://stackoverflow.com/a/37474225\n */\nexport const DOM_DELTA_LINE = 1;\n/**\n * Mode that expresses the deltas in pages.\n *\n * This only happens in Firefox for Windows with\n * a custom OS setting activated.\n *\n * Reference: https://stackoverflow.com/a/37474225\n */\nexport const DOM_DELTA_PAGE = 2;\n\n/**\n * Number of lines per page considered for\n * DOM_DELTA_PAGE.\n *\n */\nexport const LINES_PER_PAGE = 3;\n\nlet scrollLineHeight: number | undefined = undefined;\n\nexport function getScrollDeltas({\n  deltaX = 0,\n  deltaY = 0,\n  deltaMode = DOM_DELTA_PIXEL,\n}): ScrollDeltas {\n  if (deltaMode !== DOM_DELTA_PIXEL) {\n    if (deltaMode === DOM_DELTA_PAGE) {\n      deltaX *= LINES_PER_PAGE;\n      deltaY *= LINES_PER_PAGE;\n    }\n    const scrollLineHeight = getScrollLineHeight();\n    if (scrollLineHeight !== undefined) {\n      deltaX *= scrollLineHeight;\n      deltaY *= scrollLineHeight;\n    }\n  }\n\n  return { deltaX, deltaY };\n}\n\nexport function getScrollLineHeight(): number | undefined {\n  if (scrollLineHeight === undefined) {\n    const iframe = document.createElement('iframe');\n    iframe.src = '#';\n    iframe.style.position = 'absolute';\n    iframe.style.visibility = 'hidden';\n    iframe.style.width = '0px';\n    iframe.style.height = '0px';\n    iframe.style.border = 'none';\n    document.body.appendChild(iframe);\n    const iframeDocument = (iframe.contentWindow as Window).document;\n    iframeDocument.open();\n    iframeDocument.write(\n      '<!doctype html><html><head></head><body><span>X</span></body></html>',\n    );\n    iframeDocument.close();\n    const body = iframeDocument.body;\n    scrollLineHeight = (body.firstElementChild as HTMLElement).offsetHeight;\n    document.body.removeChild(iframe);\n  }\n  return scrollLineHeight;\n}\n\nexport function getAvailableScroll(element: Element, container: Element) {\n  const availableScroll = {\n    deltaXNegative: 0,\n    deltaXPositive: 0,\n    deltaYNegative: 0,\n    deltaYPositive: 0,\n  };\n\n  let scrollLeftMax, scrollTopMax;\n  while (container.contains(element) || container === element) {\n    scrollLeftMax = element.scrollWidth - element.clientWidth;\n    scrollTopMax = element.scrollHeight - element.clientHeight;\n\n    availableScroll.deltaXNegative += -element.scrollLeft;\n    availableScroll.deltaXPositive += scrollLeftMax - element.scrollLeft;\n    availableScroll.deltaYNegative += -element.scrollTop;\n    availableScroll.deltaYPositive += scrollTopMax - element.scrollTop;\n    const parent = element.parentNode;\n    if (parent === null) break;\n    element = parent as Element;\n  }\n\n  return availableScroll;\n}\n\n/**\n * Calculates the scroll distribution for `element` inside` container.\n */\nfunction calculateScrollDistribution(\n  deltaX: number,\n  deltaY: number,\n  element: Element,\n  container: Element,\n  accumulator: ScrollInformation[] = [],\n): ScrollInformation[] {\n  const scrollInformation: ScrollInformation = {\n    element,\n    scrollLeft: 0,\n    scrollTop: 0,\n  };\n  const scrollLeftMax = element.scrollWidth - element.clientWidth;\n  const scrollTopMax = element.scrollHeight - element.clientHeight;\n\n  const availableScroll = {\n    deltaXNegative: -element.scrollLeft,\n    deltaXPositive: scrollLeftMax - element.scrollLeft,\n    deltaYNegative: -element.scrollTop,\n    deltaYPositive: scrollTopMax - element.scrollTop,\n  };\n\n  const elementStyle = window.getComputedStyle(element);\n\n  if (elementStyle.overflowX !== 'hidden') {\n    // The `deltaX` can be larger than the available scroll for the element, thus overshooting.\n    // The result of that is that it scrolls the element as far as possible. We don't need to\n    // calculate exactly because we reduce the amount of desired scroll for the\n    // parent elements by the correct amount below.\n    scrollInformation.scrollLeft = element.scrollLeft + deltaX;\n    if (deltaX > availableScroll.deltaXPositive) {\n      deltaX = deltaX - availableScroll.deltaXPositive;\n    } else if (deltaX < availableScroll.deltaXNegative) {\n      deltaX = deltaX - availableScroll.deltaXNegative;\n    } else {\n      deltaX = 0;\n    }\n  }\n\n  if (elementStyle.overflowY !== 'hidden') {\n    scrollInformation.scrollTop = element.scrollTop + deltaY;\n    if (deltaY > availableScroll.deltaYPositive) {\n      deltaY = deltaY - availableScroll.deltaYPositive;\n    } else if (deltaY < availableScroll.deltaYNegative) {\n      deltaY = deltaY - availableScroll.deltaYNegative;\n    } else {\n      deltaY = 0;\n    }\n  }\n\n  if (element !== container && (deltaX || deltaY)) {\n    return calculateScrollDistribution(\n      deltaX,\n      deltaY,\n      element.parentNode as Element,\n      container,\n      accumulator.concat([scrollInformation]),\n    );\n  }\n\n  return accumulator.concat([scrollInformation]);\n}\n\n// Recursively walks up scroll containers until the delta is distributed or we\n// run out of elements in the allowed-to-scroll container.\nexport function distributeScroll(\n  deltaX: number,\n  deltaY: number,\n  element: Element,\n  container: Element,\n) {\n  const scrollInfos = calculateScrollDistribution(\n    deltaX,\n    deltaY,\n    element,\n    container,\n  );\n  let info;\n\n  for (let i = 0; i < scrollInfos.length; i++) {\n    info = scrollInfos[i];\n    if (info) {\n      info.element.scrollLeft = info.scrollLeft;\n      info.element.scrollTop = info.scrollTop;\n    }\n  }\n}\n","import { action } from '@ember/object';\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { getScrollParent } from '../utils/calculate-position.ts';\nimport {\n  distributeScroll,\n  getAvailableScroll,\n  getScrollDeltas,\n} from '../utils/scroll-helpers.ts';\nimport hasMoved from '../utils/has-moved.ts';\nimport { isTesting } from '@embroider/macros';\nimport { modifier } from 'ember-modifier';\nimport { element } from 'ember-element-helper';\nimport { or } from 'ember-truth-helpers';\nimport style from 'ember-style-modifier';\nimport { on } from '@ember/modifier';\nimport { fn } from '@ember/helper';\nimport { hash } from '@ember/helper';\nimport type {\n  Dropdown,\n  TRootEventType,\n  HorizontalPosition,\n  VerticalPosition,\n} from '../types.ts';\n\nexport interface BasicDropdownContentSignature {\n  Element: HTMLElement;\n  Args: {\n    animationEnabled?: boolean;\n    transitioningInClass?: string;\n    transitionedInClass?: string;\n    transitioningOutClass?: string;\n    isTouchDevice?: boolean;\n    destination?: string;\n    destinationElement?: HTMLElement | null;\n    dropdown?: Dropdown;\n    renderInPlace?: boolean;\n    preventScroll?: boolean | undefined;\n    rootEventType?: TRootEventType;\n    top?: string | undefined;\n    left?: string | undefined;\n    right?: string | undefined;\n    width?: string | undefined;\n    height?: string | undefined;\n    otherStyles?: Record<string, string | number | undefined>;\n    hPosition?: HorizontalPosition | null;\n    vPosition?: VerticalPosition | null;\n    dir?: string;\n    defaultClass?: string;\n    overlay?: boolean;\n    htmlTag?: keyof HTMLElementTagNameMap | undefined;\n    onFocusIn?: (dropdown?: Dropdown, event?: FocusEvent) => void;\n    onFocusOut?: (dropdown?: Dropdown, event?: FocusEvent) => void;\n    onMouseEnter?: (dropdown?: Dropdown, event?: MouseEvent) => void;\n    onMouseLeave?: (dropdown?: Dropdown, event?: MouseEvent) => void;\n    shouldReposition?: (\n      mutations: MutationRecord[],\n      dropdown?: Dropdown,\n    ) => boolean;\n  };\n  Blocks: {\n    default: [];\n  };\n}\n\ntype RootMouseDownHandler = (ev: MouseEvent | TouchEvent) => void;\n\nexport default class BasicDropdownContent extends Component<BasicDropdownContentSignature> {\n  transitioningInClass =\n    this.args.transitioningInClass || 'ember-basic-dropdown--transitioning-in';\n  transitionedInClass =\n    this.args.transitionedInClass || 'ember-basic-dropdown--transitioned-in';\n  transitioningOutClass =\n    this.args.transitioningOutClass ||\n    'ember-basic-dropdown--transitioning-out';\n  isTouchDevice =\n    this.args.isTouchDevice || Boolean(!!window && 'ontouchstart' in window);\n  dropdownId = `ember-basic-dropdown-content-${this.args.dropdown?.uniqueId}`;\n  private touchMoveEvent: TouchEvent | undefined;\n  private handleRootMouseDown?: RootMouseDownHandler;\n  private scrollableAncestors: Element[] = [];\n  private mutationObserver: MutationObserver | undefined;\n  private rootElement: HTMLElement | undefined;\n  @tracked private _contentWormhole?: Element;\n  @tracked animationClass = this.transitioningInClass;\n\n  get destinationElement(): Element | null {\n    if (this.args.destinationElement) {\n      return this.args.destinationElement;\n    }\n\n    if (!this.args.destination) {\n      return null;\n    }\n\n    const element = document.getElementById(this.args.destination);\n\n    if (element) {\n      return element;\n    }\n\n    if (this._contentWormhole) {\n      return (\n        this._contentWormhole.getRootNode() as HTMLElement\n      )?.querySelector('#' + this.args.destination);\n    }\n\n    return null;\n  }\n\n  get animationEnabled(): boolean {\n    const { animationEnabled: animationEnabledArg = true } = this.args;\n\n    return animationEnabledArg && !isTesting();\n  }\n\n  get positionStyles(): Record<string, string> {\n    const style: Record<string, string> = {};\n    if (this.args.top !== undefined) {\n      style['top'] = this.args.top;\n    }\n    if (this.args.left !== undefined) {\n      style['left'] = this.args.left;\n    }\n    if (this.args.right !== undefined) {\n      style['right'] = this.args.right;\n    }\n    if (this.args.width !== undefined) {\n      style['width'] = this.args.width;\n    }\n    if (this.args.height !== undefined) {\n      style['height'] = this.args.height;\n    }\n    return style;\n  }\n\n  /**\n   * Allows similair behaviour to `ember-composable-helpers`' `optional` helper.\n   * Avoids adding extra dependencies.\n   * Can be removed when the template `V1` compatability event handlers are removed.\n   *\n   * @see https://github.com/cibernox/ember-basic-dropdown/issues/498\n   * @memberof BasicDropdownContent\n   */\n  noop(): void {}\n\n  registerDropdownContentWormhole = modifier(\n    (dropdownContentWormhole: Element) => {\n      this._contentWormhole = dropdownContentWormhole;\n    },\n  );\n\n  respondToEvents = modifier(\n    (dropdownElement: Element): (() => void) => {\n      if (this.args.dropdown?.actions?.registerDropdownElement) {\n        this.args.dropdown.actions.registerDropdownElement(\n          dropdownElement as HTMLElement,\n        );\n      }\n\n      const selector = `[data-ebd-id=${this.args.dropdown?.uniqueId}-trigger]`;\n      let triggerElement: HTMLElement | null = null;\n      if (\n        typeof this.args.dropdown?.actions?.getTriggerElement === 'function'\n      ) {\n        triggerElement = this.args.dropdown?.actions?.getTriggerElement();\n      }\n      if (!triggerElement) {\n        triggerElement = document.querySelector(selector) as HTMLElement;\n      }\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      this.handleRootMouseDown = (e: MouseEvent | TouchEvent): any => {\n        const target = (e.composedPath?.()[0] || e.target) as Element;\n        if (target === null) return;\n        if (\n          hasMoved(e as TouchEvent, this.touchMoveEvent) ||\n          dropdownElement.contains(target) ||\n          (triggerElement && triggerElement.contains(target))\n        ) {\n          this.touchMoveEvent = undefined;\n          return;\n        }\n\n        if (dropdownIsValidParent(triggerElement, target, this.dropdownId)) {\n          this.touchMoveEvent = undefined;\n          return;\n        }\n\n        if (this.args.dropdown?.actions?.close) {\n          this.args.dropdown.actions.close(e, true);\n        }\n      };\n      document.addEventListener(\n        this.args.rootEventType || 'click',\n        this.handleRootMouseDown,\n        true,\n      );\n\n      // We need to register closing event on shadow dom element, otherwise all clicks inside a shadow dom are not closing the dropdown\n      // In additional store the rootElement for outside clicks (ensure that we do removeEventListener on correct element)\n      if (\n        this._contentWormhole &&\n        this._contentWormhole.getRootNode() instanceof ShadowRoot\n      ) {\n        this.rootElement = this._contentWormhole.getRootNode() as HTMLElement;\n      } else {\n        this.rootElement = undefined;\n      }\n\n      if (this.rootElement) {\n        this.rootElement.addEventListener(\n          this.args.rootEventType || 'click',\n          this.handleRootMouseDown,\n          true,\n        );\n      }\n\n      window.addEventListener('resize', this.repositionBound);\n      window.addEventListener('orientationchange', this.repositionBound);\n\n      if (this.isTouchDevice) {\n        document.addEventListener(\n          'touchstart',\n          this.touchStartHandlerBound,\n          true,\n        );\n        document.addEventListener('touchend', this.handleRootMouseDown, true);\n\n        if (this.rootElement) {\n          this.rootElement.addEventListener(\n            'touchstart',\n            this.touchStartHandlerBound,\n            true,\n          );\n          this.rootElement.addEventListener(\n            'touchend',\n            this.handleRootMouseDown,\n            true,\n          );\n        }\n      }\n      if (\n        triggerElement !== null &&\n        !(triggerElement.getRootNode() instanceof ShadowRoot)\n      ) {\n        this.scrollableAncestors = getScrollableAncestors(triggerElement);\n      }\n      this.addScrollHandling(dropdownElement);\n      return () => {\n        this.removeGlobalEvents();\n        this.removeScrollHandling();\n        this.scrollableAncestors = [];\n\n        document.removeEventListener(\n          this.args.rootEventType || 'click',\n          this.handleRootMouseDown as RootMouseDownHandler,\n          true,\n        );\n\n        if (this.rootElement) {\n          this.rootElement.removeEventListener(\n            this.args.rootEventType || 'click',\n            this.handleRootMouseDown as RootMouseDownHandler,\n            true,\n          );\n        }\n\n        if (this.isTouchDevice) {\n          document.removeEventListener(\n            'touchstart',\n            this.touchStartHandlerBound,\n            true,\n          );\n          document.removeEventListener(\n            'touchend',\n            this.handleRootMouseDown as RootMouseDownHandler,\n            true,\n          );\n\n          if (this.rootElement) {\n            this.rootElement.removeEventListener(\n              'touchstart',\n              this.touchStartHandlerBound,\n              true,\n            );\n            this.rootElement.removeEventListener(\n              'touchend',\n              this.handleRootMouseDown as RootMouseDownHandler,\n              true,\n            );\n          }\n        }\n      };\n    },\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore\n    { eager: false },\n  );\n\n  initiallyReposition = modifier(\n    () => {\n      // Escape autotracking frame and avoid backtracking re-render\n      void Promise.resolve().then(() => {\n        this.args.dropdown?.actions.reposition();\n      });\n    },\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore\n    { eager: false },\n  );\n\n  animateInAndOut = modifier(\n    (dropdownElement: Element): (() => void) => {\n      if (!this.animationEnabled) return () => {};\n      waitForAnimations(dropdownElement, () => {\n        this.animationClass = this.transitionedInClass;\n      });\n      return () => {\n        if (!this.animationEnabled) return;\n        let parentElement =\n          dropdownElement.parentElement ?? this.destinationElement;\n        if (parentElement === null) return;\n        if (this.args.renderInPlace) {\n          parentElement = parentElement.parentElement;\n        }\n        if (parentElement === null) return;\n        const clone = dropdownElement.cloneNode(true) as Element;\n        clone.id = `${clone.id}--clone`;\n        clone.classList.remove(...this.transitioningInClass.split(' '));\n        clone.classList.add(...this.transitioningOutClass.split(' '));\n        parentElement.appendChild(clone);\n        this.animationClass = this.transitioningInClass;\n        waitForAnimations(clone, function () {\n          (parentElement as HTMLElement).removeChild(clone);\n        });\n      };\n    },\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore\n    { eager: false },\n  );\n\n  observeMutations = modifier(\n    (dropdownElement: Element): (() => void) => {\n      this.mutationObserver = new MutationObserver((mutations) => {\n        let shouldReposition = mutations.some(\n          (record: MutationRecord) =>\n            containsRelevantMutation(record.addedNodes) ||\n            containsRelevantMutation(record.removedNodes),\n        );\n\n        if (shouldReposition && this.args.shouldReposition) {\n          shouldReposition = this.args.shouldReposition(\n            mutations,\n            this.args.dropdown,\n          );\n        }\n\n        if (shouldReposition) {\n          this.reposition();\n        }\n      });\n      this.mutationObserver.observe(dropdownElement, {\n        childList: true,\n        subtree: true,\n      });\n      return () => {\n        if (this.mutationObserver !== undefined) {\n          this.mutationObserver.disconnect();\n          this.mutationObserver = undefined;\n        }\n      };\n    },\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore\n    { eager: false },\n  );\n\n  @action\n  touchStartHandler(): void {\n    document.addEventListener('touchmove', this.touchMoveHandlerBound, true);\n\n    if (\n      this._contentWormhole &&\n      this._contentWormhole.getRootNode() instanceof ShadowRoot\n    ) {\n      const rootElement = this._contentWormhole.getRootNode() as HTMLElement;\n      rootElement.addEventListener(\n        'touchmove',\n        this.touchMoveHandlerBound,\n        true,\n      );\n    }\n  }\n\n  @action\n  touchMoveHandler(e: TouchEvent): void {\n    this.touchMoveEvent = e;\n    document.removeEventListener('touchmove', this.touchMoveHandlerBound, true);\n\n    if (\n      this._contentWormhole &&\n      this._contentWormhole.getRootNode() instanceof ShadowRoot\n    ) {\n      const rootElement = this._contentWormhole.getRootNode() as HTMLElement;\n      rootElement.removeEventListener(\n        'touchmove',\n        this.touchMoveHandlerBound,\n        true,\n      );\n    }\n  }\n\n  @action\n  reposition(): void {\n    if (!this.args.dropdown) {\n      return;\n    }\n\n    this.args.dropdown.actions.reposition();\n  }\n\n  @action\n  removeGlobalEvents(): void {\n    window.removeEventListener('resize', this.repositionBound);\n    window.removeEventListener('orientationchange', this.repositionBound);\n  }\n\n  touchMoveHandlerBound = (e: TouchEvent) => this.touchMoveHandler(e);\n  repositionBound = () => this.reposition();\n  touchStartHandlerBound = () => this.touchStartHandler();\n\n  // Methods\n  addScrollHandling(dropdownElement: Element): void {\n    if (this.args.preventScroll === true) {\n      const wheelHandler = (event: WheelEvent) => {\n        const target = (event.composedPath?.()[0] || event.target) as Element;\n        if (target === null) return;\n        if (\n          dropdownElement.contains(target) ||\n          dropdownElement === event.target\n        ) {\n          // Discover the amount of scrollable canvas that is within the dropdown.\n          const availableScroll = getAvailableScroll(target, dropdownElement);\n\n          // Calculate what the event's desired change to that scrollable canvas is.\n          let { deltaX, deltaY } = getScrollDeltas(event);\n\n          // If the consequence of the wheel action would result in scrolling beyond\n          // the scrollable canvas of the dropdown, call preventDefault() and clamp\n          // the value of the delta to the available scroll size.\n          if (deltaX < availableScroll.deltaXNegative) {\n            deltaX = availableScroll.deltaXNegative;\n            event.preventDefault();\n          } else if (deltaX > availableScroll.deltaXPositive) {\n            deltaX = availableScroll.deltaXPositive;\n            event.preventDefault();\n          } else if (deltaY < availableScroll.deltaYNegative) {\n            deltaY = availableScroll.deltaYNegative;\n            event.preventDefault();\n          } else if (deltaY > availableScroll.deltaYPositive) {\n            deltaY = availableScroll.deltaYPositive;\n            event.preventDefault();\n          }\n\n          // Add back in the default behavior for the two good states that the above\n          // `preventDefault()` code will break.\n          // - Two-axis scrolling on a one-axis scroll container\n          // - The last relevant wheel event if the scroll is overshooting\n\n          // Also, don't attempt to do this if both of `deltaX` or `deltaY` are 0.\n          if (event.defaultPrevented && (deltaX || deltaY)) {\n            distributeScroll(deltaX, deltaY, target, dropdownElement);\n          }\n        } else {\n          // Scrolling outside of the dropdown is prohibited.\n          event.preventDefault();\n        }\n      };\n      document.addEventListener('wheel', wheelHandler, {\n        capture: true,\n        passive: false,\n      });\n\n      if (\n        this._contentWormhole &&\n        this._contentWormhole.getRootNode() instanceof ShadowRoot\n      ) {\n        const rootElement = this._contentWormhole.getRootNode() as HTMLElement;\n        rootElement.addEventListener('wheel', wheelHandler, {\n          capture: true,\n          passive: false,\n        });\n      }\n\n      this.removeScrollHandling = () => {\n        document.removeEventListener('wheel', wheelHandler, { capture: true });\n\n        if (\n          this._contentWormhole &&\n          this._contentWormhole.getRootNode() instanceof ShadowRoot\n        ) {\n          const rootElement =\n            this._contentWormhole.getRootNode() as HTMLElement;\n          rootElement.removeEventListener('wheel', wheelHandler, {\n            capture: true,\n          });\n        }\n      };\n    } else {\n      this.addScrollEvents();\n      this.removeScrollHandling = this.removeScrollEvents.bind(this);\n    }\n  }\n\n  // Assigned at runtime to ensure that changes to the `preventScroll` property\n  // don't result in not cleaning up after ourselves.\n  removeScrollHandling(): void {}\n\n  // These two functions wire up scroll handling if `preventScroll` is false.\n  // These trigger reposition of the dropdown.\n  addScrollEvents(): void {\n    window.addEventListener('scroll', this.repositionBound);\n    this.scrollableAncestors.forEach((el) => {\n      el.addEventListener('scroll', this.repositionBound);\n    });\n  }\n\n  removeScrollEvents(): void {\n    window.removeEventListener('scroll', this.repositionBound);\n    this.scrollableAncestors.forEach((el) => {\n      el.removeEventListener('scroll', this.repositionBound);\n    });\n  }\n\n  <template>\n    {{#if @dropdown.isOpen}}\n      <div\n        class=\"ember-basic-dropdown-content-wormhole-origin\"\n        {{this.registerDropdownContentWormhole}}\n      >\n        {{#if @renderInPlace}}\n          {{#if @overlay}}\n            <div class=\"ember-basic-dropdown-overlay\"></div>\n          {{/if}}\n\n          {{#let (element (or @htmlTag \"div\")) as |OptionalTag|}}\n            <OptionalTag\n              id={{this.dropdownId}}\n              class=\"ember-basic-dropdown-content ember-basic-dropdown-content--{{@hPosition}}\n                ember-basic-dropdown-content--{{@vPosition}}\n                {{this.animationClass}}{{if\n                  @renderInPlace\n                  ' ember-basic-dropdown-content--in-place'\n                }}\n                {{@defaultClass}}\"\n              dir={{@dir}}\n              ...attributes\n              {{style @otherStyles this.positionStyles}}\n              {{this.respondToEvents}}\n              {{this.initiallyReposition}}\n              {{this.observeMutations}}\n              {{this.animateInAndOut}}\n              {{on \"focusin\" (fn (or @onFocusIn this.noop) @dropdown)}}\n              {{on \"focusout\" (fn (or @onFocusOut this.noop) @dropdown)}}\n              {{on \"mouseenter\" (fn (or @onMouseEnter this.noop) @dropdown)}}\n              {{on \"mouseleave\" (fn (or @onMouseLeave this.noop) @dropdown)}}\n              {{! V1 compatibility - See #498 }}\n            >\n              {{yield}}\n            </OptionalTag>\n          {{/let}}\n        {{else if this.destinationElement}}\n          {{#in-element this.destinationElement insertBefore=null}}\n            {{#if @overlay}}\n              <div class=\"ember-basic-dropdown-overlay\"></div>\n            {{/if}}\n\n            {{#let (element (or @htmlTag \"div\")) as |OptionalTag|}}\n              <OptionalTag\n                id={{this.dropdownId}}\n                class=\"ember-basic-dropdown-content ember-basic-dropdown-content--{{@hPosition}}\n                  ember-basic-dropdown-content--{{@vPosition}}\n                  {{this.animationClass}}{{if\n                    @renderInPlace\n                    ' ember-basic-dropdown-content--in-place'\n                  }}\n                  {{@defaultClass}}\"\n                dir={{@dir}}\n                ...attributes\n                {{style @otherStyles this.positionStyles}}\n                {{this.respondToEvents}}\n                {{this.initiallyReposition}}\n                {{this.observeMutations}}\n                {{this.animateInAndOut}}\n                {{on \"focusin\" (fn (or @onFocusIn this.noop) @dropdown)}}\n                {{on \"focusout\" (fn (or @onFocusOut this.noop) @dropdown)}}\n                {{on \"mouseenter\" (fn (or @onMouseEnter this.noop) @dropdown)}}\n                {{on \"mouseleave\" (fn (or @onMouseLeave this.noop) @dropdown)}}\n                {{! V1 compatibility - See #498 }}\n              >\n                {{yield}}\n              </OptionalTag>\n            {{/let}}\n          {{/in-element}}\n        {{/if}}\n      </div>\n    {{else}}\n      <div\n        id={{this.dropdownId}}\n        class=\"ember-basic-dropdown-content-placeholder\"\n        {{style (hash display=\"none\")}}\n      ></div>\n    {{/if}}\n  </template>\n}\n\nfunction containsRelevantMutation(nodeList: NodeList): boolean {\n  for (let i = 0; i < nodeList.length; i++) {\n    const node = nodeList[i];\n    if (\n      node !== undefined &&\n      node.nodeName !== '#comment' &&\n      !(node.nodeName === '#text' && node.nodeValue === '')\n    ) {\n      return true;\n    }\n  }\n  return false;\n}\n\n// All ancestors with scroll (except the BODY, which is treated differently)\nfunction getScrollableAncestors(triggerElement: Element): Element[] {\n  const scrollableAncestors = [];\n  if (triggerElement) {\n    const parent = triggerElement.parentNode;\n    if (parent !== null) {\n      let nextScrollable: Element | undefined = getScrollParent(\n        parent as Element,\n      );\n      while (\n        nextScrollable &&\n        nextScrollable.tagName.toUpperCase() !== 'BODY' &&\n        nextScrollable.tagName.toUpperCase() !== 'HTML'\n      ) {\n        scrollableAncestors.push(nextScrollable);\n        const nextParent = nextScrollable.parentNode;\n        if (nextParent === null) {\n          nextScrollable = undefined;\n        } else {\n          nextScrollable = getScrollParent(nextParent as Element);\n        }\n      }\n    }\n  }\n  return scrollableAncestors;\n}\n\nfunction closestContent(el: Element): Element | null {\n  while (\n    el &&\n    (!el.classList || !el.classList.contains('ember-basic-dropdown-content'))\n  ) {\n    if (el.parentElement === null) return null;\n    el = el.parentElement;\n  }\n  return el;\n}\n\nfunction waitForAnimations(element: Element, callback: () => void): void {\n  window.requestAnimationFrame(function () {\n    const computedStyle = window.getComputedStyle(element);\n    if (\n      computedStyle.animationName !== 'none' &&\n      computedStyle.animationPlayState === 'running'\n    ) {\n      const eventCallback = function () {\n        element.removeEventListener('animationend', eventCallback);\n        callback();\n      };\n      element.addEventListener('animationend', eventCallback);\n    } else {\n      callback();\n    }\n  });\n}\n\n/**\n * Evaluates if the given element is in a dropdown or any of its parent dropdowns.\n *\n * @param {any} owner\n * @param {HTMLElement} el\n * @param {String} dropdownId\n */\nfunction dropdownIsValidParent(\n  triggerElement: HTMLElement | null,\n  el: Element,\n  dropdownId: string,\n): boolean {\n  const closestDropdown = closestContent(el);\n  if (closestDropdown === null) {\n    return false;\n  } else {\n    const closestAttrId = closestDropdown.getAttribute('id') ?? '';\n    const selector = `[aria-controls=${closestAttrId}]`;\n    const trigger =\n      document.querySelector(selector) ??\n      (triggerElement?.getRootNode() as HTMLElement)?.querySelector(selector);\n    if (trigger === null) return false;\n    const parentDropdown = closestContent(trigger);\n    if (parentDropdown === null) return false;\n    const parentAttrId = parentDropdown.getAttribute('id') ?? '';\n    return (\n      (parentDropdown && parentAttrId === dropdownId) ||\n      dropdownIsValidParent(triggerElement, parentDropdown, dropdownId)\n    );\n  }\n}\n","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { element } from 'ember-element-helper';\nimport { or } from 'ember-truth-helpers';\nimport { concat } from '@ember/helper';\nimport basicDropdownTriggerModifier from '../modifiers/basic-dropdown-trigger.ts';\nimport { on } from '@ember/modifier';\nimport { fn } from '@ember/helper';\nimport type { Dropdown } from './basic-dropdown';\nimport type { HorizontalPosition, VerticalPosition } from '../types.ts';\n\nexport interface BasicDropdownTriggerSignature {\n  Element: HTMLElement | HTMLButtonElement;\n  Args: {\n    dropdown?: Dropdown;\n    eventType?: 'click' | 'mousedown';\n    stopPropagation?: boolean;\n    vPosition?: VerticalPosition | null;\n    hPosition?: HorizontalPosition | null;\n    defaultClass?: string;\n    renderInPlace?: boolean;\n    htmlTag?: keyof HTMLElementTagNameMap | undefined;\n    onBlur?: (dropdown?: Dropdown, event?: FocusEvent) => void;\n    onClick?: (dropdown?: Dropdown, event?: MouseEvent) => void;\n    onFocus?: (dropdown?: Dropdown, event?: FocusEvent) => void;\n    onFocusIn?: (dropdown?: Dropdown, event?: FocusEvent) => void;\n    onFocusOut?: (dropdown?: Dropdown, event?: FocusEvent) => void;\n    onKeyDown?: (dropdown?: Dropdown, event?: KeyboardEvent) => void;\n    onMouseDown?: (dropdown?: Dropdown, event?: MouseEvent) => void;\n    onMouseEnter?: (dropdown?: Dropdown, event?: MouseEvent) => void;\n    onMouseLeave?: (dropdown?: Dropdown, event?: MouseEvent) => void;\n    onTouchEnd?: (dropdown?: Dropdown, event?: TouchEvent) => void;\n  };\n  Blocks: {\n    default: [];\n  };\n}\n\nexport default class BasicDropdownTrigger extends Component<BasicDropdownTriggerSignature> {\n  // Actions\n  /**\n   * Allows similar behavior to `ember-composable-helpers`' `optional` helper.\n   * Avoids adding extra dependencies.\n   * Can be removed when the template `V1` compatibility event handlers are removed.\n   *\n   * @see https://github.com/cibernox/ember-basic-dropdown/issues/498\n   * @memberof BasicDropdownContent\n   */\n  noop(): void {}\n\n  @action\n  disableDocumentTextSelect(disable: boolean) {\n    if (disable) {\n      document.body.classList.add('ember-basic-dropdown-text-select-disabled');\n    } else {\n      document.body.classList.remove(\n        'ember-basic-dropdown-text-select-disabled',\n      );\n    }\n  }\n\n  <template>\n    {{#if @dropdown}}\n      {{#let (element (or @htmlTag \"div\")) as |OptionalTag|}}\n        {{! template-lint-disable no-pointer-down-event-binding }}\n        <OptionalTag\n          class=\"ember-basic-dropdown-trigger\n            {{if @renderInPlace ' ember-basic-dropdown-trigger--in-place'}}\n            {{if\n              @hPosition\n              (concat ' ember-basic-dropdown-trigger--' @hPosition)\n            }}\n            {{if\n              @vPosition\n              (concat ' ember-basic-dropdown-trigger--' @vPosition)\n            }}\n            {{@defaultClass}}\"\n          {{basicDropdownTriggerModifier\n            dropdown=@dropdown\n            eventType=@eventType\n            stopPropagation=@stopPropagation\n          }}\n          tabindex={{unless @dropdown.disabled \"0\"}}\n          ...attributes\n          {{on \"mousedown\" (fn this.disableDocumentTextSelect true)}}\n          {{on \"mouseup\" (fn this.disableDocumentTextSelect false)}}\n          {{! V1 compatibility - See #498 }}\n          {{on \"keydown\" (fn (or @onKeyDown this.noop) @dropdown)}}\n          {{on \"mousedown\" (fn (or @onMouseDown this.noop) @dropdown)}}\n          {{on \"touchend\" (fn (or @onTouchEnd this.noop) @dropdown)}}\n          {{on \"click\" (fn (or @onClick this.noop) @dropdown)}}\n          {{on \"mouseenter\" (fn (or @onMouseEnter this.noop) @dropdown)}}\n          {{on \"mouseleave\" (fn (or @onMouseLeave this.noop) @dropdown)}}\n          {{on \"focus\" (fn (or @onFocus this.noop) @dropdown)}}\n          {{on \"blur\" (fn (or @onBlur this.noop) @dropdown)}}\n          {{on \"focusin\" (fn (or @onFocusIn this.noop) @dropdown)}}\n          {{on \"focusout\" (fn (or @onFocusOut this.noop) @dropdown)}}\n        >\n          {{yield}}\n        </OptionalTag>\n      {{/let}}\n    {{/if}}\n  </template>\n}\n","import Component from '@glimmer/component';\nimport { getOwner } from '@ember/application';\nimport { config as utilConfig, _configSet, type Config } from '../config.ts';\nimport { deprecate } from '@ember/debug';\n\nexport interface BasicDropdownWormholeSignature {\n  Element: HTMLElement;\n}\n\nexport default class BasicDropdownWormholeComponent extends Component<BasicDropdownWormholeSignature> {\n  get getDestinationId(): string {\n    let config = utilConfig;\n\n    if (!_configSet) {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-ignore\n      // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n      const configEnvironment = getOwner(this).resolveRegistration(\n        'config:environment',\n      ) as {\n        'ember-basic-dropdown'?: Config;\n      };\n\n      if (configEnvironment['ember-basic-dropdown']) {\n        const legacyConfigString = JSON.stringify(\n          configEnvironment['ember-basic-dropdown'],\n        );\n        deprecate(\n          `You have configured \\`ember-basic-dropdown\\` in \\`ember-cli-build.js\\`. Remove that configuration and instead use \\`import { setConfig } from 'ember-basic-dropdown/config'; setConfig(${legacyConfigString});`,\n          false,\n          {\n            for: 'ember-basic-dropdown',\n            id: 'ember-basic-dropdown.config-environment',\n            since: {\n              enabled: '8.9',\n              available: '8.9',\n            },\n            until: '9.0.0',\n          },\n        );\n\n        config = configEnvironment['ember-basic-dropdown'];\n      }\n    }\n\n    return config.destination || 'ember-basic-dropdown-wormhole';\n  }\n\n  <template>\n    <div id={{this.getDestinationId}} ...attributes></div>\n  </template>\n}\n","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { guidFor } from '@ember/object/internals';\nimport calculatePosition from '../utils/calculate-position.ts';\nimport type {\n  CalculatePosition,\n  CalculatePositionResult,\n  HorizontalPosition,\n  VerticalPosition,\n} from '../utils/calculate-position.ts';\nimport { getOwner } from '@ember/application';\nimport type Owner from '@ember/owner';\nimport { schedule } from '@ember/runloop';\nimport type { ComponentLike } from '@glint/template';\nimport type { BasicDropdownTriggerSignature } from './basic-dropdown-trigger.ts';\nimport type { BasicDropdownContentSignature } from './basic-dropdown-content.ts';\nimport { ensureSafeComponent } from '@embroider/util';\nimport { hash } from '@ember/helper';\nimport BasicDropdownTrigger from './basic-dropdown-trigger.gts';\nimport BasicDropdownContent from './basic-dropdown-content.gts';\nimport { or } from 'ember-truth-helpers';\nimport type {\n  Dropdown,\n  DropdownActions,\n  RepositionChanges,\n  TRootEventType,\n} from '../types.ts';\nimport { deprecate } from '@ember/debug';\nimport { isTesting } from '@embroider/macros';\nimport { config as utilConfig, _configSet, type Config } from '../config.ts';\n\n// To avoid breaking the current types export we need this\nexport type { Dropdown, DropdownActions, TRootEventType };\n\nconst UNINITIALIZED = {};\nconst IGNORED_STYLES = ['top', 'left', 'right', 'width', 'height'];\n\nexport interface BasicDropdownDefaultBlock {\n  uniqueId: string;\n  disabled: boolean;\n  isOpen: boolean;\n  actions: DropdownActions;\n  Trigger: ComponentLike<BasicDropdownTriggerSignature>;\n  Content: ComponentLike<BasicDropdownContentSignature>;\n}\n\nexport interface BasicDropdownSignature {\n  Element: HTMLElement;\n  Args: BasicDropdownArgs;\n  Blocks: {\n    default: [BasicDropdownDefaultBlock];\n  };\n}\n\nexport interface BasicDropdownArgs {\n  initiallyOpened?: boolean;\n  renderInPlace?: boolean;\n  verticalPosition?: VerticalPosition;\n  horizontalPosition?: HorizontalPosition;\n  destination?: string;\n  destinationElement?: HTMLElement;\n  disabled?: boolean;\n  dropdownId?: string;\n  rootEventType?: TRootEventType;\n  preventScroll?: boolean;\n  matchTriggerWidth?: boolean;\n  triggerHtmlTag?: keyof HTMLElementTagNameMap;\n  contentHtmlTag?: keyof HTMLElementTagNameMap;\n  onInit?: (dropdown: Dropdown) => void;\n  registerAPI?: (dropdown: Dropdown | null) => void;\n  onOpen?: (dropdown: Dropdown, e?: Event) => boolean | void;\n  onClose?: (dropdown: Dropdown, e?: Event) => boolean | void;\n  triggerComponent?:\n    | string\n    | ComponentLike<BasicDropdownTriggerSignature>\n    | undefined;\n  contentComponent?:\n    | string\n    | ComponentLike<BasicDropdownContentSignature>\n    | undefined;\n  calculatePosition?: CalculatePosition;\n}\n\nexport default class BasicDropdown extends Component<BasicDropdownSignature> {\n  @tracked hPosition: HorizontalPosition | null = null;\n  @tracked vPosition: VerticalPosition | null = null;\n  @tracked top: string | undefined;\n  @tracked left: string | undefined;\n  @tracked right: string | undefined;\n  @tracked width: string | undefined;\n  @tracked height: string | undefined;\n  @tracked otherStyles: Record<string, string | number | undefined> = {};\n  @tracked isOpen = this.args.initiallyOpened || false;\n  @tracked renderInPlace =\n    this.args.renderInPlace !== undefined ? this.args.renderInPlace : false;\n  private previousVerticalPosition?: VerticalPosition | undefined;\n  private previousHorizontalPosition?: HorizontalPosition | undefined;\n  private triggerElement: HTMLElement | null = null;\n  private dropdownElement: HTMLElement | null = null;\n\n  private _uid = guidFor(this);\n  private _dropdownId: string =\n    this.args.dropdownId || `ember-basic-dropdown-content-${this._uid}`;\n  private _previousDisabled = UNINITIALIZED;\n  private _actions: DropdownActions = {\n    open: this.open.bind(this),\n    close: this.close.bind(this),\n    toggle: this.toggle.bind(this),\n    reposition: this.reposition.bind(this),\n    registerTriggerElement: this.registerTriggerElement.bind(this),\n    registerDropdownElement: this.registerDropdownElement.bind(this),\n    getTriggerElement: () => this.triggerElement,\n  };\n\n  private get horizontalPosition() {\n    return this.args.horizontalPosition || 'auto'; // auto-right | right | center | left\n  }\n\n  private get verticalPosition() {\n    return this.args.verticalPosition || 'auto'; // above | below\n  }\n\n  get destination(): string {\n    return this.args.destination || this._getDestinationId();\n  }\n\n  get destinationElement(): HTMLElement | null {\n    if (this.args.destinationElement) {\n      return this.args.destinationElement;\n    }\n\n    const element = document.getElementById(this.destination);\n\n    if (element) {\n      return element;\n    }\n\n    if (\n      this.triggerElement &&\n      this.triggerElement.getRootNode() instanceof ShadowRoot\n    ) {\n      return (this.triggerElement.getRootNode() as HTMLElement)?.querySelector(\n        `#${this.destination}`,\n      );\n    }\n\n    return null;\n  }\n\n  get disabled(): boolean {\n    const newVal = this.args.disabled || false;\n    if (\n      this._previousDisabled !== UNINITIALIZED &&\n      this._previousDisabled !== newVal\n    ) {\n      // eslint-disable-next-line ember/no-runloop\n      schedule('actions', () => {\n        if (newVal && this.publicAPI.isOpen) {\n          // eslint-disable-next-line ember/no-side-effects\n          this.isOpen = false;\n        }\n        if (this.args.registerAPI) {\n          this.args.registerAPI(this.publicAPI);\n        }\n      });\n    }\n    // eslint-disable-next-line ember/no-side-effects\n    this._previousDisabled = newVal;\n    return newVal;\n  }\n\n  get publicAPI(): Dropdown {\n    return {\n      uniqueId: this._uid,\n      isOpen: this.isOpen,\n      disabled: this.disabled,\n      actions: this._actions,\n    };\n  }\n\n  // Lifecycle hooks\n  constructor(owner: Owner, args: BasicDropdownArgs) {\n    super(owner, args);\n    if (this.args.onInit) {\n      this.args.onInit(this.publicAPI);\n    }\n    if (this.args.registerAPI) {\n      this.args.registerAPI(this.publicAPI);\n    }\n\n    if (this.args.dropdownId !== undefined) {\n      deprecate(\n        'You have passed `@dropdownId` into `ember-basic-dropdown`. This property does not work correctly without custom modifiers and is undocumented. Remove this parameter and use the `uniqueId` property from the public API instead.',\n        false,\n        {\n          for: 'ember-basic-dropdown',\n          id: 'ember-basic-dropdown.deprecate-arg-dropdown-id',\n          since: {\n            enabled: '8.8',\n            available: '8.8',\n          },\n          until: '9.0.0',\n        },\n      );\n    }\n  }\n\n  override willDestroy(): void {\n    super.willDestroy();\n    if (this.args.registerAPI) {\n      this.args.registerAPI(null);\n    }\n  }\n\n  // Actions\n  @action\n  open(e?: Event): void {\n    if (this.isDestroyed) {\n      return;\n    }\n    if (this.publicAPI.disabled || this.publicAPI.isOpen) {\n      return;\n    }\n    if (this.args.onOpen && this.args.onOpen(this.publicAPI, e) === false) {\n      return;\n    }\n    this.isOpen = true;\n    if (this.args.registerAPI) {\n      this.args.registerAPI(this.publicAPI);\n    }\n    const trigger = this._getTriggerElement();\n    if (trigger) {\n      const parent = trigger.parentElement;\n      if (parent) {\n        parent.setAttribute('aria-owns', this._dropdownId);\n      }\n    }\n  }\n\n  @action\n  close(e?: Event, skipFocus?: boolean): void {\n    if (this.isDestroyed) {\n      return;\n    }\n    if (this.publicAPI.disabled || !this.publicAPI.isOpen) {\n      return;\n    }\n    if (this.args.onClose && this.args.onClose(this.publicAPI, e) === false) {\n      return;\n    }\n    if (this.isDestroyed) {\n      return; // To check that the `onClose` didn't destroy the dropdown\n    }\n    this.hPosition = this.vPosition = null;\n    this.top = this.left = this.right = this.width = this.height = undefined;\n    this.previousVerticalPosition = this.previousHorizontalPosition = undefined;\n    this.isOpen = false;\n    if (this.args.registerAPI) {\n      this.args.registerAPI(this.publicAPI);\n    }\n    const trigger = this._getTriggerElement();\n    if (!trigger) {\n      return;\n    }\n    const parent = trigger.parentElement;\n    if (parent) {\n      parent.removeAttribute('aria-owns');\n    }\n    if (skipFocus) {\n      return;\n    }\n    if (trigger.tabIndex > -1) {\n      trigger.focus();\n    }\n  }\n\n  @action\n  toggle(e?: Event): void {\n    if (this.publicAPI.isOpen) {\n      this.close(e);\n    } else {\n      this.open(e);\n    }\n  }\n\n  @action\n  reposition(): undefined | RepositionChanges {\n    if (!this.publicAPI.isOpen) {\n      return;\n    }\n    const dropdownElement = this._getDropdownElement();\n    const triggerElement = this._getTriggerElement();\n    if (!dropdownElement || !triggerElement || !this.destinationElement) {\n      return;\n    }\n\n    const {\n      horizontalPosition,\n      verticalPosition,\n      previousHorizontalPosition,\n      previousVerticalPosition,\n    } = this;\n    const { renderInPlace = false, matchTriggerWidth = false } = this.args;\n    const calculatePositionFn =\n      this.args.calculatePosition || calculatePosition;\n    const positionData = calculatePositionFn(\n      triggerElement,\n      dropdownElement,\n      this.destinationElement,\n      {\n        horizontalPosition,\n        verticalPosition,\n        previousHorizontalPosition,\n        previousVerticalPosition,\n        renderInPlace,\n        matchTriggerWidth,\n        dropdown: this,\n      },\n    );\n    return this.applyReposition(triggerElement, dropdownElement, positionData);\n  }\n\n  @action\n  registerTriggerElement(element: HTMLElement): void {\n    this.triggerElement = element;\n  }\n\n  @action\n  registerDropdownElement(element: HTMLElement): void {\n    this.dropdownElement = element;\n  }\n\n  applyReposition(\n    _trigger: Element,\n    dropdown: HTMLElement,\n    positions: CalculatePositionResult,\n  ): RepositionChanges {\n    const changes: RepositionChanges = {\n      hPosition: positions.horizontalPosition,\n      vPosition: positions.verticalPosition,\n      otherStyles: Object.assign({}, this.otherStyles),\n    };\n\n    if (positions.style) {\n      if (positions.style.top !== undefined) {\n        changes.top = `${positions.style.top}px`;\n      }\n      // The component can be aligned from the right or from the left, but not from both.\n      if (positions.style.left !== undefined) {\n        changes.left = `${positions.style.left}px`;\n        changes.right = undefined;\n        // Since we set the first run manually we may need to unset the `right` property.\n        if (positions.style.right !== undefined) {\n          positions.style.right = undefined;\n        }\n      } else if (positions.style.right !== undefined) {\n        changes.right = `${positions.style.right}px`;\n        changes.left = undefined;\n      }\n      if (positions.style.width !== undefined) {\n        changes.width = `${positions.style.width}px`;\n      }\n      if (positions.style.height !== undefined) {\n        changes.height = `${positions.style.height}px`;\n      }\n      if (this.top === undefined) {\n        // Bypass Ember on the first reposition only to avoid flickering.\n        for (const prop in positions.style) {\n          if (positions.style[prop] !== undefined) {\n            if (typeof positions.style[prop] === 'number') {\n              dropdown.style.setProperty(prop, `${positions.style[prop]}px`);\n            } else {\n              dropdown.style.setProperty(prop, `${positions.style[prop]}`);\n            }\n          }\n        }\n      }\n    }\n    for (const prop in positions.style) {\n      if (!IGNORED_STYLES.includes(prop)) {\n        changes.otherStyles[prop] = positions.style[prop];\n      }\n    }\n\n    this.hPosition = changes.hPosition;\n    this.vPosition = changes.vPosition;\n    this.top = changes.top;\n    this.left = changes.left;\n    this.right = changes.right;\n    this.width = changes.width;\n    this.height = changes.height;\n    this.otherStyles = changes.otherStyles;\n    this.previousHorizontalPosition = positions.horizontalPosition;\n    this.previousVerticalPosition = positions.verticalPosition;\n    return changes;\n  }\n\n  _getDestinationId(): string {\n    let config = utilConfig;\n\n    if (!_configSet) {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-ignore\n      // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n      const configEnvironment = getOwner(this).resolveRegistration(\n        'config:environment',\n      ) as {\n        APP: {\n          rootElement: string;\n        };\n        'ember-basic-dropdown': Config;\n      };\n\n      if (configEnvironment['ember-basic-dropdown']) {\n        const legacyConfigString = JSON.stringify(\n          configEnvironment['ember-basic-dropdown'],\n        );\n        deprecate(\n          `You have configured \\`ember-basic-dropdown\\` in \\`ember-cli-build.js\\`. Remove that configuration and instead use \\`import { setConfig } from 'ember-basic-dropdown/config'; setConfig(${legacyConfigString});`,\n          false,\n          {\n            for: 'ember-basic-dropdown',\n            id: 'ember-basic-dropdown.config-environment',\n            since: {\n              enabled: '8.9',\n              available: '8.9',\n            },\n            until: '9.0.0',\n          },\n        );\n\n        config = configEnvironment['ember-basic-dropdown'];\n      }\n\n      if (configEnvironment['APP']?.rootElement) {\n        deprecate(\n          `ember-basic-dropdown received the \\`APP.rootElement\\` value from \\`ember-cli-build.js\\`. You now need to pass this value using \\`import { setConfig } from 'ember-basic-dropdown/config'; setConfig({rootElement: config.APP['rootElement']});`,\n          false,\n          {\n            for: 'ember-basic-dropdown',\n            id: 'ember-basic-dropdown.config-environment',\n            since: {\n              enabled: '8.9',\n              available: '8.9',\n            },\n            until: '9.0.0',\n          },\n        );\n\n        config.rootElement = configEnvironment['APP']?.rootElement;\n      }\n    }\n\n    if (isTesting()) {\n      // document doesn't exist in fastboot apps, for this reason we need this check\n      if (typeof document === 'undefined') {\n        return 'ember-basic-dropdown-wormhole';\n      }\n\n      // check if destination exists in tests:\n      if (config.destination) {\n        const destination = config.destination;\n        if (document.getElementById(destination) !== null) {\n          return destination;\n        }\n      }\n\n      // check if default element exists in tests:\n      if (document.getElementById('ember-basic-dropdown-wormhole') !== null) {\n        return 'ember-basic-dropdown-wormhole';\n      }\n\n      // fall back to rootElement as destination\n      const rootElement = config.rootElement;\n      return (\n        (rootElement ? document.querySelector(rootElement)?.id : undefined) ??\n        'ember-basic-dropdown-wormhole'\n      );\n    }\n\n    return config.destination || 'ember-basic-dropdown-wormhole';\n  }\n\n  _getDropdownElement(): HTMLElement | null {\n    if (this.dropdownElement) {\n      return this.dropdownElement;\n    }\n\n    return document.querySelector(`[id=\"${this._dropdownId}\"]`);\n  }\n\n  _getTriggerElement(): HTMLElement | null {\n    if (this.triggerElement) {\n      return this.triggerElement;\n    }\n\n    return document.querySelector(\n      `[data-ebd-id=${this.publicAPI.uniqueId}-trigger]`,\n    );\n  }\n\n  get triggerComponent(): ComponentLike<BasicDropdownTriggerSignature> {\n    if (this.args.triggerComponent) {\n      return ensureSafeComponent(\n        this.args.triggerComponent,\n        this,\n      ) as ComponentLike<BasicDropdownTriggerSignature>;\n    }\n\n    return BasicDropdownTrigger as ComponentLike<BasicDropdownTriggerSignature>;\n  }\n\n  get contentComponent(): ComponentLike<BasicDropdownContentSignature> {\n    if (this.args.contentComponent) {\n      return ensureSafeComponent(\n        this.args.contentComponent,\n        this,\n      ) as ComponentLike<BasicDropdownContentSignature>;\n    }\n\n    return BasicDropdownContent as ComponentLike<BasicDropdownContentSignature>;\n  }\n\n  <template>\n    {{#let\n      (hash\n        uniqueId=this.publicAPI.uniqueId\n        isOpen=this.publicAPI.isOpen\n        disabled=this.publicAPI.disabled\n        actions=this.publicAPI.actions\n        Trigger=(component\n          this.triggerComponent\n          dropdown=this.publicAPI\n          hPosition=this.hPosition\n          renderInPlace=this.renderInPlace\n          vPosition=this.vPosition\n          htmlTag=@triggerHtmlTag\n        )\n        Content=(component\n          this.contentComponent\n          dropdown=this.publicAPI\n          hPosition=this.hPosition\n          renderInPlace=this.renderInPlace\n          preventScroll=@preventScroll\n          rootEventType=(or @rootEventType \"click\")\n          vPosition=this.vPosition\n          htmlTag=@contentHtmlTag\n          destination=this.destination\n          destinationElement=this.destinationElement\n          top=this.top\n          left=this.left\n          right=this.right\n          width=this.width\n          height=this.height\n          otherStyles=this.otherStyles\n        )\n      )\n      as |api|\n    }}\n      {{#if this.renderInPlace}}\n        <div class=\"ember-basic-dropdown\" ...attributes>{{yield api}}</div>\n      {{else}}\n        {{yield api}}\n      {{/if}}\n    {{/let}}\n  </template>\n}\n","export interface Config {\n  destination?: string;\n  rootElement?: string;\n}\n\nlet _config: Config = {};\n\n// This will be removed in next major, don't use this outside the package!\nlet _configSet = false;\n\nexport function setConfig(config: Config) {\n  _config = config;\n  _configSet = true;\n}\n\nexport { _config as config, _configSet };\n","import Modifier from 'ember-modifier';\nimport type { ArgsFor, PositionalArgs, NamedArgs } from 'ember-modifier';\nimport { assert } from '@ember/debug';\nimport { action } from '@ember/object';\nimport { isDestroyed, registerDestructor } from '@ember/destroyable';\nimport hasMoved from '../utils/has-moved.ts';\nimport type Owner from '@ember/owner';\nimport type { Dropdown } from '../types.ts';\n\ninterface Signature {\n  Element: HTMLElement;\n  Args: {\n    Named: {\n      dropdown: Dropdown;\n      eventType?: 'click' | 'mousedown' | undefined;\n      stopPropagation?: boolean | undefined;\n      [named: string]: unknown;\n    };\n    Positional: unknown[];\n  };\n}\n\nexport default class DropdownTriggerModifier extends Modifier<Signature> {\n  didSetup = false;\n\n  triggerElement: HTMLElement | undefined;\n\n  toggleIsBeingHandledByTouchEvents: boolean = false;\n  touchMoveEvent: TouchEvent | undefined;\n\n  dropdown?: Dropdown;\n  desiredEventType!: string;\n  stopPropagation: boolean | undefined;\n\n  constructor(owner: Owner, args: ArgsFor<Signature>) {\n    super(owner, args);\n    registerDestructor(this, cleanup);\n  }\n\n  override modify(\n    element: HTMLElement,\n    positional: PositionalArgs<Signature>,\n    named: NamedArgs<Signature>,\n  ): void {\n    assert('must be provided dropdown object', named.dropdown);\n    this.dropdown = named.dropdown;\n    this.desiredEventType = named.eventType ?? 'click';\n    this.stopPropagation = named.stopPropagation;\n\n    if (!this.didSetup) {\n      this.setup(element);\n      this.didSetup = true;\n    }\n    this.update(element, positional, named);\n  }\n\n  setup(element: HTMLElement) {\n    // Keep a reference to the element for cleanup\n    this.triggerElement = element;\n    if (this.dropdown?.actions?.registerTriggerElement) {\n      this.dropdown.actions.registerTriggerElement(element);\n    }\n\n    if (!element.getAttribute('role')) element.setAttribute('role', 'button');\n\n    element.addEventListener('click', this.handleMouseEventBound);\n    element.addEventListener('mousedown', this.handleMouseEventBound);\n    element.addEventListener('keydown', this.handleKeyDownBound);\n    element.addEventListener('touchstart', this.handleTouchStartBound, {\n      passive: false,\n    });\n    element.addEventListener('touchend', this.handleTouchEndBound);\n  }\n\n  update(\n    element: HTMLElement,\n    _positional: PositionalArgs<Signature>,\n    named: NamedArgs<Signature>,\n  ) {\n    const { dropdown } = named;\n\n    element.setAttribute('data-ebd-id', `${dropdown.uniqueId}-trigger`);\n\n    if (element.getAttribute('aria-owns') === null) {\n      element.setAttribute(\n        'aria-owns',\n        `ember-basic-dropdown-content-${dropdown.uniqueId}`,\n      );\n    }\n\n    if (element.getAttribute('aria-controls') === null) {\n      element.setAttribute(\n        'aria-controls',\n        `ember-basic-dropdown-content-${dropdown.uniqueId}`,\n      );\n    }\n\n    element.setAttribute('aria-expanded', dropdown.isOpen ? 'true' : 'false');\n    element.setAttribute('aria-disabled', dropdown.disabled ? 'true' : 'false');\n  }\n\n  @action\n  handleMouseEvent(e: MouseEvent): void {\n    if (typeof document === 'undefined') return;\n    const { dropdown, desiredEventType, stopPropagation } = this;\n\n    if (isDestroyed(this) || !dropdown || dropdown.disabled) return;\n\n    const eventType = e.type;\n    const notLeftClick = e.button !== 0;\n    if (eventType !== desiredEventType || notLeftClick) return;\n\n    if (stopPropagation) e.stopPropagation();\n\n    if (this.toggleIsBeingHandledByTouchEvents) {\n      // Some devises have both touchscreen & mouse, and they are not mutually exclusive\n      // In those cases the touchdown handler is fired first, and it sets a flag to\n      // short-circuit the mouseup so the component is not opened and immediately closed.\n      this.toggleIsBeingHandledByTouchEvents = false;\n      return;\n    }\n    dropdown.actions.toggle(e);\n  }\n\n  @action\n  handleKeyDown(e: KeyboardEvent): void {\n    const disabled = this.dropdown?.disabled,\n      actions = this.dropdown?.actions;\n\n    if (disabled || !actions) return;\n    if (e.keyCode === 13) {\n      // Enter\n      actions.toggle(e);\n    } else if (e.keyCode === 32) {\n      // Space\n      e.preventDefault(); // prevents the space to trigger a scroll page-next\n      actions.toggle(e);\n    } else if (e.keyCode === 27) {\n      actions.close(e);\n    }\n  }\n\n  @action\n  handleTouchStart(): void {\n    document.addEventListener('touchmove', this.touchMoveHandlerBound);\n    if (this.triggerElement?.getRootNode() instanceof ShadowRoot) {\n      (this.triggerElement?.getRootNode() as HTMLElement).addEventListener(\n        'touchmove',\n        this.touchMoveHandlerBound,\n      );\n    }\n  }\n\n  @action\n  handleTouchEnd(e: TouchEvent): void {\n    this.toggleIsBeingHandledByTouchEvents = true;\n    const disabled = this.dropdown?.disabled,\n      actions = this.dropdown?.actions;\n\n    if ((e && e.defaultPrevented) || disabled || !actions) {\n      return;\n    }\n    if (!hasMoved(e, this.touchMoveEvent)) {\n      actions.toggle(e);\n    }\n    this.touchMoveEvent = undefined;\n    document.removeEventListener('touchmove', this.touchMoveHandlerBound);\n    // This next three lines are stolen from hammertime. This prevents the default\n    // behaviour of the touchend, but synthetically trigger a focus and a (delayed) click\n    // to simulate natural behaviour.\n    const target = (e.composedPath?.()[0] || e.target) as HTMLElement;\n    if (target !== null) {\n      target.focus();\n    }\n    setTimeout(function () {\n      if (!e.target) {\n        return;\n      }\n      try {\n        const event = document.createEvent('MouseEvents');\n        event.initMouseEvent(\n          'click',\n          true,\n          true,\n          window,\n          0,\n          0,\n          0,\n          0,\n          0,\n          false,\n          false,\n          false,\n          false,\n          0,\n          null,\n        );\n        e.target.dispatchEvent(event);\n      } catch {\n        const event = new Event('click');\n        e.target.dispatchEvent(event);\n      }\n    }, 0);\n    e.preventDefault();\n  }\n\n  @action\n  _touchMoveHandler(e: TouchEvent): void {\n    this.touchMoveEvent = e;\n    document.removeEventListener('touchmove', this.touchMoveHandlerBound);\n\n    if (this.triggerElement?.getRootNode() instanceof ShadowRoot) {\n      (this.triggerElement?.getRootNode() as HTMLElement).removeEventListener(\n        'touchmove',\n        this.touchMoveHandlerBound,\n      );\n    }\n  }\n\n  handleMouseEventBound = (e: MouseEvent) => this.handleMouseEvent(e);\n  handleKeyDownBound = (e: KeyboardEvent) => this.handleKeyDown(e);\n  handleTouchStartBound = () => this.handleTouchStart();\n  handleTouchEndBound = (e: TouchEvent) => this.handleTouchEnd(e);\n  touchMoveHandlerBound = (e: TouchEvent) => this._touchMoveHandler(e);\n}\n\nfunction cleanup(instance: DropdownTriggerModifier) {\n  const { triggerElement } = instance;\n  if (triggerElement) {\n    if (typeof document !== 'undefined')\n      document.removeEventListener('touchmove', instance.touchMoveHandlerBound);\n\n    if (triggerElement?.getRootNode() instanceof ShadowRoot) {\n      (triggerElement?.getRootNode() as HTMLElement).removeEventListener(\n        'touchmove',\n        instance.touchMoveHandlerBound,\n      );\n    }\n\n    triggerElement.removeEventListener('click', instance.handleMouseEventBound);\n    triggerElement.removeEventListener(\n      'mousedown',\n      instance.handleMouseEventBound,\n    );\n    triggerElement.removeEventListener('keydown', instance.handleKeyDownBound);\n    triggerElement.removeEventListener(\n      'touchstart',\n      instance.handleTouchStartBound,\n    );\n    triggerElement.removeEventListener(\n      'touchend',\n      instance.handleTouchEndBound,\n    );\n  }\n}\n","import type BasicDropdown from '../components/basic-dropdown.gts';\nimport type { VerticalPosition, HorizontalPosition } from '../types.ts';\n\n// To avoid breaking the current types export we need this\nexport type { VerticalPosition, HorizontalPosition };\n\nexport interface CalculatePositionOptions {\n  horizontalPosition: HorizontalPosition;\n  verticalPosition: VerticalPosition;\n  matchTriggerWidth: boolean;\n  previousHorizontalPosition?: HorizontalPosition | undefined;\n  previousVerticalPosition?: VerticalPosition | undefined;\n  renderInPlace: boolean;\n  dropdown: BasicDropdown;\n}\n\nexport type CalculatePositionResultStyle = {\n  top?: number | undefined;\n  left?: number | undefined;\n  right?: number | undefined;\n  width?: number | undefined;\n  height?: number | undefined;\n  [key: string]: string | number | undefined;\n};\n\nexport type CalculatePositionResult = {\n  horizontalPosition: HorizontalPosition;\n  verticalPosition: VerticalPosition;\n  style: CalculatePositionResultStyle;\n};\n\nexport type CalculatePosition = (\n  trigger: Element,\n  content: HTMLElement,\n  destination: HTMLElement,\n  options: CalculatePositionOptions,\n) => CalculatePositionResult;\n\nexport const calculateWormholedPosition: CalculatePosition = (\n  trigger,\n  content,\n  destination,\n  {\n    horizontalPosition,\n    verticalPosition,\n    matchTriggerWidth,\n    previousHorizontalPosition,\n    previousVerticalPosition,\n  },\n) => {\n  // Collect information about all the involved DOM elements\n  const scroll = { left: window.pageXOffset, top: window.pageYOffset };\n  let { left: triggerLeft, top: triggerTop } = trigger.getBoundingClientRect();\n  const { width: triggerWidth, height: triggerHeight } =\n    trigger.getBoundingClientRect();\n  const { height: dropdownHeight } = content.getBoundingClientRect();\n  let { width: dropdownWidth } = content.getBoundingClientRect();\n  const viewportWidth = document.body.clientWidth || window.innerWidth;\n  const style: CalculatePositionResultStyle = {};\n\n  // Apply containers' offset\n  let anchorElement = destination.parentNode as HTMLElement;\n\n  if (anchorElement instanceof ShadowRoot) {\n    anchorElement = anchorElement.host as HTMLElement;\n  }\n\n  let anchorPosition = window.getComputedStyle(anchorElement).position;\n  while (\n    anchorPosition !== 'relative' &&\n    anchorPosition !== 'absolute' &&\n    anchorElement.tagName.toUpperCase() !== 'BODY' &&\n    !(anchorElement.parentNode instanceof ShadowRoot)\n  ) {\n    anchorElement = anchorElement.parentNode as HTMLElement;\n    anchorPosition = window.getComputedStyle(anchorElement).position;\n  }\n  if (anchorPosition === 'relative' || anchorPosition === 'absolute') {\n    const rect = anchorElement.getBoundingClientRect();\n    triggerLeft = triggerLeft - rect.left;\n    triggerTop = triggerTop - rect.top;\n    const { offsetParent } = anchorElement;\n    if (offsetParent) {\n      triggerLeft -= offsetParent.scrollLeft;\n      triggerTop -= offsetParent.scrollTop;\n    }\n  }\n\n  // Calculate drop down width\n  dropdownWidth = matchTriggerWidth ? triggerWidth : dropdownWidth;\n  if (matchTriggerWidth) {\n    style.width = dropdownWidth;\n  }\n\n  /**\n   * Fixes bug where the dropdown always stays on the same position on the screen when\n   * the <body> is relatively positioned\n   */\n  const isBodyPositionRelative =\n    window.getComputedStyle(document.body).getPropertyValue('position') ===\n    'relative';\n\n  // Calculate horizontal position\n  let triggerLeftWithScroll = triggerLeft;\n\n  if (!isBodyPositionRelative) {\n    triggerLeftWithScroll += scroll.left;\n  }\n\n  if (horizontalPosition === 'auto' || horizontalPosition === 'auto-left') {\n    // Calculate the number of visible horizontal pixels if we were to place the\n    // dropdown on the left and right\n    const leftVisible =\n      Math.min(viewportWidth, triggerLeft + dropdownWidth) -\n      Math.max(0, triggerLeft);\n    const rightVisible =\n      Math.min(viewportWidth, triggerLeft + triggerWidth) -\n      Math.max(0, triggerLeft + triggerWidth - dropdownWidth);\n\n    if (dropdownWidth > leftVisible && rightVisible > leftVisible) {\n      // If the drop down won't fit left-aligned, and there is more space on the\n      // right than on the left, then force right-aligned\n      horizontalPosition = 'right';\n    } else if (dropdownWidth > rightVisible && leftVisible > rightVisible) {\n      // If the drop down won't fit right-aligned, and there is more space on\n      // the left than on the right, then force left-aligned\n      horizontalPosition = 'left';\n    } else {\n      // Keep same position as previous\n      horizontalPosition = previousHorizontalPosition || 'left';\n    }\n  } else if (horizontalPosition === 'auto-right') {\n    // Calculate the number of visible horizontal pixels if we were to place the\n    // dropdown on the left and right\n    const leftVisible =\n      Math.min(viewportWidth, triggerLeft + dropdownWidth) -\n      Math.max(0, triggerLeft);\n    const rightVisible =\n      Math.min(viewportWidth, triggerLeft + triggerWidth) -\n      Math.max(0, triggerLeft + triggerWidth - dropdownWidth);\n\n    if (dropdownWidth > rightVisible && leftVisible > rightVisible) {\n      // If the drop down won't fit right-aligned, and there is more space on the\n      // left than on the right, then force left-aligned\n      horizontalPosition = 'left';\n    } else if (dropdownWidth > leftVisible && rightVisible > leftVisible) {\n      // If the drop down won't fit left-aligned, and there is more space on\n      // the right than on the left, then force right-aligned\n      horizontalPosition = 'right';\n    } else {\n      // Keep same position as previous\n      horizontalPosition = previousHorizontalPosition || 'right';\n    }\n  }\n  if (horizontalPosition === 'right') {\n    style.right = viewportWidth - (triggerLeftWithScroll + triggerWidth);\n  } else if (horizontalPosition === 'center') {\n    style.left = triggerLeftWithScroll + (triggerWidth - dropdownWidth) / 2;\n  } else {\n    style.left = triggerLeftWithScroll;\n  }\n\n  // Calculate vertical position\n  let triggerTopWithScroll = triggerTop;\n\n  if (!isBodyPositionRelative) {\n    triggerTopWithScroll += scroll.top;\n  }\n\n  if (verticalPosition === 'above') {\n    style.top = triggerTopWithScroll - dropdownHeight;\n  } else if (verticalPosition === 'below') {\n    style.top = triggerTopWithScroll + triggerHeight;\n  } else {\n    const viewportBottom = scroll.top + window.innerHeight;\n    const enoughRoomBelow =\n      triggerTopWithScroll + triggerHeight + dropdownHeight < viewportBottom;\n    const enoughRoomAbove = triggerTop > dropdownHeight;\n\n    if (!enoughRoomBelow && !enoughRoomAbove) {\n      verticalPosition = 'below';\n    } else if (\n      previousVerticalPosition === 'below' &&\n      !enoughRoomBelow &&\n      enoughRoomAbove\n    ) {\n      verticalPosition = 'above';\n    } else if (\n      previousVerticalPosition === 'above' &&\n      !enoughRoomAbove &&\n      enoughRoomBelow\n    ) {\n      verticalPosition = 'below';\n    } else if (!previousVerticalPosition) {\n      verticalPosition = enoughRoomBelow ? 'below' : 'above';\n    } else {\n      verticalPosition = previousVerticalPosition;\n    }\n    style.top =\n      triggerTopWithScroll +\n      (verticalPosition === 'below' ? triggerHeight : -dropdownHeight);\n  }\n\n  return { horizontalPosition, verticalPosition, style };\n};\n\nexport const calculateInPlacePosition: CalculatePosition = (\n  trigger,\n  content,\n  _destination,\n  { horizontalPosition, verticalPosition },\n) => {\n  let dropdownRect;\n  const positionData: CalculatePositionResult = {\n    horizontalPosition: 'left',\n    verticalPosition: 'below',\n    style: {},\n  };\n  if (horizontalPosition === 'auto') {\n    const triggerRect = trigger.getBoundingClientRect();\n    dropdownRect = content.getBoundingClientRect();\n    const viewportRight = window.pageXOffset + window.innerWidth;\n    positionData.horizontalPosition =\n      triggerRect.left + dropdownRect.width > viewportRight ? 'right' : 'left';\n  } else if (horizontalPosition === 'center') {\n    const { width: triggerWidth } = trigger.getBoundingClientRect();\n    const { width: dropdownWidth } = content.getBoundingClientRect();\n    positionData.style = { left: (triggerWidth - dropdownWidth) / 2 };\n  } else if (horizontalPosition === 'auto-right') {\n    const triggerRect = trigger.getBoundingClientRect();\n    const dropdownRect = content.getBoundingClientRect();\n    positionData.horizontalPosition =\n      triggerRect.right > dropdownRect.width ? 'right' : 'left';\n  } else if (horizontalPosition === 'right') {\n    positionData.horizontalPosition = 'right';\n  }\n\n  if (verticalPosition === 'above') {\n    positionData.verticalPosition = verticalPosition;\n    dropdownRect = dropdownRect || content.getBoundingClientRect();\n    positionData.style.top = -dropdownRect.height;\n  } else {\n    positionData.verticalPosition = 'below';\n  }\n  return positionData;\n};\n\nexport function getScrollParent(element: Element) {\n  let style = window.getComputedStyle(element);\n  const excludeStaticParent = style.position === 'absolute';\n  const overflowRegex = /(auto|scroll)/;\n\n  if (style.position === 'fixed') return document.body;\n  for (\n    let parent: Element | null = element;\n    (parent = parent.parentElement);\n  ) {\n    style = window.getComputedStyle(parent);\n    if (excludeStaticParent && style.position === 'static') {\n      continue;\n    }\n    if (\n      overflowRegex.test(style.overflow + style.overflowY + style.overflowX)\n    ) {\n      return parent;\n    }\n  }\n\n  return document.body;\n}\nconst calculatePosition: CalculatePosition = (\n  trigger,\n  content,\n  destination,\n  options,\n) => {\n  if (options.renderInPlace) {\n    return calculateInPlacePosition(trigger, content, destination, options);\n  } else {\n    return calculateWormholedPosition(trigger, content, destination, options);\n  }\n};\n\nexport default calculatePosition;\n","export default function hasMoved(\n  endEvent: TouchEvent,\n  moveEvent?: TouchEvent,\n): boolean {\n  if (!moveEvent) {\n    return false;\n  }\n\n  if (\n    !endEvent.changedTouches?.[0] ||\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n    (moveEvent.changedTouches[0] as any).touchType !== 'stylus'\n  ) {\n    return true;\n  }\n\n  // Distinguish stylus scroll and tap: if touch \"distance\" < 5px, we consider it a tap\n  const horizontalDistance = Math.abs(\n    (moveEvent.changedTouches[0]?.pageX ?? 0) -\n      endEvent.changedTouches[0].pageX,\n  );\n  const verticalDistance = Math.abs(\n    (moveEvent.changedTouches[0]?.pageY ?? 0) -\n      endEvent.changedTouches[0].pageY,\n  );\n  return horizontalDistance >= 5 || verticalDistance >= 5;\n}\n","import { registerDeprecationHandler } from '@ember/debug';\n\nconst LOG_LIMIT = 100;\n\nexport default function setupDeprecationWorkflow(config) {\n  self.deprecationWorkflow = self.deprecationWorkflow || {};\n  self.deprecationWorkflow.deprecationLog = {\n    messages: new Set(),\n  };\n\n  registerDeprecationHandler((message, options, next) =>\n    handleDeprecationWorkflow(config, message, options, next),\n  );\n\n  registerDeprecationHandler(deprecationCollector);\n\n  self.deprecationWorkflow.flushDeprecations = (options) =>\n    flushDeprecations({ config, ...options });\n}\n\nfunction matchesWorkflow(matcher, value) {\n  return (\n    (typeof matcher === 'string' && matcher === value) ||\n    (matcher instanceof RegExp && matcher.exec(value))\n  );\n}\n\nexport function detectWorkflow(config, message, options) {\n  if (!config || !config.workflow) {\n    return;\n  }\n\n  let i, workflow, matcher, idMatcher;\n  for (i = 0; i < config.workflow.length; i++) {\n    workflow = config.workflow[i];\n    matcher = workflow.matchMessage;\n    idMatcher = workflow.matchId;\n\n    if (\n      matchesWorkflow(idMatcher, options?.id) ||\n      matchesWorkflow(matcher, message)\n    ) {\n      return workflow;\n    }\n  }\n}\n\nexport function flushDeprecations({ handler = 'silence', config = {} } = {}) {\n  let messages = self.deprecationWorkflow.deprecationLog.messages;\n  let existing = config.workflow ?? [];\n  let collected = messages\n    .values()\n    .filter((matchId) => !existing.some((entry) => entry.matchId === matchId))\n    .map((matchId) => ({\n      handler,\n      matchId,\n    }));\n\n  let mergedConfig = {\n    ...config,\n    workflow: [...existing, ...collected],\n  };\n\n  return `import setupDeprecationWorkflow from 'ember-cli-deprecation-workflow';\n\nsetupDeprecationWorkflow(${JSON.stringify(mergedConfig, undefined, 2)});`;\n}\n\nexport function handleDeprecationWorkflow(config, message, options, next) {\n  let matchingWorkflow = detectWorkflow(config, message, options);\n  if (!matchingWorkflow) {\n    if (config && config.throwOnUnhandled) {\n      throw new Error(message);\n    } else {\n      next(message, options);\n    }\n  } else {\n    switch (matchingWorkflow.handler) {\n      case 'silence':\n        // no-op\n        break;\n      case 'log': {\n        let key = (options && options.id) || message;\n\n        if (!self.deprecationWorkflow.logCounts) {\n          self.deprecationWorkflow.logCounts = {};\n        }\n\n        let count = self.deprecationWorkflow.logCounts[key] || 0;\n        self.deprecationWorkflow.logCounts[key] = ++count;\n\n        if (count <= LOG_LIMIT) {\n          console.warn('DEPRECATION: ' + message);\n          if (count === LOG_LIMIT) {\n            console.warn(\n              'To avoid console overflow, this deprecation will not be logged any more in this run.',\n            );\n          }\n        }\n\n        break;\n      }\n      case 'throw':\n        throw new Error(message + ` (id: ${options?.id || 'unknown'})`);\n      default:\n        next(message, options);\n        break;\n    }\n  }\n}\n\nexport function deprecationCollector(message, options, next) {\n  self.deprecationWorkflow.deprecationLog.messages.add(options.id);\n\n  next(message, options);\n}\n","import Ember from 'ember';\nimport { defer } from 'rsvp';\nimport { Environment } from './external/environment';\nimport { assert } from '@ember/debug';\nimport { join, next, schedule } from '@ember/runloop';\n\nexport class EmberEnvironment extends Environment {\n  assert(...args) {\n    assert(...args);\n  }\n\n  async(callback) {\n    join(() => schedule('actions', callback));\n  }\n\n  reportUncaughtRejection(error) {\n    next(null, function () {\n      if (Ember.onerror) {\n        Ember.onerror(error);\n      } else {\n        throw error;\n      }\n    });\n  }\n\n  defer() {\n    return defer();\n  }\n\n  globalDebuggingEnabled() {\n    return Ember.ENV.DEBUG_TASKS;\n  }\n}\n\nexport const EMBER_ENVIRONMENT = new EmberEnvironment();\n","export class Environment {\n  assert() {}\n\n  async(callback) {\n    Promise.resolve().then(callback);\n  }\n\n  reportUncaughtRejection() {\n    this.async((error) => {\n      throw error;\n    });\n  }\n\n  defer() {\n    let deferable = {\n      promise: null,\n      resolve: null,\n      reject: null,\n    };\n\n    let promise = new Promise((resolve, reject) => {\n      deferable.resolve = resolve;\n      deferable.reject = reject;\n    });\n\n    deferable.promise = promise;\n\n    return deferable;\n  }\n\n  globalDebuggingEnabled() {\n    return false;\n  }\n}\n\nexport const DEFAULT_ENVIRONMENT = new Environment();\n","class BoundedPolicy {\n  constructor(maxConcurrency) {\n    this.maxConcurrency = maxConcurrency || 1;\n  }\n}\n\nexport default BoundedPolicy;\n","import BoundedPolicy from './bounded-policy';\nimport { makeCancelState, STARTED } from './execution-states';\n\nconst CANCELLED = makeCancelState(\n  `it belongs to a 'drop' Task that was already running`,\n);\n\nclass DropReducer {\n  constructor(remainingSlots) {\n    this.remainingSlots = remainingSlots;\n  }\n\n  step() {\n    if (this.remainingSlots > 0) {\n      this.remainingSlots--;\n      return STARTED;\n    }\n\n    return CANCELLED;\n  }\n}\n\nclass DropPolicy extends BoundedPolicy {\n  makeReducer() {\n    return new DropReducer(this.maxConcurrency);\n  }\n}\n\nexport default DropPolicy;\n","import BoundedPolicy from './bounded-policy';\nimport { STARTED, QUEUED } from './execution-states';\n\nclass EnqueuedReducer {\n  constructor(remainingSlots) {\n    this.remainingSlots = remainingSlots;\n  }\n\n  step() {\n    if (this.remainingSlots > 0) {\n      this.remainingSlots--;\n      return STARTED;\n    } else {\n      return QUEUED;\n    }\n  }\n}\n\nclass EnqueuedPolicy extends BoundedPolicy {\n  makeReducer() {\n    return new EnqueuedReducer(this.maxConcurrency);\n  }\n}\n\nexport default EnqueuedPolicy;\n","export const TYPE_CANCELLED = 'CANCELLED';\nexport const TYPE_STARTED = 'STARTED';\nexport const TYPE_QUEUED = 'QUEUED';\n\nexport const STARTED = { type: TYPE_STARTED };\nexport const QUEUED = { type: TYPE_QUEUED };\n\nexport const makeCancelState = (reason) => ({ type: TYPE_CANCELLED, reason });\n","import BoundedPolicy from './bounded-policy';\nimport { STARTED, QUEUED, makeCancelState } from './execution-states';\n\nconst CANCELLED = makeCancelState(\n  `it belongs to a 'keepLatest' Task that was already running`,\n);\n\n// Given:\n// - started tasks: [a,b,_]\n// - queued tasks:  [c,d,e,f]\n// KeepLatest will cancel all but the last queued task instance, producing:\n// - started tasks: [a,b,c]\n// - queued tasks: [f]\n\n// TODO: perhaps we should expose another config for the number to keep enqueued.\n//       this would also make sense for enqueued, e.g. perform a max of maxConcurrency\n//       concurrent task instances, but after a number of queued instances has been\n//       reached, they should be cancelled.\n\nclass KeepLatestReducer {\n  constructor(remainingSlots, numToCancel) {\n    this.remainingSlots = remainingSlots;\n    this.numToCancel = numToCancel;\n  }\n\n  step() {\n    if (this.remainingSlots > 0) {\n      this.remainingSlots--;\n      return STARTED;\n    } else {\n      if (this.numToCancel > 0) {\n        this.numToCancel--;\n        return CANCELLED;\n      } else {\n        return QUEUED;\n      }\n    }\n  }\n}\n\nclass KeepLatestPolicy extends BoundedPolicy {\n  makeReducer(numRunning, numQueued) {\n    let maxEnqueued = 1;\n    let totalRunning = numRunning + numQueued;\n    return new KeepLatestReducer(\n      this.maxConcurrency,\n      totalRunning - this.maxConcurrency - maxEnqueued,\n    );\n  }\n}\n\nexport default KeepLatestPolicy;\n","import BoundedPolicy from './bounded-policy';\nimport { STARTED, makeCancelState } from './execution-states';\n\nconst CANCELLED = makeCancelState(\n  `it belongs to a 'restartable' Task that was .perform()ed again`,\n);\n\nclass RestartableReducer {\n  constructor(numToCancel) {\n    this.numToCancel = numToCancel;\n  }\n\n  step() {\n    if (this.numToCancel > 0) {\n      this.numToCancel--;\n      return CANCELLED;\n    } else {\n      return STARTED;\n    }\n  }\n}\n\nclass RestartablePolicy extends BoundedPolicy {\n  makeReducer(numRunning, numQueued) {\n    return new RestartableReducer(numRunning + numQueued - this.maxConcurrency);\n  }\n}\n\nexport default RestartablePolicy;\n","import {\n  TYPE_STARTED,\n  TYPE_QUEUED,\n  TYPE_CANCELLED,\n} from './policies/execution-states';\n\nconst LAST_APPLIED_TAGS = new Map();\n\nclass Refresh {\n  constructor(schedulerPolicy, stateTracker, taskInstances) {\n    this.stateTracker = stateTracker;\n    this.schedulerPolicy = schedulerPolicy;\n    this.initialTaskInstances = taskInstances;\n    this.startingInstances = [];\n  }\n\n  process() {\n    let [taskInstances, numRunning, numQueued] =\n      this.filterFinishedTaskInstances();\n    let reducer = this.schedulerPolicy.makeReducer(numRunning, numQueued);\n\n    let finalTaskInstances = taskInstances.filter((taskInstance) => {\n      return this.setTaskInstanceExecutionState(taskInstance, reducer.step());\n    });\n\n    this.stateTracker.computeFinalStates((state) => this.applyState(state));\n    this.startingInstances.forEach((taskInstance) => taskInstance.start());\n\n    return finalTaskInstances;\n  }\n\n  filterFinishedTaskInstances() {\n    let numRunning = 0,\n      numQueued = 0;\n    let taskInstances = this.initialTaskInstances.filter((taskInstance) => {\n      let taskState = this.stateTracker.stateFor(taskInstance.task);\n      let executorState = taskInstance.executor.state;\n\n      if (executorState.isFinished) {\n        taskState.onCompletion(taskInstance);\n        return false;\n      }\n\n      if (executorState.hasStarted) {\n        numRunning += 1;\n      } else {\n        numQueued += 1;\n      }\n\n      return true;\n    });\n    return [taskInstances, numRunning, numQueued];\n  }\n\n  setTaskInstanceExecutionState(taskInstance, desiredState) {\n    let taskState = this.stateTracker.stateFor(taskInstance.task);\n\n    if (!taskInstance.executor.counted) {\n      taskInstance.executor.counted = true;\n      taskState.onPerformed(taskInstance);\n    }\n\n    switch (desiredState.type) {\n      case TYPE_CANCELLED:\n        // this will cause a follow up flush which will detect and recompute cancellation state\n        taskInstance.cancel(desiredState.reason);\n        return false;\n      case TYPE_STARTED:\n        if (!taskInstance.executor.state.hasStarted) {\n          this.startingInstances.push(taskInstance);\n          taskState.onStart(taskInstance);\n        }\n        taskState.onRunning(taskInstance);\n        return true;\n      case TYPE_QUEUED:\n        taskState.onQueued(taskInstance);\n        // TODO: assert taskInstance hasn't started?\n        // Or perhaps this can be a way to pause a task?\n        return true;\n    }\n  }\n\n  applyState(state) {\n    let { taskable } = state;\n\n    if (!taskable.onState) {\n      return;\n    }\n\n    const { guid } = taskable;\n\n    if (\n      LAST_APPLIED_TAGS.has(guid) &&\n      state.tag < LAST_APPLIED_TAGS.get(guid)\n    ) {\n      return;\n    }\n\n    let props = Object.assign(\n      {\n        numRunning: state.numRunning,\n        numQueued: state.numQueued,\n        numPerformedInc: state.numPerformedInc,\n      },\n      state.attrs,\n    );\n\n    taskable.onState(props, taskable);\n\n    LAST_APPLIED_TAGS.set(guid, state.tag);\n  }\n}\n\nexport default Refresh;\n","import {\n  COMPLETION_SUCCESS,\n  COMPLETION_ERROR,\n  COMPLETION_CANCEL,\n} from '../../task-instance/completion-states';\n\nclass RefreshState {\n  constructor(taskable, tag) {\n    this.taskable = taskable;\n    this.group = taskable.group;\n    this.numRunning = 0;\n    this.numQueued = 0;\n    this.numPerformedInc = 0;\n    this.attrs = {};\n    this.tag = tag;\n  }\n\n  onCompletion(taskInstance) {\n    let state = taskInstance.completionState;\n    this.attrs.lastRunning = null;\n    this.attrs.lastComplete = taskInstance;\n    if (state === COMPLETION_SUCCESS) {\n      this.attrs.lastSuccessful = taskInstance;\n    } else {\n      if (state === COMPLETION_ERROR) {\n        this.attrs.lastErrored = taskInstance;\n      } else if (state === COMPLETION_CANCEL) {\n        this.attrs.lastCanceled = taskInstance;\n      }\n      this.attrs.lastIncomplete = taskInstance;\n    }\n  }\n\n  onPerformed(taskInstance) {\n    this.numPerformedInc += 1;\n    this.attrs.lastPerformed = taskInstance;\n  }\n\n  onStart(taskInstance) {\n    this.attrs.last = taskInstance;\n  }\n\n  onRunning(taskInstance) {\n    this.attrs.lastRunning = taskInstance;\n    this.numRunning += 1;\n  }\n\n  onQueued() {\n    this.numQueued += 1;\n  }\n\n  recurseTaskGroups(callback) {\n    let group = this.group;\n    while (group) {\n      callback(group);\n      group = group.group;\n    }\n  }\n\n  applyStateFrom(other) {\n    Object.assign(this.attrs, other.attrs);\n    this.numRunning += other.numRunning;\n    this.numQueued += other.numQueued;\n    this.numPerformedInc += other.numPerformedInc;\n  }\n}\n\nexport default RefreshState;\n","import RefreshState from './state';\n\nconst CURRENT_REFRESH_TAGS = new Map();\n\nclass StateTracker {\n  constructor() {\n    this.states = new Map();\n  }\n\n  stateFor(taskable) {\n    let guid = taskable.guid;\n    let taskState = this.states.get(guid);\n    if (!taskState) {\n      let currentTag = CURRENT_REFRESH_TAGS.has(guid)\n        ? CURRENT_REFRESH_TAGS.get(guid)\n        : 0;\n      taskState = new RefreshState(taskable, ++currentTag);\n      this.states.set(guid, taskState);\n      CURRENT_REFRESH_TAGS.set(guid, currentTag);\n    }\n    return taskState;\n  }\n\n  // After cancelling/queueing task instances, we have to recompute the derived state\n  // of all the tasks that had/have task instances in this scheduler. We do this by\n  // looping through all the Tasks that we've accumulated state for, and then recursively\n  // applying/adding to the state of any TaskGroups they belong to.\n  computeFinalStates(callback) {\n    this.computeRecursiveState();\n    this.forEachState((state) => callback(state));\n  }\n\n  computeRecursiveState() {\n    this.forEachState((taskState) => {\n      let lastState = taskState;\n      taskState.recurseTaskGroups((taskGroup) => {\n        let state = this.stateFor(taskGroup);\n        state.applyStateFrom(lastState);\n        lastState = state;\n      });\n    });\n  }\n\n  forEachState(callback) {\n    this.states.forEach((state) => callback(state));\n  }\n}\n\nexport default StateTracker;\n","import NullState from './null-state';\n\nconst NULL_STATE = new NullState();\n\nclass NullStateTracker {\n  stateFor() {\n    return NULL_STATE;\n  }\n\n  computeFinalStates() {}\n}\n\nexport default NullStateTracker;\n","class NullState {\n  onCompletion() {}\n  onPerformed() {}\n  onStart() {}\n  onRunning() {}\n  onQueued() {}\n}\n\nexport default NullState;\n","import SchedulerRefresh from './refresh';\nimport StateTracker from './state-tracker/state-tracker';\nimport NullStateTracker from './state-tracker/null-state-tracker';\n\n// Scheduler base class\n\n// When a Task is performed, it creates an unstarted TaskInstance and\n// passes it to the Scheduler to determine when it should run. The\n// scheduler consults the schedulerPolicy (e.g. DropPolicy, RestartablePolicy, etc)\n// to determine whether the task instance should start executing, be enqueued\n// for later execution, or be immediately cancelled. As TaskInstances start\n// and run to completion, the Scheduler's `refresh()` method is called to\n// give it an opportunity to start (or cancel) previously enqueued task instances,\n// as well as update the derived state on Tasks and TaskGroups.\n\n// Every Task has its own Scheduler instance, unless it is part of a group,\n// in which case all the Tasks in a group share a single Scheduler.\n\nclass Scheduler {\n  constructor(schedulerPolicy, stateTrackingEnabled) {\n    this.schedulerPolicy = schedulerPolicy;\n    this.stateTrackingEnabled = stateTrackingEnabled;\n    this.taskInstances = [];\n  }\n\n  cancelAll(guid, cancelRequest) {\n    let cancelations = this.taskInstances\n      .map((taskInstance) => {\n        if (taskInstance.task.guids[guid]) {\n          taskInstance.executor.cancel(cancelRequest);\n        }\n      })\n      .filter((cancelation) => !!cancelation);\n\n    return Promise.all(cancelations);\n  }\n\n  perform(taskInstance) {\n    taskInstance.onFinalize(() => this.scheduleRefresh());\n    this.taskInstances.push(taskInstance);\n    this.refresh();\n  }\n\n  scheduleRefresh() {\n    Promise.resolve().then(() => this.refresh());\n  }\n\n  refresh() {\n    let stateTracker = this.stateTrackingEnabled\n      ? new StateTracker()\n      : new NullStateTracker();\n    let refresh = new SchedulerRefresh(\n      this.schedulerPolicy,\n      stateTracker,\n      this.taskInstances,\n    );\n    this.taskInstances = refresh.process();\n  }\n}\n\nexport default Scheduler;\n","import { STARTED } from './execution-states';\n\nclass UnboundedReducer {\n  step() {\n    return STARTED;\n  }\n}\n\nconst SINGLETON_REDUCER = new UnboundedReducer();\n\nclass UnboundedPolicy {\n  makeReducer() {\n    return SINGLETON_REDUCER;\n  }\n}\n\nexport default UnboundedPolicy;\n","import Scheduler from './scheduler/scheduler';\nimport UnboundedSchedulerPolicy from './scheduler/policies/unbounded-policy';\nimport EnqueueSchedulerPolicy from './scheduler/policies/enqueued-policy';\nimport DropSchedulerPolicy from './scheduler/policies/drop-policy';\nimport KeepLatestSchedulerPolicy from './scheduler/policies/keep-latest-policy';\nimport RestartableSchedulerPolicy from './scheduler/policies/restartable-policy';\nimport { Task } from './task/task';\nimport { TaskGroup } from './task/task-group';\nimport { DEFAULT_ENVIRONMENT } from './environment';\n\nfunction assertModifiersNotMixedWithGroup(obj) {\n  if (obj._hasSetConcurrencyConstraint && obj._taskGroupPath) {\n    throw new Error(\n      `Cannot use both 'group' and other concurrency-constraining task modifiers (e.g. 'drop', 'enqueue', 'restartable')`,\n    );\n  }\n}\n\nfunction assertUnsetBufferPolicy(obj) {\n  if (obj._hasSetBufferPolicy) {\n    throw new Error(\n      `Cannot set multiple buffer policies on a task or task group. ${obj._schedulerPolicyClass} has already been set for task or task group '${obj.name}'`,\n    );\n  }\n}\n\nconst MODIFIER_REGISTRY = {\n  enqueue: (factory, value) =>\n    value && factory.setBufferPolicy(EnqueueSchedulerPolicy),\n  evented: (factory, value) => value && factory.setEvented(value),\n  debug: (factory, value) => value && factory.setDebug(value),\n  drop: (factory, value) =>\n    value && factory.setBufferPolicy(DropSchedulerPolicy),\n  group: (factory, groupName) => factory.setGroup(groupName),\n  keepLatest: (factory, value) =>\n    value && factory.setBufferPolicy(KeepLatestSchedulerPolicy),\n  maxConcurrency: (factory, maxConcurrency) =>\n    factory.setMaxConcurrency(maxConcurrency),\n  onState: (factory, onStateCallback) => factory.setOnState(onStateCallback),\n  restartable: (factory, value) =>\n    value && factory.setBufferPolicy(RestartableSchedulerPolicy),\n};\n\n/**\n * Callback type defining a task modifier\n *\n * @callback TaskFactory~TaskModifier\n * @param {TaskFactory} factory\n * @param {*} taskModifierOption\n */\n\n/**\n * Registers a new modifier with the modifier registry\n *\n * @param {string} name Name of the modifier\n * @param {TaskFactory~TaskModifier} callback\n */\nexport function registerModifier(name, callback) {\n  if (MODIFIER_REGISTRY[name]) {\n    throw new Error(\n      `A modifier with the name '${name}' has already been defined.`,\n    );\n  }\n\n  MODIFIER_REGISTRY[name] = callback;\n}\n\n/**\n * Returns a specified modifier, if it exists in the registry\n *\n * @param {string} name Name of the modifier\n * @returns {TaskFactory~TaskModifier?}\n */\nexport function getModifier(name) {\n  return MODIFIER_REGISTRY[name];\n}\n\n/**\n * Returns whether a specified modifier exists in the registry\n *\n * @param {string} name Name of the modifier\n * @returns {boolean}\n */\nexport function hasModifier(name) {\n  return name in MODIFIER_REGISTRY;\n}\n\n/**\n * Factory used for instantiating Tasks and Task Groups. Mostly for internal\n * use, but some public APIs exposed via the Task Modifier APIs.\n *\n * <style>\n *  .ignore-this--this-is-here-to-hide-constructor,\n *  #TaskFactory { display: none }\n * </style>\n *\n * @class TaskFactory\n */\nexport class TaskFactory {\n  env = DEFAULT_ENVIRONMENT;\n\n  _debug = null;\n  _enabledModifiers = [];\n  _hasSetConcurrencyConstraint = false;\n  _hasSetBufferPolicy = false;\n  _hasEnabledEvents = false;\n  _maxConcurrency = null;\n  _onStateCallback = (state, taskable) => taskable.setState(state);\n  _schedulerPolicyClass = UnboundedSchedulerPolicy;\n  _taskGroupPath = null;\n\n  constructor(name = '<unknown>', taskDefinition = null, options = {}) {\n    this.name = name;\n    this.taskDefinition = taskDefinition;\n    this.options = options;\n    this._processModifierOptions(options);\n  }\n\n  /**\n   * Returns a new Task bound to the given context\n   *\n   * @protected\n   * @param {*} context\n   * @returns {Task}\n   */\n  createTask(context) {\n    let options = this.getTaskOptions(context);\n\n    return new Task(\n      Object.assign(\n        {\n          generatorFactory: (args) => this.taskDefinition.apply(context, args),\n        },\n        options,\n      ),\n    );\n  }\n\n  /**\n   * Returns a new TaskGroup bound to the given context\n   *\n   * @protected\n   * @param {*} context\n   * @returns {Task}\n   */\n  createTaskGroup(context) {\n    let options = this.getTaskOptions(context);\n\n    return new TaskGroup(options);\n  }\n\n  /**\n   * Returns a modifier callback with the given name bound to this TaskFactory,\n   * if registered.\n   *\n   * @protected\n   * @param {string} name\n   * @returns {TaskFactory~TaskModifier?}\n   */\n  getModifier(name) {\n    if (hasModifier(name)) {\n      return MODIFIER_REGISTRY[name].bind(null, this);\n    }\n  }\n\n  /**\n   * Returns the options provided to TaskFactory\n   *\n   * @public\n   * @returns {object}\n   */\n  getOptions() {\n    return this.options;\n  }\n\n  /**\n   * Returns a new Scheduler instance\n   *\n   * @protected\n   * @param {*} schedulerPolicy\n   * @param {boolean} stateTrackingEnabled\n   * @returns {Scheduler}\n   */\n  getScheduler(schedulerPolicy, stateTrackingEnabled) {\n    return new Scheduler(schedulerPolicy, stateTrackingEnabled);\n  }\n\n  /**\n   * Returns the options to pass to a Task or TaskGroup constructor\n   *\n   * @protected\n   * @param {*} context\n   * @returns {object}\n   */\n  getTaskOptions(context) {\n    let group, scheduler;\n    let onStateCallback = this._onStateCallback;\n\n    if (this._taskGroupPath) {\n      group = context[this._taskGroupPath];\n      if (!(group instanceof TaskGroup)) {\n        throw new Error(\n          `Expected group '${this._taskGroupPath}' to be defined but was not found.`,\n        );\n      }\n\n      scheduler = group.scheduler;\n    } else {\n      let schedulerPolicy = new this._schedulerPolicyClass(\n        this._maxConcurrency,\n      );\n      scheduler = this.getScheduler(\n        schedulerPolicy,\n        onStateCallback && typeof onStateCallback === 'function',\n      );\n    }\n\n    return {\n      context,\n      debug: this._debug,\n      env: this.env,\n      name: this.name,\n      group,\n      scheduler,\n      hasEnabledEvents: this._hasEnabledEvents,\n      onStateCallback,\n      enabledModifiers: this._enabledModifiers,\n      modifierOptions: this.getOptions(),\n    };\n  }\n\n  /**\n   * Sets the Scheduler buffer policy class to the specified value.\n   *\n   * Will raise an assertion if a buffer policy has already been specified\n   *\n   * @param {*} policy\n   * @returns {TaskFactory}\n   */\n  setBufferPolicy(policy) {\n    assertUnsetBufferPolicy(this);\n    this._hasSetBufferPolicy = true;\n    this._hasSetConcurrencyConstraint = true;\n    this._schedulerPolicyClass = policy;\n    assertModifiersNotMixedWithGroup(this);\n\n    return this;\n  }\n\n  /**\n   * Sets debug mode\n   *\n   * @param {boolean} enabled\n   * @returns {TaskFactory}\n   */\n  setDebug(enabled) {\n    this._debug = enabled;\n    return this;\n  }\n\n  /**\n   * Sets whether Task will dispatch Task events or not\n   *\n   * @param {boolean} enabled\n   * @returns {TaskFactory}\n   */\n  setEvented(enabled) {\n    this._hasEnabledEvents = enabled;\n    return this;\n  }\n\n  /**\n   * Sets Scheduling policy's `maxConcurrency`\n   *\n   * @param {number} maxConcurrency\n   * @returns {TaskFactory}\n   */\n  setMaxConcurrency(maxConcurrency) {\n    this._hasSetConcurrencyConstraint = true;\n    this._maxConcurrency = maxConcurrency;\n    return this;\n  }\n\n  /**\n   * Assigns Task created from this factory to the specified group name\n   *\n   * @param {string} group\n   * @returns {TaskFactory}\n   */\n  setGroup(group) {\n    this._taskGroupPath = group;\n    return this;\n  }\n\n  /**\n   * Sets the name of tasks created from this factory\n   *\n   * @param {string} name\n   * @returns {TaskFactory}\n   */\n  setName(name) {\n    this.name = name;\n    return this;\n  }\n\n  /**\n   * Sets the callback used on state updates. Can be set to null to disable\n   * state tracking on tasks.\n   *\n   * @param {function} onStateCallback\n   * @returns {TaskFactory}\n   */\n  setOnState(onStateCallback) {\n    this._onStateCallback = onStateCallback;\n    return this;\n  }\n\n  /**\n   * Sets the definition for tasks created from this factory\n   *\n   * @param {*} taskDefinition\n   * @returns {TaskFactory}\n   */\n  setTaskDefinition(taskDefinition) {\n    this.taskDefinition = taskDefinition;\n    return this;\n  }\n\n  _processModifierOptions(options) {\n    if (!options) {\n      return;\n    }\n\n    for (let key of Object.keys(options)) {\n      let value = options[key];\n      let modifier = this.getModifier(key);\n\n      if (typeof modifier === 'function' && modifier(value)) {\n        this._enabledModifiers.push(key);\n      }\n    }\n  }\n}\n","export const TASK_CANCELATION_NAME = 'TaskCancelation';\n\n/**\n * Returns true if the object passed to it is a TaskCancelation error.\n * If you call `someTask.perform().catch(...)` or otherwise treat\n * a {@linkcode TaskInstance} like a promise, you may need to\n * handle the cancelation of a TaskInstance differently from\n * other kinds of errors it might throw, and you can use this\n * convenience function to distinguish cancelation from errors.\n *\n * ```js\n * click() {\n *   this.myTask.perform().catch(e => {\n *     if (!didCancel(e)) { throw e; }\n *   });\n * }\n * ```\n *\n * @param {object} error the caught error, which might be a TaskCancelation\n * @returns {boolean}\n */\nexport function didCancel(e) {\n  return e && e.name === TASK_CANCELATION_NAME;\n}\n\nexport const CANCEL_KIND_EXPLICIT = 'explicit';\nexport const CANCEL_KIND_YIELDABLE_CANCEL = 'yielded';\nexport const CANCEL_KIND_LIFESPAN_END = 'lifespan_end';\nexport const CANCEL_KIND_PARENT_CANCEL = 'parent_cancel';\n\nexport class CancelRequest {\n  constructor(kind, reason) {\n    this.kind = kind;\n    this.reason = reason;\n    this.promise = new Promise((resolve) => {\n      this.finalize = resolve;\n    });\n  }\n}\n","export class GeneratorStepResult {\n  constructor(value, done, errored) {\n    this.value = value;\n    this.done = done;\n    this.errored = errored;\n  }\n}\n\nexport class GeneratorState {\n  constructor(generatorFactory) {\n    this.done = false;\n    this.generatorFactory = generatorFactory;\n    this.iterator = null;\n  }\n\n  step(resolvedValue, iteratorMethod) {\n    try {\n      let iterator = this.getIterator();\n      let { value, done } = iterator[iteratorMethod](resolvedValue);\n\n      if (done) {\n        return this.finalize(value, false);\n      } else {\n        return new GeneratorStepResult(value, false, false);\n      }\n    } catch (e) {\n      return this.finalize(e, true);\n    }\n  }\n\n  getIterator() {\n    if (!this.iterator && !this.done) {\n      this.iterator = this.generatorFactory();\n    }\n    return this.iterator;\n  }\n\n  finalize(value, errored) {\n    this.done = true;\n    this.iterator = null;\n    return new GeneratorStepResult(value, true, errored);\n  }\n}\n","import { GeneratorState } from '../generator-state';\nimport { INITIAL_STATE } from './initial-state';\nimport {\n  yieldableSymbol,\n  YIELDABLE_CONTINUE,\n  YIELDABLE_THROW,\n  YIELDABLE_RETURN,\n  YIELDABLE_CANCEL,\n  cancelableSymbol,\n} from '../yieldables';\n\nimport {\n  COMPLETION_SUCCESS,\n  COMPLETION_ERROR,\n  COMPLETION_CANCEL,\n} from './completion-states';\nimport {\n  CancelRequest,\n  CANCEL_KIND_YIELDABLE_CANCEL,\n  CANCEL_KIND_LIFESPAN_END,\n  CANCEL_KIND_PARENT_CANCEL,\n  didCancel,\n  TASK_CANCELATION_NAME,\n} from './cancelation';\n\nexport const PERFORM_TYPE_DEFAULT = 'PERFORM_TYPE_DEFAULT';\nexport const PERFORM_TYPE_UNLINKED = 'PERFORM_TYPE_UNLINKED';\nexport const PERFORM_TYPE_LINKED = 'PERFORM_TYPE_LINKED';\n\nconst CANCEL_RETURN_VALUE_SENTINEL = {};\nlet TASK_INSTANCE_STACK = [];\n\nexport function getRunningInstance() {\n  return TASK_INSTANCE_STACK[TASK_INSTANCE_STACK.length - 1];\n}\n\nexport class TaskInstanceExecutor {\n  constructor({ generatorFactory, env, debug }) {\n    this.generatorState = new GeneratorState(generatorFactory);\n    this.state = Object.assign({}, INITIAL_STATE);\n    this.index = 1;\n    this.disposers = [];\n    this.finalizeCallbacks = [];\n    this.env = env;\n    this.debug = debug;\n    this.cancelRequest = null;\n  }\n\n  start() {\n    if (this.state.hasStarted || this.cancelRequest) {\n      return;\n    }\n    this.setState({ hasStarted: true });\n    this.proceedSync(YIELDABLE_CONTINUE, undefined);\n    this.taskInstance.onStarted();\n  }\n\n  cancel(cancelRequest) {\n    if (!this.requestCancel(cancelRequest)) {\n      cancelRequest.finalize();\n      return cancelRequest.promise;\n    }\n\n    if (this.state.hasStarted) {\n      this.proceedWithCancelAsync();\n    } else {\n      this.finalizeWithCancel();\n    }\n\n    return this.cancelRequest.promise;\n  }\n\n  setState(state) {\n    Object.assign(this.state, state);\n    this.taskInstance.setState(this.state);\n  }\n\n  proceedChecked(index, yieldResumeType, value) {\n    if (this.state.isFinished) {\n      return;\n    }\n    if (!this.advanceIndex(index)) {\n      return;\n    }\n\n    if (yieldResumeType === YIELDABLE_CANCEL) {\n      this.requestCancel(\n        new CancelRequest(CANCEL_KIND_YIELDABLE_CANCEL),\n        value,\n      );\n      this.proceedWithCancelAsync();\n    } else {\n      this.proceedAsync(yieldResumeType, value);\n    }\n  }\n\n  proceedWithCancelAsync() {\n    this.proceedAsync(YIELDABLE_RETURN, CANCEL_RETURN_VALUE_SENTINEL);\n  }\n\n  proceedAsync(yieldResumeType, value) {\n    this.advanceIndex(this.index);\n    this.env.async(() => this.proceedSync(yieldResumeType, value));\n  }\n\n  proceedSync(yieldResumeType, value) {\n    if (this.state.isFinished) {\n      return;\n    }\n\n    this.dispose();\n\n    if (this.generatorState.done) {\n      this.handleResolvedReturnedValue(yieldResumeType, value);\n    } else {\n      this.handleResolvedContinueValue(yieldResumeType, value);\n    }\n  }\n\n  /**\n   * This method is called when a previously yielded value from\n   * the generator has been resolved, and now it's time to pass\n   * it back into the generator. There are 3 ways to \"resume\" a\n   * generator:\n   *\n   * - call `.next(value)` on it, which is used to pass in a resolved\n   *   value (the fulfilled value of a promise), e.g. if a task generator fn\n   *   does `yield Promise.resolve(5)`, then we take that promise yielded\n   *   by the generator, detect that it's a promise, resolve it, and then\n   *   pass its fulfilled value `5` back into the generator function so\n   *   that it can continue executing.\n   * - call `.throw(error)` on it, which throw an exception from where the\n   *   the generator previously yielded. We do this when the previously\n   *   yielded value resolves to an error value (e.g. a rejected promise\n   *   or a TaskInstance that finished with an error). Note that when you\n   *   resume a generator with a `.throw()`, it can still recover from that\n   *   thrown error and continue executing normally so long as the `yield`\n   *   was inside a `try/catch` statement.\n   * - call `.return(value)` on it, causes the generator function to return\n   *   from where it previously `yield`ed. We use `.return()` when cancelling\n   *   a TaskInstance; by `.return`ing, rather than `.throw`ing, it allows\n   *   the generator function to skip `catch(e) {}` blocks, which is usually\n   *   reserved for actual errors/exceptions; if we `.throw`'d cancellations,\n   *   it would require all tasks that used try/catch to conditionally ignore\n   *   cancellations, which is annoying. So we `.return()` from generator functions\n   *   in the case of errors as a matter of convenience.\n   *\n   * @private\n   */\n  handleResolvedContinueValue(iteratorMethod, resumeValue) {\n    let beforeIndex = this.index;\n    let stepResult = this.generatorStep(resumeValue, iteratorMethod);\n\n    // TODO: what is this doing? write breaking test.\n    if (!this.advanceIndex(beforeIndex)) {\n      return;\n    }\n\n    if (stepResult.errored) {\n      this.finalize(stepResult.value, COMPLETION_ERROR);\n      return;\n    }\n\n    this.handleYieldedValue(stepResult);\n  }\n\n  /**\n   * This method is called when the generator function is all\n   * out of values, and the last value returned from the function\n   * (possible a thenable/yieldable/promise/etc) has been resolved.\n   *\n   * Possible cases:\n   * - `return \"simple value\";` // resolved value is \"simple value\"\n   * - `return undefined;` // (or omitted return) resolved value is undefined\n   * - `return someTask.perform()` // resolved value is the value returned/resolved from someTask\n   *\n   * @private\n   */\n  handleResolvedReturnedValue(yieldResumeType, value) {\n    switch (yieldResumeType) {\n      case YIELDABLE_CONTINUE:\n      case YIELDABLE_RETURN:\n        this.finalize(value, COMPLETION_SUCCESS);\n        break;\n      case YIELDABLE_THROW:\n        this.finalize(value, COMPLETION_ERROR);\n        break;\n    }\n  }\n\n  handleYieldedUnknownThenable(thenable) {\n    let resumeIndex = this.index;\n    thenable.then(\n      (value) => {\n        this.proceedChecked(resumeIndex, YIELDABLE_CONTINUE, value);\n      },\n      (error) => {\n        this.proceedChecked(resumeIndex, YIELDABLE_THROW, error);\n      },\n    );\n  }\n\n  /**\n   * The TaskInstance internally tracks an index/sequence number\n   * (the `index` property) which gets incremented every time the\n   * task generator function iterator takes a step. When a task\n   * function is paused at a `yield`, there are two events that\n   * cause the TaskInstance to take a step: 1) the yielded value\n   * \"resolves\", thus resuming the TaskInstance's execution, or\n   * 2) the TaskInstance is canceled. We need some mechanism to prevent\n   * stale yielded value resolutions from resuming the TaskFunction\n   * after the TaskInstance has already moved on (either because\n   * the TaskInstance has since been canceled or because an\n   * implementation of the Yieldable API tried to resume the\n   * TaskInstance more than once). The `index` serves as\n   * that simple mechanism: anyone resuming a TaskInstance\n   * needs to pass in the `index` they were provided that acts\n   * as a ticket to resume the TaskInstance that expires once\n   * the TaskInstance has moved on.\n   *\n   * @private\n   */\n  advanceIndex(index) {\n    if (this.index === index) {\n      return ++this.index;\n    }\n  }\n\n  handleYieldedValue(stepResult) {\n    let yieldedValue = stepResult.value;\n    if (!yieldedValue) {\n      this.proceedWithSimpleValue(yieldedValue);\n      return;\n    }\n\n    this.addDisposer(yieldedValue[cancelableSymbol]);\n\n    if (yieldedValue[yieldableSymbol]) {\n      this.invokeYieldable(yieldedValue);\n    } else if (typeof yieldedValue.then === 'function') {\n      this.handleYieldedUnknownThenable(yieldedValue);\n    } else {\n      this.proceedWithSimpleValue(yieldedValue);\n    }\n  }\n\n  proceedWithSimpleValue(yieldedValue) {\n    this.proceedAsync(YIELDABLE_CONTINUE, yieldedValue);\n  }\n\n  addDisposer(maybeDisposer) {\n    if (typeof maybeDisposer !== 'function') {\n      return;\n    }\n\n    this.disposers.push(maybeDisposer);\n  }\n\n  /**\n   * Runs any disposers attached to the task's most recent `yield`.\n   * For instance, when a task yields a TaskInstance, it registers that\n   * child TaskInstance's disposer, so that if the parent task is canceled,\n   * dispose() will run that disposer and cancel the child TaskInstance.\n   *\n   * @private\n   */\n  dispose() {\n    let disposers = this.disposers;\n    if (disposers.length === 0) {\n      return;\n    }\n    this.disposers = [];\n    disposers.forEach((disposer) => disposer());\n  }\n\n  /**\n   * Calls .next()/.throw()/.return() on the task's generator function iterator,\n   * essentially taking a single step of execution on the task function.\n   *\n   * @private\n   */\n  generatorStep(nextValue, iteratorMethod) {\n    TASK_INSTANCE_STACK.push(this);\n    let stepResult = this.generatorState.step(nextValue, iteratorMethod);\n    TASK_INSTANCE_STACK.pop();\n\n    // TODO: fix this!\n    if (this._expectsLinkedYield) {\n      let value = stepResult.value;\n      if (!value || value.performType !== PERFORM_TYPE_LINKED) {\n        // eslint-disable-next-line no-console\n        console.warn(\n          'You performed a .linked() task without immediately yielding/returning it. This is currently unsupported (but might be supported in future version of ember-concurrency).',\n        );\n      }\n      this._expectsLinkedYield = false;\n    }\n\n    return stepResult;\n  }\n\n  maybeResolveDefer() {\n    if (!this.defer || !this.state.isFinished) {\n      return;\n    }\n\n    if (this.state.completionState === COMPLETION_SUCCESS) {\n      this.defer.resolve(this.state.value);\n    } else {\n      this.defer.reject(this.state.error);\n    }\n  }\n\n  onFinalize(callback) {\n    this.finalizeCallbacks.push(callback);\n\n    if (this.state.isFinished) {\n      this.runFinalizeCallbacks();\n    }\n  }\n\n  runFinalizeCallbacks() {\n    this.finalizeCallbacks.forEach((cb) => cb());\n    this.finalizeCallbacks = [];\n    this.maybeResolveDefer();\n    this.maybeThrowUnhandledTaskErrorLater();\n  }\n\n  promise() {\n    if (!this.defer) {\n      this.defer = this.env.defer();\n      this.asyncErrorsHandled = true;\n      this.maybeResolveDefer();\n    }\n    return this.defer.promise;\n  }\n\n  maybeThrowUnhandledTaskErrorLater() {\n    if (\n      !this.asyncErrorsHandled &&\n      this.state.completionState === COMPLETION_ERROR &&\n      !didCancel(this.state.error)\n    ) {\n      this.env.async(() => {\n        if (!this.asyncErrorsHandled) {\n          this.env.reportUncaughtRejection(this.state.error);\n        }\n      });\n    }\n  }\n\n  requestCancel(request) {\n    if (this.cancelRequest || this.state.isFinished) {\n      return false;\n    }\n    this.cancelRequest = request;\n    return true;\n  }\n\n  finalize(value, completionState) {\n    if (this.cancelRequest) {\n      return this.finalizeWithCancel();\n    }\n\n    let state = { completionState };\n\n    if (completionState === COMPLETION_SUCCESS) {\n      state.isSuccessful = true;\n      state.value = value;\n    } else if (completionState === COMPLETION_ERROR) {\n      state.isError = true;\n      state.error = value;\n    } else if (completionState === COMPLETION_CANCEL) {\n      state.error = value;\n    }\n\n    this.finalizeShared(state);\n  }\n\n  finalizeWithCancel() {\n    let cancelReason = this.taskInstance.formatCancelReason(\n      this.cancelRequest.reason,\n    );\n    let error = new Error(cancelReason);\n\n    if (this.debugEnabled()) {\n      // eslint-disable-next-line no-console\n      console.log(cancelReason);\n    }\n\n    error.name = TASK_CANCELATION_NAME;\n\n    this.finalizeShared({\n      isCanceled: true,\n      completionState: COMPLETION_CANCEL,\n      error,\n      cancelReason,\n    });\n\n    this.cancelRequest.finalize();\n  }\n\n  debugEnabled() {\n    return this.debug || this.env.globalDebuggingEnabled();\n  }\n\n  finalizeShared(state) {\n    this.index++;\n    state.isFinished = true;\n    this.setState(state);\n    this.runFinalizeCallbacks();\n    this.dispatchFinalizeEvents(state.completionState);\n  }\n\n  dispatchFinalizeEvents(completionState) {\n    switch (completionState) {\n      case COMPLETION_SUCCESS:\n        this.taskInstance.onSuccess();\n        break;\n      case COMPLETION_ERROR:\n        this.taskInstance.onError(this.state.error);\n        break;\n      case COMPLETION_CANCEL:\n        this.taskInstance.onCancel(this.state.cancelReason);\n        break;\n    }\n  }\n\n  invokeYieldable(yieldedValue) {\n    try {\n      let maybeDisposer = yieldedValue[yieldableSymbol](\n        this.taskInstance,\n        this.index,\n      );\n      this.addDisposer(maybeDisposer);\n    } catch (e) {\n      this.env.reportUncaughtRejection(e);\n    }\n  }\n\n  /**\n   * `onYielded` is called when this task instance has been\n   * yielded in another task instance's execution. We take\n   * this opportunity to conditionally link up the tasks\n   * so that when the parent or child cancels, the other\n   * is cancelled.\n   *\n   * Given the following case:\n   *\n   * ```js\n   * parentTask: task(function * () {\n   *   yield otherTask.perform();\n   * })\n   * ```\n   *\n   * Then the `parent` param is the task instance that is executing, `this`\n   * is the `otherTask` task instance that was yielded.\n   *\n   * @private\n   */\n  onYielded(parent, resumeIndex) {\n    this.asyncErrorsHandled = true;\n\n    this.onFinalize(() => {\n      let completionState = this.state.completionState;\n      if (completionState === COMPLETION_SUCCESS) {\n        parent.proceed(resumeIndex, YIELDABLE_CONTINUE, this.state.value);\n      } else if (completionState === COMPLETION_ERROR) {\n        parent.proceed(resumeIndex, YIELDABLE_THROW, this.state.error);\n      } else if (completionState === COMPLETION_CANCEL) {\n        parent.proceed(resumeIndex, YIELDABLE_CANCEL, null);\n      }\n    });\n\n    let performType = this.getPerformType();\n    if (performType === PERFORM_TYPE_UNLINKED) {\n      return;\n    }\n\n    return () => {\n      this.detectSelfCancelLoop(performType, parent);\n      this.cancel(new CancelRequest(CANCEL_KIND_PARENT_CANCEL));\n    };\n  }\n\n  getPerformType() {\n    return this.taskInstance.performType || PERFORM_TYPE_DEFAULT;\n  }\n\n  detectSelfCancelLoop(performType, parent) {\n    if (performType !== PERFORM_TYPE_DEFAULT) {\n      return;\n    }\n\n    let parentCancelRequest = parent.executor && parent.executor.cancelRequest;\n\n    // Detect that the parent was cancelled by a lifespan ending and\n    // that the child is still running and not cancelled.\n    if (\n      parentCancelRequest &&\n      parentCancelRequest.kind === CANCEL_KIND_LIFESPAN_END &&\n      !this.cancelRequest &&\n      !this.state.isFinished\n    ) {\n      this.taskInstance.selfCancelLoopWarning(parent);\n    }\n  }\n}\n","import { COMPLETION_PENDING } from './completion-states';\n\nexport const INITIAL_STATE = {\n  completionState: COMPLETION_PENDING,\n\n  /**\n   * If this TaskInstance runs to completion by returning a property\n   * other than a rejecting promise, this property will be set\n   * with that value.\n   *\n   * @memberof TaskInstance\n   * @instance\n   * @readOnly\n   */\n  value: null,\n\n  /**\n   * If this TaskInstance is canceled or throws an error (or yields\n   * a promise that rejects), this property will be set with that error.\n   * Otherwise, it is null.\n   *\n   * @memberof TaskInstance\n   * @instance\n   * @readOnly\n   */\n  error: null,\n\n  /**\n   * True if the task instance is fulfilled.\n   *\n   * @memberof TaskInstance\n   * @instance\n   * @readOnly\n   */\n  isSuccessful: false,\n\n  /**\n   * True if the task instance resolves to a rejection.\n   *\n   * @memberof TaskInstance\n   * @instance\n   * @readOnly\n   */\n  isError: false,\n\n  /**\n   * True if the task instance is canceled\n   *\n   * @memberof TaskInstance\n   * @instance\n   * @readOnly\n   */\n  isCanceled: false,\n\n  /**\n   * True if the task instance has started, else false.\n   *\n   * @memberof TaskInstance\n   * @instance\n   * @readOnly\n   */\n  hasStarted: false,\n\n  /**\n   * True if the task has run to completion.\n   *\n   * @memberof TaskInstance\n   * @instance\n   * @readOnly\n   */\n  isFinished: false,\n};\n","export const DEFAULT_STATE = {\n  last: null,\n  lastRunning: null,\n  lastPerformed: null,\n  lastSuccessful: null,\n  lastComplete: null,\n  lastErrored: null,\n  lastCanceled: null,\n  lastIncomplete: null,\n  performCount: 0,\n};\n\nObject.freeze(DEFAULT_STATE);\n","import { Taskable } from './taskable';\n\nexport class TaskGroup extends Taskable {}\n","import { Taskable } from './taskable';\nimport {\n  PERFORM_TYPE_DEFAULT,\n  PERFORM_TYPE_LINKED,\n  PERFORM_TYPE_UNLINKED,\n  getRunningInstance,\n  TaskInstanceExecutor,\n} from '../task-instance/executor';\n\nclass TaskLinkProxy {\n  constructor(task, performType, linkedObject) {\n    this.task = task;\n    this.performType = performType;\n    this.linkedObject = linkedObject;\n  }\n\n  perform(...args) {\n    return this.task._performShared(args, this.performType, this.linkedObject);\n  }\n}\n\nexport class Task extends Taskable {\n  constructor(options) {\n    super(options);\n    this.generatorFactory = options.generatorFactory;\n    this.perform = this._perform.bind(this);\n  }\n\n  linked() {\n    let linkedObject = getRunningInstance();\n    if (!linkedObject) {\n      throw new Error(`You can only call .linked() from within a task.`);\n    }\n\n    return new TaskLinkProxy(this, PERFORM_TYPE_LINKED, linkedObject);\n  }\n\n  unlinked() {\n    return new TaskLinkProxy(this, PERFORM_TYPE_UNLINKED, null);\n  }\n\n  toString() {\n    return `<Task:${this.name}>`;\n  }\n\n  _clone() {\n    return new Task({\n      context: this.context,\n      debug: this.debug,\n      env: this.env,\n      generatorFactory: this.generatorFactory,\n      group: this.group,\n      hasEnabledEvents: this.hasEnabledEvents,\n      name: this.name,\n      onStateCallback: this.onStateCallback,\n      scheduler: this.scheduler,\n    });\n  }\n\n  _curry(...args) {\n    let task = this._clone();\n    task._curryArgs = [...(this._curryArgs || []), ...args];\n    return task;\n  }\n\n  _perform(...args) {\n    return this._performShared(args, PERFORM_TYPE_DEFAULT, null);\n  }\n\n  _performShared(args, performType, linkedObject) {\n    let fullArgs = this._curryArgs ? [...this._curryArgs, ...args] : args;\n    let taskInstance = this._taskInstanceFactory(\n      fullArgs,\n      performType,\n      linkedObject,\n    );\n\n    if (performType === PERFORM_TYPE_LINKED) {\n      linkedObject._expectsLinkedYield = true;\n    }\n\n    if (!this._isAlive) {\n      // a task linked to a dead lifetime should immediately cancel.\n      taskInstance.cancel();\n    }\n\n    this.scheduler.perform(taskInstance);\n    return taskInstance;\n  }\n\n  // eslint-disable-next-line no-unused-vars\n  _taskInstanceOptions(args, performType, _linkedObject) {\n    let generatorFactory = () => this.generatorFactory(args);\n    let taskInstanceOptions = {\n      task: this,\n      args,\n      executor: new TaskInstanceExecutor({\n        generatorFactory,\n        env: this.env,\n        debug: this.debug,\n      }),\n      performType,\n      hasEnabledEvents: this.hasEnabledEvents,\n    };\n\n    return taskInstanceOptions;\n  }\n}\n","import { DEFAULT_STATE } from './default-state';\nimport {\n  CancelRequest,\n  CANCEL_KIND_EXPLICIT,\n} from '../task-instance/cancelation';\n\nlet guidId = 0;\nfunction makeGuid() {\n  return `ec_${guidId++}`;\n}\n\nexport class Taskable {\n  constructor(options) {\n    this.context = options.context;\n    this.debug = options.debug || false;\n    this.enabledModifiers = options.enabledModifiers;\n    this.env = options.env;\n    this.group = options.group;\n    this.hasEnabledEvents = options.hasEnabledEvents;\n    this.modifierOptions = options.modifierOptions;\n    this.name = options.name;\n    this.onStateCallback = options.onStateCallback;\n    this.scheduler = options.scheduler;\n\n    this.guid = makeGuid();\n    this.guids = {};\n    this.guids[this.guid] = true;\n    if (this.group) {\n      Object.assign(this.guids, this.group.guids);\n    }\n  }\n\n  cancelAll(options) {\n    let { reason, cancelRequestKind, resetState } = options || {};\n    reason = reason || '.cancelAll() was explicitly called on the Task';\n\n    let cancelRequest = new CancelRequest(\n      cancelRequestKind || CANCEL_KIND_EXPLICIT,\n      reason,\n    );\n    return this.scheduler.cancelAll(this.guid, cancelRequest).then(() => {\n      if (resetState) {\n        this._resetState();\n      }\n    });\n  }\n\n  get _isAlive() {\n    return true;\n  }\n\n  _resetState() {\n    this.setState(DEFAULT_STATE);\n  }\n\n  // override\n  setState() {}\n}\n\nObject.assign(Taskable.prototype, DEFAULT_STATE);\nObject.assign(Taskable.prototype, {\n  numRunning: 0,\n  numQueued: 0,\n  isRunning: false,\n  isQueued: false,\n  isIdle: true,\n  state: 'idle',\n});\n","export const cancelableSymbol = '__ec_cancel__';\nexport const yieldableSymbol = '__ec_yieldable__';\nexport const YIELDABLE_CONTINUE = 'next';\nexport const YIELDABLE_THROW = 'throw';\nexport const YIELDABLE_RETURN = 'return';\nexport const YIELDABLE_CANCEL = 'cancel';\n\n/**\n * @class YieldableState\n * @hideconstructor\n */\nclass YieldableState {\n  constructor(taskInstance, resumeIndex) {\n    this._taskInstance = taskInstance;\n    this._resumeIndex = resumeIndex;\n  }\n\n  /**\n   * Return yielded TaskInstance. Useful for introspection on instance state.\n   * @method getTaskInstance\n   * @memberof YieldableState\n   * @public\n   * @instance\n   */\n  getTaskInstance() {\n    return this._taskInstance;\n  }\n\n  /**\n   * Cancel the yielded TaskInstance.\n   * @method cancel\n   * @memberof YieldableState\n   * @public\n   * @instance\n   */\n  cancel() {\n    let taskInstance = this._taskInstance;\n    taskInstance.proceed.call(\n      taskInstance,\n      this._resumeIndex,\n      YIELDABLE_CANCEL,\n    );\n  }\n\n  /**\n   * Cause the TaskInstance to return from its yield with an optional value,\n   * and continue executing.\n   * @method next\n   * @memberof YieldableState\n   * @param value\n   * @public\n   * @instance\n   */\n  next(value) {\n    let taskInstance = this._taskInstance;\n    taskInstance.proceed.call(\n      taskInstance,\n      this._resumeIndex,\n      YIELDABLE_CONTINUE,\n      value,\n    );\n  }\n\n  /**\n   * Short-circuit TaskInstance execution and have it return with an optional\n   * value.\n   * @method return\n   * @memberof YieldableState\n   * @param value\n   * @public\n   * @instance\n   */\n  return(value) {\n    let taskInstance = this._taskInstance;\n    taskInstance.proceed.call(\n      taskInstance,\n      this._resumeIndex,\n      YIELDABLE_RETURN,\n      value,\n    );\n  }\n\n  /**\n   * Raise a given error within the given task instance and halt execution\n   * @method throw\n   * @memberof YieldableState\n   * @param error\n   * @public\n   * @instance\n   */\n  throw(error) {\n    let taskInstance = this._taskInstance;\n    taskInstance.proceed.call(\n      taskInstance,\n      this._resumeIndex,\n      YIELDABLE_THROW,\n      error,\n    );\n  }\n}\n\n/**\n * Yieldables are a primitive for building safe, cancelation-aware ways to\n * instrument and introspect the runtime of a task. Many Yieldables are built-in\n * to ember-concurrency today, such as `timeout`, `animationFrame`, and\n * `rawTimeout`.\n *\n * For example, if I wanted to implement a yieldable for `requestIdleCallback`,\n * I could do the following:\n *\n * ```javascript\n * import Component from '@glimmer/component';\n * import { task, Yieldable } from 'ember-concurrency';\n *\n * class IdleCallbackYieldable extends Yieldable {\n *   onYield(state) {\n *     let callbackId = requestIdleCallback(() => state.next());\n *\n *     return () => cancelIdleCallback(callbackId);\n *   }\n * }\n *\n * const idleCallback = () => new IdleCallbackYieldable();\n *\n * class MyComponent extends Component {\n *   &#64;task *backgroundTask() {\n *     while (1) {\n *       yield idleCallback();\n *\n *       const data = this.complicatedNumberCrunching();\n *       yield this.sendData(data);\n *     }\n *   }\n * }\n * ```\n *\n * In general, `Yieldable` instances **should** be reusable across calls, and thus\n * care should be taken to ensure that teardown is provided and state not\n * intended to be shared across calls stay inside `onYield`.\n *\n * `Yieldable` also provides automatic Promise-casting.\n *\n * <style>\n *   .ignore-this--this-is-here-to-hide-constructor,\n *   #Yieldable { display: none }\n * </style>\n *\n * @class Yieldable\n */\nexport class Yieldable {\n  constructor() {\n    this[yieldableSymbol] = this[yieldableSymbol].bind(this);\n  }\n\n  /**\n   * Defines what happens when the task encounters `yield myYieldable` and returns\n   * a disposer function that handles any cleanup.\n   *\n   * The state parameter is provided by the runtime, and provides operations for\n   * interacting with the yielding task instance and advancing, returning,\n   * throwing, or canceling its execution.\n   *\n   * @method onYield\n   * @memberof Yieldable\n   * @param {YieldableState} state\n   * @instance\n   * @public\n   */\n  onYield() {}\n\n  _deferable() {\n    let def = { resolve: undefined, reject: undefined };\n\n    def.promise = new Promise((resolve, reject) => {\n      def.resolve = resolve;\n      def.reject = reject;\n    });\n\n    return def;\n  }\n\n  _toPromise() {\n    let def = this._deferable();\n\n    let thinInstance = {\n      proceed(_index, resumeType, value) {\n        if (\n          resumeType == YIELDABLE_CONTINUE ||\n          resumeType == YIELDABLE_RETURN\n        ) {\n          def.resolve(value);\n        } else {\n          def.reject(value);\n        }\n      },\n    };\n\n    let maybeDisposer = this[yieldableSymbol](thinInstance, 0);\n    def.promise[cancelableSymbol] = maybeDisposer;\n\n    return def.promise;\n  }\n\n  /**\n   * Returns a promise that resolves with the value yielded back to or returned\n   * to the yielded task, or rejects with either the exception thrown from the\n   * Yieldable, or an error with a `.name` property with value `\"TaskCancelation\"`.\n   *\n   * @method then\n   * @memberof Yieldable\n   * @instance\n   * @return {Promise}\n   */\n  then(...args) {\n    return this._toPromise().then(...args);\n  }\n\n  /**\n   * @method catch\n   * @memberof Yieldable\n   * @instance\n   * @return {Promise}\n   */\n  catch(...args) {\n    return this._toPromise().catch(...args);\n  }\n\n  /**\n   * @method finally\n   * @memberof Yieldable\n   * @instance\n   * @return {Promise}\n   */\n  finally(...args) {\n    return this._toPromise().finally(...args);\n  }\n\n  [yieldableSymbol](taskInstance, resumeIndex) {\n    let state = new YieldableState(taskInstance, resumeIndex);\n\n    return this.onYield(state);\n  }\n}\n\nclass AnimationFrameYieldable extends Yieldable {\n  onYield(state) {\n    let timerId = requestAnimationFrame(() => state.next());\n\n    return () => cancelAnimationFrame(timerId);\n  }\n}\n\nclass ForeverYieldable extends Yieldable {\n  onYield() {}\n}\n\nclass RawTimeoutYieldable extends Yieldable {\n  constructor(ms) {\n    super();\n    this.ms = ms;\n  }\n\n  onYield(state) {\n    let timerId = setTimeout(() => state.next(), this.ms);\n\n    return () => clearTimeout(timerId);\n  }\n}\n\n/**\n * Yielding `animationFrame()` will pause a task until after the next animation\n * frame using the native `requestAnimationFrame()` browser API.\n *\n * The task below, when performed, will print the time since the last loop run\n * for every animation frame.\n *\n * ```js\n * export default class MyComponent extends Component {\n *   &#64;task *myTask() {\n *     let lastNow = performance.now();\n *     while (true) {\n *       yield animationFrame();\n *\n *       let now = performance.now();\n *       let dt = now - lastNow;\n *       lastNow = now;\n *\n *       console.log(dt);\n *     }\n *   }\n * }\n * ```\n */\nexport function animationFrame() {\n  return new AnimationFrameYieldable();\n}\n\n/**\n *\n * Yielding `forever` will pause a task indefinitely until\n * it is cancelled (i.e. via host object destruction, the restartable modifier,\n * or manual cancellation).\n *\n * This is often useful in cases involving animation: if you're\n * using Liquid Fire, or some other animation scheme, sometimes you'll\n * notice buttons visibly reverting to their inactive states during\n * a route transition. By yielding `forever` in a Component task that drives a\n * button's active state, you can keep a task indefinitely running\n * until the animation runs to completion.\n *\n * NOTE: Liquid Fire also includes a useful `waitUntilIdle()` method\n * on the `liquid-fire-transitions` service that you can use in a lot\n * of these cases, but it won't cover cases of asynchrony that are\n * unrelated to animation, in which case `forever` might be better suited\n * to your needs.\n *\n * ```js\n * import { task, forever } from 'ember-concurrency';\n * export default class MyComponent extends Component {\n *   &#64;service myService;\n *   &#64;task *myTask() {\n *     yield this.myService.doSomethingThatCausesATransition();\n *     yield forever;\n *   }\n * }\n * ```\n */\nexport const forever = new ForeverYieldable();\n\n/**\n *\n * Yielding `rawTimeout(ms)` will pause a task for the duration\n * of time passed in, in milliseconds.\n *\n * The timeout will use the native `setTimeout()` browser API,\n * instead of the Ember runloop, which means that test helpers\n * will *not* wait for it to complete.\n *\n * The task below, when performed, will print a message to the\n * console every second.\n *\n * ```js\n * export default class MyComponent extends Component {\n *   &#64;task *myTask() {\n *     while (true) {\n *       console.log(\"Hello!\");\n *       yield rawTimeout(1000);\n *     }\n *   }\n * }\n * ```\n *\n * @param {number} ms - the amount of time to sleep before resuming\n *   the task, in milliseconds\n */\nexport function rawTimeout(ms) {\n  return new RawTimeoutYieldable(ms);\n}\n","import { get } from '@ember/object';\nimport { assert } from '@ember/debug';\n\nexport function taskHelperClosure(helperName, taskMethod, _args, hash) {\n  let task = _args[0];\n  let outerArgs = _args.slice(1);\n\n  return function (...innerArgs) {\n    if (!task || typeof task[taskMethod] !== 'function') {\n      assert(\n        `The first argument passed to the \\`${helperName}\\` helper should be a Task object (without quotes); you passed ${task}`,\n        false,\n      );\n      return;\n    }\n\n    if (hash && hash.value) {\n      let event = innerArgs.pop();\n      innerArgs.push(get(event, hash.value));\n    }\n\n    return task[taskMethod](...outerArgs, ...innerArgs);\n  };\n}\n","import Scheduler from '../external/scheduler/scheduler';\nimport { once } from '@ember/runloop';\n\nclass EmberScheduler extends Scheduler {\n  scheduleRefresh() {\n    once(this, this.refresh);\n  }\n}\n\nexport default EmberScheduler;\n","import { assert } from '@ember/debug';\nimport { get } from '@ember/object';\nimport { addListener } from '@ember/object/events';\nimport { addObserver } from '@ember/object/observers';\nimport { scheduleOnce } from '@ember/runloop';\nimport {\n  registerModifier,\n  TaskFactory as BaseTaskFactory,\n} from './external/task-factory';\n\nimport { Task, EncapsulatedTask } from './task';\nimport { TaskProperty } from './task-properties';\nimport { TaskGroup } from './task-group';\nimport EmberScheduler from './scheduler/ember-scheduler';\nimport { EMBER_ENVIRONMENT } from './ember-environment';\n\nlet handlerCounter = 0;\n\nfunction registerOnPrototype(\n  addListenerOrObserver,\n  proto,\n  names,\n  taskName,\n  taskMethod,\n  once,\n) {\n  if (names && names.length > 0) {\n    for (let i = 0; i < names.length; ++i) {\n      let name = names[i];\n\n      let handlerName = `__ember_concurrency_handler_${handlerCounter++}`;\n      proto[handlerName] = makeTaskCallback(taskName, taskMethod, once);\n      addListenerOrObserver(proto, name, null, handlerName);\n    }\n  }\n}\n\nfunction makeTaskCallback(taskName, method, once) {\n  return function () {\n    let task = get(this, taskName);\n\n    if (once) {\n      scheduleOnce('actions', task, method, ...arguments);\n    } else {\n      task[method].apply(task, arguments);\n    }\n  };\n}\n\nconst ensureArray = (possibleArr) =>\n  Array.isArray(possibleArr) ? possibleArr : [possibleArr];\n\nregisterModifier('cancelOn', (factory, eventNames) =>\n  factory.addCancelEvents(...ensureArray(eventNames)),\n);\nregisterModifier('observes', (factory, propertyPaths) =>\n  factory.addObserverKeys(...ensureArray(propertyPaths)),\n);\nregisterModifier('on', (factory, eventNames) =>\n  factory.addPerformEvents(...ensureArray(eventNames)),\n);\n\nexport class TaskFactory extends BaseTaskFactory {\n  env = EMBER_ENVIRONMENT;\n\n  createTask(context) {\n    assert(\n      `Cannot create task if a task definition is not provided as generator function or encapsulated task.`,\n      this.taskDefinition,\n    );\n\n    let options = this.getTaskOptions(context);\n\n    if (typeof this.taskDefinition === 'object') {\n      return new EncapsulatedTask(\n        Object.assign({ taskObj: this.taskDefinition }, options),\n      );\n    } else {\n      return new Task(\n        Object.assign(\n          {\n            generatorFactory: (args) =>\n              this.taskDefinition.apply(context, args),\n          },\n          options,\n        ),\n      );\n    }\n  }\n\n  createTaskGroup(context) {\n    assert(\n      `A task definition is not expected for a task group.`,\n      !this.taskDefinition,\n    );\n    let options = this.getTaskOptions(context);\n\n    return new TaskGroup(options);\n  }\n\n  addCancelEvents(...cancelEventNames) {\n    this._cancelEventNames = this._cancelEventNames || [];\n    this._cancelEventNames.push(...cancelEventNames);\n    return this;\n  }\n\n  addObserverKeys(...keys) {\n    this._observes = this._observes || [];\n    this._observes.push(...keys);\n    return this;\n  }\n\n  addPerformEvents(...eventNames) {\n    this._eventNames = this._eventNames || [];\n    this._eventNames.push(...eventNames);\n    return this;\n  }\n\n  getModifier(name) {\n    let modifier = super.getModifier(name);\n    if (!modifier && typeof TaskProperty.prototype[name] === 'function') {\n      // Shim for compatibility with user-defined TaskProperty prototype\n      // extensions. To be removed when replaced with proper public API.\n      modifier = TaskProperty.prototype[name].bind(this);\n    }\n\n    assert(\n      `Task option '${name}' is not recognized as a supported option.`,\n      modifier,\n    );\n\n    return modifier;\n  }\n\n  getScheduler(schedulerPolicy, stateTrackingEnabled) {\n    return new EmberScheduler(schedulerPolicy, stateTrackingEnabled);\n  }\n\n  _setupEmberKVO(proto) {\n    // TODO: Does this make sense in a post-Ember object world?\n\n    registerOnPrototype(\n      addListener,\n      proto,\n      this._eventNames,\n      this.name,\n      'perform',\n      false,\n    );\n    registerOnPrototype(\n      addListener,\n      proto,\n      this._cancelEventNames,\n      this.name,\n      'cancelAll',\n      false,\n    );\n    registerOnPrototype(\n      addObserver,\n      proto,\n      this._observes,\n      this.name,\n      'perform',\n      true,\n    );\n  }\n\n  // Provided for compatibility with ember-concurrency TaskProperty extension\n  // methods\n  get taskFn() {\n    return this.taskDefinition;\n  }\n\n  set taskFn(fn) {\n    this.setTaskDefinition(fn);\n  }\n}\n","import { TaskGroup as TaskGroupBase } from './external/task/task-group';\nimport { TASKABLE_MIXIN } from './taskable-mixin';\nimport { TRACKED_INITIAL_TASK_STATE } from './tracked-state';\n\n/**\n * \"Task Groups\" provide a means for applying\n * task modifiers to groups of tasks. Once a {@linkcode Task} is declared\n * as part of a group task, modifiers like `drop` or `restartable`\n * will no longer affect the individual `Task`. Instead those\n * modifiers can be applied to the entire group.\n *\n * Turns the decorated property into a task group.\n *\n * Optionally takes a hash of options that will be applied as modifiers to the\n * task group. For instance `maxConcurrency` or `keepLatest`.\n *\n * ```js\n * import Component from '@glimmer/component';\n * import { task, taskGroup } from 'ember-concurrency';\n *\n * class MyComponent extends Component {\n *   &#64;taskGroup({ maxConcurrency: 5 }) chores;\n *\n *   &#64;task({ group: 'chores' })\n *   *mowLawn() {}\n *\n *   &#64;task({ group: 'chores' })\n *   *doDishes() {}\n * }\n * ```\n *\n * <style>\n *  .ignore-this--this-is-here-to-hide-constructor,\n *  #TaskGroup { display: none }\n * </style>\n *\n * @class TaskGroup\n */\nexport class TaskGroup extends TaskGroupBase {\n  /**\n   * Cancels all running or queued `TaskInstance`s for this task group.\n   * If you're trying to cancel a specific TaskInstance (rather\n   * than all of the instances running under this task group) call\n   * `.cancel()` on the specific TaskInstance.\n   *\n   * @method cancelAll\n   * @memberof TaskGroup\n   * @param options.reason A descriptive reason the task group was\n   *   cancelled. Defaults to `\".cancelAll() was explicitly called\n   *   on the Task\"`.\n   * @param options.resetState If true, will clear the task group state\n   *   (`last*` and `performCount` properties will be set to initial\n   *   values). Defaults to false.\n   * @instance\n   * @async\n   *\n   */\n  /**\n   * `true` if any current task instances are running.\n   *\n   * @memberof TaskGroup\n   * @member {boolean} isRunning\n   * @instance\n   * @readOnly\n   */\n  /**\n   * `true` if any future task instances are queued.\n   *\n   * @memberof TaskGroup\n   * @member {boolean} isQueued\n   * @instance\n   * @readOnly\n   */\n  /**\n   * `true` if the task is not in the running or queued state.\n   *\n   * @memberof TaskGroup\n   * @member {boolean} isIdle\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The current state of the task: `\"running\"`, `\"queued\"` or `\"idle\"`.\n   *\n   * @memberof TaskGroup\n   * @member {string} state\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The most recently started task instance.\n   *\n   * @memberof TaskGroup\n   * @member {TaskInstance} last\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The most recent task instance that is currently running.\n   *\n   * @memberof TaskGroup\n   * @member {TaskInstance} lastRunning\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The most recently performed task instance.\n   *\n   * @memberof TaskGroup\n   * @member {TaskInstance} lastPerformed\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The most recent task instance that succeeded.\n   *\n   * @memberof TaskGroup\n   * @member {TaskInstance} lastSuccessful\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The most recently completed task instance.\n   *\n   * @memberof TaskGroup\n   * @member {TaskInstance} lastComplete\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The most recent task instance that errored.\n   *\n   * @memberof TaskGroup\n   * @member {TaskInstance} lastErrored\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The most recently canceled task instance.\n   *\n   * @memberof TaskGroup\n   * @member {TaskInstance} lastCanceled\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The most recent task instance that is incomplete.\n   *\n   * @memberof TaskGroup\n   * @member {TaskInstance} lastIncomplete\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The number of times this task has been performed.\n   *\n   * @memberof TaskGroup\n   * @member {number} performCount\n   * @instance\n   * @readOnly\n   */\n}\n\nif (TRACKED_INITIAL_TASK_STATE) {\n  Object.defineProperties(TaskGroup.prototype, TRACKED_INITIAL_TASK_STATE);\n}\n\nObject.assign(TaskGroup.prototype, TASKABLE_MIXIN);\n","import { INITIAL_STATE } from './initial-state';\nimport { yieldableSymbol } from '../yieldables';\nimport { CancelRequest, CANCEL_KIND_EXPLICIT } from './cancelation';\nconst EXPLICIT_CANCEL_REASON = '.cancel() was explicitly called';\n\nexport class BaseTaskInstance {\n  constructor({ task, args, executor, performType, hasEnabledEvents }) {\n    this.task = task;\n    this.args = args;\n    this.performType = performType;\n    this.executor = executor;\n    this.executor.taskInstance = this;\n    this.hasEnabledEvents = hasEnabledEvents;\n  }\n\n  setState() {}\n  onStarted() {}\n  onSuccess() {}\n  onError() {}\n  onCancel() {}\n  formatCancelReason() {}\n  selfCancelLoopWarning() {}\n\n  onFinalize(callback) {\n    this.executor.onFinalize(callback);\n  }\n\n  proceed(index, yieldResumeType, value) {\n    this.executor.proceedChecked(index, yieldResumeType, value);\n  }\n\n  [yieldableSymbol](parentTaskInstance, resumeIndex) {\n    return this.executor.onYielded(parentTaskInstance, resumeIndex);\n  }\n\n  cancel(cancelReason = EXPLICIT_CANCEL_REASON) {\n    this.executor.cancel(new CancelRequest(CANCEL_KIND_EXPLICIT, cancelReason));\n  }\n\n  then(...args) {\n    return this.executor.promise().then(...args);\n  }\n\n  catch(...args) {\n    return this.executor.promise().catch(...args);\n  }\n\n  finally(...args) {\n    return this.executor.promise().finally(...args);\n  }\n\n  toString() {\n    return `${this.task} TaskInstance`;\n  }\n\n  start() {\n    this.executor.start();\n    return this;\n  }\n}\n\nObject.assign(BaseTaskInstance.prototype, INITIAL_STATE);\nObject.assign(BaseTaskInstance.prototype, {\n  state: 'waiting',\n  isDropped: false,\n  isRunning: true,\n});\n","import { BaseTaskInstance } from './external/task-instance/base';\nimport { TRACKED_INITIAL_INSTANCE_STATE } from './tracked-state';\n\n/**\n  A `TaskInstance` represent a single execution of a\n  {@linkcode Task}. Every call to {@linkcode Task#perform} returns\n  a `TaskInstance`.\n\n  `TaskInstance`s are cancelable, either explicitly\n  via {@linkcode TaskInstance#cancel} or {@linkcode Task#cancelAll},\n  or automatically due to the host object being destroyed, or\n  because concurrency policy enforced by a\n  {@linkcode TaskProperty Task Modifier} canceled the task instance.\n\n  <style>\n    .ignore-this--this-is-here-to-hide-constructor,\n    #TaskInstance { display: none }\n  </style>\n\n  @class TaskInstance\n*/\n\nexport class TaskInstance extends BaseTaskInstance {\n  setState(props) {\n    let state = this._recomputeState(props);\n    Object.assign(this, {\n      ...props,\n      isRunning: !props.isFinished,\n      isDropped: state === 'dropped',\n      state,\n    });\n  }\n\n  _recomputeState(props) {\n    if (props.isDropped) {\n      return 'dropped';\n    } else if (props.isCanceled) {\n      if (props.hasStarted) {\n        return 'canceled';\n      } else {\n        return 'dropped';\n      }\n    } else if (props.isFinished) {\n      return 'finished';\n    } else if (props.hasStarted) {\n      return 'running';\n    } else {\n      return 'waiting';\n    }\n  }\n\n  onStarted() {\n    this.triggerEvent('started', this);\n  }\n\n  onSuccess() {\n    this.triggerEvent('succeeded', this);\n  }\n\n  onError(error) {\n    this.triggerEvent('errored', this, error);\n  }\n\n  onCancel(cancelReason) {\n    this.triggerEvent('canceled', this, cancelReason);\n  }\n\n  formatCancelReason(reason) {\n    return `TaskInstance '${this.getName()}' was canceled because ${reason}. For more information, see: http://ember-concurrency.com/docs/task-cancelation-help`;\n  }\n\n  getName() {\n    if (!this.name) {\n      this.name = (this.task && this.task.name) || '<unknown>';\n    }\n    return this.name;\n  }\n\n  selfCancelLoopWarning(parent) {\n    let parentName = `\\`${parent.getName()}\\``;\n    let childName = `\\`${this.getName()}\\``;\n    // eslint-disable-next-line no-console\n    console.warn(\n      `ember-concurrency detected a potentially hazardous \"self-cancel loop\" between parent task ${parentName} and child task ${childName}. If you want child task ${childName} to be canceled when parent task ${parentName} is canceled, please change \\`.perform()\\` to \\`.linked().perform()\\`. If you want child task ${childName} to keep running after parent task ${parentName} is canceled, change it to \\`.unlinked().perform()\\``,\n    );\n  }\n\n  triggerEvent(...allArgs) {\n    if (!this.hasEnabledEvents) {\n      return;\n    }\n\n    let taskInstance = this;\n    let task = taskInstance.task;\n    let host = task.context;\n    let eventNamespace = task && task.name;\n\n    if (host && host.trigger && eventNamespace) {\n      let [eventType, ...args] = allArgs;\n      host.trigger(`${eventNamespace}:${eventType}`, ...args);\n    }\n  }\n\n  /**\n   * Describes the state that the task instance is in. Can be used for debugging,\n   * or potentially driving some UI state. Possible values are:\n   *\n   * - `\"dropped\"`: task instance was canceled before it started\n   * - `\"canceled\"`: task instance was canceled before it could finish\n   * - `\"finished\"`: task instance ran to completion (even if an exception was thrown)\n   * - `\"running\"`: task instance is currently running (returns true even if\n   *     is paused on a yielded promise)\n   * - `\"waiting\"`: task instance hasn't begun running yet (usually\n   *     because the task is using the {@linkcode TaskProperty#enqueue enqueue}\n   *     task modifier)\n   *\n   * The animated timeline examples on the [Task Concurrency](/docs/task-concurrency)\n   * docs page make use of this property.\n   *\n   * @name state\n   * @memberof TaskInstance\n   * @instance\n   * @readOnly\n   */\n\n  /**\n   * True if the TaskInstance was canceled before it could\n   * ever start running. For example, calling\n   * {@linkcode Task#perform .perform()} twice on a\n   * task with the {@linkcode TaskProperty#drop drop} modifier applied\n   * will result in the second task instance being dropped.\n   *\n   * @name isDropped\n   * @memberof TaskInstance\n   * @instance\n   * @readOnly\n   */\n\n  /**\n   * True if the task is still running.\n   *\n   * @name isRunning\n   * @memberof TaskInstance\n   * @instance\n   * @readOnly\n   */\n\n  /**\n   * Event emitted when a new {@linkcode TaskInstance} starts executing.\n   *\n   * `on` from `@ember/object/evented` may be used to create a binding on the host object to the event.\n   *\n   * ```js\n   * export default Component.extend({\n   *   doSomething: task(function * () {\n   *     // ... does something\n   *   }),\n   *\n   *   onDoSomethingStarted: on('doSomething:started', function (taskInstance) {\n   *     // ...\n   *   })\n   * });\n   * ```\n   *\n   * @event TaskInstance#TASK_NAME:started\n   * @param {TaskInstance} taskInstance - Task instance that was started\n   */\n\n  /**\n   * Event emitted when a {@linkcode TaskInstance} succeeds.\n   *\n   * `on` from `@ember/object/evented` may be used to create a binding on the host object to the event.\n   *\n   * ```js\n   * export default Component.extend({\n   *   doSomething: task(function * () {\n   *     // ... does something\n   *   }),\n   *\n   *   onDoSomethingSucceeded: on('doSomething:succeeded', function (taskInstance) {\n   *     // ...\n   *   })\n   * });\n   * ```\n   *\n   * @event TaskInstance#TASK_NAME:succeeded\n   * @param {TaskInstance} taskInstance - Task instance that was succeeded\n   */\n\n  /**\n   * Event emitted when a {@linkcode TaskInstance} throws an an error that is\n   * not handled within the task itself.\n   *\n   * `on` from `@ember/object/evented` may be used to create a binding on the host object to the event.\n   *\n   * ```js\n   * export default Component.extend({\n   *   doSomething: task(function * () {\n   *     // ... does something\n   *   }),\n   *\n   *   onDoSomethingErrored: on('doSomething:errored', function (taskInstance, error) {\n   *     // ...\n   *   })\n   * });\n   * ```\n   *\n   * @event TaskInstance#TASK_NAME:errored\n   * @param {TaskInstance} taskInstance - Task instance that was started\n   * @param {Error} error - Error that was thrown by the task instance\n   */\n\n  /**\n   * Event emitted when a {@linkcode TaskInstance} is canceled.\n   *\n   * `on` from `@ember/object/evented` may be used to create a binding on the host object to the event.\n   *\n   * ```js\n   * export default Component.extend({\n   *   doSomething: task(function * () {\n   *     // ... does something\n   *   }),\n   *\n   *   onDoSomethingCanceled: on('doSomething:canceled', function (taskInstance, cancelationReason) {\n   *     // ...\n   *   })\n   * });\n   * ```\n   *\n   * @event TaskInstance#TASK_NAME:canceled\n   * @param {TaskInstance} taskInstance - Task instance that was started\n   * @param {string} cancelationReason - Cancelation reason that was was provided to {@linkcode TaskInstance#cancel}\n   */\n\n  /**\n   * Cancels the task instance. Has no effect if the task instance has\n   * already been canceled or has already finished running.\n   *\n   * @method cancel\n   * @memberof TaskInstance\n   * @instance\n   * @async\n   */\n\n  /**\n   * Returns a promise that resolves with the value returned\n   * from the task's (generator) function, or rejects with\n   * either the exception thrown from the task function, or\n   * an error with a `.name` property with value `\"TaskCancelation\"`.\n   *\n   * @method then\n   * @memberof TaskInstance\n   * @instance\n   * @return {Promise}\n   */\n\n  /**\n   * @method catch\n   * @memberof TaskInstance\n   * @instance\n   * @return {Promise}\n   */\n\n  /**\n   * @method finally\n   * @memberof TaskInstance\n   * @instance\n   * @return {Promise}\n   */\n}\n\nif (TRACKED_INITIAL_INSTANCE_STATE) {\n  Object.defineProperties(\n    TaskInstance.prototype,\n    TRACKED_INITIAL_INSTANCE_STATE,\n  );\n}\n","import Ember from 'ember';\n\nimport { computed } from '@ember/object';\n\nimport EnqueueSchedulerPolicy from './external/scheduler/policies/enqueued-policy';\nimport DropSchedulerPolicy from './external/scheduler/policies/drop-policy';\nimport KeepLatestSchedulerPolicy from './external/scheduler/policies/keep-latest-policy';\nimport RestartableSchedulerPolicy from './external/scheduler/policies/restartable-policy';\n\nexport let taskFactorySymbol = '__ec_task_factory';\n\nexport const propertyModifiers = {\n  /**\n   * Configures the task to cancel old currently task instances\n   * to make room for a new one to perform. Sets default\n   * maxConcurrency to 1.\n   *\n   * [See the Live Example](/docs/examples/route-tasks/1)\n   *\n   * @method restartable\n   * @memberof TaskProperty\n   * @instance\n   */\n  restartable() {\n    this[taskFactorySymbol].setBufferPolicy(RestartableSchedulerPolicy);\n    return this;\n  },\n\n  /**\n   * Configures the task to run task instances one-at-a-time in\n   * the order they were `.perform()`ed. Sets default\n   * maxConcurrency to 1.\n   *\n   * @method enqueue\n   * @memberof TaskProperty\n   * @instance\n   */\n  enqueue() {\n    this[taskFactorySymbol].setBufferPolicy(EnqueueSchedulerPolicy);\n    return this;\n  },\n\n  /**\n   * Configures the task to immediately cancel (i.e. drop) any\n   * task instances performed when the task is already running\n   * at maxConcurrency. Sets default maxConcurrency to 1.\n   *\n   * @method drop\n   * @memberof TaskProperty\n   * @instance\n   */\n  drop() {\n    this[taskFactorySymbol].setBufferPolicy(DropSchedulerPolicy);\n    return this;\n  },\n\n  /**\n   * Configures the task to drop all but the most recently\n   * performed {@linkcode TaskInstance }.\n   *\n   * @method keepLatest\n   * @memberof TaskProperty\n   * @instance\n   */\n  keepLatest() {\n    this[taskFactorySymbol].setBufferPolicy(KeepLatestSchedulerPolicy);\n    return this;\n  },\n\n  /**\n   * Sets the maximum number of task instances that are allowed\n   * to run at the same time. By default, with no task modifiers\n   * applied, this number is Infinity (there is no limit\n   * to the number of tasks that can run at the same time).\n   * {@linkcode TaskProperty#restartable .restartable},\n   * {@linkcode TaskProperty#enqueue .enqueue}, and\n   * {@linkcode TaskProperty#drop .drop} set the default\n   * maxConcurrency to 1, but you can override this value\n   * to set the maximum number of concurrently running tasks\n   * to a number greater than 1.\n   *\n   * [See the AJAX Throttling example](/docs/examples/ajax-throttling)\n   *\n   * The example below uses a task with `maxConcurrency(3)` to limit\n   * the number of concurrent AJAX requests (for anyone using this task)\n   * to 3.\n   *\n   * ```js\n   * doSomeAjax: task(function * (url) {\n   *   return fetch(url);\n   * }).maxConcurrency(3),\n   *\n   * elsewhere() {\n   *   this.doSomeAjax.perform(\"http://www.example.com/json\");\n   * },\n   * ```\n   *\n   * @method maxConcurrency\n   * @memberof TaskProperty\n   * @param {Number} n The maximum number of concurrently running tasks\n   * @instance\n   */\n  maxConcurrency(n) {\n    this[taskFactorySymbol].setMaxConcurrency(n);\n    return this;\n  },\n\n  /**\n   * Adds this task to a TaskGroup so that concurrency constraints\n   * can be shared between multiple tasks.\n   *\n   * [See the Task Group docs for more information](/docs/task-groups)\n   *\n   * @method group\n   * @memberof TaskProperty\n   * @param {String} groupPath A path to the TaskGroup property\n   * @instance\n   */\n  group(taskGroupPath) {\n    this[taskFactorySymbol].setGroup(taskGroupPath);\n    return this;\n  },\n\n  /**\n   * Activates lifecycle events, allowing Evented host objects to react to task state\n   * changes.\n   *\n   * ```js\n   *\n   * export default Component.extend({\n   *   uploadTask: task(function* (file) {\n   *     // ... file upload stuff\n   *   }).evented(),\n   *\n   *   uploadedStarted: on('uploadTask:started', function(taskInstance) {\n   *     this.analytics.track(\"User Photo: upload started\");\n   *   }),\n   * });\n   * ```\n   *\n   * @method evented\n   * @memberof TaskProperty\n   * @instance\n   */\n  evented() {\n    this[taskFactorySymbol].setEvented(true);\n    return this;\n  },\n\n  /**\n   * Logs lifecycle events to aid in debugging unexpected Task behavior.\n   * Presently only logs cancelation events and the reason for the cancelation,\n   * e.g. \"TaskInstance 'doStuff' was canceled because the object it lives on was destroyed or unrendered\"\n   *\n   * @method debug\n   * @memberof TaskProperty\n   * @instance\n   */\n  debug() {\n    this[taskFactorySymbol].setDebug(true);\n    return this;\n  },\n\n  /**\n   * Configures the task to call the passed in callback for derived state updates,\n   * overriding the default derived state tracking. You may call with `null` to\n   * completely opt-out of derived state tracking.\n   *\n   * @method onState\n   * @memberof TaskProperty\n   * @param {function?} callback Callback to be called. Receives an object argument with the new state.\n   * @instance\n   */\n  onState(callback) {\n    this[taskFactorySymbol].setOnState(callback);\n    return this;\n  },\n};\n\n/**\n  A {@link TaskProperty} is the Computed Property-like object returned\n  from the {@linkcode task} function. You can call Task Modifier methods\n  on this object to configure the behavior of the {@link Task}.\n\n  See [Managing Task Concurrency](/docs/task-concurrency) for an\n  overview of all the different task modifiers you can use and how\n  they impact automatic cancelation / enqueueing of task instances.\n\n  {@link TaskProperty} is only used for supporting \"classic\" Ember objects.\n  When using Native JavaScript or TypeScript classes, you will use [task decorators](/docs/task-decorators)\n  on methods instead.\n\n  @class TaskProperty\n*/\nexport class TaskProperty {}\nexport class TaskGroupProperty {}\n\nObject.assign(TaskGroupProperty.prototype, propertyModifiers);\nObject.assign(TaskProperty.prototype, propertyModifiers, {\n  setup(proto, key) {\n    if (this.callSuperSetup) {\n      this.callSuperSetup(...arguments);\n    }\n\n    this[taskFactorySymbol].setName(key);\n    this[taskFactorySymbol]._setupEmberKVO(proto);\n  },\n\n  /**\n   * Calling `task(...).on(eventName)` configures the task to be\n   * automatically performed when the specified events fire. In\n   * this way, it behaves like\n   * [Ember.on](http://emberjs.com/api/classes/Ember.html#method_on).\n   *\n   * You can use `task(...).on('init')` to perform the task\n   * when the host object is initialized.\n   *\n   * ```js\n   * export default Component.extend({\n   *   pollForUpdates: task(function * () {\n   *     // ... this runs when the Component is first created\n   *     // because we specified .on('init')\n   *   }).on('init'),\n   *\n   *   handleFoo: task(function * (a, b, c) {\n   *     // this gets performed automatically if the 'foo'\n   *     // event fires on this Component,\n   *     // e.g., if someone called component.trigger('foo')\n   *   }).on('foo'),\n   * });\n   * ```\n   *\n   * @method on\n   * @memberof TaskProperty\n   * @param {String} eventNames*\n   * @instance\n   */\n  on() {\n    this[taskFactorySymbol].addPerformEvents(...arguments);\n    return this;\n  },\n\n  /**\n   * This behaves like the {@linkcode TaskProperty#on task(...).on() modifier},\n   * but instead will cause the task to be canceled if any of the\n   * specified events fire on the parent object.\n   *\n   * [See the Live Example](/docs/examples/route-tasks/1)\n   *\n   * @method cancelOn\n   * @memberof TaskProperty\n   * @param {String} eventNames*\n   * @instance\n   */\n  cancelOn() {\n    this[taskFactorySymbol].addCancelEvents(...arguments);\n    return this;\n  },\n\n  /**\n   * This behaves like the {@linkcode TaskProperty#on task(...).on() modifier},\n   * but instead will cause the task to be performed if any of the\n   * specified properties on the parent object change.\n   *\n   * @method observes\n   * @memberof TaskProperty\n   * @param {String} keys*\n   * @instance\n   */\n  observes() {\n    this[taskFactorySymbol].addObserverKeys(...arguments);\n    return this;\n  },\n});\n\nconst setDecorator = Ember._setClassicDecorator || Ember._setComputedDecorator;\nexport function taskComputed(fn) {\n  let cp = function (proto, key) {\n    if (cp.setup !== undefined) {\n      cp.setup(proto, key);\n    }\n\n    return computed(fn)(...arguments);\n  };\n\n  setDecorator(cp);\n\n  return cp;\n}\n","import { setOwner, getOwner } from '@ember/application';\nimport EmberObject, { get, set } from '@ember/object';\nimport { isDestroying, registerDestructor } from '@ember/destroyable';\nimport { Task as BaseTask } from './external/task/task';\nimport { TaskInstance } from './task-instance';\nimport { TaskInstanceExecutor } from './external/task-instance/executor';\nimport { TASKABLE_MIXIN } from './taskable-mixin';\nimport { TRACKED_INITIAL_TASK_STATE } from './tracked-state';\nimport { CANCEL_KIND_LIFESPAN_END } from './external/task-instance/cancelation';\n\n/**\n  The `Task` object lives on a host Ember object (e.g.\n  a Component, Route, or Controller). You call the\n  {@linkcode Task#perform .perform()} method on this object\n  to create run individual {@linkcode TaskInstance}s,\n  and at any point, you can call the {@linkcode Task#cancelAll .cancelAll()}\n  method on this object to cancel all running or enqueued\n  {@linkcode TaskInstance}s.\n\n  <style>\n    .ignore-this--this-is-here-to-hide-constructor,\n    #Task { display: none }\n  </style>\n\n  @class Task\n*/\nexport class Task extends BaseTask {\n  /**\n   * `true` if any current task instances are running.\n   *\n   * @memberof Task\n   * @member {boolean} isRunning\n   * @instance\n   * @readOnly\n   */\n  /**\n   * `true` if any future task instances are queued.\n   *\n   * @memberof Task\n   * @member {boolean} isQueued\n   * @instance\n   * @readOnly\n   */\n  /**\n   * `true` if the task is not in the running or queued state.\n   *\n   * @memberof Task\n   * @member {boolean} isIdle\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The current state of the task: `\"running\"`, `\"queued\"` or `\"idle\"`.\n   *\n   * @memberof Task\n   * @member {string} state\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The most recently started task instance.\n   *\n   * @memberof Task\n   * @member {TaskInstance} last\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The most recent task instance that is currently running.\n   *\n   * @memberof Task\n   * @member {TaskInstance} lastRunning\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The most recently performed task instance.\n   *\n   * @memberof Task\n   * @member {TaskInstance} lastPerformed\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The most recent task instance that succeeded.\n   *\n   * @memberof Task\n   * @member {TaskInstance} lastSuccessful\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The most recently completed task instance.\n   *\n   * @memberof Task\n   * @member {TaskInstance} lastComplete\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The most recent task instance that errored.\n   *\n   * @memberof Task\n   * @member {TaskInstance} lastErrored\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The most recently canceled task instance.\n   *\n   * @memberof Task\n   * @member {TaskInstance} lastCanceled\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The most recent task instance that is incomplete.\n   *\n   * @memberof Task\n   * @member {TaskInstance} lastIncomplete\n   * @instance\n   * @readOnly\n   */\n  /**\n   * The number of times this task has been performed.\n   *\n   * @memberof Task\n   * @member {number} performCount\n   * @instance\n   * @readOnly\n   */\n\n  constructor(options) {\n    super(options);\n\n    if (!isDestroying(this.context)) {\n      registerDestructor(this.context, () => {\n        this.cancelAll({\n          reason: 'the object it lives on was destroyed or unrendered',\n          cancelRequestKind: CANCEL_KIND_LIFESPAN_END,\n        });\n      });\n    }\n  }\n\n  /**\n   * Flags the task as linked to the parent task's lifetime. Must be called\n   * within another task's perform function. The task will be cancelled if the\n   * parent task is canceled as well.\n   *\n   * ember-concurrency will indicate when this may be needed.\n   *\n   * @method linked\n   * @memberof Task\n   * @instance\n   *\n   */\n\n  /**\n   * Flags the task as not linked to the parent task's lifetime. Must be called\n   * within another task's perform function. The task will NOT be cancelled if the\n   * parent task is canceled.\n   *\n   * This is useful for avoiding the so-called \"self-cancel loop\" for tasks.\n   * ember-concurrency will indicate when this may be needed.\n   *\n   * @method unlinked\n   * @memberof Task\n   * @instance\n   *\n   */\n\n  /**\n   * Creates a new {@linkcode TaskInstance} and attempts to run it right away.\n   * If running this task instance would increase the task's concurrency\n   * to a number greater than the task's maxConcurrency, this task\n   * instance might be immediately canceled (dropped), or enqueued\n   * to run at later time, after the currently running task(s) have finished.\n   *\n   * @method perform\n   * @memberof Task\n   * @param {*} arg* - args to pass to the task function\n   * @instance\n   *\n   * @fires TaskInstance#TASK_NAME:started\n   * @fires TaskInstance#TASK_NAME:succeeded\n   * @fires TaskInstance#TASK_NAME:errored\n   * @fires TaskInstance#TASK_NAME:canceled\n   *\n   */\n\n  /**\n   * Cancels all running or queued `TaskInstance`s for this Task.\n   * If you're trying to cancel a specific TaskInstance (rather\n   * than all of the instances running under this task) call\n   * `.cancel()` on the specific TaskInstance.\n   *\n   * @method cancelAll\n   * @memberof Task\n   * @param options.reason A descriptive reason the task was\n   *   cancelled. Defaults to `\".cancelAll() was explicitly called\n   *   on the Task\"`.\n   * @param options.resetState If true, will clear the task state\n   *   (`last*` and `performCount` properties will be set to initial\n   *   values). Defaults to false.\n   * @instance\n   * @async\n   *\n   */\n\n  get _isAlive() {\n    return !isDestroying(this.context);\n  }\n\n  _taskInstanceFactory(args, performType, linkedObject) {\n    let options = this._taskInstanceOptions(args, performType, linkedObject);\n    let taskInstance = new TaskInstance(options);\n    return taskInstance;\n  }\n\n  _clone() {\n    return new Task({\n      context: this.context,\n      debug: this.debug,\n      env: this.env,\n      generatorFactory: this.generatorFactory,\n      group: this.group,\n      hasEnabledEvents: this.hasEnabledEvents,\n      name: this.name,\n      onStateCallback: this.onStateCallback,\n      scheduler: this.scheduler,\n    });\n  }\n}\n\nif (TRACKED_INITIAL_TASK_STATE) {\n  Object.defineProperties(Task.prototype, TRACKED_INITIAL_TASK_STATE);\n}\n\nObject.assign(Task.prototype, TASKABLE_MIXIN);\n\nconst currentTaskInstanceSymbol = '__ec__encap_current_ti';\nexport class EncapsulatedTask extends Task {\n  constructor(options) {\n    super(options);\n    this.taskObj = options.taskObj;\n    this._encapsulatedTaskStates = new WeakMap();\n    this._encapsulatedTaskInstanceProxies = new WeakMap();\n  }\n\n  _getEncapsulatedTaskClass() {\n    let encapsulatedTaskImplClass = this._encapsulatedTaskImplClass;\n\n    if (!encapsulatedTaskImplClass) {\n      // eslint-disable-next-line ember/no-classic-classes\n      encapsulatedTaskImplClass = EmberObject.extend(this.taskObj, {\n        unknownProperty(key) {\n          let currentInstance = this[currentTaskInstanceSymbol];\n          return currentInstance ? currentInstance[key] : undefined;\n        },\n      });\n    }\n\n    return encapsulatedTaskImplClass;\n  }\n\n  _taskInstanceFactory(args, performType) {\n    let owner = getOwner(this.context);\n    let taskInstanceProxy;\n    let encapsulatedTaskImpl = this._getEncapsulatedTaskClass().create({\n      context: this.context,\n    });\n    setOwner(encapsulatedTaskImpl, owner);\n\n    let generatorFactory = () =>\n      encapsulatedTaskImpl.perform.apply(taskInstanceProxy, args);\n    let taskInstance = new TaskInstance({\n      task: this,\n      args,\n      executor: new TaskInstanceExecutor({\n        generatorFactory,\n        env: this.env,\n        debug: this.debug,\n      }),\n      performType,\n      hasEnabledEvents: this.hasEnabledEvents,\n    });\n    encapsulatedTaskImpl[currentTaskInstanceSymbol] = taskInstance;\n\n    this._encapsulatedTaskStates.set(taskInstance, encapsulatedTaskImpl);\n\n    taskInstanceProxy = this._wrappedEncapsulatedTaskInstance(taskInstance);\n\n    return taskInstanceProxy;\n  }\n\n  _wrappedEncapsulatedTaskInstance(taskInstance) {\n    if (!taskInstance) {\n      return null;\n    }\n\n    let _encapsulatedTaskInstanceProxies =\n      this._encapsulatedTaskInstanceProxies;\n    let proxy = _encapsulatedTaskInstanceProxies.get(taskInstance);\n\n    if (!proxy) {\n      let encapsulatedTaskImpl = this._encapsulatedTaskStates.get(taskInstance);\n\n      proxy = new Proxy(taskInstance, {\n        get(obj, prop) {\n          return prop in obj\n            ? obj[prop]\n            : get(encapsulatedTaskImpl, prop.toString());\n        },\n        set(obj, prop, value) {\n          if (prop in obj) {\n            obj[prop] = value;\n          } else {\n            set(encapsulatedTaskImpl, prop.toString(), value);\n          }\n          return true;\n        },\n        has(obj, prop) {\n          return prop in obj || prop in encapsulatedTaskImpl;\n        },\n        ownKeys(obj) {\n          return Reflect.ownKeys(obj).concat(\n            Reflect.ownKeys(encapsulatedTaskImpl),\n          );\n        },\n        defineProperty(obj, prop, descriptor) {\n          // Ember < 3.16 uses a WeakMap for value storage, keyed to the proxy.\n          // We need to ensure that when we use setProperties to update it, and\n          // it creates Meta, that it uses the proxy to key, otherwise we'll\n          // have two different values stores in Meta, one which won't render.\n          let proxy = _encapsulatedTaskInstanceProxies.get(taskInstance);\n          if (proxy) {\n            if (descriptor.get) {\n              descriptor.get = descriptor.get.bind(proxy);\n            } else if (proxy && descriptor.set) {\n              descriptor.set = descriptor.set.bind(proxy);\n            }\n          }\n\n          return Reflect.defineProperty(encapsulatedTaskImpl, prop, descriptor);\n        },\n        getOwnPropertyDescriptor(obj, prop) {\n          return prop in obj\n            ? Reflect.getOwnPropertyDescriptor(obj, prop)\n            : Reflect.getOwnPropertyDescriptor(encapsulatedTaskImpl, prop);\n        },\n      });\n\n      _encapsulatedTaskInstanceProxies.set(taskInstance, proxy);\n    }\n\n    return proxy;\n  }\n}\n","export const TASKABLE_MIXIN = {\n  _performCount: 0,\n\n  setState(state) {\n    this._performCount = this._performCount + (state.numPerformedInc || 0);\n\n    let isRunning = state.numRunning > 0;\n    let isQueued = state.numQueued > 0;\n    let derivedState = Object.assign({}, state, {\n      performCount: this._performCount,\n      isRunning,\n      isQueued,\n      isIdle: !isRunning && !isQueued,\n      state: isRunning ? 'running' : 'idle',\n    });\n    Object.assign(this, derivedState);\n  },\n\n  onState(state, task) {\n    if (task.onStateCallback) {\n      task.onStateCallback(state, task);\n    }\n  },\n};\n","import { tracked } from '@glimmer/tracking';\nimport { DEFAULT_STATE as INITIAL_TASK_STATE } from './external/task/default-state';\nimport { INITIAL_STATE as INITIAL_INSTANCE_STATE } from './external/task-instance/initial-state';\n\nfunction trackMixin(proto, obj, key) {\n  const propDesc = Object.getOwnPropertyDescriptor(proto, key);\n  propDesc.initializer = propDesc.initializer || (() => proto[key]);\n  delete propDesc.value;\n  const desc = tracked(obj, key, propDesc);\n  obj[key] = desc;\n  return obj;\n}\n\nfunction applyTracked(proto, initial) {\n  return Object.keys(proto).reduce((acc, key) => {\n    return trackMixin(proto, acc, key);\n  }, initial);\n}\n\nexport let TRACKED_INITIAL_TASK_STATE;\nexport let TRACKED_INITIAL_INSTANCE_STATE;\n\nTRACKED_INITIAL_TASK_STATE = applyTracked(INITIAL_TASK_STATE, {});\nTRACKED_INITIAL_TASK_STATE = applyTracked(\n  {\n    numRunning: 0,\n    numQueued: 0,\n    isRunning: false,\n    isQueued: false,\n    isIdle: true,\n    state: 'idle',\n  },\n  TRACKED_INITIAL_TASK_STATE,\n);\n\nTRACKED_INITIAL_INSTANCE_STATE = applyTracked(INITIAL_INSTANCE_STATE, {});\nTRACKED_INITIAL_INSTANCE_STATE = applyTracked(\n  {\n    state: 'waiting',\n    isDropped: false,\n    isRunning: false,\n  },\n  TRACKED_INITIAL_INSTANCE_STATE,\n);\n\nObject.freeze(TRACKED_INITIAL_TASK_STATE);\nObject.freeze(TRACKED_INITIAL_INSTANCE_STATE);\n","import { TaskFactory } from './task-factory';\n\n/**\n * This builder function is called by the transpiled code from\n * `task(async () => {})`. See async-arrow-task-transform.js\n *\n * @private\n */\nexport function buildTask(contextFn, options, taskName, bufferPolicyName) {\n  let optionsWithBufferPolicy = options;\n\n  if (bufferPolicyName) {\n    optionsWithBufferPolicy = Object.assign({}, optionsWithBufferPolicy);\n    optionsWithBufferPolicy[bufferPolicyName] = true;\n  }\n\n  const result = contextFn();\n\n  const taskFactory = new TaskFactory(\n    taskName || '<unknown>',\n    result.generator,\n    optionsWithBufferPolicy,\n  );\n  return taskFactory.createTask(result.context);\n}\n","import { helper } from '@ember/component/helper';\nimport { assert } from '@ember/debug';\nimport { taskHelperClosure } from '../-private/helpers';\nimport type { Task } from '../index';\n\nconst CANCEL_REASON = \"the 'cancel-all' template helper was invoked\";\n\ntype CancelAllParams = [task: Task<any, any[]>];\n\nexport function cancelHelper(args: CancelAllParams) {\n  let cancelable = args[0];\n  if (!cancelable || typeof cancelable.cancelAll !== 'function') {\n    assert(\n      `The first argument passed to the \\`cancel-all\\` helper should be a Task or TaskGroup (without quotes); you passed ${cancelable}`,\n      false,\n    );\n  }\n\n  return taskHelperClosure('cancel-all', 'cancelAll', [\n    cancelable,\n    { reason: CANCEL_REASON },\n  ]);\n}\n\nexport default helper(cancelHelper);\n","import { helper } from '@ember/component/helper';\nimport { assert } from '@ember/debug';\nimport { taskHelperClosure } from '../-private/helpers';\nimport type { Task } from '../index';\n\nfunction maybeReportError(\n  onError: (error: unknown) => void | null | undefined,\n) {\n  return function (e: unknown) {\n    if (typeof onError === 'function') {\n      onError(e);\n    } else if (onError === null) {\n      // Do nothing\n    } else {\n      assert(\n        `The onError argument passed to the \\`perform\\` helper should be a function or null; you passed ${onError}`,\n        false,\n      );\n    }\n  };\n}\n\ntype PerformParams = [task: Task<any, any[]>, ...args: any[]];\n\nexport function performHelper(args: PerformParams, hash: any) {\n  let perform = taskHelperClosure('perform', 'perform', args, hash);\n\n  if (hash && typeof hash.onError !== 'undefined') {\n    return function (...innerArgs: any[]) {\n      try {\n        let taskInstance = perform(...innerArgs);\n        return taskInstance.catch(maybeReportError(hash.onError));\n        // eslint-disable-next-line no-empty\n      } catch {\n        maybeReportError(hash.onError);\n      }\n    };\n  } else {\n    return perform;\n  }\n}\n\nexport default helper(performHelper);\n","import { helper } from '@ember/component/helper';\nimport type { Task } from '../index';\n\ntype TaskParams = [task: Task<any, any[]>, ...args: any[]];\n\nfunction taskHelper(positional: TaskParams) {\n  let [task, ...args] = positional;\n\n  // @ts-expect-errors _curry isn't typed yet\n  return task._curry(...args);\n}\n\nexport default helper(taskHelper);\n","import { later, cancel } from '@ember/runloop';\nimport { EMBER_ENVIRONMENT } from './ember-environment';\nimport { Yieldable } from './external/yieldables';\n\nexport function isEventedObject(c) {\n  return (\n    c &&\n    ((typeof c.one === 'function' && typeof c.off === 'function') ||\n      (typeof c.on === 'function' && typeof c.off === 'function') ||\n      (typeof c.addEventListener === 'function' &&\n        typeof c.removeEventListener === 'function'))\n  );\n}\n\nexport class EmberYieldable extends Yieldable {\n  _deferable() {\n    return EMBER_ENVIRONMENT.defer();\n  }\n}\n\nclass TimeoutYieldable extends EmberYieldable {\n  constructor(ms) {\n    super();\n    this.ms = ms;\n  }\n\n  onYield(state) {\n    let timerId = later(() => state.next(), this.ms);\n\n    return () => cancel(timerId);\n  }\n}\n\n/**\n *\n * Yielding `timeout(ms)` will pause a task for the duration\n * of time passed in, in milliseconds.\n *\n * This timeout will be scheduled on the Ember runloop, which\n * means that test helpers will wait for it to complete before\n * continuing with the test. See `rawTimeout()` if you need\n * different behavior.\n *\n * The task below, when performed, will print a message to the\n * console every second.\n *\n * ```js\n * export default class MyComponent extends Component {\n *   &#64;task *myTask() {\n *     while (true) {\n *       console.log(\"Hello!\");\n *       yield timeout(1000);\n *     }\n *   }\n * }\n * ```\n *\n * @param {number} ms - the amount of time to sleep before resuming\n *   the task, in milliseconds\n */\nexport function timeout(ms) {\n  return new TimeoutYieldable(ms);\n}\n\nexport function deprecatePrivateModule(moduleName) {\n  // eslint-disable-next-line no-console\n  console.warn(\n    `an Ember addon is importing a private ember-concurrency module '${moduleName}' that has moved`,\n  );\n}\n","import { TaskFactory } from './task-factory';\n\nfunction taskFromPropertyDescriptor(\n  target,\n  key,\n  descriptor,\n  params = [],\n  factoryClass = TaskFactory,\n) {\n  let { initializer, get, value } = descriptor;\n  let taskFn;\n\n  if (initializer) {\n    taskFn = initializer.call(undefined);\n  } else if (get) {\n    taskFn = get.call(undefined);\n  } else if (value) {\n    taskFn = value;\n  }\n\n  taskFn.displayName = `${key} (task)`;\n\n  let tasks = new WeakMap();\n  let options = params[0] || {};\n  let factory = new factoryClass(key, taskFn, options);\n  factory._setupEmberKVO(target);\n\n  return {\n    get() {\n      let task = tasks.get(this);\n\n      if (!task) {\n        task = factory.createTask(this);\n        tasks.set(this, task);\n      }\n\n      return task;\n    },\n  };\n}\n\nfunction taskGroupPropertyDescriptor(\n  _target,\n  key,\n  _descriptor,\n  params = [],\n  factoryClass = TaskFactory,\n) {\n  let taskGroups = new WeakMap();\n  let options = params[0] || {};\n  let factory = new factoryClass(key, null, options);\n\n  return {\n    get() {\n      let task = taskGroups.get(this);\n\n      if (!task) {\n        task = factory.createTaskGroup(this);\n        taskGroups.set(this, task);\n      }\n\n      return task;\n    },\n  };\n}\n\n// Cribbed from @ember-decorators/utils\nfunction isFieldDescriptor(possibleDesc) {\n  let [target, key, desc] = possibleDesc;\n\n  return (\n    possibleDesc.length === 3 &&\n    typeof target === 'object' &&\n    target !== null &&\n    typeof key === 'string' &&\n    ((typeof desc === 'object' &&\n      desc !== null &&\n      'enumerable' in desc &&\n      'configurable' in desc) ||\n      desc === undefined) // TS compatibility ???\n  );\n}\n\nexport function decoratorWithParams(descriptorFn) {\n  return function (...params) {\n    if (isFieldDescriptor(params)) {\n      return descriptorFn(...params);\n    } else {\n      return (...desc) => descriptorFn(...desc, params);\n    }\n  };\n}\n\nfunction createDecorator(fn, baseOptions = {}, factoryClass = TaskFactory) {\n  return decoratorWithParams((target, key, descriptor, [userOptions] = []) => {\n    let mergedOptions = Object.assign({}, { ...baseOptions, ...userOptions });\n\n    return fn(target, key, descriptor, [mergedOptions], factoryClass);\n  });\n}\n\nexport function createTaskDecorator(\n  baseOptions = {},\n  factoryClass = TaskFactory,\n) {\n  return createDecorator(taskFromPropertyDescriptor, baseOptions, factoryClass);\n}\n\nexport function createTaskGroupDecorator(\n  baseOptions = {},\n  factoryClass = TaskFactory,\n) {\n  return createDecorator(\n    taskGroupPropertyDescriptor,\n    baseOptions,\n    factoryClass,\n  );\n}\n\nexport const lastValue = decoratorWithParams(\n  (_target, _key, descriptor, [taskName] = []) => {\n    const { initializer } = descriptor;\n    delete descriptor.initializer;\n\n    return {\n      get() {\n        let lastInstance = this[taskName].lastSuccessful;\n\n        if (lastInstance) {\n          return lastInstance.value;\n        }\n\n        if (initializer) {\n          return initializer.call(this);\n        }\n\n        return undefined;\n      },\n    };\n  },\n);\n","import {\n  createTaskDecorator,\n  createTaskGroupDecorator,\n  lastValue as nativeLastValue,\n} from './external/task-decorators';\nimport { TaskFactory as EmberTaskFactory } from './task-factory';\n\nexport const lastValue = nativeLastValue;\n\n/**\n * A Task is a cancelable, restartable, asynchronous operation that\n * is driven by a generator function. Tasks are automatically canceled\n * when the object they live on is destroyed (e.g. a Component\n * is unrendered).\n *\n * Turns the decorated generator function into a task.\n *\n * Optionally takes a hash of options that will be applied as modifiers to the\n * task. For instance `maxConcurrency`, `on`, `group` or `keepLatest`.\n *\n * By default, tasks have no concurrency constraints\n * (multiple instances of a task can be running at the same time)\n * but much of a power of tasks lies in proper usage of Task Modifiers\n * that you can apply to a task.\n *\n * You can also define an\n * <a href=\"/docs/advanced/encapsulated-task\">Encapsulated Task</a>\n * by decorating an object that defines a `perform` generator\n * method.\n *\n * ```js\n * import Component from '@ember/component';\n * import { task } from 'ember-concurrency';\n *\n * class MyComponent extends Component {\n *   &#64;task\n *   *plainTask() {}\n *\n *   &#64;task({ maxConcurrency: 5, keepLatest: true, cancelOn: 'click' })\n *   *taskWithModifiers() {}\n * }\n * ```\n *\n * @function\n * @param {object?} [options={}] Task modifier options\n * @param {string|string[]} [options.cancelOn] Events to cancel task on. Applies only to `&#64;ember/component`\n * @param {boolean} [options.enqueue] Sets `enqueue` modifier on task if `true`\n * @param {boolean} [options.evented] Enables [task lifecycle events](/docs/advanced/lifecycle-events) for this Task, if `true`\n * @param {boolean} [options.debug] Enables task debugging if `true`\n * @param {boolean} [options.drop] Sets `drop` modifier on task if `true`\n * @param {string} [options.group] Associates task with the group specified\n * @param {boolean} [options.keepLatest] Sets `keepLatest` modifier on task if `true`\n * @param {number} [options.maxConcurrency] Sets the maximum number of running task instances for the task\n * @param {string|string[]} [options.observes] Properties to watch and cause task to be performed when they change\n * @param {string|string[]} [options.on] Events to perform task on. Applies only to `&#64;ember/component`\n * @param {function?} [options.onState] Callback to use for state tracking. May be set to `null` to disable state tracking.\n * @param {boolean} [options.restartable] Sets `restartable` modifier on task if `true`\n * @return {Task}\n */\nexport const task = createTaskDecorator({}, EmberTaskFactory);\n\n/**\n * Turns the decorated generator function into a task and applies the\n * `drop` modifier.\n *\n * Optionally takes a hash of options that will be applied as modifiers to the\n * task. For instance `maxConcurrency`, `on`, or `group`.\n *\n * You can also define an\n * <a href=\"/docs/advanced/encapsulated-task\">Encapsulated Task</a>\n * by decorating an object that defines a `perform` generator\n * method.\n *\n * ```js\n * import Component from '@ember/component';\n * import { task, dropTask } from 'ember-concurrency';\n *\n * class MyComponent extends Component {\n *   &#64;task\n *   *plainTask() {}\n *\n *   &#64;dropTask({ cancelOn: 'click' })\n *   *myDropTask() {}\n * }\n * ```\n *\n * @function\n * @param {object?} [options={}] Task modifier options. See {@link task} for list.\n * @return {Task}\n */\nexport const dropTask = createTaskDecorator({ drop: true }, EmberTaskFactory);\n\n/**\n * Turns the decorated generator function into a task and applies the\n * `enqueue` modifier.\n *\n * Optionally takes a hash of options that will be applied as modifiers to the\n * task. For instance `maxConcurrency`, `on`, or `group`.\n *\n * You can also define an\n * <a href=\"/docs/advanced/encapsulated-task\">Encapsulated Task</a>\n * by decorating an object that defines a `perform` generator\n * method.\n *\n * ```js\n * import Component from '@ember/component';\n * import { task, enqueueTask } from 'ember-concurrency';\n *\n * class MyComponent extends Component {\n *   &#64;task\n *   *plainTask() {}\n *\n *   &#64;enqueueTask({ cancelOn: 'click' })\n *   *myEnqueueTask() {}\n * }\n * ```\n *\n * @function\n * @param {object?} [options={}] Task modifier options. See {@link task} for list.\n * @return {Task}\n */\nexport const enqueueTask = createTaskDecorator(\n  {\n    enqueue: true,\n  },\n  EmberTaskFactory,\n);\n\n/**\n * Turns the decorated generator function into a task and applies the\n * `keepLatest` modifier.\n *\n * Optionally takes a hash of options that will be applied as modifiers to the\n * task. For instance `maxConcurrency`, `on`, or `group`.\n *\n * You can also define an\n * <a href=\"/docs/advanced/encapsulated-task\">Encapsulated Task</a>\n * by decorating an object that defines a `perform` generator\n * method.\n *\n * ```js\n * import Component from '@ember/component';\n * import { task, keepLatestTask } from 'ember-concurrency';\n *\n * class MyComponent extends Component {\n *   &#64;task\n *   *plainTask() {}\n *\n *   &#64;keepLatestTask({ cancelOn: 'click' })\n *   *myKeepLatestTask() {}\n * }\n * ```\n *\n * @function\n * @param {object?} [options={}] Task modifier options. See {@link task} for list.\n * @return {Task}\n */\nexport const keepLatestTask = createTaskDecorator(\n  {\n    keepLatest: true,\n  },\n  EmberTaskFactory,\n);\n\n/**\n * Turns the decorated generator function into a task and applies the\n * `restartable` modifier.\n *\n * Optionally takes a hash of options that will be applied as modifiers to the\n * task. For instance `maxConcurrency`, `on`, or `group`.\n *\n * You can also define an\n * <a href=\"/docs/advanced/encapsulated-task\">Encapsulated Task</a>\n * by decorating an object that defines a `perform` generator\n * method.\n *\n * ```js\n * import Component from '@ember/component';\n * import { task, restartableTask } from 'ember-concurrency';\n *\n * class MyComponent extends Component {\n *   &#64;task\n *   *plainTask() {}\n *\n *   &#64;restartableTask({ cancelOn: 'click' })\n *   *myRestartableTask() {}\n * }\n * ```\n *\n * @function\n * @param {object?} [options={}] Task modifier options. See {@link task} for list.\n * @return {Task}\n */\nexport const restartableTask = createTaskDecorator(\n  {\n    restartable: true,\n  },\n  EmberTaskFactory,\n);\n\n/**\n * \"Task Groups\" provide a means for applying\n * task modifiers to groups of tasks. Once a {@linkcode Task} is declared\n * as part of a group task, modifiers like `drop` or `restartable`\n * will no longer affect the individual `Task`. Instead those\n * modifiers can be applied to the entire group.\n *\n * Turns the decorated property into a task group.\n *\n * Optionally takes a hash of options that will be applied as modifiers to the\n * task group. For instance `maxConcurrency` or `keepLatest`.\n *\n * ```js\n * import Component from '@glimmer/component';\n * import { task, taskGroup } from 'ember-concurrency';\n *\n * class MyComponent extends Component {\n *   &#64;taskGroup({ maxConcurrency: 5 }) chores;\n *\n *   &#64;task({ group: 'chores' })\n *   *mowLawn() {}\n *\n *   &#64;task({ group: 'chores' })\n *   *doDishes() {}\n * }\n * ```\n *\n * @function\n * @param {object?} [options={}] Task group modifier options. See {@link task} for list.\n * @return {TaskGroup}\n */\nexport const taskGroup = createTaskGroupDecorator({}, EmberTaskFactory);\n\n/**\n * Turns the decorated property into a task group and applies the\n * `drop` modifier.\n *\n * Optionally takes a hash of further options that will be applied as modifiers\n * to the task group.\n *\n * @function\n * @param {object?} [options={}] Task group modifier options. See {@link task} for list.\n * @return {TaskGroup}\n */\nexport const dropTaskGroup = createTaskGroupDecorator(\n  {\n    drop: true,\n  },\n  EmberTaskFactory,\n);\n\n/**\n * Turns the decorated property into a task group and applies the\n * `enqueue` modifier.\n *\n * Optionally takes a hash of further options that will be applied as modifiers\n * to the task group.\n *\n * @function\n * @param {object?} [options={}] Task group modifier options. See {@link task} for list.\n * @return {TaskGroup}\n */\nexport const enqueueTaskGroup = createTaskGroupDecorator(\n  {\n    enqueue: true,\n  },\n  EmberTaskFactory,\n);\n\n/**\n * Turns the decorated property into a task group and applies the\n * `keepLatest` modifier.\n *\n * Optionally takes a hash of further options that will be applied as modifiers\n * to the task group.\n *\n * @function\n * @param {object?} [options={}] Task group modifier options. See {@link task} for list.\n * @return {TaskGroup}\n */\nexport const keepLatestTaskGroup = createTaskGroupDecorator(\n  { keepLatest: true },\n  EmberTaskFactory,\n);\n\n/**\n * Turns the decorated property into a task group and applies the\n * `restartable` modifier.\n *\n * Optionally takes a hash of further options that will be applied as modifiers\n * to the task group.\n *\n * @function\n * @param {object?} [options={}] Task group modifier options. See {@link task} for list.\n * @return {TaskGroup}\n */\nexport const restartableTaskGroup = createTaskGroupDecorator(\n  { restartable: true },\n  EmberTaskFactory,\n);\n","import { TaskFactory } from './task-factory';\nimport {\n  TaskProperty,\n  TaskGroupProperty,\n  taskComputed,\n  taskFactorySymbol,\n} from './task-properties';\nimport {\n  task as taskDecorator,\n  taskGroup as taskGroupDecorator,\n} from './task-decorators';\nimport { assert } from '@ember/debug';\n\n// eslint-disable-next-line no-unused-vars\nimport { TaskGroup } from './task-group';\n\n/**\n * TODO: update docs to reflect both old and new ES6 styles\n *\n * A Task is a cancelable, restartable, asynchronous operation that\n * is driven by a generator function. Tasks are automatically canceled\n * when the object they live on is destroyed (e.g. a Component\n * is unrendered).\n *\n * To define a task, use the `task(...)` function, and pass in\n * a generator function, which will be invoked when the task\n * is performed. The reason generator functions are used is\n * that they (like the proposed ES7 async-await syntax) can\n * be used to elegantly express asynchronous, cancelable\n * operations.\n *\n * You can also define an\n * <a href=\"/docs/advanced/encapsulated-task\">Encapsulated Task</a>\n * by passing in an object that defined a `perform` generator\n * function property.\n *\n * The following Component defines a task called `myTask` that,\n * when performed, prints a message to the console, sleeps for 1 second,\n * prints a final message to the console, and then completes.\n *\n * ```js\n * import { task, timeout } from 'ember-concurrency';\n * export default Component.extend({\n *   myTask: task(function * () {\n *     console.log(\"Pausing for a second...\");\n *     yield timeout(1000);\n *     console.log(\"Done!\");\n *   })\n * });\n * ```\n *\n * ```hbs\n * <button {{action myTask.perform}}>Perform Task</button>\n * ```\n *\n * By default, tasks have no concurrency constraints\n * (multiple instances of a task can be running at the same time)\n * but much of a power of tasks lies in proper usage of Task Modifiers\n * that you can apply to a task.\n *\n * @param {function} generatorFunction the generator function backing the task.\n * @returns {TaskProperty}\n */\nexport function task(taskFnOrProtoOrDecoratorOptions, key, descriptor) {\n  assert(\n    `It appears you're attempting to use the new task(async () => { ... }) syntax, but the async arrow task function you've provided is not being properly compiled by Babel.\\n\\nPossible causes / remedies:\\n\\n1. You must pass the async function expression directly to the task() function (it is not currently supported to pass in a variable containing the async arrow fn, or any other kind of indirection)\\n2. The new task syntax is only supported by native classes. Ensure that this is one.\\n3. If this code is in an addon, please ensure the addon specifies ember-concurrency \"2.3.0\" or higher in \"dependencies\" (not \"devDependencies\")\\n4. Ensure that there is only one version of ember-concurrency v2.3.0+ being used in your project (including nested dependencies) and consider using npm/yarn/pnpm resolutions to enforce a single version is used\\n5. Ensure that you have registered the Babel transform that Ember Concurrency uses to transform tasks in the \"async-arrow\" notation, see https://ember-concurrency.com/docs/v4-upgrade`,\n    !isUntranspiledAsyncFn(arguments[arguments.length - 1]),\n  );\n\n  if (\n    isDecoratorOptions(taskFnOrProtoOrDecoratorOptions) ||\n    (key && descriptor)\n  ) {\n    return taskDecorator(...arguments);\n  } else {\n    return buildClassicTaskProperty(taskFnOrProtoOrDecoratorOptions);\n  }\n}\n\nfunction isUntranspiledAsyncFn(obj) {\n  return obj && obj.constructor && obj.constructor.name === 'AsyncFunction';\n}\n\n/**\n * Build and return a \"classic\" TaskProperty, which is essentially a subclass of a Computed Property\n * descriptor that can be used to define Tasks on classic Ember.Objects.\n *\n * @private\n */\nfunction buildClassicTaskProperty(taskFn) {\n  const taskProperty = taskComputed(function () {\n    taskProperty[taskFactorySymbol].setTaskDefinition(taskProperty.taskFn);\n    return taskProperty[taskFactorySymbol].createTask(this);\n  });\n\n  taskProperty.taskFn = taskFn;\n\n  taskProperty[taskFactorySymbol] = new TaskFactory();\n\n  Object.setPrototypeOf(taskProperty, TaskProperty.prototype);\n\n  return taskProperty;\n}\n\n/**\n * \"Task Groups\" provide a means for applying\n * task modifiers to groups of tasks. Once a {@linkcode Task} is declared\n * as part of a group task, modifiers like `drop` or `restartable`\n * will no longer affect the individual `Task`. Instead those\n * modifiers can be applied to the entire group.\n *\n * ```js\n * import { task, taskGroup } from 'ember-concurrency';\n *\n * export default class MyController extends Controller {\n *   &#64;taskGroup({ drop: true }) chores;\n *\n *   &#64;task({ group: 'chores' }) mowLawn = taskFn;\n *   &#64;task({ group: 'chores' }) doDishes = taskFn;\n *   &#64;task({ group: 'chores' }) changeDiapers = taskFn;\n * }\n * ```\n *\n * @returns {TaskGroup}\n */\nexport function taskGroup(possibleDecoratorOptions, key, descriptor) {\n  if (isDecoratorOptions(possibleDecoratorOptions) || (key && descriptor)) {\n    return taskGroupDecorator(...arguments);\n  } else {\n    let tp = taskComputed(function (key) {\n      tp[taskFactorySymbol].setName(key);\n      return tp[taskFactorySymbol].createTaskGroup(this);\n    });\n\n    tp[taskFactorySymbol] = new TaskFactory();\n\n    Object.setPrototypeOf(tp, TaskGroupProperty.prototype);\n\n    return tp;\n  }\n}\n\nfunction isDecoratorOptions(possibleOptions) {\n  if (!possibleOptions) {\n    return false;\n  }\n  if (typeof possibleOptions === 'function') {\n    return false;\n  }\n\n  if (\n    typeof possibleOptions === 'object' &&\n    'perform' in possibleOptions &&\n    typeof possibleOptions.perform === 'function'\n  ) {\n    return false;\n  }\n\n  return Object.getPrototypeOf(possibleOptions) === Object.prototype;\n}\n","import { assert } from '@ember/debug';\nimport RSVP, { Promise } from 'rsvp';\nimport { TaskInstance } from './task-instance';\nimport { cancelableSymbol, Yieldable } from './external/yieldables';\n\n/**\n * A cancelation-aware variant of [Promise.all](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all).\n * The normal version of a `Promise.all` just returns a regular, uncancelable\n * Promise. The `ember-concurrency` variant of `all()` has the following\n * additional behavior:\n *\n * - if the task that `yield`ed `all()` is canceled, any of the\n *   {@linkcode TaskInstance}s passed in to `all` will be canceled\n * - if any of the {@linkcode TaskInstance}s (or regular promises) passed in reject (or\n *   are canceled), all of the other unfinished `TaskInstance`s will\n *   be automatically canceled.\n *\n * [Check out the \"Awaiting Multiple Child Tasks example\"](/docs/examples/joining-tasks)\n */\nexport const all = taskAwareVariantOf(RSVP.Promise, 'all', identity);\n\n/**\n * A cancelation-aware variant of [RSVP.allSettled](https://api.emberjs.com/ember/release/functions/rsvp/allSettled).\n * The normal version of a `RSVP.allSettled` just returns a regular, uncancelable\n * Promise. The `ember-concurrency` variant of `allSettled()` has the following\n * additional behavior:\n *\n * - if the task that `yield`ed `allSettled()` is canceled, any of the\n *   {@linkcode TaskInstance}s passed in to `allSettled` will be canceled\n */\nexport const allSettled = taskAwareVariantOf(RSVP, 'allSettled', identity);\n\n/**\n * A cancelation-aware variant of [Promise.race](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/race).\n * The normal version of a `Promise.race` just returns a regular, uncancelable\n * Promise. The `ember-concurrency` variant of `race()` has the following\n * additional behavior:\n *\n * - if the task that `yield`ed `race()` is canceled, any of the\n *   {@linkcode TaskInstance}s passed in to `race` will be canceled\n * - once any of the tasks/promises passed in complete (either success, failure,\n *   or cancelation), any of the {@linkcode TaskInstance}s passed in will be canceled\n *\n * [Check out the \"Awaiting Multiple Child Tasks example\"](/docs/examples/joining-tasks)\n */\nexport const race = taskAwareVariantOf(Promise, 'race', identity);\n\n/**\n * A cancelation-aware variant of [RSVP.hash](https://api.emberjs.com/ember/release/functions/rsvp/hash).\n * The normal version of a `RSVP.hash` just returns a regular, uncancelable\n * Promise. The `ember-concurrency` variant of `hash()` has the following\n * additional behavior:\n *\n * - if the task that `yield`ed `hash()` is canceled, any of the\n *   {@linkcode TaskInstance}s passed in to `hash` will be canceled\n * - if any of the items rejects/cancels, all other cancelable items\n *   (e.g. {@linkcode TaskInstance}s) will be canceled\n */\nexport const hash = taskAwareVariantOf(RSVP, 'hash', getValues);\n\n/**\n * A cancelation-aware variant of [RSVP.hashSettled](https://api.emberjs.com/ember/release/functions/rsvp/hashSettled).\n * The normal version of a `RSVP.hashSettled` just returns a regular, uncancelable\n * Promise. The `ember-concurrency` variant of `hashSettled()` has the following\n * additional behavior:\n *\n * - if the task that `yield`ed `hashSettled()` is canceled, any of the\n *   {@linkcode TaskInstance}s passed in to `hashSettled` will be canceled\n */\nexport const hashSettled = taskAwareVariantOf(RSVP, 'hashSettled', getValues);\n\nfunction identity(obj) {\n  return obj;\n}\n\nfunction getValues(obj) {\n  return Object.keys(obj).map((k) => obj[k]);\n}\n\nfunction castForPromiseHelper(castable) {\n  if (castable) {\n    if (castable instanceof TaskInstance) {\n      // Mark TaskInstances, including those that performed synchronously and\n      // have finished already, as having their errors handled, as if they had\n      // been then'd, which this is emulating.\n      castable.executor.asyncErrorsHandled = true;\n    } else if (castable instanceof Yieldable) {\n      // Cast to promise\n      return castable._toPromise();\n    }\n  }\n\n  return castable;\n}\n\nfunction castAwaitables(arrOrHash, callback) {\n  if (Array.isArray(arrOrHash)) {\n    return arrOrHash.map(callback);\n  } else if (typeof arrOrHash === 'object' && arrOrHash !== null) {\n    let obj = {};\n    Object.keys(arrOrHash).forEach((key) => {\n      obj[key] = callback(arrOrHash[key]);\n    });\n    return obj;\n  } else {\n    // :shruggie:\n    return arrOrHash;\n  }\n}\n\nfunction taskAwareVariantOf(obj, method, getItems) {\n  return function (awaitable) {\n    let awaitables = castAwaitables(awaitable, castForPromiseHelper);\n\n    let items = getItems(awaitables);\n    assert(`'${method}' expects an array.`, Array.isArray(items));\n\n    let defer = RSVP.defer();\n\n    obj[method](awaitables).then(defer.resolve, defer.reject);\n\n    let hasCancelled = false;\n    let cancelAll = () => {\n      if (hasCancelled) {\n        return;\n      }\n      hasCancelled = true;\n      items.forEach((it) => {\n        if (it) {\n          if (it instanceof TaskInstance) {\n            it.cancel();\n          } else if (typeof it[cancelableSymbol] === 'function') {\n            it[cancelableSymbol]();\n          }\n        }\n      });\n    };\n\n    let promise = defer.promise.finally(cancelAll);\n    promise[cancelableSymbol] = cancelAll;\n    return promise;\n  };\n}\n","import { assert } from '@ember/debug';\nimport { schedule, cancel } from '@ember/runloop';\nimport { get } from '@ember/object';\nimport { addObserver, removeObserver } from '@ember/object/observers';\nimport { EmberYieldable, isEventedObject } from './utils';\n\nclass WaitForQueueYieldable extends EmberYieldable {\n  constructor(queueName) {\n    super();\n    this.queueName = queueName;\n  }\n\n  onYield(state) {\n    let timerId;\n\n    try {\n      timerId = schedule(this.queueName, () => state.next());\n    } catch (error) {\n      state.throw(error);\n    }\n\n    return () => cancel(timerId);\n  }\n}\n\nclass WaitForEventYieldable extends EmberYieldable {\n  constructor(object, eventName) {\n    super();\n    this.object = object;\n    this.eventName = eventName;\n    this.usesDOMEvents = false;\n  }\n\n  on(callback) {\n    if (typeof this.object.addEventListener === 'function') {\n      // assume that we're dealing with a DOM `EventTarget`.\n      this.usesDOMEvents = true;\n      this.object.addEventListener(this.eventName, callback);\n    } else {\n      this.object.on(this.eventName, callback);\n    }\n  }\n\n  off(callback) {\n    if (this.usesDOMEvents) {\n      this.object.removeEventListener(this.eventName, callback);\n    } else {\n      this.object.off(this.eventName, callback);\n    }\n  }\n\n  onYield(state) {\n    let fn = null;\n    let disposer = () => {\n      fn && this.off(fn);\n      fn = null;\n    };\n\n    fn = (event) => {\n      disposer();\n      state.next(event);\n    };\n\n    this.on(fn);\n\n    return disposer;\n  }\n}\n\nclass WaitForPropertyYieldable extends EmberYieldable {\n  constructor(object, key, predicateCallback = Boolean) {\n    super();\n    this.object = object;\n    this.key = key;\n\n    if (typeof predicateCallback === 'function') {\n      this.predicateCallback = predicateCallback;\n    } else {\n      this.predicateCallback = (v) => v === predicateCallback;\n    }\n  }\n\n  onYield(state) {\n    let observerBound = false;\n    let observerFn = () => {\n      let value = get(this.object, this.key);\n      let predicateValue = this.predicateCallback(value);\n      if (predicateValue) {\n        state.next(value);\n        return true;\n      }\n    };\n\n    if (!observerFn()) {\n      // eslint-disable-next-line ember/no-observers\n      addObserver(this.object, this.key, null, observerFn);\n      observerBound = true;\n    }\n\n    return () => {\n      if (observerBound && observerFn) {\n        removeObserver(this.object, this.key, null, observerFn);\n      }\n    };\n  }\n}\n\n/**\n * Use `waitForQueue` to pause the task until a certain run loop queue is reached.\n *\n * ```js\n * import { task, waitForQueue } from 'ember-concurrency';\n * export default class MyComponent extends Component {\n *   &#64;task *myTask() {\n *     yield waitForQueue('afterRender');\n *     console.log(\"now we're in the afterRender queue\");\n *   }\n * }\n * ```\n *\n * @param {string} queueName the name of the Ember run loop queue\n */\nexport function waitForQueue(queueName) {\n  return new WaitForQueueYieldable(queueName);\n}\n\n/**\n * Use `waitForEvent` to pause the task until an event is fired. The event\n * can either be a jQuery event or an Ember.Evented event (or any event system\n * where the object supports `.on()` `.one()` and `.off()`).\n *\n * ```js\n * import { task, waitForEvent } from 'ember-concurrency';\n * export default class MyComponent extends Component {\n *   &#64;task *myTask() {\n *     console.log(\"Please click anywhere..\");\n *     let clickEvent = yield waitForEvent($('body'), 'click');\n *     console.log(\"Got event\", clickEvent);\n *\n *     let emberEvent = yield waitForEvent(this, 'foo');\n *     console.log(\"Got foo event\", emberEvent);\n *\n *     // somewhere else: component.trigger('foo', { value: 123 });\n *   }\n * }\n * ```\n *\n * @param {object} object the Ember Object, jQuery element, or other object with .on() and .off() APIs\n *                 that the event fires from\n * @param {function} eventName the name of the event to wait for\n */\nexport function waitForEvent(object, eventName) {\n  assert(\n    `${object} must include Ember.Evented (or support \\`.on()\\` and \\`.off()\\`) or DOM EventTarget (or support \\`addEventListener\\` and  \\`removeEventListener\\`) to be able to use \\`waitForEvent\\``,\n    isEventedObject(object),\n  );\n  return new WaitForEventYieldable(object, eventName);\n}\n\n/**\n * Use `waitForProperty` to pause the task until a property on an object\n * changes to some expected value. This can be used for a variety of use\n * cases, including synchronizing with another task by waiting for it\n * to become idle, or change state in some other way. If you omit the\n * callback, `waitForProperty` will resume execution when the observed\n * property becomes truthy. If you provide a callback, it'll be called\n * immediately with the observed property's current value, and multiple\n * times thereafter whenever the property changes, until you return\n * a truthy value from the callback, or the current task is canceled.\n * You can also pass in a non-Function value in place of the callback,\n * in which case the task will continue executing when the property's\n * value becomes the value that you passed in.\n *\n * ```js\n * import { task, waitForProperty } from 'ember-concurrency';\n * export default class MyComponent extends Component {\n *   &#64;tracked foo = 0;\n *\n *   &#64;task *myTask() {\n *     console.log(\"Waiting for `foo` to become 5\");\n *\n *     yield waitForProperty(this, 'foo', v => v === 5);\n *     // alternatively: yield waitForProperty(this, 'foo', 5);\n *\n *     // somewhere else: this.foo = 5;\n *\n *     console.log(\"`foo` is 5!\");\n *\n *     // wait for another task to be idle before running:\n *     yield waitForProperty(this, 'otherTask.isIdle');\n *     console.log(\"otherTask is idle!\");\n *   }\n * }\n * ```\n *\n * @param {object} object an object (most likely an Ember Object)\n * @param {string} key the property name that is observed for changes\n * @param {function} callbackOrValue a Function that should return a truthy value\n *                                   when the task should continue executing, or\n *                                   a non-Function value that the watched property\n *                                   needs to equal before the task will continue running\n */\nexport function waitForProperty(object, key, predicateCallback) {\n  return new WaitForPropertyYieldable(object, key, predicateCallback);\n}\n","import { deprecate, warn } from '@ember/debug';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nimport { getOrSetGlobal, peekTransient, setTransient } from '../types/-private.js';\nfunction coerceId(id) {\n  if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_NON_STRICT_ID)) {\n    let normalized;\n    if (id === null || id === undefined || id === '') {\n      normalized = null;\n    } else {\n      normalized = String(id);\n    }\n    deprecate(`The resource id '<${typeof id}> ${String(id)} ' is not normalized. Update your application code to use '${JSON.stringify(normalized)}' instead.`, normalized === id, {\n      id: 'ember-data:deprecate-non-strict-id',\n      until: '6.0',\n      for: 'ember-data',\n      since: {\n        available: '4.13',\n        enabled: '5.3'\n      }\n    });\n    return normalized;\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Resource IDs must be a non-empty string or null. Received '${String(id)}'.`);\n    }\n  })(id === null || typeof id === 'string' && id.length > 0) : {};\n  return id;\n}\nfunction getStore(wrapper) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`expected a private _store property`);\n    }\n  })('_store' in wrapper) : {};\n  return wrapper._store;\n}\nfunction expandingGet(cache, key1, key2) {\n  const mainCache = cache[key1] = cache[key1] || Object.create(null);\n  return mainCache[key2];\n}\nfunction expandingSet(cache, key1, key2, value) {\n  const mainCache = cache[key1] = cache[key1] || Object.create(null);\n  mainCache[key2] = value;\n}\nfunction assertValidRelationshipPayload(graph, op) {\n  const relationship = graph.get(op.record, op.field);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Cannot update an implicit relationship`);\n    }\n  })(isHasMany(relationship) || isBelongsTo(relationship)) : {};\n  const payload = op.value;\n  const {\n    definition,\n    identifier,\n    state\n  } = relationship;\n  const {\n    type\n  } = identifier;\n  const {\n    field\n  } = op;\n  const {\n    isAsync,\n    kind\n  } = definition;\n  if (payload.links) {\n    warn(`You pushed a record of type '${type}' with a relationship '${field}' configured as 'async: false'. You've included a link but no primary data, this may be an error in your payload. WarpDrive will treat this relationship as known-to-be-empty.`, isAsync || !!payload.data || state.hasReceivedData, {\n      id: 'ds.store.push-link-for-sync-relationship'\n    });\n  } else if (payload.data) {\n    if (kind === 'belongsTo') {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`A ${type} record was pushed into the store with the value of ${field} being ${inspect(payload.data)}, but ${field} is a belongsTo relationship so the value must not be an array. You should probably check your data payload or serializer.`);\n        }\n      })(!Array.isArray(payload.data)) : {};\n      assertRelationshipData(getStore(graph.store), identifier, payload.data, definition);\n    } else if (kind === 'hasMany') {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`A ${type} record was pushed into the store with the value of ${field} being '${inspect(payload.data)}', but ${field} is a hasMany relationship so the value must be an array. You should probably check your data payload or serializer.`);\n        }\n      })(Array.isArray(payload.data)) : {};\n      if (Array.isArray(payload.data)) {\n        for (let i = 0; i < payload.data.length; i++) {\n          assertRelationshipData(getStore(graph.store), identifier, payload.data[i], definition);\n        }\n      }\n    }\n  }\n}\nfunction inspect(value) {\n  const type = typeof value;\n  if (value === null) {\n    return 'null';\n  }\n  if (type !== 'object') {\n    return type;\n  }\n  if (Array.isArray(value)) {\n    return 'Array';\n  }\n  if (value instanceof Date) {\n    return 'Date';\n  }\n  if (value instanceof RegExp) {\n    return 'RegExp';\n  }\n  if (value instanceof Map) {\n    return 'Map';\n  }\n  if (value instanceof Set) {\n    return 'Set';\n  }\n  return 'object';\n}\nfunction checkIfNew(store, resourceKey) {\n  if (!resourceKey.id) {\n    return true;\n  }\n  return store.cache.isNew(resourceKey);\n}\nfunction isBelongsTo(relationship) {\n  return relationship.definition.kind === 'belongsTo';\n}\nfunction isImplicit(relationship) {\n  return relationship.definition.isImplicit;\n}\nfunction isHasMany(relationship) {\n  return relationship.definition.kind === 'hasMany';\n}\nfunction forAllRelatedIdentifiers(rel, cb) {\n  if (isBelongsTo(rel)) {\n    if (rel.remoteState) {\n      cb(rel.remoteState);\n    }\n    if (rel.localState && rel.localState !== rel.remoteState) {\n      cb(rel.localState);\n    }\n  } else if (isHasMany(rel)) {\n    // TODO\n    // rel.remoteMembers.forEach(cb);\n    // might be simpler if performance is not a concern\n    for (let i = 0; i < rel.remoteState.length; i++) {\n      const inverseIdentifier = rel.remoteState[i];\n      cb(inverseIdentifier);\n    }\n    rel.additions?.forEach(cb);\n  } else {\n    rel.localMembers.forEach(cb);\n    rel.remoteMembers.forEach(inverseIdentifier => {\n      if (!rel.localMembers.has(inverseIdentifier)) {\n        cb(inverseIdentifier);\n      }\n    });\n  }\n}\n\n/*\n  Removes the given identifier from BOTH remote AND local state.\n\n  This method is useful when either a deletion or a rollback on a new record\n  needs to entirely purge itself from an inverse relationship.\n  */\nfunction removeIdentifierCompletelyFromRelationship(graph, relationship, value, silenceNotifications) {\n  if (isBelongsTo(relationship)) {\n    if (relationship.remoteState === value) {\n      relationship.remoteState = null;\n    }\n    if (relationship.localState === value) {\n      relationship.localState = null;\n      // This allows dematerialized inverses to be rematerialized\n      // we shouldn't be notifying here though, figure out where\n      // a notification was missed elsewhere.\n      {\n        notifyChange(graph, relationship);\n      }\n    }\n  } else if (isHasMany(relationship)) {\n    relationship.remoteMembers.delete(value);\n    relationship.additions?.delete(value);\n    const wasInRemovals = relationship.removals?.delete(value);\n    const canonicalIndex = relationship.remoteState.indexOf(value);\n    if (canonicalIndex !== -1) {\n      relationship.remoteState.splice(canonicalIndex, 1);\n    }\n    if (!wasInRemovals) {\n      const currentIndex = relationship.localState?.indexOf(value);\n      if (currentIndex !== -1 && currentIndex !== undefined) {\n        relationship.localState.splice(currentIndex, 1);\n        // This allows dematerialized inverses to be rematerialized\n        // we shouldn't be notifying here though, figure out where\n        // a notification was missed elsewhere.\n        {\n          notifyChange(graph, relationship);\n        }\n      }\n    }\n  } else {\n    relationship.remoteMembers.delete(value);\n    relationship.localMembers.delete(value);\n  }\n}\nfunction notifyChange(graph, relationship) {\n  if (!relationship.accessed) {\n    return;\n  }\n  const resourceKey = relationship.identifier;\n  const key = relationship.definition.key;\n  if (resourceKey === graph._removing) {\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_GRAPH)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_GRAPH || globalThis.getWarpDriveRuntimeConfig().debug.LOG_GRAPH) {\n        // eslint-disable-next-line no-console\n        console.log(`Graph: ignoring relationship change for removed identifier ${String(resourceKey)} ${key}`);\n      }\n    }\n    return;\n  }\n  if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_GRAPH)) {\n    if (getGlobalConfig().WarpDrive.debug.LOG_GRAPH || globalThis.getWarpDriveRuntimeConfig().debug.LOG_GRAPH) {\n      // eslint-disable-next-line no-console\n      console.log(`Graph: notifying relationship change for ${String(resourceKey)} ${key}`);\n    }\n  }\n  graph.store.notifyChange(resourceKey, 'relationships', key);\n}\nfunction assertRelationshipData(store, resourceKey, data, meta) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`A ${resourceKey.type} record was pushed into the store with the value of ${meta.key} being '${JSON.stringify(data)}', but ${meta.key} is a belongsTo relationship so the value must not be an array. You should probably check your data payload or serializer.`);\n    }\n  })(!Array.isArray(data)) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Encountered a relationship identifier without a type for the ${meta.kind} relationship '${meta.key}' on <${resourceKey.type}:${String(resourceKey.id)}>, expected an identifier with type '${meta.type}' but found\\n\\n'${JSON.stringify(data, null, 2)}'\\n\\nPlease check your serializer and make sure it is serializing the relationship payload into a JSON API format.`);\n    }\n  })(data === null || 'type' in data && typeof data.type === 'string' && data.type.length) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Encountered a relationship identifier without an id for the ${meta.kind} relationship '${meta.key}' on <${resourceKey.type}:${String(resourceKey.id)}>, expected an identifier but found\\n\\n'${JSON.stringify(data, null, 2)}'\\n\\nPlease check your serializer and make sure it is serializing the relationship payload into a JSON API format.`);\n    }\n  })(data === null || !!coerceId(data.id)) : {};\n  if (data?.type === meta.type) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Missing Schema: Encountered a relationship identifier { type: '${data.type}', id: '${String(data.id)}' } for the '${resourceKey.type}.${meta.key}' ${meta.kind} relationship on <${resourceKey.type}:${String(resourceKey.id)}>, but no schema exists for that type.`);\n      }\n    })(store.schema.hasResource(data)) : {};\n  } else {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Missing Schema: Encountered a relationship identifier with type '${data.type}' for the ${meta.kind} relationship '${meta.key}' on <${resourceKey.type}:${String(resourceKey.id)}>, Expected an identifier with type '${meta.type}'. No schema was found for '${data.type}'.`);\n      }\n    })(data === null || !data.type || store.schema.hasResource(data)) : {};\n  }\n}\nconst RELATIONSHIP_KINDS = ['belongsTo', 'hasMany', 'resource', 'collection'];\nfunction isLegacyField(field) {\n  return field.kind === 'belongsTo' || field.kind === 'hasMany';\n}\nfunction isRelationshipField(field) {\n  return RELATIONSHIP_KINDS.includes(field.kind);\n}\nfunction temporaryConvertToLegacy(field) {\n  return {\n    kind: field.kind === 'resource' ? 'belongsTo' : 'hasMany',\n    name: field.name,\n    type: field.type,\n    options: Object.assign({}, {\n      async: false,\n      inverse: null,\n      resetOnRemoteUpdate: false\n    }, field.options)\n  };\n}\n\n/**\n *\n * Given RHS (Right Hand Side)\n *\n * ```ts\n * class User extends Model {\n *   @hasMany('animal', { async: false, inverse: 'owner' }) pets;\n * }\n * ```\n *\n * Given LHS (Left Hand Side)\n *\n * ```ts\n * class Animal extends Model {\n *  @belongsTo('user', { async: false, inverse: 'pets' }) owner;\n * }\n * ```\n *\n * The UpgradedMeta for the RHS would be:\n *\n * ```ts\n * {\n *   kind: 'hasMany',\n *   key: 'pets',\n *   type: 'animal',\n *   isAsync: false,\n *   isImplicit: false,\n *   isCollection: true,\n *   isPolymorphic: false,\n *   inverseKind: 'belongsTo',\n *   inverseKey: 'owner',\n *   inverseType: 'user',\n *   inverseIsAsync: false,\n *   inverseIsImplicit: false,\n *   inverseIsCollection: false,\n *   inverseIsPolymorphic: false,\n * }\n * ```\n *\n * The UpgradeMeta for the LHS would be:\n *\n * ```ts\n * {\n *   kind: 'belongsTo',\n *   key: 'owner',\n *   type: 'user',\n *   isAsync: false,\n *   isImplicit: false,\n *   isCollection: false,\n *   isPolymorphic: false,\n *   inverseKind: 'hasMany',\n *   inverseKey: 'pets',\n *   inverseType: 'animal',\n *   inverseIsAsync: false,\n *   inverseIsImplicit: false,\n *   inverseIsCollection: true,\n *   inverseIsPolymorphic: false,\n * }\n * ```\n *\n * @private\n */\n\nconst BOOL_LATER = null;\nconst STR_LATER = '';\nconst IMPLICIT_KEY_RAND = Date.now();\nfunction implicitKeyFor(type, key) {\n  return `implicit-${type}:${key}${IMPLICIT_KEY_RAND}`;\n}\nfunction syncMeta(definition, inverseDefinition) {\n  definition.inverseKind = inverseDefinition.kind;\n  definition.inverseKey = inverseDefinition.key;\n  definition.inverseName = inverseDefinition.name;\n  definition.inverseType = inverseDefinition.type;\n  definition.inverseIsAsync = inverseDefinition.isAsync;\n  definition.inverseIsCollection = inverseDefinition.isCollection;\n  definition.inverseIsPolymorphic = inverseDefinition.isPolymorphic;\n  definition.inverseIsImplicit = inverseDefinition.isImplicit;\n  definition.inverseIsLinksMode = inverseDefinition.isLinksMode;\n  const resetOnRemoteUpdate = definition.resetOnRemoteUpdate === false || inverseDefinition.resetOnRemoteUpdate === false ? false : true;\n  definition.resetOnRemoteUpdate = resetOnRemoteUpdate;\n  inverseDefinition.resetOnRemoteUpdate = resetOnRemoteUpdate;\n}\nfunction upgradeMeta(meta) {\n  if (!isLegacyField(meta)) {\n    meta = temporaryConvertToLegacy(meta);\n  }\n  const niceMeta = {};\n  const options = meta.options;\n  niceMeta.kind = meta.kind;\n  niceMeta.key = meta.sourceKey ?? meta.name;\n  niceMeta.name = meta.name;\n  niceMeta.type = meta.type;\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected relationship definition to specify async`);\n    }\n  })(typeof options?.async === 'boolean') : {};\n  niceMeta.isAsync = options.async;\n  niceMeta.isImplicit = false;\n  niceMeta.isCollection = meta.kind === 'hasMany';\n  niceMeta.isPolymorphic = options && !!options.polymorphic;\n  niceMeta.isLinksMode = options.linksMode ?? false;\n  niceMeta.inverseKey = options && options.inverse || STR_LATER;\n  niceMeta.inverseName = options && options.inverse || STR_LATER;\n  niceMeta.inverseType = STR_LATER;\n  niceMeta.inverseIsAsync = BOOL_LATER;\n  niceMeta.inverseIsImplicit = options && options.inverse === null || BOOL_LATER;\n  niceMeta.inverseIsCollection = BOOL_LATER;\n  niceMeta.inverseIsLinksMode = BOOL_LATER;\n\n  // prettier-ignore\n  niceMeta.resetOnRemoteUpdate = !isLegacyField(meta) ? false : meta.options?.linksMode ? false : meta.options?.resetOnRemoteUpdate === false ? false : true;\n  return niceMeta;\n}\nfunction assertConfiguration(info, type, key) {\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    const isSelfReferential = info.isSelfReferential;\n    if (isSelfReferential) {\n      return true;\n    }\n    const _isRHS = key === info.rhs_relationshipName && (type === info.rhs_baseModelName ||\n    // base or non-polymorphic\n    // if the other side is polymorphic then we need to scan our modelNames\n    info.lhs_isPolymorphic && info.rhs_modelNames.includes(type)); // polymorphic\n    const _isLHS = key === info.lhs_relationshipName && (type === info.lhs_baseModelName ||\n    // base or non-polymorphic\n    // if the other side is polymorphic then we need to scan our modelNames\n    info.rhs_isPolymorphic && info.lhs_modelNames.includes(type)); // polymorphic;\n\n    if (!_isRHS && !_isLHS) {\n      /*\n        this occurs when we are likely polymorphic but not configured to be polymorphic\n        most often due to extending a class that has a relationship definition on it.\n         e.g.\n         ```ts\n        class Pet extends Model {\n          @belongsTo('human', { async: false, inverse: 'pet' }) owner;\n        }\n        class Human extends Model {\n          @belongsTo('pet', { async: false, inverse: 'owner' }) pet;\n        }\n        class Farmer extends Human {}\n        ```\n         In the above case, the following would trigger this error:\n         ```ts\n        let pet = store.createRecord('pet');\n        let farmer = store.createRecord('farmer');\n        farmer.pet = pet; // error\n        ```\n         The correct way to fix this is to specify the polymorphic option on Pet\n        and to specify the abstract type 'human' on the Human base class.\n         ```ts\n        class Pet extends Model {\n          @belongsTo('human', { async: false, inverse: 'pet', polymorphic: true }) owner;\n        }\n        class Human extends Model {\n          @belongsTo('pet', { async: false, inverse: 'owner', as: 'human' }) pet;\n        }\n        class Farmer extends Human {}\n        ```\n         Alternatively both Human and Farmer could declare the relationship, because relationship\n        definitions are \"structural\".\n         ```ts\n        class Pet extends Model {\n          @belongsTo('human', { async: false, inverse: 'pet', polymorphic: true }) owner;\n        }\n        class Human extends Model {\n          @belongsTo('pet', { async: false, inverse: 'owner', as: 'human' }) pet;\n        }\n        class Farmer extends Model {\n          @belongsTo('pet', { async: false, inverse: 'owner', as: 'human' }) pet;\n        }\n        ```\n        */\n      if (key === info.lhs_relationshipName && info.lhs_modelNames.includes(type)) {\n        // parentIdentifier, parentDefinition, addedIdentifier, store\n        assertInheritedSchema(info.lhs_definition, type);\n      } else if (key === info.rhs_relationshipName && info.rhs_modelNames.includes(type)) {\n        assertInheritedSchema(info.lhs_definition, type);\n      }\n      // OPEN AN ISSUE :: we would like to improve our errors but need to understand what corner case got us here\n      throw new Error(`PLEASE OPEN AN ISSUE :: Found a relationship that is neither the LHS nor RHS of the same edge. This is not supported. Please report this to the WarpDrive team.`);\n    }\n    if (_isRHS && _isLHS) {\n      // not sure how we get here but it's probably the result of some form of inheritance\n      // without having specified polymorphism correctly leading to it not being self-referential\n      // OPEN AN ISSUE :: we would like to improve our errors but need to understand what corner case got us here\n      throw new Error(`PLEASE OPEN AN ISSUE :: Found a relationship that is both the LHS and RHS of the same edge but is not self-referential. This is not supported. Please report this to the WarpDrive team.`);\n    }\n  }\n}\nfunction isLHS(info, type, key) {\n  const isSelfReferential = info.isSelfReferential;\n  const isRelationship = key === info.lhs_relationshipName;\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    assertConfiguration(info, type, key);\n  }\n  if (isRelationship === true) {\n    return isSelfReferential === true ||\n    // itself\n    type === info.lhs_baseModelName ||\n    // base or non-polymorphic\n    // if the other side is polymorphic then we need to scan our modelNames\n    info.rhs_isPolymorphic && info.lhs_modelNames.includes(type) // polymorphic\n    ;\n  }\n  return false;\n}\nfunction upgradeDefinition(graph, key, propertyName, isImplicit = false) {\n  const cache = graph._definitionCache;\n  const storeWrapper = graph.store;\n  const polymorphicLookup = graph._potentialPolymorphicTypes;\n  const {\n    type\n  } = key;\n  let cached = /*#__NOINLINE__*/expandingGet(cache, type, propertyName);\n\n  // CASE: We have a cached resolution (null if no relationship exists)\n  if (cached !== undefined) {\n    return cached;\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected to find relationship definition in the cache for the implicit relationship ${propertyName}`);\n    }\n  })(!isImplicit) : {};\n  const relationships = storeWrapper.schema.fields(key);\n  const relationshipsBySourceKey = storeWrapper.schema.cacheFields?.(key) ?? relationships;\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected to have a relationship definition for ${type} but none was found.`);\n    }\n  })(relationships) : {};\n  const meta = relationshipsBySourceKey.get(propertyName);\n  if (!meta) {\n    // TODO potentially we should just be permissive here since this is an implicit relationship\n    // and not require the lookup table to be populated\n    if (polymorphicLookup[type]) {\n      const altTypes = Object.keys(polymorphicLookup[type]);\n      for (let i = 0; i < altTypes.length; i++) {\n        const _cached = expandingGet(cache, altTypes[i], propertyName);\n        if (_cached) {\n          /*#__NOINLINE__*/expandingSet(cache, type, propertyName, _cached);\n          _cached.rhs_modelNames.push(type);\n          return _cached;\n        }\n      }\n    }\n\n    // CASE: We don't have a relationship at all\n    // we should only hit this in prod\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected a relationship schema for '${type}.${propertyName}', but no relationship schema was found.`);\n      }\n    })(meta) : {};\n    cache[type][propertyName] = null;\n    return null;\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected ${propertyName} to be a relationship`);\n    }\n  })(isRelationshipField(meta)) : {};\n  const definition = /*#__NOINLINE__*/upgradeMeta(meta);\n  let inverseDefinition;\n  let inverseKey;\n  const inverseType = definition.type;\n\n  // CASE: Inverse is explicitly null\n  if (definition.inverseKey === null) {\n    // TODO probably dont need this assertion if polymorphic\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected the inverse model to exist`);\n      }\n    })(getStore(storeWrapper).modelFor(inverseType)) : {};\n    inverseDefinition = null;\n  } else {\n    inverseKey = /*#__NOINLINE__*/inverseForRelationship(getStore(storeWrapper), key, propertyName);\n\n    // CASE: If we are polymorphic, and we declared an inverse that is non-null\n    // we must assume that the lack of inverseKey means that there is no\n    // concrete type as the baseType, so we must construct and artificial\n    // placeholder\n    if (!inverseKey && definition.isPolymorphic && definition.inverseKey) {\n      inverseDefinition = {\n        kind: 'belongsTo',\n        // this must be updated when we find the first belongsTo or hasMany definition that matches\n        key: definition.inverseKey,\n        name: definition.inverseName,\n        type: type,\n        isAsync: false,\n        // this must be updated when we find the first belongsTo or hasMany definition that matches\n        isImplicit: false,\n        isCollection: false,\n        // this must be updated when we find the first belongsTo or hasMany definition that matches\n        isPolymorphic: false\n      }; // the rest of the fields are populated by syncMeta\n\n      // CASE: Inverse resolves to null\n    } else if (!inverseKey) {\n      inverseDefinition = null;\n    } else {\n      // CASE: We have an explicit inverse or were able to resolve one\n      // for the inverse we use \"name\" for lookup not \"sourceKey\"\n      const inverseDefinitions = storeWrapper.schema.fields({\n        type: inverseType\n      });\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected to have a relationship definition for ${inverseType} but none was found.`);\n        }\n      })(inverseDefinitions) : {};\n      const metaFromInverse = inverseDefinitions.get(inverseKey);\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected a relationship schema for '${inverseType}.${inverseKey}' to match the inverse of '${type}.${propertyName}', but no relationship schema was found.`);\n        }\n      })(metaFromInverse) : {};\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected ${inverseKey} to be a relationship`);\n        }\n      })(isRelationshipField(metaFromInverse)) : {};\n      inverseDefinition = upgradeMeta(metaFromInverse);\n    }\n  }\n\n  // CASE: We have no inverse\n  if (!inverseDefinition) {\n    // polish off meta\n    inverseKey = /*#__NOINLINE__*/implicitKeyFor(type, propertyName);\n    inverseDefinition = {\n      kind: 'implicit',\n      key: inverseKey,\n      type: type,\n      isAsync: false,\n      isImplicit: true,\n      isCollection: true,\n      // with implicits any number of records could point at us\n      isPolymorphic: false\n    }; // the rest of the fields are populated by syncMeta\n\n    syncMeta(definition, inverseDefinition);\n    syncMeta(inverseDefinition, definition);\n    const info = {\n      lhs_key: `${type}:${propertyName}`,\n      lhs_modelNames: [type],\n      lhs_baseModelName: type,\n      lhs_relationshipName: propertyName,\n      lhs_definition: definition,\n      lhs_isPolymorphic: definition.isPolymorphic,\n      rhs_key: inverseDefinition.key,\n      rhs_modelNames: [inverseType],\n      rhs_baseModelName: inverseType,\n      rhs_relationshipName: inverseDefinition.key,\n      rhs_definition: inverseDefinition,\n      rhs_isPolymorphic: false,\n      hasInverse: false,\n      isSelfReferential: type === inverseType,\n      // this could be wrong if we are self-referential but also polymorphic\n      isReflexive: false // we can't be reflexive if we don't define an inverse\n    };\n    expandingSet(cache, inverseType, inverseKey, info);\n    expandingSet(cache, type, propertyName, info);\n    return info;\n  }\n\n  // CASE: We do have an inverse\n  const baseType = inverseDefinition.type;\n\n  // TODO we want to assert this but this breaks all of our shoddily written tests\n  /*\n    if (DEBUG) {\n      let inverseDoubleCheck = inverseFor(inverseRelationshipName, store);\n       assert(`The ${inverseBaseModelName}:${inverseRelationshipName} relationship declares 'inverse: null', but it was resolved as the inverse for ${baseModelName}:${relationshipName}.`, inverseDoubleCheck);\n    }\n  */\n  // CASE: We may have already discovered the inverse for the baseModelName\n  // CASE: We have already discovered the inverse\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`We should have determined an inverseKey by now, open an issue if this is hit`);\n    }\n  })(typeof inverseKey === 'string' && inverseKey.length > 0) : {};\n  cached = expandingGet(cache, baseType, propertyName) || expandingGet(cache, inverseType, inverseKey);\n  if (cached) {\n    // TODO this assert can be removed if the above assert is enabled\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`The ${inverseType}:${inverseKey} relationship declares 'inverse: null', but it was resolved as the inverse for ${type}:${propertyName}.`);\n      }\n    })(cached.hasInverse !== false) : {};\n    const _isLHS = cached.lhs_baseModelName === baseType;\n    const modelNames = _isLHS ? cached.lhs_modelNames : cached.rhs_modelNames;\n    // make this lookup easier in the future by caching the key\n    modelNames.push(type);\n    expandingSet(cache, type, propertyName, cached);\n    return cached;\n  }\n\n  // this is our first time so polish off the metas\n  syncMeta(definition, inverseDefinition);\n  syncMeta(inverseDefinition, definition);\n  const lhs_modelNames = [type];\n  if (type !== baseType) {\n    lhs_modelNames.push(baseType);\n  }\n  const isSelfReferential = baseType === inverseType;\n  const info = {\n    lhs_key: `${baseType}:${propertyName}`,\n    lhs_modelNames,\n    lhs_baseModelName: baseType,\n    lhs_relationshipName: propertyName,\n    lhs_definition: definition,\n    lhs_isPolymorphic: definition.isPolymorphic,\n    rhs_key: `${inverseType}:${inverseKey}`,\n    rhs_modelNames: [inverseType],\n    rhs_baseModelName: inverseType,\n    rhs_relationshipName: inverseKey,\n    rhs_definition: inverseDefinition,\n    rhs_isPolymorphic: inverseDefinition.isPolymorphic,\n    hasInverse: true,\n    isSelfReferential,\n    isReflexive: isSelfReferential && propertyName === inverseKey\n  };\n\n  // Create entries for the baseModelName as well as modelName to speed up\n  //  inverse lookups\n  expandingSet(cache, baseType, propertyName, info);\n  expandingSet(cache, type, propertyName, info);\n\n  // Greedily populate the inverse\n  expandingSet(cache, inverseType, inverseKey, info);\n  return info;\n}\nfunction inverseForRelationship(store, resourceKey, key) {\n  const fields = store.schema.fields(resourceKey);\n  const definition = fields.get(key);\n  if (!definition) {\n    return null;\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected ${key} to be a relationship`);\n    }\n  })(isRelationshipField(definition)) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected the relationship defintion to specify the inverse type or null.`);\n    }\n  })(definition.options?.inverse === null || typeof definition.options?.inverse === 'string' && definition.options.inverse.length > 0) : {};\n  return definition.options.inverse;\n}\n\n/* eslint-disable @typescript-eslint/no-shadow */\n\nlet assertPolymorphicType;\nlet assertInheritedSchema;\nif (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n  function validateSchema(definition, meta) {\n    const errors = new Map();\n    if (definition.inverseKey !== meta.name) {\n      errors.set('name', ` <---- should be '${definition.inverseKey}'`);\n    }\n    if (definition.inverseType !== meta.type) {\n      errors.set('type', ` <---- should be '${definition.inverseType}'`);\n    }\n    if (definition.inverseKind !== meta.kind) {\n      errors.set('type', ` <---- should be '${definition.inverseKind}'`);\n    }\n    if (definition.inverseIsAsync !== meta.options.async) {\n      errors.set('async', ` <---- should be ${definition.inverseIsAsync}`);\n    }\n    if (definition.inverseIsPolymorphic && definition.inverseIsPolymorphic !== meta.options.polymorphic) {\n      errors.set('polymorphic', ` <---- should be ${definition.inverseIsPolymorphic}`);\n    }\n    if (definition.key !== meta.options.inverse) {\n      errors.set('inverse', ` <---- should be '${definition.key}'`);\n    }\n    if (definition.type !== meta.options.as) {\n      errors.set('as', ` <---- should be '${definition.type}'`);\n    }\n    return errors;\n  }\n  function expectedSchema(definition) {\n    return printSchema({\n      name: definition.inverseKey,\n      type: definition.inverseType,\n      kind: definition.inverseKind,\n      options: {\n        as: definition.type,\n        async: definition.inverseIsAsync,\n        polymorphic: definition.inverseIsPolymorphic || false,\n        inverse: definition.key\n      }\n    });\n  }\n  function printSchema(config, errors) {\n    return `\n\n\\`\\`\\`\n{\n  ${config.name}: {\n    name: '${config.name}',${errors?.get('name') || ''}\n    type: '${config.type}',${errors?.get('type') || ''}\n    kind: '${config.kind}',${errors?.get('kind') || ''}\n    options: {\n      as: '${config.options.as}',${errors?.get('as') || ''}\n      async: ${config.options.async},${errors?.get('async') || ''}\n      polymorphic: ${config.options.polymorphic},${errors?.get('polymorphic') || ''}\n      inverse: '${config.options.inverse}'${errors?.get('inverse') || ''}\n    }\n  }\n}\n\\`\\`\\`\n\n`;\n  }\n  function metaFrom(definition) {\n    return {\n      name: definition.key,\n      type: definition.type,\n      kind: definition.kind,\n      options: {\n        async: definition.isAsync,\n        polymorphic: definition.isPolymorphic,\n        inverse: definition.inverseKey\n      }\n    };\n  }\n  function inverseMetaFrom(definition) {\n    return {\n      name: definition.inverseKey,\n      type: definition.inverseType,\n      kind: definition.inverseKind,\n      options: {\n        as: definition.isPolymorphic ? definition.type : undefined,\n        async: definition.inverseIsAsync,\n        polymorphic: definition.inverseIsPolymorphic,\n        inverse: definition.key\n      }\n    };\n  }\n  function inverseDefinition(definition) {\n    return {\n      key: definition.inverseKey,\n      name: definition.inverseName,\n      type: definition.inverseType,\n      kind: definition.inverseKind,\n      isAsync: definition.inverseIsAsync,\n      isPolymorphic: true,\n      isLinksMode: definition.isLinksMode,\n      isCollection: definition.inverseIsCollection,\n      isImplicit: definition.inverseIsImplicit,\n      inverseKey: definition.key,\n      inverseName: definition.name,\n      inverseType: definition.type,\n      inverseKind: definition.kind,\n      inverseIsAsync: definition.isAsync,\n      inverseIsPolymorphic: definition.isPolymorphic,\n      inverseIsLinksMode: definition.inverseIsLinksMode,\n      inverseIsImplicit: definition.isImplicit,\n      inverseIsCollection: definition.isCollection,\n      resetOnRemoteUpdate: definition.resetOnRemoteUpdate\n    };\n  }\n  function definitionWithPolymorphic(definition) {\n    return Object.assign({}, definition, {\n      inverseIsPolymorphic: true\n    });\n  }\n  assertInheritedSchema = function assertInheritedSchema(definition, type) {\n    const meta1 = metaFrom(definition);\n    const meta2 = inverseMetaFrom(definition);\n    const errors1 = validateSchema(inverseDefinition(definition), meta1);\n    const errors2 = validateSchema(definitionWithPolymorphic(definition), meta2);\n    if (errors2.size === 0 && errors1.size > 0) {\n      throw new Error(`The schema for the relationship '${type}.${definition.key}' is not configured to satisfy '${definition.inverseType}' and thus cannot utilize the '${definition.inverseType}.${definition.key}' relationship to connect with '${definition.type}.${definition.inverseKey}'\\n\\nIf using this relationship in a polymorphic manner is desired, the relationships schema definition for '${type}' should include:${printSchema(meta1, errors1)}`);\n    } else if (errors1.size > 0) {\n      throw new Error(`The schema for the relationship '${type}.${definition.key}' is not configured to satisfy '${definition.inverseType}' and thus cannot utilize the '${definition.inverseType}.${definition.key}' relationship to connect with '${definition.type}.${definition.inverseKey}'\\n\\nIf using this relationship in a polymorphic manner is desired, the relationships schema definition for '${type}' should include:${printSchema(meta1, errors1)} and the relationships schema definition for '${definition.type}' should include:${printSchema(meta2, errors2)}`);\n    } else if (errors2.size > 0) {\n      throw new Error(`The schema for the relationship '${type}.${definition.key}' satisfies '${definition.inverseType}' but cannot utilize the '${definition.inverseType}.${definition.key}' relationship to connect with '${definition.type}.${definition.inverseKey}' because that relationship is not polymorphic.\\n\\nIf using this relationship in a polymorphic manner is desired, the relationships schema definition for '${definition.type}' should include:${printSchema(meta2, errors2)}`);\n    }\n  };\n  assertPolymorphicType = function assertPolymorphicType(parentIdentifier, parentDefinition, addedIdentifier, store) {\n    if (parentDefinition.inverseIsImplicit) {\n      return;\n    }\n    if (parentDefinition.isPolymorphic) {\n      let meta = store.schema.fields(addedIdentifier).get(parentDefinition.inverseKey);\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`No '${parentDefinition.inverseKey}' field exists on '${addedIdentifier.type}'. To use this type in the polymorphic relationship '${parentDefinition.inverseType}.${parentDefinition.key}' the relationships schema definition for ${addedIdentifier.type} should include:${expectedSchema(parentDefinition)}`);\n        }\n      })(meta) : {};\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected the field ${parentDefinition.inverseKey} to be a relationship`);\n        }\n      })(meta && isRelationshipField(meta)) : {};\n      meta = isLegacyField(meta) ? meta : temporaryConvertToLegacy(meta);\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`You should not specify both options.as and options.inverse as null on ${addedIdentifier.type}.${parentDefinition.inverseKey}, as if there is no inverse field there is no abstract type to conform to. You may have intended for this relationship to be polymorphic, or you may have mistakenly set inverse to null.`);\n        }\n      })(!(meta.options.inverse === null && meta?.options.as?.length)) : {};\n      const errors = validateSchema(parentDefinition, meta);\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`The schema for the relationship '${parentDefinition.inverseKey}' on '${addedIdentifier.type}' type does not correctly implement '${parentDefinition.type}' and thus cannot be assigned to the '${parentDefinition.key}' relationship in '${parentIdentifier.type}'. If using this record in this polymorphic relationship is desired, correct the errors in the schema shown below:${printSchema(meta, errors)}`);\n        }\n      })(errors.size === 0) : {};\n    } else if (addedIdentifier.type !== parentDefinition.type) {\n      // if we are not polymorphic\n      // then the addedIdentifier.type must be the same as the parentDefinition.type\n      let meta = store.schema.fields(addedIdentifier).get(parentDefinition.inverseKey);\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected the field ${parentDefinition.inverseKey} to be a relationship`);\n        }\n      })(!meta || isRelationshipField(meta)) : {};\n      meta = meta && (isLegacyField(meta) ? meta : temporaryConvertToLegacy(meta));\n      if (meta?.options.as === parentDefinition.type) {\n        // inverse is likely polymorphic but missing the polymorphic flag\n        let meta = store.schema.fields({\n          type: parentDefinition.inverseType\n        }).get(parentDefinition.key);\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Expected the field ${parentDefinition.key} to be a relationship`);\n          }\n        })(meta && isRelationshipField(meta)) : {};\n        meta = isLegacyField(meta) ? meta : temporaryConvertToLegacy(meta);\n        const errors = validateSchema(definitionWithPolymorphic(inverseDefinition(parentDefinition)), meta);\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          {\n            throw new Error(`The '<${addedIdentifier.type}>.${parentDefinition.inverseKey}' relationship cannot be used polymorphically because '<${parentDefinition.inverseType}>.${parentDefinition.key} is not a polymorphic relationship. To use this relationship in a polymorphic manner, fix the following schema issues on the relationships schema for '${parentDefinition.inverseType}':${printSchema(meta, errors)}`);\n          }\n        })() : {};\n      } else {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          {\n            throw new Error(`The '${addedIdentifier.type}' type does not implement '${parentDefinition.type}' and thus cannot be assigned to the '${parentDefinition.key}' relationship in '${parentIdentifier.type}'. If this relationship should be polymorphic, mark ${parentDefinition.inverseType}.${parentDefinition.key} as \\`polymorphic: true\\` and ${addedIdentifier.type}.${parentDefinition.inverseKey} as implementing it via \\`as: '${parentDefinition.type}'\\`.`);\n          }\n        })() : {};\n      }\n    }\n  };\n}\nfunction count(label) {\n  // @ts-expect-error\n  // eslint-disable-next-line\n  globalThis.__WarpDriveMetricCountData[label] = (globalThis.__WarpDriveMetricCountData[label] || 0) + 1;\n}\n\n/*\n    case many:1\n    ========\n    In a bi-directional graph with Many:1 edges, adding a value\n    results in up-to 3 discrete value transitions, while removing\n    a value is only 2 transitions.\n\n    For adding C to A\n    If: A <<-> B, C <->> D is the initial state,\n    and: B <->> A <<-> C, D is the final state\n\n    then we would undergo the following transitions.\n\n    add C to A\n    remove C from D\n    add A to C\n\n    For removing B from A\n    If: A <<-> B, C <->> D is the initial state,\n    and: A, B, C <->> D is the final state\n\n    then we would undergo the following transitions.\n\n    remove B from A\n    remove A from B\n\n    case many:many\n    ===========\n    In a bi-directional graph with Many:Many edges, adding or\n    removing a value requires only 2 value transitions.\n\n    For Adding\n    If: A<<->>B, C<<->>D is the initial state (double arrows representing the many side)\n    And: D<<->>C<<->>A<<->>B is the final state\n\n    Then we would undergo two transitions.\n\n    add C to A.\n    add A to C\n\n    For Removing\n    If: A<<->>B, C<<->>D is the initial state (double arrows representing the many side)\n    And: A, B, C<<->>D is the final state\n\n    Then we would undergo two transitions.\n\n    remove B from A\n    remove A from B\n\n    case many:?\n    ========\n    In a uni-directional graph with Many:? edges (modeled in WarpDrive with `inverse:null`) with\n    artificial (implicit) inverses, replacing a value results in 2 discrete value transitions.\n    This is because a Many:? relationship is effectively Many:Many.\n  */\nfunction replaceRelatedRecords(graph, op, isRemote) {\n  if (isRemote) {\n    replaceRelatedRecordsRemote(graph, op, isRemote);\n  } else {\n    replaceRelatedRecordsLocal(graph, op, isRemote);\n  }\n}\nfunction replaceRelatedRecordsLocal(graph, op, isRemote) {\n  const resourceKeys = op.value;\n  const relationship = graph.get(op.record, op.field);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`expected hasMany relationship`);\n    }\n  })(isHasMany(relationship)) : {};\n  relationship.state.hasReceivedData = true;\n  const {\n    additions,\n    removals\n  } = relationship;\n  const {\n    inverseKey,\n    type\n  } = relationship.definition;\n  const {\n    record\n  } = op;\n  const wasDirty = relationship.isDirty;\n  let localBecameDirty = false;\n  if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_METRIC_COUNTS)) {\n    if (getGlobalConfig().WarpDrive.debug.LOG_METRIC_COUNTS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_METRIC_COUNTS) {\n      count(`replaceRelatedRecordsLocal ${'type' in record ? record.type : '<document>'} ${op.field}`);\n    }\n  }\n  const onAdd = resourceKey => {\n    // Since we are diffing against the remote state, we check\n    // if our previous local state did not contain this ResourceKey\n    const removalsHas = removals?.has(resourceKey);\n    if (removalsHas || !additions?.has(resourceKey)) {\n      if (type !== resourceKey.type) {\n        if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n          assertPolymorphicType(relationship.identifier, relationship.definition, resourceKey, graph.store);\n        }\n        graph.registerPolymorphicType(type, resourceKey.type);\n      }\n\n      // we've added a record locally that wasn't in the local state before\n      localBecameDirty = true;\n      addToInverse(graph, resourceKey, inverseKey, op.record, isRemote);\n      if (removalsHas) {\n        removals.delete(resourceKey);\n      }\n    }\n  };\n  const onRemove = resourceKey => {\n    // Since we are diffing against the remote state, we check\n    // if our previous local state had contained this ResourceKey\n    const additionsHas = additions?.has(resourceKey);\n    if (additionsHas || !removals?.has(resourceKey)) {\n      // we've removed a record locally that was in the local state before\n      localBecameDirty = true;\n      removeFromInverse(graph, resourceKey, inverseKey, record, isRemote);\n      if (additionsHas) {\n        additions.delete(resourceKey);\n      }\n    }\n  };\n  const diff = diffCollection(resourceKeys, relationship, onAdd, onRemove);\n\n  // any additions no longer in the local state\n  // also need to be removed from the inverse\n  if (additions && additions.size > 0) {\n    additions.forEach(resourceKey => {\n      if (!diff.add.has(resourceKey)) {\n        localBecameDirty = true;\n        onRemove(resourceKey);\n      }\n    });\n  }\n\n  // any removals no longer in the local state\n  // also need to be added back to the inverse\n  if (removals && removals.size > 0) {\n    removals.forEach(resourceKey => {\n      if (!diff.del.has(resourceKey)) {\n        localBecameDirty = true;\n        onAdd(resourceKey);\n      }\n    });\n  }\n  const becameDirty = diff.changed || localBecameDirty;\n  relationship.additions = diff.add;\n  relationship.removals = diff.del;\n  relationship.localState = diff.finalState;\n\n  // we only notify if the localState changed and were not already dirty before\n  // because if we were already dirty then we have already notified\n  if (becameDirty && !wasDirty) {\n    notifyChange(graph, relationship);\n  }\n}\nfunction replaceRelatedRecordsRemote(graph, op, isRemote) {\n  const resourceKeys = op.value;\n  const relationship = graph.get(op.record, op.field);\n  if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_METRIC_COUNTS)) {\n    if (getGlobalConfig().WarpDrive.debug.LOG_METRIC_COUNTS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_METRIC_COUNTS) {\n      count(`replaceRelatedRecordsRemote ${'type' in op.record ? op.record.type : '<document>'}  ${op.field}`);\n    }\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You can only '${op.op}' on a hasMany relationship. ${op.record.type}.${op.field} is a ${relationship.definition.kind}`);\n    }\n  })(isHasMany(relationship)) : {};\n  if (isRemote) {\n    graph._addToTransaction(relationship);\n  }\n  const wasDirty = relationship.isDirty;\n  // if this is our first time receiving data\n  // we need to mark the relationship as dirty\n  // so that non-materializing APIs like `hasManyReference.value()`\n  // will get notified and updated.\n  if (!relationship.state.hasReceivedData) {\n    relationship.isDirty = true;\n  }\n  relationship.state.hasReceivedData = true;\n\n  // cache existing state\n  const {\n    definition\n  } = relationship;\n  const {\n    type\n  } = relationship.definition;\n  const diff = diffCollection(resourceKeys, relationship, resourceKey => {\n    if (type !== resourceKey.type) {\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        assertPolymorphicType(relationship.identifier, relationship.definition, resourceKey, graph.store);\n      }\n      graph.registerPolymorphicType(type, resourceKey.type);\n    }\n    // commit additions\n    // TODO build this into the diff?\n    // because we are not dirty if this was a committed local addition\n    if (relationship.additions?.has(resourceKey)) {\n      relationship.additions.delete(resourceKey);\n    } else {\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.DEBUG_RELATIONSHIP_NOTIFICATIONS)) {\n        if (getGlobalConfig().WarpDrive.debug.DEBUG_RELATIONSHIP_NOTIFICATIONS || globalThis.getWarpDriveRuntimeConfig().debug.DEBUG_RELATIONSHIP_NOTIFICATIONS) {\n          if (!relationship.isDirty) {\n            // eslint-disable-next-line no-console\n            console.log(`setting relationship to dirty because the remote addition was not in our previous list of local additions`);\n          }\n        }\n      }\n    }\n    addToInverse(graph, resourceKey, definition.inverseKey, op.record, isRemote);\n  }, resourceKey => {\n    // commit removals\n    // TODO build this into the diff?\n    // because we are not dirty if this was a committed local addition\n    if (relationship.removals?.has(resourceKey)) {\n      relationship.removals.delete(resourceKey);\n    } else {\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.DEBUG_RELATIONSHIP_NOTIFICATIONS)) {\n        if (getGlobalConfig().WarpDrive.debug.DEBUG_RELATIONSHIP_NOTIFICATIONS || globalThis.getWarpDriveRuntimeConfig().debug.DEBUG_RELATIONSHIP_NOTIFICATIONS) {\n          if (!relationship.isDirty) {\n            // eslint-disable-next-line no-console\n            console.log(`setting relationship to dirty because the remote removal was not in our previous list of local removals`);\n          }\n        }\n      }\n    }\n    removeFromInverse(graph, resourceKey, definition.inverseKey, op.record, isRemote);\n  });\n\n  // replace existing state\n  relationship.remoteMembers = diff.finalSet;\n  relationship.remoteState = diff.finalState;\n\n  // changed also indicates a change in order\n  if (diff.changed) {\n    relationship.isDirty = true;\n  }\n\n  // TODO unsure if we need this but it\n  // may allow us to more efficiently patch\n  // the associated ManyArray\n  relationship._diff = diff;\n  if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE)) {\n    // only do this for legacy hasMany, not collection\n    // and provide a way to incrementally migrate\n    if (\n    // we do not guard by diff.changed here\n    // because we want to clear local changes even if\n    // no change has occurred to preserve the legacy behavior\n    relationship.definition.kind === 'hasMany' && relationship.definition.resetOnRemoteUpdate !== false && (diff.changed || wasDirty)) {\n      const deprecationInfo = {\n        removals: [],\n        additions: [],\n        triggered: false\n      };\n      if (relationship.removals) {\n        relationship.isDirty = true;\n        relationship.removals.forEach(resourceKey => {\n          deprecationInfo.triggered = true;\n          deprecationInfo.removals.push(resourceKey);\n          // reverse the removal\n          // if we are still in removals at this point then\n          // we were not \"committed\" which means we are present\n          // in the remoteMembers. So we \"add back\" on the inverse.\n          addToInverse(graph, resourceKey, definition.inverseKey, op.record, false);\n        });\n        relationship.removals = null;\n      }\n      if (relationship.additions) {\n        relationship.additions.forEach(resourceKey => {\n          // reverse the addition\n          // if we are still in additions at this point then\n          // we were not \"committed\" which means we are not present\n          // in the remoteMembers. So we \"remove\" from the inverse.\n          // however we only do this if we are not a \"new\" record.\n          if (!checkIfNew(graph._realStore, resourceKey)) {\n            deprecationInfo.triggered = true;\n            deprecationInfo.additions.push(resourceKey);\n            relationship.isDirty = true;\n            relationship.additions.delete(resourceKey);\n            removeFromInverse(graph, resourceKey, definition.inverseKey, op.record, false);\n          }\n        });\n        if (relationship.additions.size === 0) {\n          relationship.additions = null;\n        }\n      }\n      if (deprecationInfo.triggered) {\n        deprecate(`WarpDrive is changing the default semantics of updates to the remote state of relationships.\\n\\nThe following local state was cleared from the <${relationship.identifier.type}>.${relationship.definition.key} hasMany relationship but will not be once this deprecation is resolved by opting into the new behavior:\\n\\n\\tAdded: [${deprecationInfo.additions.map(i => i.lid).join(', ')}]\\n\\tRemoved: [${deprecationInfo.removals.map(i => i.lid).join(', ')}]`, false, {\n          id: 'ember-data:deprecate-relationship-remote-update-clearing-local-state',\n          for: 'ember-data',\n          since: {\n            enabled: '5.3',\n            available: '4.13'\n          },\n          until: '6.0',\n          url: 'https://deprecations.emberjs.com/v5.x#ember-data-deprecate-relationship-remote-update-clearing-local-state'\n        });\n      }\n    }\n  }\n  if (relationship.isDirty && !wasDirty) {\n    flushCanonical(graph, relationship);\n  }\n}\nfunction addToInverse(graph, resourceKey, key, value, isRemote) {\n  const relationship = graph.get(resourceKey, key);\n  const {\n    type\n  } = relationship.definition;\n  if (type !== value.type) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      assertPolymorphicType(relationship.identifier, relationship.definition, value, graph.store);\n    }\n    graph.registerPolymorphicType(type, value.type);\n  }\n  if (isBelongsTo(relationship)) {\n    relationship.state.hasReceivedData = true;\n    relationship.state.isEmpty = false;\n    if (isRemote) {\n      graph._addToTransaction(relationship);\n      if (relationship.remoteState !== null) {\n        removeFromInverse(graph, relationship.remoteState, relationship.definition.inverseKey, resourceKey, isRemote);\n      }\n      relationship.remoteState = value;\n    }\n    if (relationship.localState !== value) {\n      if (!isRemote && relationship.localState) {\n        removeFromInverse(graph, relationship.localState, relationship.definition.inverseKey, resourceKey, isRemote);\n      }\n      relationship.localState = value;\n      notifyChange(graph, relationship);\n    }\n  } else if (isHasMany(relationship)) {\n    if (isRemote) {\n      // TODO this needs to alert stuffs\n      // And patch state better\n      // This is almost definitely wrong\n      // WARNING WARNING WARNING\n\n      if (!relationship.remoteMembers.has(value)) {\n        graph._addToTransaction(relationship);\n        relationship.remoteState.push(value);\n        relationship.remoteMembers.add(value);\n        if (relationship.additions?.has(value)) {\n          relationship.additions.delete(value);\n        } else {\n          relationship.isDirty = true;\n          relationship.state.hasReceivedData = true;\n          flushCanonical(graph, relationship);\n        }\n      }\n    } else {\n      // if we are not dirty but have a null localState then we\n      // are mutating a relationship that has never been fetched\n      // so we initialize localState to an empty array\n      if (!relationship.isDirty && !relationship.localState) {\n        relationship.localState = [];\n      }\n      if (_add(graph, resourceKey, relationship, value, null, isRemote)) {\n        notifyChange(graph, relationship);\n      }\n    }\n  } else {\n    if (isRemote) {\n      if (!relationship.remoteMembers.has(value)) {\n        relationship.remoteMembers.add(value);\n        relationship.localMembers.add(value);\n      }\n    } else {\n      if (!relationship.localMembers.has(value)) {\n        relationship.localMembers.add(value);\n      }\n    }\n  }\n}\nfunction notifyInverseOfPotentialMaterialization(graph, resourceKey, key, value, isRemote) {\n  const relationship = graph.get(resourceKey, key);\n  if (isHasMany(relationship) && isRemote && relationship.remoteMembers.has(value)) {\n    notifyChange(graph, relationship);\n  }\n}\nfunction removeFromInverse(graph, resourceKey, key, value, isRemote) {\n  const relationship = graph.get(resourceKey, key);\n  if (isBelongsTo(relationship)) {\n    relationship.state.isEmpty = true;\n    if (isRemote) {\n      graph._addToTransaction(relationship);\n      relationship.remoteState = null;\n    }\n    if (relationship.localState === value) {\n      relationship.localState = null;\n      notifyChange(graph, relationship);\n    }\n  } else if (isHasMany(relationship)) {\n    if (isRemote) {\n      graph._addToTransaction(relationship);\n      if (_removeRemote(relationship, value)) {\n        notifyChange(graph, relationship);\n      }\n    } else {\n      if (_removeLocal(relationship, value)) {\n        notifyChange(graph, relationship);\n      }\n    }\n  } else {\n    if (isRemote) {\n      relationship.remoteMembers.delete(value);\n      relationship.localMembers.delete(value);\n    } else {\n      if (value && relationship.localMembers.has(value)) {\n        relationship.localMembers.delete(value);\n      }\n    }\n  }\n}\nfunction flushCanonical(graph, rel) {\n  if (rel.accessed) {\n    graph._scheduleLocalSync(rel);\n  }\n}\nfunction replaceRelatedRecord(graph, op, isRemote = false) {\n  const relationship = graph.get(op.record, op.field);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You can only '${op.op}' on a belongsTo relationship. ${op.record.type}.${op.field} is a ${relationship.definition.kind}`);\n    }\n  })(isBelongsTo(relationship)) : {};\n  if (isRemote) {\n    graph._addToTransaction(relationship);\n  }\n  const {\n    definition,\n    state\n  } = relationship;\n  const prop = isRemote ? 'remoteState' : 'localState';\n  const existingState = relationship[prop];\n\n  /*\n    case 1:1\n    ========\n    In a bi-directional graph with 1:1 edges, replacing a value\n    results in up-to 4 discrete value transitions.\n     If: A <-> B, C <-> D is the initial state,\n    and: A <-> C, B, D is the final state\n     then we would undergo the following 4 transitions.\n     remove A from B\n    add C to A\n    remove C from D\n    add A to C\n     case 1:many\n    ===========\n    In a bi-directional graph with 1:Many edges, replacing a value\n    results in up-to 3 discrete value transitions.\n     If: A<->>B<<->D, C<<->D is the initial state (double arrows representing the many side)\n    And: A<->>C<<->D, B<<->D is the final state\n     Then we would undergo three transitions.\n     remove A from B\n    add C to A.\n    add A to C\n     case 1:?\n    ========\n    In a uni-directional graph with 1:? edges (modeled in WarpDrive with `inverse:null`) with\n    artificial (implicit) inverses, replacing a value results in up-to 3 discrete value transitions.\n    This is because a 1:? relationship is effectively 1:many.\n     If: A->B, C->B is the initial state\n    And: A->C, C->B is the final state\n     Then we would undergo three transitions.\n     Remove A from B\n    Add C to A\n    Add A to C\n  */\n\n  // nothing for us to do\n  if (op.value === existingState) {\n    // if we were empty before but now know we are empty this needs to be true\n    state.hasReceivedData = true;\n    // if this is a remote update we still sync\n    if (isRemote) {\n      const {\n        localState\n      } = relationship;\n      // don't sync if localState is a new record and our remoteState is null\n      if (localState && checkIfNew(graph._realStore, localState) && !existingState) {\n        return;\n      }\n      if (existingState && localState === existingState) {\n        notifyInverseOfPotentialMaterialization(graph, existingState, definition.inverseKey, op.record, isRemote);\n      } else if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE)) {\n        // if localState does not match existingState then we know\n        // we have a local mutation that has not been persisted yet\n        if (localState !== op.value && relationship.definition.resetOnRemoteUpdate !== false) {\n          relationship.localState = existingState;\n          deprecate(`WarpDrive is changing the default semantics of updates to the remote state of relationships.\\n\\nThe following local state was cleared from the <${relationship.identifier.type}>.${relationship.definition.key} belongsTo relationship but will not be once this deprecation is resolved:\\n\\n\\t${localState ? 'Added: ' + localState.lid + '\\n\\t' : ''}${existingState ? 'Removed: ' + existingState.lid : ''}`, false, {\n            id: 'ember-data:deprecate-relationship-remote-update-clearing-local-state',\n            for: 'ember-data',\n            since: {\n              enabled: '5.3',\n              available: '4.13'\n            },\n            until: '6.0',\n            url: 'https://deprecations.emberjs.com/v5.x#ember-data-deprecate-relationship-remote-update-clearing-local-state'\n          });\n          notifyChange(graph, relationship);\n        }\n      }\n    }\n    return;\n  }\n\n  // remove this value from the inverse if required\n  if (existingState) {\n    removeFromInverse(graph, existingState, definition.inverseKey, op.record, isRemote);\n  }\n\n  // update value to the new value\n  relationship[prop] = op.value;\n  state.hasReceivedData = true;\n  state.isEmpty = op.value === null;\n  state.isStale = false;\n  state.hasFailedLoadAttempt = false;\n  if (op.value) {\n    if (definition.type !== op.value.type) {\n      // assert(\n      //   `The '<${definition.inverseType}>.${op.field}' relationship expects only '${definition.type}' records since it is not polymorphic. Received a Record of type '${op.value.type}'`,\n      //   definition.isPolymorphic\n      // );\n\n      // TODO this should now handle the deprecation warning if isPolymorphic is not set\n      // but the record does turn out to be polymorphic\n      // this should still assert if the user is relying on legacy inheritance/mixins to\n      // provide polymorphic behavior and has not yet added the polymorphic flags\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        assertPolymorphicType(relationship.identifier, definition, op.value, graph.store);\n      }\n      graph.registerPolymorphicType(definition.type, op.value.type);\n    }\n    addToInverse(graph, op.value, definition.inverseKey, op.record, isRemote);\n  }\n  if (isRemote) {\n    const {\n      localState,\n      remoteState\n    } = relationship;\n    if (localState && checkIfNew(graph._realStore, localState) && !remoteState) {\n      return;\n    }\n    // when localState does not match the new remoteState and\n    // localState === existingState then we had no local mutation\n    // and we can safely sync the new remoteState to local\n    if (localState !== remoteState && localState === existingState) {\n      relationship.localState = remoteState;\n      notifyChange(graph, relationship);\n      // But when localState does not match the new remoteState and\n      // and localState !== existingState then we know we have a local mutation\n      // that has not been persisted yet.\n    } else if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE)) {\n      if (localState !== remoteState && localState !== existingState && relationship.definition.resetOnRemoteUpdate !== false) {\n        relationship.localState = remoteState;\n        deprecate(`WarpDrive is changing the default semantics of updates to the remote state of relationships.\\n\\nThe following local state was cleared from the <${relationship.identifier.type}>.${relationship.definition.key} belongsTo relationship but will not be once this deprecation is resolved:\\n\\n\\t${localState ? 'Added: ' + localState.lid + '\\n\\t' : ''}${existingState ? 'Removed: ' + existingState.lid : ''}`, false, {\n          id: 'ember-data:deprecate-relationship-remote-update-clearing-local-state',\n          for: 'ember-data',\n          since: {\n            enabled: '5.3',\n            available: '4.13'\n          },\n          until: '6.0',\n          url: 'https://deprecations.emberjs.com/v5.x#ember-data-deprecate-relationship-remote-update-clearing-local-state'\n        });\n        notifyChange(graph, relationship);\n      }\n    }\n  } else {\n    notifyChange(graph, relationship);\n  }\n}\nfunction _deprecatedCompare(priorLocalState, newState, newMembers, prevState, prevSet, onAdd, onDel, remoteClearsLocal) {\n  const newLength = newState.length;\n  const prevLength = prevState.length;\n  const iterationLength = Math.max(newLength, prevLength);\n  let changed = newMembers.size !== prevSet.size;\n  let remoteOrderChanged = false;\n  const added = new Set();\n  const removed = new Set();\n  const duplicates = new Map();\n  const finalSet = new Set();\n  const finalState = [];\n  const priorLocalLength = priorLocalState?.length ?? 0;\n  for (let i = 0, j = 0; i < iterationLength; i++) {\n    let adv = false;\n    let member;\n\n    // accumulate anything added\n    if (i < newLength) {\n      member = newState[i];\n      if (!finalSet.has(member)) {\n        finalState[j] = member;\n        finalSet.add(member);\n        adv = true;\n        if (!prevSet.has(member)) {\n          // Avoid unnecessarily notifying a change that already exists locally\n          if (i < priorLocalLength) {\n            const priorLocalMember = priorLocalState[i];\n            if (priorLocalMember !== member) {\n              changed = true;\n            }\n          }\n          added.add(member);\n          onAdd(member);\n        }\n      } else {\n        let list = duplicates.get(member);\n        if (list === undefined) {\n          list = [];\n          duplicates.set(member, list);\n        }\n        list.push(i);\n      }\n    }\n\n    // accumulate anything removed\n    if (i < prevLength) {\n      const prevMember = prevState[i];\n\n      // detect reordering, adjusting index for duplicates\n      // j is always less than i and so if i < prevLength, j < prevLength\n      if (member !== prevState[j]) {\n        // the new remote order does not match the current remote order\n        // indicating a change in membership or reordering\n        remoteOrderChanged = true;\n        // however: if the new remote order matches the current local order\n        // we can disregard the change notification generation so long as\n        // we are not configured to reset on remote update (which is deprecated)\n        if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE)) {\n          if (!remoteClearsLocal && i < priorLocalLength) {\n            const priorLocalMember = priorLocalState[j];\n            if (priorLocalMember !== member) {\n              changed = true;\n            }\n          } else {\n            changed = true;\n          }\n        } else {\n          if (i < priorLocalLength) {\n            const priorLocalMember = priorLocalState[j];\n            if (priorLocalMember !== member) {\n              changed = true;\n            }\n          } else {\n            changed = true;\n          }\n        }\n\n        // if remote order hasn't changed but local order differs\n        // and we are configured to reset on remote update (which is deprecated)\n        // then we still need to mark the relationship as changed\n      } else if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE)) {\n        if (remoteClearsLocal) {\n          if (!changed && j < priorLocalLength) {\n            const priorLocalMember = priorLocalState[j];\n            if (priorLocalMember !== member) {\n              changed = true;\n            }\n          }\n        }\n      }\n      if (!newMembers.has(prevMember)) {\n        changed = true;\n        removed.add(prevMember);\n        onDel(prevMember);\n      }\n    } else if (adv && j < prevLength && member !== prevState[j]) {\n      changed = true;\n    }\n    if (adv) {\n      j++;\n    }\n  }\n  const diff = {\n    add: added,\n    del: removed,\n    finalState,\n    finalSet,\n    changed,\n    remoteOrderChanged\n  };\n  return {\n    diff,\n    duplicates\n  };\n}\nfunction _compare(priorLocalState, finalState, finalSet, prevState, prevSet, onAdd, onDel, remoteClearsLocal) {\n  const finalLength = finalState.length;\n  const prevLength = prevState.length;\n  const iterationLength = Math.max(finalLength, prevLength);\n  const equalLength = priorLocalState ? finalLength === priorLocalState.length : finalLength === prevLength;\n  let remoteOrderChanged = finalSet.size !== prevSet.size;\n  let changed = priorLocalState ? finalSet.size !== priorLocalState.length : remoteOrderChanged;\n  const added = new Set();\n  const removed = new Set();\n  const priorLocalLength = priorLocalState?.length ?? 0;\n  if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.DEBUG_RELATIONSHIP_NOTIFICATIONS)) {\n    if (getGlobalConfig().WarpDrive.debug.DEBUG_RELATIONSHIP_NOTIFICATIONS || globalThis.getWarpDriveRuntimeConfig().debug.DEBUG_RELATIONSHIP_NOTIFICATIONS) {\n      // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n      changed &&\n      // eslint-disable-next-line no-console\n      console.log(`changed because ${priorLocalState ? 'finalSet.size !== priorLocalState.length' : 'finalSet.size !== prevSet.size'}`);\n    }\n  }\n  for (let i = 0; i < iterationLength; i++) {\n    let member;\n\n    // accumulate anything added\n    if (i < finalLength) {\n      member = finalState[i];\n      if (!prevSet.has(member)) {\n        // Avoid unnecessarily notifying a change that already exists locally\n        if (i < priorLocalLength) {\n          const priorLocalMember = priorLocalState[i];\n          if (priorLocalMember !== member) {\n            if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.DEBUG_RELATIONSHIP_NOTIFICATIONS)) {\n              if (getGlobalConfig().WarpDrive.debug.DEBUG_RELATIONSHIP_NOTIFICATIONS || globalThis.getWarpDriveRuntimeConfig().debug.DEBUG_RELATIONSHIP_NOTIFICATIONS) {\n                // eslint-disable-next-line @typescript-eslint/no-unused-expressions, no-console\n                !changed && console.log(`changed because priorLocalMember !== member && !prevSet.has(member)`);\n              }\n            }\n            changed = true;\n          }\n        }\n        added.add(member);\n        onAdd(member);\n      }\n    }\n\n    // accumulate anything removed\n    if (i < prevLength) {\n      const prevMember = prevState[i];\n\n      // detect reordering\n      if (equalLength && member !== prevMember) {\n        // the new remote order does not match the current remote order\n        // indicating a change in membership or reordering\n        remoteOrderChanged = true;\n        // however: if the new remote order matches the current local order\n        // we can disregard the change notification generation so long as\n        // we are not configured to reset on remote update (which is deprecated)\n\n        if (i < priorLocalLength) {\n          const priorLocalMember = priorLocalState[i];\n          if (priorLocalMember !== member) {\n            if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.DEBUG_RELATIONSHIP_NOTIFICATIONS)) {\n              if (getGlobalConfig().WarpDrive.debug.DEBUG_RELATIONSHIP_NOTIFICATIONS || globalThis.getWarpDriveRuntimeConfig().debug.DEBUG_RELATIONSHIP_NOTIFICATIONS) {\n                // eslint-disable-next-line @typescript-eslint/no-unused-expressions, no-console\n                !changed && console.log(`changed because priorLocalMember !== member && member !== prevMember`);\n              }\n            }\n            changed = true;\n          }\n        } else if (i < finalLength) {\n          // if we have exceeded the length of priorLocalState and we are within the range\n          // of the finalState then we must have changed\n          if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.DEBUG_RELATIONSHIP_NOTIFICATIONS)) {\n            if (getGlobalConfig().WarpDrive.debug.DEBUG_RELATIONSHIP_NOTIFICATIONS || globalThis.getWarpDriveRuntimeConfig().debug.DEBUG_RELATIONSHIP_NOTIFICATIONS) {\n              // eslint-disable-next-line @typescript-eslint/no-unused-expressions, no-console\n              !changed && console.log(`changed because priorMember !== member && index >= priorLocalLength`);\n            }\n          }\n          changed = true;\n        }\n\n        // if remote order hasn't changed but local order differs\n        // and we are configured to reset on remote update (which is deprecated)\n        // then we still need to mark the relationship as changed\n      } else if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE)) {\n        if (remoteClearsLocal) {\n          if (equalLength && !changed && i < priorLocalLength) {\n            const priorLocalMember = priorLocalState[i];\n            if (priorLocalMember !== prevMember) {\n              if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.DEBUG_RELATIONSHIP_NOTIFICATIONS)) {\n                if (getGlobalConfig().WarpDrive.debug.DEBUG_RELATIONSHIP_NOTIFICATIONS || globalThis.getWarpDriveRuntimeConfig().debug.DEBUG_RELATIONSHIP_NOTIFICATIONS) {\n                  // eslint-disable-next-line @typescript-eslint/no-unused-expressions, no-console\n                  !changed && console.log(`changed because priorLocalMember !== prevMember && remoteClearsLocal`);\n                }\n              }\n              changed = true;\n            }\n          }\n        }\n      }\n      if (!finalSet.has(prevMember)) {\n        // if we are within finalLength, we can only be \"changed\" if we've already exceeded\n        // the index range of priorLocalState, as otherwise the previous member may still\n        // be removed.\n        //\n        // prior local: [1, 2, 3, 4]\n        // final state: [1, 2, 3]\n        // prev remote state: [1, 2, 5, 3, 4]\n        // i === 2\n        // prevMember === 5\n        // !finalSet.has(prevMember) === true\n        //\n        // because we will become changed at i===3,\n        // we do not need to worry about becoming changed at i===2\n        // as the arrays until now are still the same\n        //\n        // prior local: [1, 2, 3]\n        // final state: [1, 2, 3, 4]\n        // prev remote state: [1, 2, 5, 3, 4]\n        // i === 2\n        // prevMember === 5\n        // !finalSet.has(prevMember) === true\n        //\n        // because we will become changed at i===3\n        // we do not need to worry about becoming changed at i===2\n        //\n        // prior local: [1, 2, 3]\n        // final state: [1, 2, 3]\n        // prev remote state: [1, 2, 5, 3, 4]\n        // i === 2\n        // prevMember === 5\n        // !finalSet.has(prevMember) === true\n        //\n        // because we have same length and same membership order\n        // we do not need to worry about becoming changed at i===2\n        //\n        // if you do not have a priorLocalState you can't be changed\n        // ergo, we never need to set changed in this branch.\n        // this log can still be useful for debugging.\n        if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.DEBUG_RELATIONSHIP_NOTIFICATIONS)) {\n          if (getGlobalConfig().WarpDrive.debug.DEBUG_RELATIONSHIP_NOTIFICATIONS || globalThis.getWarpDriveRuntimeConfig().debug.DEBUG_RELATIONSHIP_NOTIFICATIONS) {\n            // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n            !changed &&\n            // eslint-disable-next-line no-console\n            console.log(`changed because i >= priorLocalLength && i < finalLength && !finalSet.has(prevMember)`);\n          }\n        }\n        //\n        // we do still set remoteOrderChanged as it has\n        remoteOrderChanged = true;\n        removed.add(prevMember);\n        onDel(prevMember);\n      }\n    }\n  }\n  return {\n    add: added,\n    del: removed,\n    finalState,\n    finalSet,\n    changed,\n    remoteOrderChanged\n  };\n}\nfunction diffCollection(finalState, relationship, onAdd, onDel) {\n  const finalSet = new Set(finalState);\n  const {\n    localState: priorLocalState,\n    remoteState,\n    remoteMembers\n  } = relationship;\n  if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_NON_UNIQUE_PAYLOADS)) {\n    if (finalState.length !== finalSet.size) {\n      const {\n        diff,\n        duplicates\n      } = _deprecatedCompare(priorLocalState, finalState, finalSet, remoteState, remoteMembers, onAdd, onDel, relationship.definition.resetOnRemoteUpdate);\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        deprecate(`Expected all entries in the relationship ${relationship.definition.type}:${relationship.definition.key} to be unique, see log for a list of duplicate entry indeces`, false, {\n          id: 'ember-data:deprecate-non-unique-relationship-entries',\n          for: 'ember-data',\n          until: '6.0',\n          since: {\n            available: '4.13',\n            enabled: '5.3'\n          }\n        });\n        // eslint-disable-next-line no-console\n        console.log(duplicates);\n      }\n      return diff;\n    }\n  } else {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected all entries in the relationship to be unique, found duplicates`);\n      }\n    })(finalState.length === finalSet.size) : {};\n  }\n  return _compare(priorLocalState, finalState, finalSet, remoteState, remoteMembers, onAdd, onDel, relationship.definition.resetOnRemoteUpdate);\n}\nfunction computeLocalState(storage) {\n  if (!storage.isDirty) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected localState to be present`);\n      }\n    })(Array.isArray(storage.localState)) : {};\n    return storage.localState;\n  }\n  const state = storage.remoteState.slice();\n  storage.removals?.forEach(v => {\n    const index = state.indexOf(v);\n    state.splice(index, 1);\n  });\n  storage.additions?.forEach(v => {\n    state.push(v);\n  });\n  storage.localState = state;\n  storage.isDirty = false;\n  return state;\n}\n\n/**\n * A function which attempts to add a value to the local state of a collection\n * relationship, and returns true if the value was added, or false if it was\n * already present.\n *\n * It will not generate a notification, will not update the relationships to dirty,\n * and will not update the inverse relationships, making it suitable for use as\n * an internal util to perform the just the addition to a specific side of a\n * relationship.\n *\n * @internal\n */\nfunction _add(graph, record, relationship, value, index, isRemote) {\n  return !isRemote ? _addLocal(graph, record, relationship, value, index) : _addRemote(graph, record, relationship, value, index);\n}\nfunction _addRemote(graph, record, relationship, value, index) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`expected an identifier to add to the collection relationship`);\n    }\n  })(value) : {};\n  const {\n    remoteMembers,\n    additions,\n    removals,\n    remoteState\n  } = relationship;\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Cannot add a resource that is already present`);\n    }\n  })(!remoteMembers.has(value)) : {};\n  if (remoteMembers.has(value)) {\n    return false;\n  }\n\n  // add to the remote state\n  remoteMembers.add(value);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Cannot insert at an index that is not in bounds`);\n    }\n  })(index === null || index >= 0 && index < remoteState.length) : {};\n  const hasValidIndex = index !== null && index >= 0 && index < remoteState.length;\n  if (hasValidIndex) {\n    remoteState.splice(index, 0, value);\n  } else {\n    remoteState.push(value);\n  }\n\n  // remove from additions if present\n  if (additions?.has(value)) {\n    additions.delete(value);\n\n    // nothing more to do this was our state already\n    return false;\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Remote state indicated addition of a resource that was present only as a local mutation`);\n    }\n  })(!removals?.has(value)) : {};\n\n  // if the relationship already needs to recalc, we don't bother\n  // attempting to patch the localState\n  if (relationship.isDirty) {\n    return true;\n  }\n\n  // if we have existing localState\n  // we attempt to patch it without blowing it away\n  // as this is more efficient than recomputing\n  // it allows us to preserve local ordering\n  // to a small extent. Local ordering should not\n  // be relied upon as any remote change could blow it away\n  if (relationship.localState) {\n    if (!hasValidIndex) {\n      relationship.localState.push(value);\n    } else if (index === 0) {\n      relationship.localState.unshift(value);\n    } else if (!removals?.size) {\n      relationship.localState.splice(index, 0, value);\n    } else {\n      relationship.isDirty = true;\n    }\n  }\n  return true;\n}\nfunction _addLocal(graph, record, relationship, value, index) {\n  const {\n    remoteMembers,\n    removals\n  } = relationship;\n  let additions = relationship.additions;\n  const hasPresence = remoteMembers.has(value) || additions?.has(value);\n  if (hasPresence && !removals?.has(value)) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to add the resource '${value.lid}' to the collection <${relationship.identifier.type}>.${relationship.definition.key} it was already in`);\n      }\n    })(hasPresence && !removals?.has(value)) : {};\n    return false;\n  }\n  if (removals?.has(value)) {\n    removals.delete(value);\n  } else {\n    if (!additions) {\n      additions = relationship.additions = new Set();\n    }\n    relationship.state.hasReceivedData = true;\n    additions.add(value);\n    const {\n      type\n    } = relationship.definition;\n    if (type !== value.type) {\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        assertPolymorphicType(record, relationship.definition, value, graph.store);\n      }\n      graph.registerPolymorphicType(value.type, type);\n    }\n  }\n\n  // if we have existing localState\n  // and we have an index\n  // apply the change, as this is more efficient\n  // than recomputing localState and\n  // it allows us to preserve local ordering\n  // to a small extend. Local ordering should not\n  // be relied upon as any remote change will blow it away\n  if (relationship.localState) {\n    if (index !== null) {\n      relationship.localState.splice(index, 0, value);\n    } else {\n      relationship.localState.push(value);\n    }\n  }\n  return true;\n}\nfunction _remove(graph, record, relationship, value, index, isRemote) {\n  return !isRemote ? _removeLocal(relationship, value) : _removeRemote(relationship, value);\n}\nfunction _removeLocal(relationship, value) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`expected an identifier to remove from the collection relationship`);\n    }\n  })(value) : {};\n  const {\n    remoteMembers,\n    additions\n  } = relationship;\n  let removals = relationship.removals;\n  const hasPresence = remoteMembers.has(value) || additions?.has(value);\n  if (!hasPresence || removals?.has(value)) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to remove the resource '${value.lid}' from the collection <${relationship.identifier.type}>.${relationship.definition.key} but it was not present`);\n      }\n    })(!hasPresence || removals?.has(value)) : {};\n    return false;\n  }\n  if (additions?.has(value)) {\n    additions.delete(value);\n  } else {\n    if (!removals) {\n      removals = relationship.removals = new Set();\n    }\n    removals.add(value);\n  }\n\n  // if we have existing localState\n  // apply the change, as this is more efficient\n  // than recomputing localState and\n  // it allows us to preserve local ordering\n  // to a small extend. Local ordering should not\n  // be relied upon as any remote change will blow it away\n  if (relationship.localState) {\n    const index = relationship.localState.indexOf(value);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot remove a resource that is not present`);\n      }\n    })(index !== -1) : {};\n    relationship.localState.splice(index, 1);\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected relationship to be dirty when performing a local mutation`);\n    }\n  })(relationship.localState || relationship.isDirty) : {};\n  return true;\n}\nfunction _removeRemote(relationship, value) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`expected an identifier to remove from the collection relationship`);\n    }\n  })(value) : {};\n  const {\n    remoteMembers,\n    additions,\n    removals,\n    remoteState\n  } = relationship;\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Cannot remove a resource that is not present`);\n    }\n  })(remoteMembers.has(value)) : {};\n  if (!remoteMembers.has(value)) {\n    return false;\n  }\n\n  // remove from remote state\n  remoteMembers.delete(value);\n  let index = remoteState.indexOf(value);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Cannot remove a resource that is not present`);\n    }\n  })(index !== -1) : {};\n  remoteState.splice(index, 1);\n\n  // remove from removals if present\n  if (removals?.has(value)) {\n    removals.delete(value);\n\n    // nothing more to do this was our state already\n    return false;\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Remote state indicated removal of a resource that was present only as a local mutation`);\n    }\n  })(!additions?.has(value)) : {};\n\n  // if we have existing localState\n  // and we have an index\n  // apply the change, as this is more efficient\n  // than recomputing localState and\n  // it allows us to preserve local ordering\n  // to a small extend. Local ordering should not\n  // be relied upon as any remote change will blow it away\n  if (relationship.localState) {\n    index = relationship.localState.indexOf(value);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot remove a resource that is not present`);\n      }\n    })(index !== -1) : {};\n    relationship.localState.splice(index, 1);\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected relationship to be dirty when performing a local mutation`);\n    }\n  })(relationship.localState || relationship.isDirty) : {};\n  return true;\n}\nfunction rollbackRelationship(graph, key, field, relationship) {\n  if (isBelongsTo(relationship)) {\n    replaceRelatedRecord(graph, {\n      op: 'replaceRelatedRecord',\n      record: key,\n      field,\n      value: relationship.remoteState\n    }, false);\n  } else {\n    replaceRelatedRecords(graph, {\n      op: 'replaceRelatedRecords',\n      record: key,\n      field,\n      value: relationship.remoteState.slice()\n    }, false);\n\n    // when the change was a \"reorder\" only we wont have generated\n    // a notification yet.\n    // if we give rollback a unique operation we can use the ability of\n    // diff to report a separate `remoteOrderChanged` flag to trigger this\n    // if needed to avoid the duplicate.\n    notifyChange(graph, relationship);\n  }\n}\nfunction createState() {\n  return {\n    hasReceivedData: false,\n    isEmpty: true,\n    isStale: false,\n    hasFailedLoadAttempt: false,\n    shouldForceReload: false,\n    hasDematerializedInverse: false\n  };\n}\nfunction createCollectionEdge(definition, identifier) {\n  return {\n    definition,\n    identifier,\n    state: createState(),\n    remoteMembers: new Set(),\n    remoteState: [],\n    additions: null,\n    removals: null,\n    meta: null,\n    links: null,\n    localState: null,\n    isDirty: false,\n    transactionRef: 0,\n    accessed: false,\n    _diff: undefined\n  };\n}\nconst cp = structuredClone;\nfunction legacyGetCollectionRelationshipData(source, getRemoteState) {\n  source.accessed = true;\n  const payload = {};\n  if (source.state.hasReceivedData) {\n    payload.data = getRemoteState ? source.remoteState.slice() : computeLocalState(source);\n  }\n  if (source.links) {\n    payload.links = cp(source.links);\n  }\n  if (source.meta) {\n    payload.meta = cp(source.meta);\n  }\n  return payload;\n}\n\n/**\n   Implicit relationships are relationships which have not been declared but the inverse side exists on\n   another record somewhere\n\n   For example consider the following two models\n\n   ::: code-group\n\n   ```js [./models/comment.js]\n   import { Model, attr } from '@warp-drive/legacy/model';\n\n   export default class Comment extends Model {\n     @attr text;\n   }\n   ```\n\n   ```js [./models/post.js]\n    import { Model, attr, hasMany } from '@warp-drive/legacy/model';\n\n   export default class Post extends Model {\n     @attr title;\n     @hasMany('comment', { async: true, inverse: null }) comments;\n   }\n   ```\n\n   :::\n\n   Then we would have a implicit 'post' relationship for the comment record in order\n   to be do things like remove the comment from the post if the comment were to be deleted.\n*/\n\nfunction createImplicitEdge(definition, identifier) {\n  return {\n    definition,\n    identifier,\n    localMembers: new Set(),\n    remoteMembers: new Set()\n  };\n}\n\n/**\n * Stores the data for one side of a \"single\" resource relationship.\n *\n * @private\n */\n\nfunction createResourceEdge(definition, identifier) {\n  return {\n    definition,\n    identifier,\n    state: createState(),\n    transactionRef: 0,\n    localState: null,\n    remoteState: null,\n    meta: null,\n    links: null,\n    accessed: false\n  };\n}\nfunction legacyGetResourceRelationshipData(source, getRemoteState) {\n  source.accessed = true;\n  let data;\n  const payload = {};\n  if (getRemoteState && source.remoteState) {\n    data = source.remoteState;\n  } else if (!getRemoteState && source.localState) {\n    data = source.localState;\n  }\n  if ((getRemoteState && source.remoteState === null || source.localState === null) && source.state.hasReceivedData) {\n    data = null;\n  }\n  if (source.links) {\n    payload.links = source.links;\n  }\n  if (data !== undefined) {\n    payload.data = data;\n  }\n  if (source.meta) {\n    payload.meta = source.meta;\n  }\n  return payload;\n}\nfunction addToRelatedRecords(graph, op, isRemote) {\n  const {\n    record,\n    value,\n    index\n  } = op;\n  const relationship = graph.get(record, op.field);\n  const _isBelongsTo = isBelongsTo(relationship);\n  if (isRemote && _isBelongsTo) {\n    if (value !== relationship.remoteState) {\n      const newOp = {\n        op: 'replaceRelatedRecord',\n        record,\n        field: op.field,\n        value: value\n      };\n      return replaceRelatedRecord(graph, newOp, isRemote);\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected '${value?.lid}' (the value to add) to NOT be the same as the remote state '${relationship.remoteState?.lid ?? '<null>'}'`);\n      }\n    })(value === relationship.remoteState) : {};\n    return;\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You can only '${op.op}' on a hasMany relationship. ${record.type}.${op.field} is a ${relationship.definition.kind}`);\n    }\n  })(isHasMany(relationship)) : {};\n\n  // if we are not dirty but have a null localState then we\n  // are mutating a relationship that has never been fetched\n  // so we initialize localState to an empty array\n  if (!relationship.isDirty && !relationship.localState) {\n    relationship.localState = [];\n  }\n  if (Array.isArray(value)) {\n    for (let i = 0; i < value.length; i++) {\n      addRelatedRecord(graph, relationship, record, value[i], index !== undefined ? index + i : null, isRemote);\n    }\n  } else {\n    addRelatedRecord(graph, relationship, record, value, index ?? null, isRemote);\n  }\n  notifyChange(graph, relationship);\n}\nfunction addRelatedRecord(graph, relationship, record, value, index, isRemote) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`expected an identifier to add to the collection relationship`);\n    }\n  })(value) : {};\n  if (_add(graph, record, relationship, value, index, isRemote)) {\n    addToInverse(graph, value, relationship.definition.inverseKey, record, isRemote);\n  }\n}\nfunction mergeIdentifier(graph, op, relationships) {\n  Object.keys(relationships).forEach(key => {\n    const rel = relationships[key];\n    if (!rel) {\n      return;\n    }\n    mergeIdentifierForRelationship(graph, op, rel);\n  });\n}\nfunction mergeIdentifierForRelationship(graph, op, rel) {\n  rel.identifier = op.value;\n  forAllRelatedIdentifiers(rel, identifier => {\n    const inverse = graph.get(identifier, rel.definition.inverseKey);\n    mergeInRelationship(graph, inverse, op);\n  });\n}\nfunction mergeInRelationship(graph, rel, op) {\n  if (isBelongsTo(rel)) {\n    mergeBelongsTo(graph, rel, op);\n  } else if (isHasMany(rel)) {\n    mergeHasMany(graph, rel, op);\n  } else {\n    mergeImplicit(graph, rel, op);\n  }\n}\nfunction mergeBelongsTo(graph, rel, op) {\n  if (rel.remoteState === op.record) {\n    rel.remoteState = op.value;\n  }\n  if (rel.localState === op.record) {\n    rel.localState = op.value;\n    notifyChange(graph, rel);\n  }\n}\nfunction mergeHasMany(graph, rel, op) {\n  if (rel.remoteMembers.has(op.record)) {\n    rel.remoteMembers.delete(op.record);\n    rel.remoteMembers.add(op.value);\n    const index = rel.remoteState.indexOf(op.record);\n    rel.remoteState.splice(index, 1, op.value);\n    rel.isDirty = true;\n  }\n  if (rel.additions?.has(op.record)) {\n    rel.additions.delete(op.record);\n    rel.additions.add(op.value);\n    rel.isDirty = true;\n  }\n  if (rel.removals?.has(op.record)) {\n    rel.removals.delete(op.record);\n    rel.removals.add(op.value);\n    rel.isDirty = true;\n  }\n  if (rel.isDirty) {\n    notifyChange(graph, rel);\n  }\n}\nfunction mergeImplicit(graph, rel, op) {\n  if (rel.remoteMembers.has(op.record)) {\n    rel.remoteMembers.delete(op.record);\n    rel.remoteMembers.add(op.value);\n  }\n  if (rel.localMembers.has(op.record)) {\n    rel.localMembers.delete(op.record);\n    rel.localMembers.add(op.value);\n  }\n}\nfunction removeFromRelatedRecords(graph, op, isRemote) {\n  const {\n    record,\n    value\n  } = op;\n  const relationship = graph.get(record, op.field);\n  const _isBelongsTo = isBelongsTo(relationship);\n  if (isRemote && _isBelongsTo) {\n    if (value === relationship.remoteState) {\n      const newOp = {\n        op: 'replaceRelatedRecord',\n        record,\n        field: op.field,\n        value: null\n      };\n      return replaceRelatedRecord(graph, newOp, isRemote);\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected '${value?.lid}' (the value to remove) to be the same as the remote state '${relationship.remoteState?.lid ?? '<null>'}'`);\n      }\n    })(value === relationship.remoteState) : {};\n    return;\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You can only '${op.op}' on a hasMany relationship. ${record.type}.${op.field} is a ${relationship.definition.kind}`);\n    }\n  })(isHasMany(relationship)) : {};\n  if (Array.isArray(value)) {\n    for (let i = 0; i < value.length; i++) {\n      removeRelatedRecord(graph, record, relationship, value[i], op.index ?? null, isRemote);\n    }\n  } else {\n    removeRelatedRecord(graph, record, relationship, value, op.index ?? null, isRemote);\n  }\n  notifyChange(graph, relationship);\n}\nfunction removeRelatedRecord(graph, record, relationship, value, index, isRemote) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`expected an identifier to remove from the collection relationship`);\n    }\n  })(value) : {};\n  if (_remove(graph, record, relationship, value, index, isRemote)) {\n    removeFromInverse(graph, value, relationship.definition.inverseKey, record, isRemote);\n  }\n}\n\n/*\n  This method normalizes a link to an \"links object\". If the passed link is\n  already an object it's returned without any modifications.\n\n  See http://jsonapi.org/format/#document-links for more information.\n*/\nfunction _normalizeLink(link) {\n  switch (typeof link) {\n    case 'object':\n      return link;\n    case 'string':\n      return {\n        href: link\n      };\n  }\n}\n\n/*\n    Updates the \"canonical\" or \"remote\" state of a relationship, replacing any existing\n    state and blowing away any local changes (excepting new records).\n*/\nfunction updateRelationshipOperation(graph, op) {\n  const relationship = graph.get(op.record, op.field);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Cannot update an implicit relationship`);\n    }\n  })(isHasMany(relationship) || isBelongsTo(relationship)) : {};\n  const {\n    definition,\n    state,\n    identifier\n  } = relationship;\n  const {\n    isCollection\n  } = definition;\n  const payload = op.value;\n  let hasRelationshipDataProperty = false;\n  let hasUpdatedLink = false;\n  if (payload.meta) {\n    relationship.meta = payload.meta;\n  }\n  if (payload.data !== undefined) {\n    hasRelationshipDataProperty = true;\n    if (isCollection) {\n      // TODO deprecate this case. We\n      // have tests saying we support it.\n      if (payload.data === null) {\n        payload.data = [];\n      }\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected an array`);\n        }\n      })(Array.isArray(payload.data)) : {};\n      const cache = graph.store.cacheKeyManager;\n      graph.update({\n        op: 'replaceRelatedRecords',\n        record: identifier,\n        field: op.field,\n        value: upgradeIdentifiers(payload.data, cache)\n      }, true);\n    } else {\n      graph.update({\n        op: 'replaceRelatedRecord',\n        record: identifier,\n        field: op.field,\n        value: payload.data ? graph.store.cacheKeyManager.upgradeIdentifier(payload.data) : null\n      }, true);\n    }\n  } else if (definition.isAsync === false && !state.hasReceivedData) {\n    hasRelationshipDataProperty = true;\n    if (isCollection) {\n      graph.update({\n        op: 'replaceRelatedRecords',\n        record: identifier,\n        field: op.field,\n        value: []\n      }, true);\n    } else {\n      graph.update({\n        op: 'replaceRelatedRecord',\n        record: identifier,\n        field: op.field,\n        value: null\n      }, true);\n    }\n  }\n  if (payload.links) {\n    const originalLinks = relationship.links;\n    relationship.links = payload.links;\n    if (payload.links.related) {\n      const relatedLink = _normalizeLink(payload.links.related);\n      const currentLink = originalLinks && originalLinks.related ? _normalizeLink(originalLinks.related) : null;\n      const currentLinkHref = currentLink ? currentLink.href : null;\n      if (relatedLink && relatedLink.href && relatedLink.href !== currentLinkHref) {\n        warn(`You pushed a record of type '${identifier.type}' with a relationship '${definition.key}' configured as 'async: false'. You've included a link but no primary data, this may be an error in your payload. WarpDrive will treat this relationship as known-to-be-empty.`, definition.isAsync || state.hasReceivedData, {\n          id: 'ds.store.push-link-for-sync-relationship'\n        });\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`You have pushed a record of type '${identifier.type}' with '${definition.key}' as a link, but the value of that link is not a string.`);\n          }\n        })(typeof relatedLink.href === 'string' || relatedLink.href === null) : {};\n        hasUpdatedLink = true;\n      }\n    }\n  }\n\n  /*\n       Data being pushed into the relationship might contain only data or links,\n       or a combination of both.\n        IF contains only data\n       IF contains both links and data\n        state.isEmpty -> true if is empty array (has-many) or is null (belongs-to)\n        state.hasReceivedData -> true\n        hasDematerializedInverse -> false\n        state.isStale -> false\n        allInverseRecordsAreLoaded -> run-check-to-determine\n        IF contains only links\n        state.isStale -> true\n       */\n  relationship.state.hasFailedLoadAttempt = false;\n  if (hasRelationshipDataProperty) {\n    const relationshipIsEmpty = payload.data === null || Array.isArray(payload.data) && payload.data.length === 0;\n\n    // we don't need to notify here as the update op we pushed in above will notify once\n    // membership is in the correct state.\n    relationship.state.hasReceivedData = true;\n    relationship.state.isStale = false;\n    relationship.state.hasDematerializedInverse = false;\n    relationship.state.isEmpty = relationshipIsEmpty;\n  } else if (hasUpdatedLink) {\n    // only notify stale if we have not previously received membership data.\n    // within this same transaction\n    // this prevents refetching when only one side of the relationship in the\n    // payload contains the info while the other side contains just a link\n    // this only works when the side with just a link is a belongsTo, as we\n    // don't know if a hasMany has full information or not.\n    // see #7049 for context.\n    if (isCollection || !relationship.state.hasReceivedData || isStaleTransaction(relationship.transactionRef, graph._transaction)) {\n      relationship.state.isStale = true;\n      notifyChange(graph, relationship);\n    } else {\n      relationship.state.isStale = false;\n    }\n  }\n}\nfunction isStaleTransaction(relationshipTransactionId, graphTransactionId) {\n  return relationshipTransactionId === 0 ||\n  // relationship has never notified\n  graphTransactionId === null ||\n  // we are not in a transaction\n  relationshipTransactionId < graphTransactionId // we are not part of the current transaction\n  ;\n}\nfunction upgradeIdentifiers(arr, cache) {\n  for (let i = 0; i < arr.length; i++) {\n    arr[i] = cache.upgradeIdentifier(arr[i]);\n  }\n  return arr;\n}\nconst Graphs = getOrSetGlobal('Graphs', new Map());\n/*\n * Graph acts as the cache for relationship data. It allows for\n * us to ask about and update relationships for a given Identifier\n * without requiring other objects for that Identifier to be\n * instantiated (such as `RecordData` or a `Record`)\n *\n * This also allows for us to make more substantive changes to relationships\n * with increasingly minor alterations to other portions of the internals\n * over time.\n *\n * The graph is made up of nodes and edges. Each unique identifier gets\n * its own node, which is a dictionary with a list of that node's edges\n * (or connections) to other nodes. In `Model` terms, a node represents a\n * record instance, with each key (an edge) in the dictionary correlating\n * to either a `hasMany` or `belongsTo` field on that record instance.\n *\n * The value for each key, or `edge` is the identifier(s) the node relates\n * to in the graph from that key.\n */\nclass Graph {\n  constructor(store) {\n    this._definitionCache = Object.create(null);\n    this._metaCache = Object.create(null);\n    this._potentialPolymorphicTypes = Object.create(null);\n    this.identifiers = new Map();\n    this.store = store;\n    this._realStore = store._store;\n    this.isDestroyed = false;\n    this._willSyncRemote = false;\n    this._willSyncLocal = false;\n    this._pushedUpdates = {\n      belongsTo: undefined,\n      hasMany: undefined,\n      deletions: []\n    };\n    this._updatedRelationships = new Set();\n    this._transaction = null;\n    this._removing = null;\n    this.silenceNotifications = false;\n  }\n  has(resourceKey, propertyName) {\n    const relationships = this.identifiers.get(resourceKey);\n    if (!relationships) {\n      return false;\n    }\n    return relationships[propertyName] !== undefined;\n  }\n  getDefinition(resourceKey, propertyName) {\n    let defs = this._metaCache[resourceKey.type];\n    let meta = defs?.[propertyName];\n    if (!meta) {\n      const info = /*#__NOINLINE__*/upgradeDefinition(this, resourceKey, propertyName);\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Could not determine relationship information for ${resourceKey.type}.${propertyName}`);\n        }\n      })(info !== null) : {};\n\n      // if (info.rhs_definition?.kind === 'implicit') {\n      // we should possibly also do this\n      // but it would result in being extremely permissive for other relationships by accident\n      // this.registerPolymorphicType(info.rhs_baseModelName, identifier.type);\n      // }\n\n      meta = /*#__NOINLINE__*/isLHS(info, resourceKey.type, propertyName) ? info.lhs_definition : info.rhs_definition;\n      defs = this._metaCache[resourceKey.type] = defs || {};\n      defs[propertyName] = meta;\n    }\n    return meta;\n  }\n  get(resourceKey, propertyName) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`expected propertyName`);\n      }\n    })(propertyName) : {};\n    let relationships = this.identifiers.get(resourceKey);\n    if (!relationships) {\n      relationships = Object.create(null);\n      this.identifiers.set(resourceKey, relationships);\n    }\n    let relationship = relationships[propertyName];\n    if (!relationship) {\n      const meta = this.getDefinition(resourceKey, propertyName);\n      if (meta.kind === 'belongsTo') {\n        relationship = relationships[propertyName] = createResourceEdge(meta, resourceKey);\n      } else if (meta.kind === 'hasMany') {\n        relationship = relationships[propertyName] = createCollectionEdge(meta, resourceKey);\n      } else {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Expected kind to be implicit`);\n          }\n        })(meta.kind === 'implicit' && meta.isImplicit === true) : {};\n        relationship = relationships[propertyName] = createImplicitEdge(meta, resourceKey);\n      }\n    }\n    return relationship;\n  }\n  getData(resourceKey, propertyName) {\n    const relationship = this.get(resourceKey, propertyName);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot getData() on an implicit relationship`);\n      }\n    })(!isImplicit(relationship)) : {};\n    if (isBelongsTo(relationship)) {\n      return legacyGetResourceRelationshipData(relationship, false);\n    }\n    return legacyGetCollectionRelationshipData(relationship, false);\n  }\n  getRemoteData(resourceKey, propertyName) {\n    const relationship = this.get(resourceKey, propertyName);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot getRemoteData() on an implicit relationship`);\n      }\n    })(!isImplicit(relationship)) : {};\n    if (isBelongsTo(relationship)) {\n      return legacyGetResourceRelationshipData(relationship, true);\n    }\n    return legacyGetCollectionRelationshipData(relationship, true);\n  }\n\n  /*\n   * Allows for the graph to dynamically discover polymorphic connections\n   * without needing to walk prototype chains.\n   *\n   * Used by edges when an added `type` does not match the expected `type`\n   * for that edge.\n   *\n   * Currently we assert before calling this. For a public API we will want\n   * to call out to the schema manager to ask if we should consider these\n   * types as equivalent for a given relationship.\n   */\n  registerPolymorphicType(type1, type2) {\n    const typeCache = this._potentialPolymorphicTypes;\n    let t1 = typeCache[type1];\n    if (!t1) {\n      t1 = typeCache[type1] = Object.create(null);\n    }\n    t1[type2] = true;\n    let t2 = typeCache[type2];\n    if (!t2) {\n      t2 = typeCache[type2] = Object.create(null);\n    }\n    t2[type1] = true;\n  }\n  isReleasable(resourceKey) {\n    const relationships = this.identifiers.get(resourceKey);\n    if (!relationships) {\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_GRAPH)) {\n        if (getGlobalConfig().WarpDrive.debug.LOG_GRAPH || globalThis.getWarpDriveRuntimeConfig().debug.LOG_GRAPH) {\n          // eslint-disable-next-line no-console\n          console.log(`graph: RELEASABLE ${String(resourceKey)}`);\n        }\n      }\n      return true;\n    }\n    const keys = Object.keys(relationships);\n    for (let i = 0; i < keys.length; i++) {\n      const relationship = relationships[keys[i]];\n      // account for previously unloaded relationships\n      // typically from a prior deletion of a record that pointed to this one implicitly\n      if (relationship === undefined) {\n        continue;\n      }\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected a relationship`);\n        }\n      })(relationship) : {};\n      if (relationship.definition.inverseIsAsync && !checkIfNew(this._realStore, resourceKey)) {\n        if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_GRAPH)) {\n          if (getGlobalConfig().WarpDrive.debug.LOG_GRAPH || globalThis.getWarpDriveRuntimeConfig().debug.LOG_GRAPH) {\n            // eslint-disable-next-line no-console\n            console.log(`graph: <<NOT>> RELEASABLE ${String(resourceKey)}`);\n          }\n        }\n        return false;\n      }\n    }\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_GRAPH)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_GRAPH || globalThis.getWarpDriveRuntimeConfig().debug.LOG_GRAPH) {\n        // eslint-disable-next-line no-console\n        console.log(`graph: RELEASABLE ${String(resourceKey)}`);\n      }\n    }\n    return true;\n  }\n  unload(resourceKey, silenceNotifications) {\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_GRAPH)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_GRAPH || globalThis.getWarpDriveRuntimeConfig().debug.LOG_GRAPH) {\n        // eslint-disable-next-line no-console\n        console.log(`graph: unload ${String(resourceKey)}`);\n      }\n    }\n    const relationships = this.identifiers.get(resourceKey);\n    if (relationships) {\n      // cleans up the graph but retains some nodes\n      // to allow for rematerialization\n      Object.keys(relationships).forEach(key => {\n        const rel = relationships[key];\n        if (!rel) {\n          return;\n        }\n        /*#__NOINLINE__*/\n        destroyRelationship(this, rel, silenceNotifications);\n        if (/*#__NOINLINE__*/isImplicit(rel)) {\n          // @ts-expect-error\n          relationships[key] = undefined;\n        }\n      });\n    }\n  }\n  _isDirty(resourceKey, field) {\n    const relationships = this.identifiers.get(resourceKey);\n    if (!relationships) {\n      return false;\n    }\n    const relationship = relationships[field];\n    if (!relationship) {\n      return false;\n    }\n    if (isBelongsTo(relationship)) {\n      return relationship.localState !== relationship.remoteState;\n    } else if (isHasMany(relationship)) {\n      const hasAdditions = relationship.additions !== null && relationship.additions.size > 0;\n      const hasRemovals = relationship.removals !== null && relationship.removals.size > 0;\n      return hasAdditions || hasRemovals || isReordered(relationship);\n    }\n    return false;\n  }\n  getChanged(resourceKey) {\n    const relationships = this.identifiers.get(resourceKey);\n    const changed = new Map();\n    if (!relationships) {\n      return changed;\n    }\n    const keys = Object.keys(relationships);\n    for (let i = 0; i < keys.length; i++) {\n      const field = keys[i];\n      const relationship = relationships[field];\n      if (!relationship) {\n        continue;\n      }\n      if (isBelongsTo(relationship)) {\n        if (relationship.localState !== relationship.remoteState) {\n          changed.set(field, {\n            kind: 'resource',\n            remoteState: relationship.remoteState,\n            localState: relationship.localState\n          });\n        }\n      } else if (isHasMany(relationship)) {\n        const hasAdditions = relationship.additions !== null && relationship.additions.size > 0;\n        const hasRemovals = relationship.removals !== null && relationship.removals.size > 0;\n        const reordered = isReordered(relationship);\n        if (hasAdditions || hasRemovals || reordered) {\n          changed.set(field, {\n            kind: 'collection',\n            additions: new Set(relationship.additions),\n            removals: new Set(relationship.removals),\n            remoteState: relationship.remoteState,\n            localState: legacyGetCollectionRelationshipData(relationship, false).data || [],\n            reordered\n          });\n        }\n      }\n    }\n    return changed;\n  }\n  hasChanged(resourceKey) {\n    const relationships = this.identifiers.get(resourceKey);\n    if (!relationships) {\n      return false;\n    }\n    const keys = Object.keys(relationships);\n    for (let i = 0; i < keys.length; i++) {\n      if (this._isDirty(resourceKey, keys[i])) {\n        return true;\n      }\n    }\n    return false;\n  }\n  rollback(resourceKey) {\n    const relationships = this.identifiers.get(resourceKey);\n    const changed = [];\n    if (!relationships) {\n      return changed;\n    }\n    const keys = Object.keys(relationships);\n    for (let i = 0; i < keys.length; i++) {\n      const field = keys[i];\n      const relationship = relationships[field];\n      if (!relationship) {\n        continue;\n      }\n      if (this._isDirty(resourceKey, field)) {\n        rollbackRelationship(this, resourceKey, field, relationship);\n        changed.push(field);\n      }\n    }\n    return changed;\n  }\n  remove(resourceKey) {\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_GRAPH)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_GRAPH || globalThis.getWarpDriveRuntimeConfig().debug.LOG_GRAPH) {\n        // eslint-disable-next-line no-console\n        console.log(`graph: remove ${String(resourceKey)}`);\n      }\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot remove ${String(resourceKey)} while still removing ${String(this._removing)}`);\n      }\n    })(!this._removing) : {};\n    this._removing = resourceKey;\n    this.unload(resourceKey);\n    this.identifiers.delete(resourceKey);\n    this._removing = null;\n  }\n\n  /*\n   * Remote state changes\n   */\n  push(op) {\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_GRAPH)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_GRAPH || globalThis.getWarpDriveRuntimeConfig().debug.LOG_GRAPH) {\n        // eslint-disable-next-line no-console\n        console.log(`graph: push ${String(op.record)}`, op);\n      }\n    }\n    if (op.op === 'deleteRecord') {\n      this._pushedUpdates.deletions.push(op);\n    } else {\n      const definition = this.getDefinition(op.record, op.field);\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Cannot push a remote update for an implicit relationship`);\n        }\n      })(definition.kind !== 'implicit') : {};\n      addPending(this._pushedUpdates, definition, op);\n    }\n    if (!this._willSyncRemote) {\n      this._willSyncRemote = true;\n      const store = getStore(this.store);\n      if (!store._cbs) {\n        store._run(() => this._flushRemoteQueue());\n      } else {\n        store._schedule('coalesce', () => this._flushRemoteQueue());\n      }\n    }\n  }\n\n  /*\n   * Local state changes\n   */\n\n  update(op, isRemote = false) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot update an implicit relationship`);\n      }\n    })(op.op === 'deleteRecord' || op.op === 'mergeIdentifiers' || !isImplicit(this.get(op.record, op.field))) : {};\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_GRAPH)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_GRAPH || globalThis.getWarpDriveRuntimeConfig().debug.LOG_GRAPH) {\n        // eslint-disable-next-line no-console\n        console.log(`graph: update (${isRemote ? 'remote' : 'local'}) ${String(op.record)}`, op);\n      }\n    }\n    switch (op.op) {\n      case 'mergeIdentifiers':\n        {\n          const relationships = this.identifiers.get(op.record);\n          if (relationships) {\n            /*#__NOINLINE__*/mergeIdentifier(this, op, relationships);\n          }\n          break;\n        }\n      case 'update':\n      case 'updateRelationship':\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Can only perform the operation updateRelationship on remote state`);\n          }\n        })(isRemote) : {};\n        if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n          // in debug, assert payload validity eagerly\n          // TODO add deprecations/assertion here for duplicates\n          assertValidRelationshipPayload(this, op);\n        }\n        /*#__NOINLINE__*/\n        updateRelationshipOperation(this, op);\n        break;\n      case 'deleteRecord':\n        {\n          macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n            if (!test) {\n              throw new Error(`Can only perform the operation deleteRelationship on remote state`);\n            }\n          })(isRemote) : {};\n          const identifier = op.record;\n          const relationships = this.identifiers.get(identifier);\n          if (relationships) {\n            Object.keys(relationships).forEach(key => {\n              const rel = relationships[key];\n              if (!rel) {\n                return;\n              }\n              // works together with the has check\n              // @ts-expect-error\n              relationships[key] = undefined;\n              /*#__NOINLINE__*/\n              removeCompletelyFromInverse(this, rel);\n            });\n            this.identifiers.delete(identifier);\n          }\n          break;\n        }\n      case 'replaceRelatedRecord':\n        /*#__NOINLINE__*/replaceRelatedRecord(this, op, isRemote);\n        break;\n      case 'add':\n        /*#__NOINLINE__*/addToRelatedRecords(this, op, isRemote);\n        break;\n      case 'remove':\n        /*#__NOINLINE__*/removeFromRelatedRecords(this, op, isRemote);\n        break;\n      case 'replaceRelatedRecords':\n        /*#__NOINLINE__*/replaceRelatedRecords(this, op, isRemote);\n        break;\n      default:\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          {\n            throw new Error(`No local relationship update operation exists for '${op.op}'`);\n          }\n        })() : {};\n    }\n  }\n  _scheduleLocalSync(relationship) {\n    this._updatedRelationships.add(relationship);\n    if (!this._willSyncLocal) {\n      this._willSyncLocal = true;\n      getStore(this.store)._schedule('sync', () => this._flushLocalQueue());\n    }\n  }\n  _flushRemoteQueue() {\n    if (!this._willSyncRemote) {\n      return;\n    }\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_GRAPH)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_GRAPH || globalThis.getWarpDriveRuntimeConfig().debug.LOG_GRAPH) {\n        // eslint-disable-next-line no-console\n        console.groupCollapsed(`Graph: Initialized Transaction`);\n      }\n    }\n    let transactionRef = peekTransient('transactionRef') ?? 0;\n    this._transaction = ++transactionRef;\n    setTransient('transactionRef', transactionRef);\n    this._willSyncRemote = false;\n    const updates = this._pushedUpdates;\n    const {\n      deletions,\n      hasMany,\n      belongsTo\n    } = updates;\n    updates.deletions = [];\n    updates.hasMany = undefined;\n    updates.belongsTo = undefined;\n    for (let i = 0; i < deletions.length; i++) {\n      this.update(deletions[i], true);\n    }\n    if (hasMany) {\n      flushPending(this, hasMany);\n    }\n    if (belongsTo) {\n      flushPending(this, belongsTo);\n    }\n    this._transaction = null;\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_GRAPH)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_GRAPH || globalThis.getWarpDriveRuntimeConfig().debug.LOG_GRAPH) {\n        // eslint-disable-next-line no-console\n        console.log(`Graph: transaction finalized`);\n        // eslint-disable-next-line no-console\n        console.groupEnd();\n      }\n    }\n  }\n  _addToTransaction(relationship) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`expected a transaction`);\n      }\n    })(this._transaction !== null) : {};\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_GRAPH)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_GRAPH || globalThis.getWarpDriveRuntimeConfig().debug.LOG_GRAPH) {\n        // eslint-disable-next-line no-console\n        console.log(`Graph: ${String(relationship.identifier)} ${relationship.definition.key} added to transaction`);\n      }\n    }\n    relationship.transactionRef = this._transaction;\n  }\n  _flushLocalQueue() {\n    if (!this._willSyncLocal) {\n      return;\n    }\n    if (this.silenceNotifications) {\n      this.silenceNotifications = false;\n      this._updatedRelationships = new Set();\n      return;\n    }\n    this._willSyncLocal = false;\n    const updated = this._updatedRelationships;\n    this._updatedRelationships = new Set();\n    updated.forEach(rel => notifyChange(this, rel));\n  }\n  destroy() {\n    Graphs.delete(this.store);\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      Graphs.delete(getStore(this.store));\n      if (Graphs.size) {\n        Graphs.forEach((_, key) => {\n          macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n            if (!test) {\n              throw new Error(`Memory Leak Detected, likely the test or app instance previous to this was not torn down properly`);\n            }\n          })(!key.isDestroyed && !key.isDestroying) : {};\n        });\n      }\n    }\n    this.identifiers.clear();\n    this.store = null;\n    this.isDestroyed = true;\n  }\n}\nfunction flushPending(graph, ops) {\n  for (const type of ops.values()) {\n    for (const opList of type.values()) {\n      flushPendingList(graph, opList);\n    }\n  }\n}\nfunction flushPendingList(graph, opList) {\n  for (let i = 0; i < opList.length; i++) {\n    graph.update(opList[i], true);\n  }\n}\n\n// Handle dematerialization for relationship `rel`.  In all cases, notify the\n// relationship of the dematerialization: this is done so the relationship can\n// notify its inverse which needs to update state\n//\n// If the inverse is sync, unloading this record is treated as a client-side\n// delete, so we remove the inverse records from this relationship to\n// disconnect the graph.  Because it's not async, we don't need to keep around\n// the identifier as an id-wrapper for references\nfunction destroyRelationship(graph, rel, silenceNotifications) {\n  if (isImplicit(rel)) {\n    if (graph.isReleasable(rel.identifier)) {\n      /*#__NOINLINE__*/removeCompletelyFromInverse(graph, rel);\n    }\n    return;\n  }\n  const {\n    identifier\n  } = rel;\n  const {\n    inverseKey\n  } = rel.definition;\n  if (!rel.definition.inverseIsImplicit) {\n    /*#__NOINLINE__*/forAllRelatedIdentifiers(rel, inverseIdentifer => /*#__NOINLINE__*/notifyInverseOfDematerialization(graph, inverseIdentifer, inverseKey, identifier, silenceNotifications));\n  }\n  if (!rel.definition.inverseIsImplicit && !rel.definition.inverseIsAsync) {\n    rel.state.isStale = true;\n    /*#__NOINLINE__*/\n    clearRelationship(rel);\n\n    // necessary to clear relationships in the ui from dematerialized records\n    // hasMany is managed by Model which calls `retreiveLatest` after\n    // dematerializing the resource-cache instance.\n    // but sync belongsTo requires this since they don't have a proxy to update.\n    // so we have to notify so it will \"update\" to null.\n    // we should discuss whether we still care about this, probably fine to just\n    // leave the ui relationship populated since the record is destroyed and\n    // internally we've fully cleaned up.\n    if (!rel.definition.isAsync && !silenceNotifications) {\n      /*#__NOINLINE__*/notifyChange(graph, rel);\n    }\n  }\n}\nfunction notifyInverseOfDematerialization(graph, inverseIdentifier, inverseKey, resourceKey, silenceNotifications) {\n  if (!graph.has(inverseIdentifier, inverseKey)) {\n    return;\n  }\n  const relationship = graph.get(inverseIdentifier, inverseKey);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`expected no implicit`);\n    }\n  })(!isImplicit(relationship)) : {};\n\n  // For remote members, it is possible that inverseRecordData has already been associated to\n  // to another record. For such cases, do not dematerialize the inverseRecordData\n  if (!isBelongsTo(relationship) || !relationship.localState || resourceKey === relationship.localState) {\n    /*#__NOINLINE__*/removeDematerializedInverse(graph, relationship, resourceKey, silenceNotifications);\n  }\n}\nfunction clearRelationship(relationship) {\n  if (isBelongsTo(relationship)) {\n    relationship.localState = null;\n    relationship.remoteState = null;\n    relationship.state.hasReceivedData = false;\n    relationship.state.isEmpty = true;\n  } else {\n    relationship.remoteMembers.clear();\n    relationship.remoteState = [];\n    relationship.additions = null;\n    relationship.removals = null;\n    relationship.localState = null;\n  }\n}\nfunction removeDematerializedInverse(graph, relationship, inverseIdentifier, silenceNotifications) {\n  if (isBelongsTo(relationship)) {\n    const localInverse = relationship.localState;\n    if (!relationship.definition.isAsync || localInverse && checkIfNew(graph._realStore, localInverse)) {\n      // unloading inverse of a sync relationship is treated as a client-side\n      // delete, so actually remove the models don't merely invalidate the cp\n      // cache.\n      // if the record being unloaded only exists on the client, we similarly\n      // treat it as a client side delete\n      if (relationship.localState === localInverse && localInverse !== null) {\n        relationship.localState = null;\n      }\n      if (relationship.remoteState === localInverse && localInverse !== null) {\n        relationship.remoteState = null;\n        relationship.state.hasReceivedData = true;\n        relationship.state.isEmpty = true;\n        if (relationship.localState && !checkIfNew(graph._realStore, relationship.localState)) {\n          relationship.localState = null;\n        }\n      }\n    } else {\n      relationship.state.hasDematerializedInverse = true;\n    }\n    if (!silenceNotifications) {\n      notifyChange(graph, relationship);\n    }\n  } else {\n    if (!relationship.definition.isAsync || inverseIdentifier && checkIfNew(graph._realStore, inverseIdentifier)) {\n      // unloading inverse of a sync relationship is treated as a client-side\n      // delete, so actually remove the models don't merely invalidate the cp\n      // cache.\n      // if the record being unloaded only exists on the client, we similarly\n      // treat it as a client side delete\n      /*#__NOINLINE__*/\n      removeIdentifierCompletelyFromRelationship(graph, relationship, inverseIdentifier);\n    } else {\n      relationship.state.hasDematerializedInverse = true;\n    }\n    if (!silenceNotifications) {\n      notifyChange(graph, relationship);\n    }\n  }\n}\nfunction removeCompletelyFromInverse(graph, relationship) {\n  const {\n    identifier\n  } = relationship;\n  const {\n    inverseKey\n  } = relationship.definition;\n  forAllRelatedIdentifiers(relationship, inverseIdentifier => {\n    if (graph.has(inverseIdentifier, inverseKey)) {\n      removeIdentifierCompletelyFromRelationship(graph, graph.get(inverseIdentifier, inverseKey), identifier);\n    }\n  });\n  if (isBelongsTo(relationship)) {\n    if (!relationship.definition.isAsync) {\n      clearRelationship(relationship);\n    }\n    relationship.localState = null;\n  } else if (isHasMany(relationship)) {\n    if (!relationship.definition.isAsync) {\n      clearRelationship(relationship);\n      notifyChange(graph, relationship);\n    }\n  } else {\n    relationship.remoteMembers.clear();\n    relationship.localMembers.clear();\n  }\n}\nfunction addPending(cache, definition, op) {\n  const cacheForKind = cache[definition.kind] = cache[definition.kind] || new Map();\n  let cacheForType = cacheForKind.get(definition.inverseType);\n  if (!cacheForType) {\n    cacheForType = new Map();\n    cacheForKind.set(definition.inverseType, cacheForType);\n  }\n  let cacheForField = cacheForType.get(op.field);\n  if (!cacheForField) {\n    cacheForField = [];\n    cacheForType.set(op.field, cacheForField);\n  }\n  cacheForField.push(op);\n}\nfunction isReordered(relationship) {\n  // if we are dirty we are never re-ordered because accessing\n  // the state would flush away any reordering.\n  if (relationship.isDirty) {\n    return false;\n  }\n  const {\n    remoteState,\n    localState,\n    additions,\n    removals\n  } = relationship;\n  if (localState === null) {\n    // the relationship has never been accessed, so it hasn't been reordered either\n    return false;\n  }\n  for (let i = 0, j = 0; i < remoteState.length; i++) {\n    const member = remoteState[i];\n    const localMember = localState[j];\n    if (member !== localMember) {\n      if (removals && removals.has(member)) {\n        // dont increment j because we want to skip this\n        continue;\n      }\n      if (additions && additions.has(localMember)) {\n        // increment j to skip this localMember\n        // decrement i to repeat this remoteMember\n        j++;\n        i--;\n        continue;\n      }\n      return true;\n    }\n\n    // if we made it here, increment j\n    j++;\n  }\n  return false;\n}\n\n/**\nProvides a performance tuned normalized graph for intelligently managing relationships between resources based on identity\n\nWhile this Graph is abstract, it currently is a private implementation required as a peer-dependency by the {json:api} Cache Implementation.\n\nWe intend to make this Graph public API after some additional iteration during the 5.x timeframe, until then all APIs should be considered experimental and unstable, not fit for direct application or 3rd party library usage.\n\n  @module\n*/\n\nfunction isStore(maybeStore) {\n  return maybeStore._instanceCache !== undefined;\n}\nfunction getWrapper(store) {\n  return isStore(store) ? store._instanceCache._storeWrapper : store;\n}\nfunction peekGraph(store) {\n  return Graphs.get(getWrapper(store));\n}\nfunction graphFor(store) {\n  const wrapper = getWrapper(store);\n  let graph = Graphs.get(wrapper);\n  if (!graph) {\n    graph = new Graph(wrapper);\n    Graphs.set(wrapper, graph);\n    getStore(wrapper)._graph = graph;\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      if (getStore(wrapper).isDestroying) {\n        throw new Error(`Memory Leak Detected During Teardown`);\n      }\n    }\n  }\n  return graph;\n}\nexport { graphFor, isBelongsTo, peekGraph };","import { graphFor, peekGraph, isBelongsTo } from '@warp-drive/core/graph/-private';\nimport { logGroup, isResourceKey, assertPrivateCapabilities, isRequestKey } from '@warp-drive/core/store/-private';\nimport Fuse from 'fuse.js';\nimport jsonToAst from 'json-to-ast';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\n\nfunction validateDocumentFields(schema, jsonApiDoc) {\n  const {\n    data,\n    included\n  } = jsonApiDoc;\n  if (data === null) {\n    return;\n  }\n  if (typeof jsonApiDoc.data !== 'object') {\n    throw new Error(`Expected a resource object in the 'data' property in the document provided to the cache, but was ${typeof jsonApiDoc.data}`);\n  }\n  if (Array.isArray(data)) {\n    for (const resource of data) {\n      validateResourceFields(schema, resource, {\n        verifyIncluded: true,\n        included\n      });\n    }\n  } else {\n    validateResourceFields(schema, data, {\n      verifyIncluded: true,\n      included\n    });\n  }\n  if (included) {\n    for (const resource of included) {\n      validateResourceFields(schema, resource, {\n        verifyIncluded: false\n      });\n    }\n  }\n}\nfunction validateResourceFields(schema, resource, options) {\n  if (!resource.relationships) {\n    return;\n  }\n  const resourceType = resource.type;\n  const fields = schema.fields({\n    type: resource.type\n  });\n  for (const [type, relationshipDoc] of Object.entries(resource.relationships)) {\n    const field = fields.get(type);\n    if (!field) {\n      return;\n    }\n    switch (field.kind) {\n      case 'belongsTo':\n        {\n          if (field.options.linksMode) {\n            validateBelongsToLinksMode(resourceType, field, relationshipDoc, options);\n          }\n          break;\n        }\n      case 'hasMany':\n        {\n          if (field.options.linksMode) {\n            validateHasManyToLinksMode(resourceType, field);\n          }\n          break;\n        }\n    }\n  }\n}\nfunction validateBelongsToLinksMode(resourceType, field, relationshipDoc, options) {\n  if (field.options.async) {\n    throw new Error(`Cannot fetch ${resourceType}.${field.name} because the field is in linksMode but async is not yet supported`);\n  }\n  if (!relationshipDoc.links?.related) {\n    throw new Error(`Cannot fetch ${resourceType}.${field.name} because the field is in linksMode but the related link is missing`);\n  }\n  const relationshipData = relationshipDoc.data;\n  if (Array.isArray(relationshipData)) {\n    throw new Error(`Cannot fetch ${resourceType}.${field.name} because the relationship data for a belongsTo relationship is unexpectedly an array`);\n  }\n  // Explicitly allow `null`! Missing key or `undefined` are always invalid.\n  if (relationshipData === undefined) {\n    throw new Error(`Cannot fetch ${resourceType}.${field.name} because the field is in linksMode but the relationship data is undefined`);\n  }\n  if (relationshipData === null) {\n    return;\n  }\n  if (!options.verifyIncluded) {\n    return;\n  }\n  const includedDoc = options.included?.find(doc => doc.type === relationshipData.type && doc.id === relationshipData.id);\n  if (!includedDoc) {\n    throw new Error(`Cannot fetch ${resourceType}.${field.name} because the field is in linksMode but the related data is not included`);\n  }\n}\nfunction validateHasManyToLinksMode(resourceType, field, _relationshipDoc, _options) {\n  if (field.options.async) {\n    throw new Error(`Cannot fetch ${resourceType}.${field.name} because the field is in linksMode but async hasMany is not yet supported`);\n  }\n}\n\nfunction inspectType(obj) {\n  if (obj === null) {\n    return 'null';\n  }\n  if (Array.isArray(obj)) {\n    return 'array';\n  }\n  if (typeof obj === 'object') {\n    const proto = Object.getPrototypeOf(obj);\n    if (proto === null) {\n      return 'object';\n    }\n    if (proto === Object.prototype) {\n      return 'object';\n    }\n    return `object (${proto.constructor?.name})`;\n  }\n  if (typeof obj === 'function') {\n    return 'function';\n  }\n  if (typeof obj === 'string') {\n    return 'string';\n  }\n  if (typeof obj === 'number') {\n    return 'number';\n  }\n  if (typeof obj === 'boolean') {\n    return 'boolean';\n  }\n  if (typeof obj === 'symbol') {\n    return 'symbol';\n  }\n  if (typeof obj === 'bigint') {\n    return 'bigint';\n  }\n  if (typeof obj === 'undefined') {\n    return 'undefined';\n  }\n  return 'unknown';\n}\nfunction isSimpleObject(obj) {\n  if (obj === null) {\n    return false;\n  }\n  if (Array.isArray(obj)) {\n    return false;\n  }\n  if (typeof obj !== 'object') {\n    return false;\n  }\n  const proto = Object.getPrototypeOf(obj);\n  if (proto === null) {\n    return true;\n  }\n  if (proto === Object.prototype) {\n    return true;\n  }\n  return false;\n}\nconst RELATIONSHIP_FIELD_KINDS = ['belongsTo', 'hasMany', 'resource', 'collection'];\nclass Reporter {\n  capabilities;\n  contextDocument;\n  errors = [];\n  ast;\n  jsonStr;\n\n  // TODO @runspired make this configurable to consuming apps before\n  // activating by default\n  strict = {\n    linkage: true,\n    unknownType: true,\n    unknownAttribute: true,\n    unknownRelationship: true\n  };\n  constructor(capabilities, doc) {\n    this.capabilities = capabilities;\n    this.contextDocument = doc;\n    this.jsonStr = JSON.stringify(doc.content, null, 2);\n    this.ast = jsonToAst(this.jsonStr, {\n      loc: true\n    });\n  }\n  searchTypes(type) {\n    if (!this._typeFilter) {\n      const allTypes = this.schema.resourceTypes();\n      this._typeFilter = new Fuse(allTypes);\n    }\n    const result = this._typeFilter.search(type);\n    return result;\n  }\n  _fieldFilters = new Map();\n  searchFields(type, field) {\n    if (!this._fieldFilters.has(type)) {\n      const allFields = this.schema.fields({\n        type\n      });\n      const allCacheFields = this.schema.cacheFields?.({\n        type\n      }) ?? allFields;\n      const attrs = Array.from(allCacheFields.values()).filter(isRemoteField).map(v => v.name);\n      this._fieldFilters.set(type, new Fuse(attrs));\n    }\n    const result = this._fieldFilters.get(type).search(field);\n    return result;\n  }\n  get schema() {\n    return this.capabilities.schema;\n  }\n  getLocation(path, kind) {\n    if (path.length === 0) {\n      return this.ast.loc;\n    }\n    let priorNode = this.ast;\n    let node = this.ast;\n    for (const segment of path) {\n      //\n      // handle array paths\n      //\n      if (typeof segment === 'number') {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Because the segment is a number, expected a node of type Array`);\n          }\n        })(node.type === 'Array') : {};\n        if (node.children && node.children[segment]) {\n          priorNode = node;\n          const childNode = node.children[segment];\n          if (childNode.type === 'Object' || childNode.type === 'Array') {\n            node = childNode;\n          } else {\n            // set to the closest node we can find\n            return node.loc;\n          }\n        } else {\n          // set to the closest node we can find\n          // as we had no children\n          return priorNode.loc;\n        }\n\n        //\n        // handle object paths\n        //\n      } else {\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          if (!test) {\n            throw new Error(`Because the segment is a string, expected a node of type Object`);\n          }\n        })(node.type === 'Object') : {};\n        const child = node.children.find(childCandidate => {\n          if (childCandidate.type === 'Property') {\n            return childCandidate.key.type === 'Identifier' && childCandidate.key.value === segment;\n          }\n          return false;\n        });\n        if (child) {\n          if (child.value.type === 'Object' || child.value.type === 'Array') {\n            priorNode = node;\n            node = child.value;\n          } else {\n            // set to the closest node we can find\n            return kind === 'key' ? child.key.loc : child.value.loc;\n          }\n        } else {\n          // set to the closest node we can find\n          return priorNode.loc;\n        }\n      }\n    }\n    return node.loc;\n  }\n  error(path, message, kind = 'key') {\n    const loc = this.getLocation(path, kind);\n    this.errors.push({\n      path,\n      message,\n      loc,\n      type: 'error',\n      kind\n    });\n  }\n  warn(path, message, kind = 'key') {\n    const loc = this.getLocation(path, kind);\n    this.errors.push({\n      path,\n      message,\n      loc,\n      type: 'warning',\n      kind\n    });\n  }\n  info(path, message, kind = 'key') {\n    const loc = this.getLocation(path, kind);\n    this.errors.push({\n      path,\n      message,\n      loc,\n      type: 'info',\n      kind\n    });\n  }\n  hasExtension(extensionName) {\n    return REGISTERED_EXTENSIONS.has(extensionName);\n  }\n  getExtension(extensionName) {\n    return REGISTERED_EXTENSIONS.get(extensionName);\n  }\n  report(colorize = true) {\n    const lines = this.jsonStr.split('\\n');\n\n    // sort the errors by line, then by column, then by type\n    const {\n      errors\n    } = this;\n    if (!errors.length) {\n      return;\n    }\n    errors.sort((a, b) => {\n      return a.loc.end.line < b.loc.end.line ? -1 : a.loc.end.column < b.loc.end.column ? -1 : compareType(a.type, b.type);\n    });\n\n    // store the errors in a map by line\n    const errorMap = new Map();\n    for (const error of errors) {\n      const line = error.loc.end.line;\n      if (!errorMap.has(line)) {\n        errorMap.set(line, []);\n      }\n      errorMap.get(line).push(error);\n    }\n\n    // splice the errors into the lines\n    const errorLines = [];\n    const colors = [];\n    const counts = {\n      error: 0,\n      warning: 0,\n      info: 0\n    };\n    const LINE_SIZE = String(lines.length).length;\n    for (let i = 0; i < lines.length; i++) {\n      const line = lines[i];\n      errorLines.push(colorize ? `${String(i + 1).padEnd(LINE_SIZE, ' ')}  \\t%c${line}%c` : `${String(i + 1).padEnd(LINE_SIZE, ' ')}  \\t${line}`);\n      colors.push(`color: grey; background-color: transparent;`,\n      // first color sets color\n      `color: inherit; background-color: transparent;` // second color resets the color profile\n      );\n      if (errorMap.has(i + 1)) {\n        const errorsForLine = errorMap.get(i + 1);\n        for (const error of errorsForLine) {\n          counts[error.type]++;\n          const {\n            loc,\n            message\n          } = error;\n          const start = loc.end.line === loc.start.line ? loc.start.column - 1 : loc.end.column - 1;\n          const end = loc.end.column - 1;\n          const symbol = error.type === 'error' ? '❌' : error.type === 'warning' ? '⚠️' : 'ℹ️';\n          const errorLine = colorize ? `${''.padStart(LINE_SIZE, ' ') + symbol}\\t${' '.repeat(start)}%c^${'~'.repeat(end - start)} %c//%c ${message}%c` : `${''.padStart(LINE_SIZE, ' ') + symbol}\\t${' '.repeat(start)}^${'~'.repeat(end - start)} // ${message}`;\n          errorLines.push(errorLine);\n          colors.push(error.type === 'error' ? 'color: red;' : error.type === 'warning' ? 'color: orange;' : 'color: blue;', 'color: grey;', error.type === 'error' ? 'color: red;' : error.type === 'warning' ? 'color: orange;' : 'color: blue;', 'color: inherit; background-color: transparent;' // reset color\n          );\n        }\n      }\n    }\n    const contextStr = `${counts.error} errors and ${counts.warning} warnings found in the {json:api} document returned by ${this.contextDocument.request?.method} ${this.contextDocument.request?.url}`;\n    const errorString = contextStr + `\\n\\n` + errorLines.join('\\n');\n\n    // eslint-disable-next-line no-console, @typescript-eslint/no-unused-expressions\n    colorize ? console.log(errorString, ...colors) : console.log(errorString);\n    if (macroCondition(getGlobalConfig().WarpDrive.features.JSON_API_CACHE_VALIDATION_ERRORS)) {\n      if (counts.error > 0) {\n        throw new Error(contextStr);\n      }\n    }\n  }\n}\n\n// we always want to sort errors first, then warnings, then info\nfunction compareType(a, b) {\n  if (a === b) {\n    return 0;\n  }\n  if (a === 'error') {\n    return -1;\n  }\n  if (b === 'error') {\n    return 1;\n  }\n  if (a === 'warning') {\n    return -1;\n  }\n  if (b === 'warning') {\n    return 1;\n  }\n  return 0;\n}\nconst REGISTERED_EXTENSIONS = new Map();\nfunction isMetaDocument(doc) {\n  return !(doc instanceof Error) && doc.content && !('data' in doc.content) && !('included' in doc.content) && 'meta' in doc.content;\n}\nfunction isErrorDocument(doc) {\n  return doc instanceof Error;\n}\nfunction isPushedDocument(doc) {\n  return !!doc && typeof doc === 'object' && 'content' in doc && !('request' in doc) && !('response' in doc);\n}\nfunction logPotentialMatches(matches, kind) {\n  if (matches.length === 0) {\n    return '';\n  }\n  if (matches.length === 1) {\n    return `  Did you mean this available ${kind} \"${matches[0].item}\"?`;\n  }\n  const potentialMatches = matches.map(match => match.item).join('\", \"');\n  return `  Did you mean one of these available ${kind}s: \"${potentialMatches}\"?`;\n}\nfunction isRemoteField(v) {\n  return !(v.kind === '@local' || v.kind === 'alias' || v.kind === 'derived');\n}\nfunction getRemoteField(fields, key) {\n  const field = fields.get(key);\n  if (!field) {\n    return undefined;\n  }\n  if (!isRemoteField(field)) {\n    return undefined;\n  }\n  return field;\n}\n\nconst VALID_TOP_LEVEL_MEMBERS = ['data', 'included', 'meta', 'jsonapi', 'links'];\n\n/**\n * Reports issues which violate the JSON:API spec for top-level members.\n *\n * Version: 1.1\n * Section: 7.1\n * Link: https://jsonapi.org/format/#document-top-level\n *\n * @internal\n */\nfunction validateTopLevelDocumentMembers(reporter, doc) {\n  const keys = Object.keys(doc);\n  for (const key of keys) {\n    if (!VALID_TOP_LEVEL_MEMBERS.includes(key)) {\n      if (key.includes(':')) {\n        // TODO @runspired expose the API to enable folks to add validation for their own extensions\n        const extensionName = key.split(':')[0];\n        if (reporter.hasExtension(extensionName)) {\n          const extension = reporter.getExtension(extensionName);\n          extension(reporter, [key]);\n        } else {\n          reporter.warn([key], `Unrecognized extension ${extensionName}. The data provided by \"${key}\" will be ignored as it is not a valid {json:api} member`);\n        }\n      } else {\n        reporter.error([key], `Unrecognized top-level member. The data it provides is ignored as it is not a valid {json:api} member`);\n      }\n    }\n  }\n\n  // additional rules for top-level members\n  // ======================================\n\n  // 1. MUST have either `data`, `errors`, or `meta`\n  if (!('data' in doc) && !('errors' in doc) && !('meta' in doc)) {\n    reporter.error([], 'A {json:api} Document must contain one-of `data` `errors` or `meta`');\n  }\n\n  // 2. MUST NOT have both `data` and `errors`\n  if ('data' in doc && 'errors' in doc) {\n    reporter.error(['data'], 'A {json:api} Document MUST NOT contain both `data` and `errors` members');\n  }\n\n  // 3. MUST NOT have both `included` and `errors`\n  // while not explicitly stated in the spec, this is a logical extension of the above rule\n  // since `included` is only valid when `data` is present.\n  if ('included' in doc && 'errors' in doc) {\n    reporter.error(['included'], 'A {json:api} Document MUST NOT contain both `included` and `errors` members');\n  }\n\n  // 4. MUST NOT have `included` if `data` is not present\n  if ('included' in doc && !('data' in doc)) {\n    reporter.error(['included'], 'A {json:api} Document MUST NOT contain `included` if `data` is not present');\n  }\n\n  // 5. MUST NOT have `included` if `data` is null\n  // when strictly enforcing full linkage, we need to ensure that `included` is not present if `data` is null\n  // however, most APIs will ignore this rule for DELETE requests, so unless strict linkage is enabled, we will only warn\n  // about this issue.\n  if ('included' in doc && doc.data === null) {\n    const isMaybeDelete = reporter.contextDocument.request?.method?.toUpperCase() === 'DELETE' || reporter.contextDocument.request?.op === 'deleteRecord';\n    const method = !reporter.strict.linkage && isMaybeDelete ? 'warn' : 'error';\n    reporter[method](['included'], 'A {json:api} Document MUST NOT contain `included` if `data` is null');\n  }\n\n  // Simple Validation of Top-Level Members\n  // ==========================================\n  // 1. `data` MUST be a single resource object or an array of resource objects or `null`\n  if ('data' in doc) {\n    const dataMemberHasAppropriateForm = doc.data === null || Array.isArray(doc.data) || isSimpleObject(doc.data);\n    if (!dataMemberHasAppropriateForm) {\n      reporter.error(['data'], `The 'data' member MUST be a single resource object or an array of resource objects or null. Received data of type \"${inspectType(doc.data)}\"`);\n    }\n  }\n\n  // 2. `included` MUST be an array of resource objects\n  if ('included' in doc) {\n    if (!Array.isArray(doc.included)) {\n      reporter.error(['included'], `The 'included' member MUST be an array of resource objects. Received data of type \"${inspectType(doc.included)}\"`);\n    }\n  }\n\n  // 3. `meta` MUST be a simple object\n  if ('meta' in doc) {\n    if (!isSimpleObject(doc.meta)) {\n      reporter.error(['meta'], `The 'meta' member MUST be a simple object. Received data of type \"${inspectType(doc.meta)}\"`);\n    }\n  }\n\n  // 4. `jsonapi` MUST be a simple object\n  if ('jsonapi' in doc) {\n    if (!isSimpleObject(doc.jsonapi)) {\n      reporter.error(['jsonapi'], `The 'jsonapi' member MUST be a simple object. Received data of type \"${inspectType(doc.jsonapi)}\"`);\n    }\n  }\n\n  // 5. `links` MUST be a simple object\n  if ('links' in doc) {\n    if (!isSimpleObject(doc.links)) {\n      reporter.error(['links'], `The 'links' member MUST be a simple object. Received data of type \"${inspectType(doc.links)}\"`);\n    }\n  }\n\n  // 6. `errors` MUST be an array of error objects\n  if ('errors' in doc) {\n    if (!Array.isArray(doc.errors)) {\n      reporter.error(['errors'], `The 'errors' member MUST be an array of error objects. Received data of type \"${inspectType(doc.errors)}\"`);\n    }\n  }\n}\n\nconst VALID_COLLECTION_LINKS = ['self', 'related', 'first', 'last', 'prev', 'next'];\nconst VALID_RESOURCE_RELATIONSHIP_LINKS = ['self', 'related'];\nconst VALID_RESOURCE_LINKS = ['self'];\n\n/**\n * Validates the links object in a top-level JSON API document or resource object\n *\n * Version: 1.1\n *\n * Section: 7.1 Top Level\n * Link: https://jsonapi.org/format/#document-top-level\n *\n * Section: 7.2.3 Resource Objects\n * Link: https://jsonapi.org/format/#document-resource-object-links\n *\n * Section: 7.2.2.2 Resource Relationships\n * Link: https://jsonapi.org/format/#document-resource-object-relationships\n *\n * Section: 7.6 Document Links\n * Link: https://jsonapi.org/format/#document-links\n *\n * @internal\n */\nfunction validateLinks(reporter, doc, type, path = ['links']) {\n  if (!('links' in doc)) {\n    return;\n  }\n  if (!isSimpleObject(doc.links)) {\n    // this is a violation but we report it when validating section 7.1\n    return;\n  }\n\n  // prettier-ignore\n  const VALID_TOP_LEVEL_LINKS = type === 'collection-document' || type === 'collection-relationship' ? VALID_COLLECTION_LINKS : type === 'resource-document' || type === 'resource-relationship' ? VALID_RESOURCE_RELATIONSHIP_LINKS : type === 'resource' ? VALID_RESOURCE_LINKS : [];\n  const links = doc.links;\n  const keys = Object.keys(links);\n  for (const key of keys) {\n    if (!VALID_TOP_LEVEL_LINKS.includes(key)) {\n      reporter.warn([...path, key], `Unrecognized top-level link. The data it provides may be ignored as it is not a valid {json:api} link for a ${type}`);\n    }\n    // links may be either a string or an object with an href property or null\n    if (links[key] === null) ; else if (typeof links[key] === 'string') {\n      if (links[key].length === 0) {\n        reporter.warn([...path, key], `Expected a non-empty string, but received an empty string`);\n      }\n      // valid, though we should potentially validate the URL here\n    } else if (isSimpleObject(links[key])) {\n      if ('href' in links[key]) {\n        const linksKeys = Object.keys(links[key]);\n        if (linksKeys.length > 1) {\n          reporter.warn([...path, key], `Expected the links object to only have an href property, but received unknown keys ${linksKeys.filter(k => k !== 'href').join(', ')}`);\n        }\n        if (typeof links[key].href !== 'string') {\n          reporter.error([...path, key, 'href'], `Expected a string value, but received ${inspectType(links[key].href)}`);\n        } else {\n          if (links[key].href.length === 0) {\n            reporter.warn([...path, key, 'href'], `Expected a non-empty string, but received an empty string`);\n          }\n          // valid, though we should potentially validate the URL here\n        }\n      } else {\n        const linksKeys = Object.keys(links[key]);\n        if (linksKeys.length > 0) {\n          reporter.error([...path, key], `Expected the links object to have an href property, but received only the unknown keys ${linksKeys.join(', ')}`);\n        } else {\n          reporter.error([...path, key], `Expected the links object to have an href property`);\n        }\n      }\n    } else {\n      // invalid\n      reporter.error([...path, key], `Expected a string, null, or an object with an href property for the link \"${key}\", but received ${inspectType(links[key])}`);\n    }\n  }\n}\n\nconst SINGULAR_OPS = ['createRecord', 'updateRecord', 'deleteRecord', 'findRecord', 'queryRecord'];\n\n/**\n * Validates the resource objects in either the `data` or `included` members of\n * JSON:API document.\n *\n * Version: 1.1\n * Section: 7.2\n * Link: https://jsonapi.org/format/#document-resource-objects\n *\n * @internal\n */\nfunction validateDocumentResources(reporter, doc) {\n  if ('data' in doc) {\n    // scan for common mistakes of single vs multiple resource objects\n    const op = reporter.contextDocument.request?.op;\n    if (op && SINGULAR_OPS.includes(op)) {\n      if (Array.isArray(doc.data)) {\n        reporter.error(['data'], `\"${op}\" requests expect a single resource object in the returned data, but received an array`);\n      }\n    }\n\n    // guard for a common mistake around deleteRecord\n    if (op === 'deleteRecord') {\n      if (doc.data !== null) {\n        reporter.warn(['data'], `\"deleteRecord\" requests expect the data member to be null, but received ${inspectType(doc.data)}. This can sometimes cause unexpected resurrection of the deleted record.`);\n      }\n    }\n    if (Array.isArray(doc.data)) {\n      doc.data.forEach((resource, index) => {\n        if (!isSimpleObject(resource)) {\n          reporter.error(['data', index], `Expected a resource object, but received ${inspectType(resource)}`);\n        } else {\n          validateResourceObject(reporter, resource, ['data', index]);\n        }\n      });\n    } else if (doc.data !== null) {\n      if (!isSimpleObject(doc.data)) {\n        reporter.error(['data'], `Expected a resource object, but received ${inspectType(doc.data)}`);\n      } else {\n        validateResourceObject(reporter, doc.data, ['data']);\n      }\n    }\n  }\n  if ('included' in doc && Array.isArray(doc.included)) {\n    doc.included.forEach((resource, index) => {\n      if (!isSimpleObject(resource)) {\n        reporter.error(['included', index], `Expected a resource object, but received ${inspectType(resource)}`);\n      } else {\n        validateResourceObject(reporter, resource, ['included', index]);\n      }\n    });\n  }\n}\nfunction validateResourceObject(reporter, resource, path) {\n  validateTopLevelResourceShape(reporter, resource, path);\n}\nconst VALID_TOP_LEVEL_RESOURCE_KEYS = ['lid', 'id', 'type', 'attributes', 'relationships', 'meta', 'links'];\nfunction validateTopLevelResourceShape(reporter, resource, path) {\n  // a resource MUST have a string type\n  if (!('type' in resource)) {\n    reporter.error([...path, 'type'], `Expected a ResourceObject to have a type property`);\n  } else if (typeof resource.type !== 'string') {\n    reporter.error([...path, 'type'], `Expected a string value for the type property, but received ${inspectType(resource.type)}`, 'value');\n  } else if (resource.type.length === 0) {\n    reporter.error([...path, 'type'], `Expected a non-empty string value for the type property, but received an empty string`, 'value');\n  } else if (!reporter.schema.hasResource({\n    type: resource.type\n  })) {\n    const method = reporter.strict.unknownType ? 'error' : 'warn';\n    const potentialTypes = reporter.searchTypes(resource.type);\n    reporter[method]([...path, 'type'], `Expected a schema to be available for the ResourceType \"${resource.type}\" but none was found.${logPotentialMatches(potentialTypes, 'ResourceType')}`, 'value');\n  }\n\n  // a resource MUST have a string ID\n  if (!('id' in resource)) {\n    reporter.error([...path, 'id'], `Expected a ResourceObject to have an id property`);\n  } else if (typeof resource.id !== 'string') {\n    reporter.error([...path, 'id'], `Expected a string value for the id property, but received ${inspectType(resource.id)}`, 'value');\n  } else if (resource.id.length === 0) {\n    reporter.error([...path, 'id'], `Expected a non-empty string value for the id property, but received an empty string`, 'value');\n  }\n\n  // a resource MAY have a lid property\n  if ('lid' in resource && typeof resource.lid !== 'string') {\n    reporter.error([...path, 'lid'], `Expected a string value for the lid property, but received ${inspectType(resource.lid)}`, 'value');\n  }\n\n  // a resource MAY have a meta property\n  if ('meta' in resource && !isSimpleObject(resource.meta)) {\n    reporter.error([...path, 'meta'], `Expected a simple object for the meta property, but received ${inspectType(resource.meta)}`, 'value');\n  }\n\n  // a resource MAY have a links property\n  if ('links' in resource && !isSimpleObject(resource.links)) {\n    reporter.error([...path, 'links'], `Expected a simple object for the links property, but received ${inspectType(resource.links)}`, 'value');\n  } else if ('links' in resource) {\n    validateLinks(reporter, resource, 'resource', [...path, 'links']);\n  }\n  const hasAttributes = 'attributes' in resource && isSimpleObject(resource.attributes);\n  const hasRelationships = 'relationships' in resource && isSimpleObject(resource.relationships);\n\n  // We expect at least one of attributes or relationships to be present\n  if (!hasAttributes && !hasRelationships) {\n    reporter.warn(path, `Expected a ResourceObject to have either attributes or relationships`);\n  }\n\n  // we expect at least one of attributes or relationships to be non-empty\n  const attributesLength = hasAttributes ? Object.keys(resource.attributes).length : 0;\n  const relationshipsLength = hasRelationships ? Object.keys(resource.relationships).length : 0;\n  if ((hasAttributes || hasRelationships) && attributesLength === 0 && relationshipsLength === 0) {\n    reporter.warn([...path, hasAttributes ? 'attributes' : hasRelationships ? 'relationships' : 'attributes'], `Expected a ResourceObject to have either non-empty attributes or non-empty relationships`);\n  }\n\n  // check for unknown keys on the resource object\n  const keys = Object.keys(resource);\n  for (const key of keys) {\n    if (!VALID_TOP_LEVEL_RESOURCE_KEYS.includes(key)) {\n      // check for extension keys\n      if (key.includes(':')) {\n        const extensionName = key.split(':')[0];\n        if (reporter.hasExtension(extensionName)) {\n          const extension = reporter.getExtension(extensionName);\n          extension(reporter, [...path, key]);\n        } else {\n          reporter.warn([...path, key], `Unrecognized extension ${extensionName}. The data provided by \"${key}\" will be ignored as it is not a valid {json:api} ResourceObject member`);\n        }\n      } else {\n        // check if this is an attribute or relationship\n        let didYouMean = '  Likely this field should have been inside of either \"attributes\" or \"relationships\"';\n        const type = 'type' in resource ? resource.type : undefined;\n        if (type && reporter.schema.hasResource({\n          type\n        })) {\n          const fields = reporter.schema.fields({\n            type\n          });\n          const field = getRemoteField(fields, key);\n          if (field) {\n            const isRelationship = RELATIONSHIP_FIELD_KINDS.includes(field.kind);\n            didYouMean = `  Based on the ResourceSchema for \"${type}\" this field is likely a ${field.kind} and belongs inside of ${isRelationship ? 'relationships' : 'attributes'}, e.g. \"${isRelationship ? 'relationships' : 'attributes'}\": { \"${key}\": { ... } }`;\n          } else {\n            const fieldMatches = reporter.searchFields(type, key);\n            if (fieldMatches.length === 1) {\n              const matchedField = fields.get(fieldMatches[0].item);\n              const isRelationship = RELATIONSHIP_FIELD_KINDS.includes(matchedField.kind);\n              didYouMean = `  Based on the ResourceSchema for \"${type}\" this field is likely a ${matchedField.kind} and belongs inside of ${isRelationship ? 'relationships' : 'attributes'}, e.g. \"${isRelationship ? 'relationships' : 'attributes'}\": { \"${matchedField.name}\": { ... } }`;\n            } else if (fieldMatches.length > 1) {\n              const matchedField = fields.get(fieldMatches[0].item);\n              const isRelationship = RELATIONSHIP_FIELD_KINDS.includes(matchedField.kind);\n              didYouMean = `  Based on the ResourceSchema for \"${type}\" this field is likely one of \"${fieldMatches.map(v => v.item).join('\", \"')}\" and belongs inside of either \"attributes\" or \"relationships\", e.g. \"${isRelationship ? 'relationships' : 'attributes'}\": { \"${matchedField.name}\": { ... } }`;\n            }\n          }\n        }\n        reporter.error([...path, key], `Unrecognized ResourceObject member. The data it provides is ignored as it is not a valid {json:api} ResourceObject member.${didYouMean}`);\n      }\n    }\n  }\n\n  // if we have a schema, validate the individual attributes and relationships\n  const type = 'type' in resource ? resource.type : undefined;\n  if (type && reporter.schema.hasResource({\n    type\n  })) {\n    if ('attributes' in resource) {\n      validateResourceAttributes(reporter, type, resource.attributes, [...path, 'attributes']);\n    }\n    if ('relationships' in resource) {\n      validateResourceRelationships(reporter, type, resource.relationships, [...path, 'relationships']);\n    }\n  }\n}\nfunction validateResourceAttributes(reporter, type, resource, path) {\n  const fields = reporter.schema.fields({\n    type\n  });\n  const cacheFields = reporter.schema.cacheFields?.({\n    type\n  }) ?? fields;\n  for (const [key] of Object.entries(resource)) {\n    const field = getRemoteField(cacheFields, key);\n    const actualField = cacheFields.get(key);\n    if (!field && actualField) {\n      reporter.warn([...path, key], `Expected the ${actualField.kind} field \"${key}\" to not have its own data in the ResourceObject's attributes. Likely this field should either not be returned in this payload or the field definition should be updated in the schema.`);\n    } else if (!field) {\n      if (key.includes(':')) {\n        const extensionName = key.split(':')[0];\n        if (reporter.hasExtension(extensionName)) {\n          const extension = reporter.getExtension(extensionName);\n          extension(reporter, [...path, key]);\n        } else {\n          reporter.warn([...path, key], `Unrecognized extension ${extensionName}. The data provided by \"${key}\" will be ignored as it is not a valid {json:api} ResourceObject member`);\n        }\n      } else {\n        const method = reporter.strict.unknownAttribute ? 'error' : 'warn';\n\n        // TODO @runspired when we check for fuzzy matches we can adjust the message to say\n        // whether the expected field is an attribute or a relationship\n        const potentialFields = reporter.searchFields(type, key);\n        reporter[method]([...path, key], `Unrecognized attribute. The data it provides is ignored as it is not part of the ResourceSchema for \"${type}\".${logPotentialMatches(potentialFields, 'field')}`);\n      }\n    } else if (field && RELATIONSHIP_FIELD_KINDS.includes(field.kind)) {\n      reporter.error([...path, key], `Expected the \"${key}\" field to be in \"relationships\" as it has kind \"${field.kind}\", but received data for it in \"attributes\".`);\n    }\n  }\n\n  // TODO @runspired we should also deep-validate the field value\n  // TODO @runspired we should validate that field values are valid JSON and not instances\n}\nfunction validateResourceRelationships(reporter, type, resource, path) {\n  const schema = reporter.schema.fields({\n    type\n  });\n  for (const [key] of Object.entries(resource)) {\n    const field = getRemoteField(schema, key);\n    const actualField = schema.get(key);\n    if (!field && actualField) {\n      reporter.warn([...path, key], `Expected the ${actualField.kind} field \"${key}\" to not have its own data in the ResourceObject's relationships. Likely this field should either not be returned in this payload or the field definition should be updated in the schema.`);\n    } else if (!field) {\n      if (key.includes(':')) {\n        const extensionName = key.split(':')[0];\n        if (reporter.hasExtension(extensionName)) {\n          const extension = reporter.getExtension(extensionName);\n          extension(reporter, [...path, key]);\n        } else {\n          reporter.warn([...path, key], `Unrecognized extension ${extensionName}. The data provided by \"${key}\" will be ignored as it is not a valid {json:api} ResourceObject member`);\n        }\n      } else {\n        const method = reporter.strict.unknownRelationship ? 'error' : 'warn';\n\n        // TODO @runspired when we check for fuzzy matches we can adjust the message to say\n        // whether the expected field is an attribute or a relationship\n        const potentialFields = reporter.searchFields(type, key);\n        reporter[method]([...path, key], `Unrecognized relationship. The data it provides is ignored as it is not part of the ResourceSchema for \"${type}\".${logPotentialMatches(potentialFields, 'field')}`);\n      }\n    } else if (field && !RELATIONSHIP_FIELD_KINDS.includes(field.kind)) {\n      reporter.error([...path, key], `Expected the \"${key}\" field to be in \"attributes\" as it has kind \"${field.kind}\", but received data for it in \"relationships\".`);\n    }\n  }\n\n  // TODO @runspired we should also deep-validate the relationship payload\n  // TODO @runspired we should validate linksMode requirements for both Polaris and Legacy modes\n  // TODO @runspired we should warn if the discovered resource-type in a relationship is the abstract\n  //   type instead of the concrete type.\n}\n\nfunction validateDocument(capabilities, doc) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected a JSON:API Document as the content provided to the cache, received ${typeof doc.content}`);\n    }\n  })(doc instanceof Error || typeof doc.content === 'object' && doc.content !== null) : {};\n\n  // if the feature is not active and the payloads are not being logged\n  // we don't need to validate the payloads\n  if (macroCondition(!getGlobalConfig().WarpDrive.features.JSON_API_CACHE_VALIDATION_ERRORS)) {\n    if (macroCondition(!getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE)) {\n      if (!(getGlobalConfig().WarpDrive.debug.LOG_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE)) {\n        return;\n      }\n    }\n  }\n  if (macroCondition(!getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE)) {\n    if (!(getGlobalConfig().WarpDrive.debug.LOG_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE)) {\n      if (macroCondition(!getGlobalConfig().WarpDrive.features.JSON_API_CACHE_VALIDATION_ERRORS)) {\n        return;\n      }\n    }\n  }\n  if (isErrorDocument(doc)) {\n    return; // return validateErrorDocument(reporter, doc);\n  } else if (isMetaDocument(doc)) {\n    return; // return validateMetaDocument(reporter, doc);\n  } else if (isPushedDocument(doc)) {\n    return; // return validatePushedDocument(reporter, doc);\n  }\n  const reporter = new Reporter(capabilities, doc);\n  return validateResourceDocument(reporter, doc);\n}\n\n// function validateErrorDocument(reporter: Reporter, doc: StructuredErrorDocument) {}\n\n// function validateMetaDocument(reporter: Reporter, doc: StructuredDataDocument<ResourceMetaDocument>) {}\n\n// function validatePushedDocument(reporter: Reporter, doc: StructuredDataDocument<ResourceDocument>) {}\n\nfunction validateResourceDocument(reporter, doc) {\n  validateTopLevelDocumentMembers(reporter, doc.content);\n  validateLinks(reporter, doc.content, 'data' in doc.content && Array.isArray(doc.content?.data) ? 'collection-document' : 'resource-document');\n  validateDocumentResources(reporter, doc.content);\n\n  // TODO @runspired - validateMeta on document\n  // TODO @runspired - validateMeta on resource\n  // TODO @runspired - validateMeta on resource relationships\n  // TODO @runspired - validate no-meta on resource identifiers\n  //\n  // ---------------------------------\n  // super-strict-mode\n  //\n  // TODO @runspired - validate that all referenced resource identifiers are present in the document (full linkage)\n  // TODO @runspired - validate that all included resources have a path back to `data` (full linkage)\n  //\n  // ---------------------------------\n  // nice-to-haves\n  //\n  // TODO @runspired - validate links objects more thoroughly for spec props we don't use\n  // TODO @runspired - validate request includes are in fact included\n  // TODO @runspired - validate request fields are in fact present\n  // TODO @runspired - MAYBE validate request sort is in fact sorted? (useful for catching Mocking bugs)\n  // TODO @runspired - MAYBE validate request pagination is in fact paginated? (useful for catching Mocking bugs)\n\n  reporter.report();\n}\n\nfunction isImplicit(relationship) {\n  return relationship.definition.isImplicit;\n}\nconst EMPTY_ITERATOR = {\n  iterator() {\n    return {\n      next() {\n        return {\n          done: true,\n          value: undefined\n        };\n      }\n    };\n  }\n};\nfunction makeCache() {\n  return {\n    id: null,\n    remoteAttrs: null,\n    localAttrs: null,\n    defaultAttrs: null,\n    inflightAttrs: null,\n    changes: null,\n    errors: null,\n    isNew: false,\n    isDeleted: false,\n    isDeletionCommitted: false\n  };\n}\n\n/**\n * ```ts\n * import { JSONAPICache } from '@warp-drive/json-api';\n * ```\n *\n * A {@link Cache} implementation tuned for [{json:api}](https://jsonapi.org/)\n *\n * @categoryDescription Cache Management\n * APIs for primary cache management functionality\n * @categoryDescription Cache Forking\n * APIs that support Cache Forking\n * @categoryDescription SSR Support\n * APIs that support SSR functionality\n * @categoryDescription Resource Lifecycle\n * APIs that support management of resource data\n * @categoryDescription Resource Data\n * APIs that support granular field level management of resource data\n * @categoryDescription Resource State\n * APIs that support managing Resource states\n *\n * @public\n */\nclass JSONAPICache {\n  /**\n   * The Cache Version that this implementation implements.\n   *\n   * @public\n   */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  constructor(capabilities) {\n    this.version = '2';\n    this._capabilities = capabilities;\n    this.__cache = new Map();\n    this.__graph = graphFor(capabilities);\n    this.__destroyedCache = new Map();\n    this.__documents = new Map();\n  }\n\n  ////////// ================ //////////\n  ////////// Cache Management //////////\n  ////////// ================ //////////\n\n  /**\n   * Cache the response to a request\n   *\n   * Implements `Cache.put`.\n   *\n   * Expects a StructuredDocument whose `content` member is a JsonApiDocument.\n   *\n   * ```js\n   * cache.put({\n   *   request: { url: 'https://api.example.com/v1/user/1' },\n   *   content: {\n   *     data: {\n   *       type: 'user',\n   *       id: '1',\n   *       attributes: {\n   *         name: 'Chris'\n   *       }\n   *     }\n   *   }\n   * })\n   * ```\n   *\n   * > **Note**\n   * > The nested `content` and `data` members are not a mistake. This is because\n   * > there are two separate concepts involved here, the `StructuredDocument` which contains\n   * > the context of a given Request that has been issued with the returned contents as its\n   * > `content` property, and a `JSON:API Document` which is the json contents returned by\n   * > this endpoint and which uses its `data` property to signify which resources are the\n   * > primary resources associated with the request.\n   *\n   * StructuredDocument's with urls will be cached as full documents with\n   * associated resource membership order and contents preserved but linked\n   * into the cache.\n   *\n   * @category Cache Management\n   * @public\n   */\n\n  put(doc) {\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      validateDocument(this._capabilities, doc);\n    }\n    if (isErrorDocument(doc)) {\n      return this._putDocument(doc, undefined, undefined);\n    } else if (isMetaDocument(doc)) {\n      return this._putDocument(doc, undefined, undefined);\n    }\n    const jsonApiDoc = doc.content;\n    const included = jsonApiDoc.included;\n    let i, length;\n    const {\n      cacheKeyManager\n    } = this._capabilities;\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      validateDocumentFields(this._capabilities.schema, jsonApiDoc);\n    }\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE) {\n        const Counts = new Map();\n        let totalCount = 0;\n        if (included) {\n          for (i = 0, length = included.length; i < length; i++) {\n            const type = included[i].type;\n            Counts.set(type, (Counts.get(type) || 0) + 1);\n            totalCount++;\n          }\n        }\n        if (Array.isArray(jsonApiDoc.data)) {\n          for (i = 0, length = jsonApiDoc.data.length; i < length; i++) {\n            const type = jsonApiDoc.data[i].type;\n            Counts.set(type, (Counts.get(type) || 0) + 1);\n            totalCount++;\n          }\n        } else if (jsonApiDoc.data) {\n          const type = jsonApiDoc.data.type;\n          Counts.set(type, (Counts.get(type) || 0) + 1);\n          totalCount++;\n        }\n        logGroup('cache', 'put', '<@document>', doc.content?.lid || doc.request?.url || 'unknown-request', `(${totalCount}) records`, '');\n        let str = `\\tContent Counts:`;\n        Counts.forEach((count, type) => {\n          str += `\\n\\t\\t${type}: ${count} record${count > 1 ? 's' : ''}`;\n        });\n        if (Counts.size === 0) {\n          str += `\\t(empty)`;\n        }\n        // eslint-disable-next-line no-console\n        console.log(str);\n        // eslint-disable-next-line no-console\n        console.log({\n          lid: doc.content?.lid,\n          content: structuredClone(doc.content),\n          // we may need a specialized copy here\n          request: doc.request,\n          // structuredClone(doc.request),\n          response: doc.response // structuredClone(doc.response),\n        });\n        // eslint-disable-next-line no-console\n        console.groupEnd();\n      }\n    }\n    if (included) {\n      for (i = 0, length = included.length; i < length; i++) {\n        included[i] = putOne(this, cacheKeyManager, included[i]);\n      }\n    }\n    if (Array.isArray(jsonApiDoc.data)) {\n      length = jsonApiDoc.data.length;\n      const identifiers = [];\n      for (i = 0; i < length; i++) {\n        identifiers.push(putOne(this, cacheKeyManager, jsonApiDoc.data[i]));\n      }\n      return this._putDocument(doc, identifiers, included);\n    }\n    if (jsonApiDoc.data === null) {\n      return this._putDocument(doc, null, included);\n    }\n    const identifier = putOne(this, cacheKeyManager, jsonApiDoc.data);\n    return this._putDocument(doc, identifier, included);\n  }\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n\n  /** @internal */\n  _putDocument(doc, data, included) {\n    // @ts-expect-error narrowing within is just horrible  in TS :/\n    const resourceDocument = isErrorDocument(doc) ? fromStructuredError(doc) : fromBaseDocument(doc);\n    if (data !== undefined) {\n      resourceDocument.data = data;\n    }\n    if (included !== undefined) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`There should not be included data on an Error document`);\n        }\n      })(!isErrorDocument(doc)) : {};\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`There should not be included data on a Meta document`);\n        }\n      })(!isMetaDocument(doc)) : {};\n      resourceDocument.included = included;\n    }\n    const request = doc.request;\n    const identifier = request ? this._capabilities.cacheKeyManager.getOrCreateDocumentIdentifier(request) : null;\n    if (identifier) {\n      resourceDocument.lid = identifier.lid;\n\n      // @ts-expect-error\n      doc.content = resourceDocument;\n      const hasExisting = this.__documents.has(identifier.lid);\n      this.__documents.set(identifier.lid, doc);\n      this._capabilities.notifyChange(identifier, hasExisting ? 'updated' : 'added', null);\n    }\n    if (doc.request?.op === 'findHasMany') {\n      const parentIdentifier = doc.request.options?.identifier;\n      const parentField = doc.request.options?.field;\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected a hasMany field`);\n        }\n      })(parentField?.kind === 'hasMany') : {};\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected a parent identifier for a findHasMany request`);\n        }\n      })(parentIdentifier && isResourceKey(parentIdentifier)) : {};\n      if (parentField && parentIdentifier) {\n        this.__graph.push({\n          op: 'updateRelationship',\n          record: parentIdentifier,\n          field: parentField.name,\n          value: resourceDocument\n        });\n      }\n    }\n    return resourceDocument;\n  }\n\n  /**\n   * Update the \"remote\" or \"canonical\" (persisted) state of the Cache\n   * by merging new information into the existing state.\n   *\n   * @category Cache Management\n   * @public\n   * @param op the operation or list of operations to perform\n   */\n  patch(op) {\n    if (Array.isArray(op)) {\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE)) {\n        if (getGlobalConfig().WarpDrive.debug.LOG_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE) {\n          logGroup('cache', 'patch', '<BATCH>', String(op.length) + ' operations', '', '');\n        }\n      }\n      assertPrivateCapabilities(this._capabilities);\n      this._capabilities._store._join(() => {\n        for (const operation of op) {\n          patchCache(this, operation);\n        }\n      });\n      if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE)) {\n        if (getGlobalConfig().WarpDrive.debug.LOG_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE) {\n          // eslint-disable-next-line no-console\n          console.groupEnd();\n        }\n      }\n    } else {\n      patchCache(this, op);\n    }\n  }\n\n  /**\n   * Update the \"local\" or \"current\" (unpersisted) state of the Cache\n   *\n   * @category Cache Management\n   * @public\n   */\n  mutate(mutation) {\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE) {\n        logGroup('cache', 'mutate', mutation.record.type, mutation.record.lid, mutation.field, mutation.op);\n        try {\n          const _data = JSON.parse(JSON.stringify(mutation));\n          // eslint-disable-next-line no-console\n          console.log(_data);\n        } catch {\n          // eslint-disable-next-line no-console\n          console.log(mutation);\n        }\n      }\n    }\n    this.__graph.update(mutation, false);\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE) {\n        // eslint-disable-next-line no-console\n        console.groupEnd();\n      }\n    }\n  }\n\n  /**\n   * Peek resource data from the Cache.\n   *\n   * In development, if the return value\n   * is JSON the return value\n   * will be deep-cloned and deep-frozen\n   * to prevent mutation thereby enforcing cache\n   * Immutability.\n   *\n   * This form of peek is useful for implementations\n   * that want to feed raw-data from cache to the UI\n   * or which want to interact with a blob of data\n   * directly from the presentation cache.\n   *\n   * An implementation might want to do this because\n   * de-referencing records which read from their own\n   * blob is generally safer because the record does\n   * not require retainining connections to the Store\n   * and Cache to present data on a per-field basis.\n   *\n   * This generally takes the place of `getAttr` as\n   * an API and may even take the place of `getRelationship`\n   * depending on implementation specifics, though this\n   * latter usage is less recommended due to the advantages\n   * of the Graph handling necessary entanglements and\n   * notifications for relational data.\n   *\n   * :::warning\n   * It is not recommended to use the return value as\n   * a serialized representation of the resource both\n   * due to it containing local mutations and because\n   * it may contain additional fields not recognized\n   * by the {json:api} API implementation such as `lid` and\n   * the various internal WarpDrive bookkeeping fields.\n   * :::\n   *\n   * @category Cache Management\n   * @public\n   */\n\n  peek(identifier) {\n    if (isResourceKey(identifier)) {\n      const peeked = this.__safePeek(identifier, false);\n      if (!peeked) {\n        return null;\n      }\n      const {\n        type,\n        id,\n        lid\n      } = identifier;\n      const attributes = structuredClone(Object.assign({}, peeked.remoteAttrs, peeked.inflightAttrs, peeked.localAttrs));\n      const relationships = {};\n      const rels = this.__graph.identifiers.get(identifier);\n      if (rels) {\n        Object.keys(rels).forEach(key => {\n          const rel = rels[key];\n          if (rel.definition.isImplicit) {\n            return;\n          } else {\n            relationships[key] = this.__graph.getData(identifier, key);\n          }\n        });\n      }\n      assertPrivateCapabilities(this._capabilities);\n      const store = this._capabilities._store;\n      const attrs = getCacheFields(this, identifier);\n      attrs.forEach((attr, key) => {\n        if (key in attributes && attributes[key] !== undefined) {\n          return;\n        }\n        const defaultValue = getDefaultValue(attr, identifier, store);\n        if (defaultValue !== undefined) {\n          attributes[key] = defaultValue;\n        }\n      });\n      return {\n        type,\n        id,\n        lid,\n        attributes,\n        relationships\n      };\n    }\n    const document = this.peekRequest(identifier);\n    if (document) {\n      if ('content' in document) return document.content;\n    }\n    return null;\n  }\n\n  /**\n   * Peek the remote resource data from the Cache.\n   *\n   * @category Cache Management\n   * @public\n   */\n\n  peekRemoteState(identifier) {\n    if (isResourceKey(identifier)) {\n      const peeked = this.__safePeek(identifier, false);\n      if (!peeked) {\n        return null;\n      }\n      const {\n        type,\n        id,\n        lid\n      } = identifier;\n      const attributes = structuredClone(peeked.remoteAttrs);\n      const relationships = {};\n      const rels = this.__graph.identifiers.get(identifier);\n      if (rels) {\n        Object.keys(rels).forEach(key => {\n          const rel = rels[key];\n          if (rel.definition.isImplicit) {\n            return;\n          } else {\n            relationships[key] = structuredClone(this.__graph.getData(identifier, key));\n          }\n        });\n      }\n      assertPrivateCapabilities(this._capabilities);\n      const store = this._capabilities._store;\n      const attrs = getCacheFields(this, identifier);\n      attrs.forEach((attr, key) => {\n        if (key in attributes && attributes[key] !== undefined) {\n          return;\n        }\n        const defaultValue = getDefaultValue(attr, identifier, store);\n        if (defaultValue !== undefined) {\n          attributes[key] = defaultValue;\n        }\n      });\n      return {\n        type,\n        id,\n        lid,\n        attributes,\n        relationships\n      };\n    }\n    const document = this.peekRequest(identifier);\n    if (document) {\n      if ('content' in document) return document.content;\n    }\n    return null;\n  }\n\n  /**\n   * Peek the Cache for the existing request data associated with\n   * a cacheable request.\n   *\n   * This is effectively the reverse of `put` for a request in\n   * that it will return the the request, response, and content\n   * whereas `peek` will return just the `content`.\n   *\n   * @category Cache Management\n   * @public\n   */\n  peekRequest(identifier) {\n    return this.__documents.get(identifier.lid) || null;\n  }\n\n  /**\n   * Push resource data from a remote source into the cache for this identifier\n   *\n   * @category Cache Management\n   * @public\n   * @return if `calculateChanges` is true then calculated key changes should be returned\n   */\n  upsert(identifier, data, calculateChanges) {\n    assertPrivateCapabilities(this._capabilities);\n    const store = this._capabilities._store;\n    if (!store._cbs) {\n      let result = undefined;\n      store._run(() => {\n        result = cacheUpsert(this, identifier, data, calculateChanges);\n      });\n      return result;\n    }\n    return cacheUpsert(this, identifier, data, calculateChanges);\n  }\n\n  ////////// ============= //////////\n  ////////// Cache Forking //////////\n  ////////// ============= //////////\n\n  /**\n   * Create a fork of the cache from the current state.\n   *\n   * Applications should typically not call this method themselves,\n   * preferring instead to fork at the Store level, which will\n   * utilize this method to fork the cache.\n   *\n   * @category Cache Forking\n   * @private\n   */\n  fork() {\n    throw new Error(`Not Implemented`);\n  }\n\n  /**\n   * Merge a fork back into a parent Cache.\n   *\n   * Applications should typically not call this method themselves,\n   * preferring instead to merge at the Store level, which will\n   * utilize this method to merge the caches.\n   *\n   * @category Cache Forking\n   * @private\n   */\n  merge(_cache) {\n    throw new Error(`Not Implemented`);\n  }\n\n  /**\n   * Generate the list of changes applied to all\n   * record in the store.\n   *\n   * Each individual resource or document that has\n   * been mutated should be described as an individual\n   * `Change` entry in the returned array.\n   *\n   * A `Change` is described by an object containing up to\n   * three properties: (1) the `identifier` of the entity that\n   * changed; (2) the `op` code of that change being one of\n   * `upsert` or `remove`, and if the op is `upsert` a `patch`\n   * containing the data to merge into the cache for the given\n   * entity.\n   *\n   * This `patch` is opaque to the Store but should be understood\n   * by the Cache and may expect to be utilized by an Adapter\n   * when generating data during a `save` operation.\n   *\n   * It is generally recommended that the `patch` contain only\n   * the updated state, ignoring fields that are unchanged\n   *\n   * ```ts\n   * interface Change {\n   *  identifier: ResourceKey | RequestKey;\n   *  op: 'upsert' | 'remove';\n   *  patch?: unknown;\n   * }\n   * ```\n   *\n   * @category Cache Forking\n   * @private\n   */\n  diff() {\n    throw new Error(`Not Implemented`);\n  }\n\n  ////////// =========== //////////\n  ////////// SSR Support //////////\n  ////////// =========== //////////\n\n  /**\n   * Serialize the entire contents of the Cache into a Stream\n   * which may be fed back into a new instance of the same Cache\n   * via `cache.hydrate`.\n   *\n   * @category SSR Support\n   * @private\n   */\n  dump() {\n    throw new Error(`Not Implemented`);\n  }\n\n  /**\n   * hydrate a Cache from a Stream with content previously serialized\n   * from another instance of the same Cache, resolving when hydration\n   * is complete.\n   *\n   * This method should expect to be called both in the context of restoring\n   * the Cache during application rehydration after SSR **AND** at unknown\n   * times during the lifetime of an already booted application when it is\n   * desired to bulk-load additional information into the cache. This latter\n   * behavior supports optimizing pre/fetching of data for route transitions\n   * via data-only SSR modes.\n   *\n   * @category SSR Support\n   * @private\n   */\n  hydrate(stream) {\n    throw new Error('Not Implemented');\n  }\n\n  ////////// ================== //////////\n  ////////// Resource Lifecycle //////////\n  ////////// ================== //////////\n\n  /**\n   * [LIFECYCLE] Signal to the cache that a new record has been instantiated on the client\n   *\n   * It returns properties from options that should be set on the record during the create\n   * process. This return value behavior is deprecated.\n   *\n   * @category Resource Lifecycle\n   * @public\n   */\n  clientDidCreate(identifier, options) {\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE) {\n        try {\n          const _data = options ? JSON.parse(JSON.stringify(options)) : options;\n          // eslint-disable-next-line no-console\n          console.log(`WarpDrive | Mutation - clientDidCreate ${identifier.lid}`, _data);\n        } catch {\n          // eslint-disable-next-line no-console\n          console.log(`WarpDrive | Mutation - clientDidCreate ${identifier.lid}`, options);\n        }\n      }\n    }\n    const cached = this._createCache(identifier);\n    cached.isNew = true;\n    const createOptions = {};\n    if (options !== undefined) {\n      const fields = getCacheFields(this, identifier);\n      const graph = this.__graph;\n      const propertyNames = Object.keys(options);\n      for (let i = 0; i < propertyNames.length; i++) {\n        const name = propertyNames[i];\n        const propertyValue = options[name];\n        if (name === 'id') {\n          continue;\n        }\n        const fieldType = fields.get(name);\n        const kind = fieldType !== undefined ? 'kind' in fieldType ? fieldType.kind : 'attribute' : null;\n        let relationship;\n        switch (kind) {\n          case 'attribute':\n            this.setAttr(identifier, name, propertyValue);\n            createOptions[name] = propertyValue;\n            break;\n          case 'belongsTo':\n            this.mutate({\n              op: 'replaceRelatedRecord',\n              field: name,\n              record: identifier,\n              value: propertyValue\n            });\n            relationship = graph.get(identifier, name);\n            relationship.state.hasReceivedData = true;\n            relationship.state.isEmpty = false;\n            break;\n          case 'hasMany':\n            this.mutate({\n              op: 'replaceRelatedRecords',\n              field: name,\n              record: identifier,\n              value: propertyValue\n            });\n            relationship = graph.get(identifier, name);\n            relationship.state.hasReceivedData = true;\n            relationship.state.isEmpty = false;\n            break;\n          default:\n            // reflect back (pass-thru) unknown properties\n            createOptions[name] = propertyValue;\n        }\n      }\n    }\n    this._capabilities.notifyChange(identifier, 'added', null);\n    return createOptions;\n  }\n\n  /**\n   * [LIFECYCLE] Signals to the cache that a resource\n   * will be part of a save transaction.\n   *\n   * @category Resource Lifecycle\n   * @public\n   */\n  willCommit(identifier, _context) {\n    if (Array.isArray(identifier)) {\n      for (const key of identifier) {\n        willCommit(this, key);\n      }\n    } else {\n      willCommit(this, identifier);\n    }\n  }\n\n  /**\n   * [LIFECYCLE] Signals to the cache that a resource\n   * was successfully updated as part of a save transaction.\n   *\n   * @category Resource Lifecycle\n   * @public\n   */\n\n  didCommit(committedIdentifier, result) {\n    const payload = result ? result.content : null;\n    const operation = result?.request?.op ?? null;\n    const data = payload && payload.data;\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE) {\n        try {\n          const payloadCopy = payload ? JSON.parse(JSON.stringify(payload)) : payload;\n          // eslint-disable-next-line no-console\n          console.log(`WarpDrive | Payload - ${operation}`, payloadCopy);\n        } catch {\n          // eslint-disable-next-line no-console\n          console.log(`WarpDrive | Payload - ${operation}`, payload);\n        }\n      }\n    }\n    const responseIsCollection = Array.isArray(data);\n    const hasMultipleIdentifiers = Array.isArray(committedIdentifier) && committedIdentifier.length > 1;\n    if (Array.isArray(committedIdentifier)) {\n      // if we get back an array of primary data, we treat each\n      // entry as a separate commit for each identifier\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected the array of primary data to match the array of committed identifiers`);\n        }\n      })(!hasMultipleIdentifiers || !responseIsCollection || data.length === committedIdentifier.length) : {};\n      if (responseIsCollection) {\n        for (let i = 0; i < committedIdentifier.length; i++) {\n          const identifier = committedIdentifier[i];\n          didCommit(this, identifier, data[i] ?? null, operation);\n        }\n        // but if we get back no data or a single entry, we apply\n        // the change back to the original identifier\n      } else {\n        for (let i = 0; i < committedIdentifier.length; i++) {\n          const identifier = committedIdentifier[i];\n          didCommit(this, identifier, i === 0 ? data : null, operation);\n        }\n      }\n    } else {\n      didCommit(this, committedIdentifier, data, operation);\n    }\n    const included = payload && payload.included;\n    const {\n      cacheKeyManager\n    } = this._capabilities;\n    if (included) {\n      for (let i = 0, length = included.length; i < length; i++) {\n        putOne(this, cacheKeyManager, included[i]);\n      }\n    }\n    return hasMultipleIdentifiers && responseIsCollection ? {\n      data: committedIdentifier\n    } : {\n      data: Array.isArray(committedIdentifier) ? committedIdentifier[0] : committedIdentifier\n    };\n  }\n\n  /**\n   * [LIFECYCLE] Signals to the cache that a resource\n   * was update via a save transaction failed.\n   *\n   * @category Resource Lifecycle\n   * @public\n   */\n  commitWasRejected(identifier, errors) {\n    if (Array.isArray(identifier)) {\n      for (let i = 0; i < identifier.length; i++) {\n        commitDidError(this, identifier[i], errors && i === 0 ? errors : null);\n      }\n      return;\n    }\n    return commitDidError(this, identifier, errors || null);\n  }\n\n  /**\n   * [LIFECYCLE] Signals to the cache that all data for a resource\n   * should be cleared.\n   *\n   * This method is a candidate to become a mutation\n   *\n   * @category Resource Lifecycle\n   * @public\n   */\n  unloadRecord(identifier) {\n    const storeWrapper = this._capabilities;\n    // TODO this is necessary because\n    // we maintain memebership inside InstanceCache\n    // for peekAll, so even though we haven't created\n    // any data we think this exists.\n    // TODO can we eliminate that membership now?\n    if (!this.__cache.has(identifier)) {\n      // the graph may still need to unload identity\n      peekGraph(storeWrapper)?.unload(identifier);\n      return;\n    }\n    const removeFromRecordArray = !this.isDeletionCommitted(identifier);\n    let removed = false;\n    const cached = this.__peek(identifier, false);\n    if (cached.isNew || cached.isDeletionCommitted) {\n      peekGraph(storeWrapper)?.push({\n        op: 'deleteRecord',\n        record: identifier,\n        isNew: cached.isNew\n      });\n    } else {\n      peekGraph(storeWrapper)?.unload(identifier);\n    }\n\n    // effectively clearing these is ensuring that\n    // we report as `isEmpty` during teardown.\n    cached.localAttrs = null;\n    cached.remoteAttrs = null;\n    cached.defaultAttrs = null;\n    cached.inflightAttrs = null;\n    const relatedIdentifiers = _allRelatedIdentifiers(storeWrapper, identifier);\n    if (areAllModelsUnloaded(storeWrapper, relatedIdentifiers)) {\n      for (let i = 0; i < relatedIdentifiers.length; ++i) {\n        const relatedIdentifier = relatedIdentifiers[i];\n        storeWrapper.notifyChange(relatedIdentifier, 'removed', null);\n        removed = true;\n        storeWrapper.disconnectRecord(relatedIdentifier);\n      }\n    }\n    this.__cache.delete(identifier);\n    this.__destroyedCache.set(identifier, cached);\n\n    /*\n     * The destroy cache is a hack to prevent applications\n     * from blowing up during teardown. Accessing state\n     * on a destroyed record is not safe, but historically\n     * was possible due to a combination of teardown timing\n     * and retention of cached state directly on the\n     * record itself.\n     *\n     * Once we have deprecated accessing state on a destroyed\n     * instance we may remove this. The timing isn't a huge deal\n     * as momentarily retaining the objects outside the bounds\n     * of a test won't cause issues.\n     */\n    if (this.__destroyedCache.size === 1) {\n      // TODO do we still need this?\n      setTimeout(() => {\n        this.__destroyedCache.clear();\n      }, 100);\n    }\n    if (!removed && removeFromRecordArray) {\n      storeWrapper.notifyChange(identifier, 'removed', null);\n    }\n  }\n\n  ////////// ============= //////////\n  ////////// Resource Data //////////\n  ////////// ============= //////////\n\n  /**\n   * Retrieve the data for an attribute from the cache\n   * with local mutations applied.\n   *\n   * @category Resource Data\n   * @public\n   */\n  getAttr(identifier, attr) {\n    const isSimplePath = !Array.isArray(attr) || attr.length === 1;\n    if (Array.isArray(attr) && attr.length === 1) {\n      attr = attr[0];\n    }\n    if (isSimplePath) {\n      const attribute = attr;\n      const cached = this.__peek(identifier, true);\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Cannot retrieve attributes for identifier ${String(identifier)} as it is not present in the cache`);\n        }\n      })(cached) : {};\n\n      // in Prod we try to recover when accessing something that\n      // doesn't exist\n      if (!cached) {\n        return undefined;\n      }\n      if (cached.localAttrs && attribute in cached.localAttrs) {\n        return cached.localAttrs[attribute];\n      } else if (cached.inflightAttrs && attribute in cached.inflightAttrs) {\n        return cached.inflightAttrs[attribute];\n      } else if (cached.remoteAttrs && attribute in cached.remoteAttrs) {\n        return cached.remoteAttrs[attribute];\n      } else if (cached.defaultAttrs && attribute in cached.defaultAttrs) {\n        return cached.defaultAttrs[attribute];\n      } else {\n        const attrSchema = getCacheFields(this, identifier).get(attribute);\n        assertPrivateCapabilities(this._capabilities);\n        const defaultValue = getDefaultValue(attrSchema, identifier, this._capabilities._store);\n        if (schemaHasLegacyDefaultValueFn(attrSchema)) {\n          cached.defaultAttrs = cached.defaultAttrs || Object.create(null);\n          cached.defaultAttrs[attribute] = defaultValue;\n        }\n        return defaultValue;\n      }\n    }\n\n    // TODO @runspired consider whether we need a defaultValue cache in ReactiveResource\n    // like we do for the simple case above.\n    const path = attr;\n    const cached = this.__peek(identifier, true);\n    const basePath = path[0];\n    let current = cached.localAttrs && basePath in cached.localAttrs ? cached.localAttrs[basePath] : undefined;\n    if (current === undefined) {\n      current = cached.inflightAttrs && basePath in cached.inflightAttrs ? cached.inflightAttrs[basePath] : undefined;\n    }\n    if (current === undefined) {\n      current = cached.remoteAttrs && basePath in cached.remoteAttrs ? cached.remoteAttrs[basePath] : undefined;\n    }\n    if (current === undefined) {\n      return undefined;\n    }\n    for (let i = 1; i < path.length; i++) {\n      current = current[path[i]];\n      if (current === undefined) {\n        return undefined;\n      }\n    }\n    return current;\n  }\n\n  /**\n   * Retrieve the remote data for an attribute from the cache\n   *\n   * @category Resource Data\n   * @public\n   */\n  getRemoteAttr(identifier, attr) {\n    const isSimplePath = !Array.isArray(attr) || attr.length === 1;\n    if (Array.isArray(attr) && attr.length === 1) {\n      attr = attr[0];\n    }\n    if (isSimplePath) {\n      const attribute = attr;\n      const cached = this.__peek(identifier, true);\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Cannot retrieve remote attributes for identifier ${String(identifier)} as it is not present in the cache`);\n        }\n      })(cached) : {};\n\n      // in Prod we try to recover when accessing something that\n      // doesn't exist\n      if (!cached) {\n        return undefined;\n      }\n      if (cached.remoteAttrs && attribute in cached.remoteAttrs) {\n        return cached.remoteAttrs[attribute];\n\n        // we still show defaultValues in the case of a remoteAttr access\n      } else if (cached.defaultAttrs && attribute in cached.defaultAttrs) {\n        return cached.defaultAttrs[attribute];\n      } else {\n        const attrSchema = getCacheFields(this, identifier).get(attribute);\n        assertPrivateCapabilities(this._capabilities);\n        const defaultValue = getDefaultValue(attrSchema, identifier, this._capabilities._store);\n        if (schemaHasLegacyDefaultValueFn(attrSchema)) {\n          cached.defaultAttrs = cached.defaultAttrs || Object.create(null);\n          cached.defaultAttrs[attribute] = defaultValue;\n        }\n        return defaultValue;\n      }\n    }\n\n    // TODO @runspired consider whether we need a defaultValue cache in ReactiveResource\n    // like we do for the simple case above.\n    const path = attr;\n    const cached = this.__peek(identifier, true);\n    const basePath = path[0];\n    let current = cached.remoteAttrs && basePath in cached.remoteAttrs ? cached.remoteAttrs[basePath] : undefined;\n    if (current === undefined) {\n      return undefined;\n    }\n    for (let i = 1; i < path.length; i++) {\n      current = current[path[i]];\n      if (current === undefined) {\n        return undefined;\n      }\n    }\n    return current;\n  }\n\n  /**\n   * Mutate the data for an attribute in the cache\n   *\n   * This method is a candidate to become a mutation\n   *\n   * @category Resource Data\n   * @public\n   */\n  setAttr(identifier, attr, value) {\n    // this assert works to ensure we have a non-empty string and/or a non-empty array\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error('setAttr must receive at least one attribute path');\n      }\n    })(attr.length > 0) : {};\n    const isSimplePath = !Array.isArray(attr) || attr.length === 1;\n    if (Array.isArray(attr) && attr.length === 1) {\n      attr = attr[0];\n    }\n    if (isSimplePath) {\n      const cached = this.__peek(identifier, false);\n      const currentAttr = attr;\n      const existing = cached.inflightAttrs && currentAttr in cached.inflightAttrs ? cached.inflightAttrs[currentAttr] : cached.remoteAttrs && currentAttr in cached.remoteAttrs ? cached.remoteAttrs[currentAttr] : undefined;\n      if (existing !== value) {\n        cached.localAttrs = cached.localAttrs || Object.create(null);\n        cached.localAttrs[currentAttr] = value;\n        cached.changes = cached.changes || Object.create(null);\n        cached.changes[currentAttr] = [existing, value];\n      } else if (cached.localAttrs) {\n        delete cached.localAttrs[currentAttr];\n        delete cached.changes[currentAttr];\n      }\n      if (cached.defaultAttrs && currentAttr in cached.defaultAttrs) {\n        delete cached.defaultAttrs[currentAttr];\n      }\n      this._capabilities.notifyChange(identifier, 'attributes', currentAttr);\n      return;\n    }\n\n    // get current value from local else inflight else remote\n    // structuredClone current if not local (or always?)\n    // traverse path, update value at path\n    // notify change at first link in path.\n    // second pass optimization is change notifyChange signature to take an array path\n\n    // guaranteed that we have path of at least 2 in length\n    const path = attr;\n    const cached = this.__peek(identifier, false);\n\n    // get existing cache record for base path\n    const basePath = path[0];\n    const existing = cached.inflightAttrs && basePath in cached.inflightAttrs ? cached.inflightAttrs[basePath] : cached.remoteAttrs && basePath in cached.remoteAttrs ? cached.remoteAttrs[basePath] : undefined;\n    let existingAttr;\n    if (existing) {\n      existingAttr = existing[path[1]];\n      for (let i = 2; i < path.length; i++) {\n        // the specific change we're making is at path[length - 1]\n        existingAttr = existingAttr[path[i]];\n      }\n    }\n    if (existingAttr !== value) {\n      cached.localAttrs = cached.localAttrs || Object.create(null);\n      cached.localAttrs[basePath] = cached.localAttrs[basePath] || structuredClone(existing);\n      cached.changes = cached.changes || Object.create(null);\n      let currentLocal = cached.localAttrs[basePath];\n      let nextLink = 1;\n      while (nextLink < path.length - 1) {\n        currentLocal = currentLocal[path[nextLink++]];\n      }\n      currentLocal[path[nextLink]] = value;\n      cached.changes[basePath] = [existing, cached.localAttrs[basePath]];\n\n      // since we initiaize the value as basePath as a clone of the value at the remote basePath\n      // then in theory we can use JSON.stringify to compare the two values as key insertion order\n      // ought to be consistent.\n      // we try/catch this because users have a habit of doing \"Bad Things\"TM wherein the cache contains\n      // stateful values that are not JSON serializable correctly such as Dates.\n      // in the case that we error, we fallback to not removing the local value\n      // so that any changes we don't understand are preserved. Thse objects would then sometimes\n      // appear to be dirty unnecessarily, and for folks that open an issue we can guide them\n      // to make their cache data less stateful.\n    } else if (cached.localAttrs) {\n      try {\n        if (!existing) {\n          return;\n        }\n        const existingStr = JSON.stringify(existing);\n        const newStr = JSON.stringify(cached.localAttrs[basePath]);\n        if (existingStr !== newStr) {\n          delete cached.localAttrs[basePath];\n          delete cached.changes[basePath];\n        }\n      } catch {\n        // noop\n      }\n    }\n    this._capabilities.notifyChange(identifier, 'attributes', basePath);\n  }\n\n  /**\n   * Query the cache for the changed attributes of a resource.\n   *\n   * @category Resource Data\n   * @public\n   * @return `{ '<field>': ['<old>', '<new>'] }`\n   */\n  changedAttrs(identifier) {\n    const cached = this.__peek(identifier, false);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot retrieve changed attributes for identifier ${String(identifier)} as it is not present in the cache`);\n      }\n    })(cached) : {};\n\n    // in Prod we try to recover when accessing something that\n    // doesn't exist\n    if (!cached) {\n      return Object.create(null);\n    }\n\n    // TODO freeze in dev\n    return cached.changes || Object.create(null);\n  }\n\n  /**\n   * Query the cache for whether any mutated attributes exist\n   *\n   * @category Resource Data\n   * @public\n   */\n  hasChangedAttrs(identifier) {\n    const cached = this.__peek(identifier, true);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Cannot retrieve changed attributes for identifier ${String(identifier)} as it is not present in the cache`);\n      }\n    })(cached) : {};\n\n    // in Prod we try to recover when accessing something that\n    // doesn't exist\n    if (!cached) {\n      return false;\n    }\n    return cached.inflightAttrs !== null && Object.keys(cached.inflightAttrs).length > 0 || cached.localAttrs !== null && Object.keys(cached.localAttrs).length > 0;\n  }\n\n  /**\n   * Tell the cache to discard any uncommitted mutations to attributes\n   *\n   * This method is a candidate to become a mutation\n   *\n   * @category Resource Data\n   * @public\n   * @return the names of fields that were restored\n   */\n  rollbackAttrs(identifier) {\n    const cached = this.__peek(identifier, false);\n    let dirtyKeys;\n    cached.isDeleted = false;\n    if (cached.localAttrs !== null) {\n      dirtyKeys = Object.keys(cached.localAttrs);\n      cached.localAttrs = null;\n      cached.changes = null;\n    }\n    if (cached.isNew) {\n      // > Note: Graph removal handled by unloadRecord\n      cached.isDeletionCommitted = true;\n      cached.isDeleted = true;\n      cached.isNew = false;\n    }\n    cached.inflightAttrs = null;\n    cached.defaultAttrs = null;\n    if (cached.errors) {\n      cached.errors = null;\n      this._capabilities.notifyChange(identifier, 'errors', null);\n    }\n    this._capabilities.notifyChange(identifier, 'state', null);\n    if (dirtyKeys && dirtyKeys.length) {\n      notifyAttributes(this._capabilities, identifier, new Set(dirtyKeys));\n    }\n    return dirtyKeys || [];\n  }\n\n  /**\n   * Query the cache for the changes to relationships of a resource.\n   *\n   * Returns a map of relationship names to RelationshipDiff objects.\n   *\n   * ```ts\n   * type RelationshipDiff =\n     | {\n        kind: 'collection';\n        remoteState: ResourceKey[];\n        additions: Set<ResourceKey>;\n        removals: Set<ResourceKey>;\n        localState: ResourceKey[];\n        reordered: boolean;\n       }\n     | {\n        kind: 'resource';\n        remoteState: ResourceKey | null;\n        localState: ResourceKey | null;\n      };\n      ```\n   *\n   * @category Resource Data\n   * @public\n   */\n  changedRelationships(identifier) {\n    return this.__graph.getChanged(identifier);\n  }\n\n  /**\n   * Query the cache for whether any mutated relationships exist\n   *\n   * @category Resource Data\n   * @public\n   */\n  hasChangedRelationships(identifier) {\n    return this.__graph.hasChanged(identifier);\n  }\n\n  /**\n   * Tell the cache to discard any uncommitted mutations to relationships.\n   *\n   * This will also discard the change on any appropriate inverses.\n   *\n   * This method is a candidate to become a mutation\n   *\n   * @category Resource Data\n   * @public\n   * @return the names of relationships that were restored\n   */\n  rollbackRelationships(identifier) {\n    assertPrivateCapabilities(this._capabilities);\n    let result;\n    this._capabilities._store._join(() => {\n      result = this.__graph.rollback(identifier);\n    });\n    return result;\n  }\n\n  /**\n   * Query the cache for the current state of a relationship property\n   *\n   * @category Resource Data\n   * @public\n   * @return resource relationship object\n   */\n  getRelationship(identifier, field) {\n    return this.__graph.getData(identifier, field);\n  }\n\n  /**\n   * Query the cache for the remote state of a relationship property\n   *\n   * @category Resource Data\n   * @public\n   * @return resource relationship object\n   */\n  getRemoteRelationship(identifier, field) {\n    return this.__graph.getRemoteData(identifier, field);\n  }\n\n  ////////// ============== //////////\n  ////////// Resource State //////////\n  ////////// ============== //////////\n\n  /**\n   * Update the cache state for the given resource to be marked\n   * as locally deleted, or remove such a mark.\n   *\n   * This method is a candidate to become a mutation\n   *\n   * @category Resource State\n   * @public\n   */\n  setIsDeleted(identifier, isDeleted) {\n    const cached = this.__peek(identifier, false);\n    cached.isDeleted = isDeleted;\n    // > Note: Graph removal for isNew handled by unloadRecord\n    this._capabilities.notifyChange(identifier, 'state', null);\n  }\n\n  /**\n   * Query the cache for any validation errors applicable to the given resource.\n   *\n   * @category Resource State\n   * @public\n   */\n  getErrors(identifier) {\n    return this.__peek(identifier, true).errors || [];\n  }\n\n  /**\n   * Query the cache for whether a given resource has any available data\n   *\n   * @category Resource State\n   * @public\n   */\n  isEmpty(identifier) {\n    const cached = this.__safePeek(identifier, true);\n    return cached ? cached.remoteAttrs === null && cached.inflightAttrs === null && cached.localAttrs === null : true;\n  }\n\n  /**\n   * Query the cache for whether a given resource was created locally and not\n   * yet persisted.\n   *\n   * @category Resource State\n   * @public\n   */\n  isNew(identifier) {\n    // TODO can we assert here?\n    return this.__safePeek(identifier, true)?.isNew || false;\n  }\n\n  /**\n   * Query the cache for whether a given resource is marked as deleted (but not\n   * necessarily persisted yet).\n   *\n   * @category Resource State\n   * @public\n   */\n  isDeleted(identifier) {\n    // TODO can we assert here?\n    return this.__safePeek(identifier, true)?.isDeleted || false;\n  }\n\n  /**\n   * Query the cache for whether a given resource has been deleted and that deletion\n   * has also been persisted.\n   *\n   * @category Resource State\n   * @public\n   */\n  isDeletionCommitted(identifier) {\n    // TODO can we assert here?\n    return this.__safePeek(identifier, true)?.isDeletionCommitted || false;\n  }\n\n  /**\n   * Private method used to populate an entry for the identifier\n   *\n   * @internal\n   */\n  _createCache(identifier) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected no resource data to yet exist in the cache`);\n      }\n    })(!this.__cache.has(identifier)) : {};\n    const cache = makeCache();\n    this.__cache.set(identifier, cache);\n    return cache;\n  }\n\n  /**\n   * Peek whether we have cached resource data matching the identifier\n   * without asserting if the resource data is missing.\n   *\n   * @internal\n   */\n  __safePeek(identifier, allowDestroyed) {\n    let resource = this.__cache.get(identifier);\n    if (!resource && allowDestroyed) {\n      resource = this.__destroyedCache.get(identifier);\n    }\n    return resource;\n  }\n\n  /**\n   * Peek whether we have cached resource data matching the identifier\n   * Asserts if the resource data is missing.\n   *\n   * @internal\n   */\n  __peek(identifier, allowDestroyed) {\n    const resource = this.__safePeek(identifier, allowDestroyed);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected Cache to have a resource entry for the identifier ${String(identifier)} but none was found`);\n      }\n    })(resource) : {};\n    return resource;\n  }\n}\nfunction addResourceToDocument(cache, op) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected field to be either 'data' or 'included'`);\n    }\n  })(op.field === 'data' || op.field === 'included') : {};\n  const doc = cache.__documents.get(op.record.lid);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected to have a cached document on which to perform the add operation`);\n    }\n  })(doc) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected to have content on the document`);\n    }\n  })(doc.content) : {};\n  const {\n    content\n  } = doc;\n  if (op.field === 'data') {\n    let shouldNotify = false;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected to have a data property on the document`);\n      }\n    })('data' in content) : {};\n\n    // if data is not an array, we set the data property directly\n    if (!Array.isArray(content.data)) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected to have a single record as the operation value`);\n        }\n      })(op.value && !Array.isArray(op.value)) : {};\n      shouldNotify = content.data !== op.value;\n      if (shouldNotify) content.data = op.value;\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`The value '${op.value.lid}' cannot be added from the data of document '${op.record.lid}' as it is already the current value '${content.data ? content.data.lid : '<null>'}'`);\n        }\n      })(shouldNotify) : {};\n    } else {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected to have a non-null operation value`);\n        }\n      })(op.value) : {};\n      if (Array.isArray(op.value)) {\n        if (op.index !== undefined) {\n          // for collections, because we allow duplicates we are always changed.\n          shouldNotify = true;\n          content.data.splice(op.index, 0, ...op.value);\n        } else {\n          // for collections, because we allow duplicates we are always changed.\n          shouldNotify = true;\n          content.data.push(...op.value);\n        }\n      } else {\n        if (op.index !== undefined) {\n          // for collections, because we allow duplicates we are always changed.\n          shouldNotify = true;\n          content.data.splice(op.index, 0, op.value);\n        } else {\n          // for collections, because we allow duplicates we are always changed.\n          shouldNotify = true;\n          content.data.push(op.value);\n        }\n      }\n    }\n\n    // notify\n    if (shouldNotify) cache._capabilities.notifyChange(op.record, 'updated', null);\n    return;\n  }\n  content.included = content.included || [];\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected to have a non-null operation value`);\n    }\n  })(op.value) : {};\n  if (Array.isArray(op.value)) {\n    // included is not allowed to have duplicates, so we do a dirty check here\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`included should not contain duplicate members`);\n      }\n    })(new Set([...content.included, ...op.value]).size === content.included.length + op.value.length) : {};\n    content.included = content.included.concat(op.value);\n  } else {\n    // included is not allowed to have duplicates, so we do a dirty check here\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`included should not contain duplicate members`);\n      }\n    })(content.included.includes(op.value) === false) : {};\n    content.included.push(op.value);\n  }\n\n  // we don't notify in the included case because this is not reactively\n  // exposed. We should possibly consider doing so though for subscribers\n}\nfunction removeResourceFromDocument(cache, op) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected field to be either 'data' or 'included'`);\n    }\n  })(op.field === 'data' || op.field === 'included') : {};\n  const doc = cache.__documents.get(op.record.lid);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected to have a cached document on which to perform the remove operation`);\n    }\n  })(doc) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected to have content on the document`);\n    }\n  })(doc.content) : {};\n  const {\n    content\n  } = doc;\n  if (op.field === 'data') {\n    let shouldNotify = false;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected to have a data property on the document`);\n      }\n    })('data' in content) : {};\n\n    // if data is not an array, we set the data property directly\n    if (!Array.isArray(content.data)) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected to have a single record as the operation value`);\n        }\n      })(op.value && !Array.isArray(op.value)) : {};\n      shouldNotify = content.data === op.value;\n      // we only remove the value if it was our existing value\n      if (shouldNotify) content.data = null;\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`The value '${op.value.lid}' cannot be removed from the data of document '${op.record.lid}' as it is not the current value '${content.data ? content.data.lid : '<null>'}'`);\n        }\n      })(shouldNotify) : {};\n    } else {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`Expected to have a non-null operation value`);\n        }\n      })(op.value) : {};\n      const toRemove = Array.isArray(op.value) ? op.value : [op.value];\n      for (let i = 0; i < toRemove.length; i++) {\n        const value = toRemove[i];\n        if (op.index !== undefined) {\n          // in production we want to recover gracefully\n          // so we fallback to first-index-of\n          const index = op.index < content.data.length && content.data[op.index] === value ? op.index : content.data.indexOf(value);\n          macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n            if (!test) {\n              throw new Error(`Mismatched Index: Expected index '${op.index}' to contain the value '${value.lid}' but that value is at index '${index}'`);\n            }\n          })(op.index < content.data.length && content.data[op.index] === value) : {};\n          if (index !== -1) {\n            // we remove the first occurrence of the value\n            shouldNotify = true;\n            content.data.splice(index, 1);\n          }\n        } else {\n          // we remove the first occurrence of the value\n          const index = content.data.indexOf(value);\n          if (index !== -1) {\n            shouldNotify = true;\n            content.data.splice(index, 1);\n          }\n        }\n      }\n    }\n\n    // notify\n    if (shouldNotify) cache._capabilities.notifyChange(op.record, 'updated', null);\n  } else {\n    content.included = content.included || [];\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected to have a non-null operation value`);\n      }\n    })(op.value) : {};\n    const toRemove = Array.isArray(op.value) ? op.value : [op.value];\n    for (const identifier of toRemove) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`attempted to remove a value from included that was not present in the included array`);\n        }\n      })(content.included.includes(identifier)) : {};\n      const index = content.included.indexOf(identifier);\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error(`The value '${identifier.lid}' cannot be removed from the included of document '${op.record.lid}' as it is not present`);\n        }\n      })(index !== -1) : {};\n      if (index !== -1) {\n        content.included.splice(index, 1);\n      }\n    }\n\n    // we don't notify in the included case because this is not reactively\n    // exposed. We should possibly consider doing so though for subscribers\n  }\n}\nfunction areAllModelsUnloaded(wrapper, identifiers) {\n  for (let i = 0; i < identifiers.length; ++i) {\n    const identifier = identifiers[i];\n    if (wrapper.hasRecord(identifier)) {\n      return false;\n    }\n  }\n  return true;\n}\nfunction getLocalState(rel) {\n  if (isBelongsTo(rel)) {\n    return rel.localState ? [rel.localState] : [];\n  }\n  return rel.additions ? [...rel.additions] : [];\n}\nfunction getRemoteState(rel) {\n  if (isBelongsTo(rel)) {\n    return rel.remoteState ? [rel.remoteState] : [];\n  }\n  return rel.remoteState;\n}\nfunction schemaHasLegacyDefaultValueFn(schema) {\n  if (!schema) return false;\n  return hasLegacyDefaultValueFn(schema.options);\n}\nfunction hasLegacyDefaultValueFn(options) {\n  return !!options && typeof options.defaultValue === 'function';\n}\nfunction getDefaultValue(schema, identifier, store) {\n  const options = schema?.options;\n  if (!schema || !options && !schema.type) {\n    return;\n  }\n  if (schema.kind !== 'attribute' && schema.kind !== 'field') {\n    return;\n  }\n\n  // legacy support for defaultValues that are functions\n  if (hasLegacyDefaultValueFn(options)) {\n    // If anyone opens an issue for args not working right, we'll restore + deprecate it via a Proxy\n    // that lazily instantiates the record. We don't want to provide any args here\n    // because in a non @ember-data/model world they don't make sense.\n    return options.defaultValue();\n    // legacy support for defaultValues that are primitives\n  } else if (options && 'defaultValue' in options) {\n    const defaultValue = options.defaultValue;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Non primitive defaultValues are not supported because they are shared between all instances. If you would like to use a complex object as a default value please provide a function that returns the complex object.`);\n      }\n    })(typeof defaultValue !== 'object' || defaultValue === null) : {};\n    return defaultValue;\n\n    // new style transforms\n  } else if (schema.kind !== 'attribute' && schema.type) {\n    const transform = store.schema.transformation(schema);\n    if (transform?.defaultValue) {\n      return transform.defaultValue(options || null, identifier);\n    }\n  }\n}\nfunction notifyAttributes(storeWrapper, identifier, keys) {\n  if (!keys) {\n    storeWrapper.notifyChange(identifier, 'attributes', null);\n    return;\n  }\n  for (const key of keys) {\n    storeWrapper.notifyChange(identifier, 'attributes', key);\n  }\n}\n\n/*\n      TODO @deprecate IGOR DAVID\n      There seems to be a potential bug here, where we will return keys that are not\n      in the schema\n  */\nfunction calculateChangedKeys(cached, updates, fields) {\n  const changedKeys = new Set();\n  const keys = Object.keys(updates);\n  const length = keys.length;\n  const localAttrs = cached.localAttrs;\n  const original = Object.assign(Object.create(null), cached.remoteAttrs, cached.inflightAttrs);\n  for (let i = 0; i < length; i++) {\n    const key = keys[i];\n    if (!fields.has(key)) {\n      continue;\n    }\n    const value = updates[key];\n\n    // A value in localAttrs means the user has a local change to\n    // this attribute. We never override this value when merging\n    // updates from the backend so we should not sent a change\n    // notification if the server value differs from the original.\n    if (localAttrs && localAttrs[key] !== undefined) {\n      continue;\n    }\n    if (original[key] !== value) {\n      changedKeys.add(key);\n    }\n  }\n  return changedKeys;\n}\nfunction cacheIsEmpty(cached) {\n  return !cached || cached.remoteAttrs === null && cached.inflightAttrs === null && cached.localAttrs === null;\n}\nfunction _isEmpty(peeked) {\n  if (!peeked) {\n    return true;\n  }\n  const isNew = peeked.isNew;\n  const isDeleted = peeked.isDeleted;\n  const isEmpty = cacheIsEmpty(peeked);\n  return (!isNew || isDeleted) && isEmpty;\n}\nfunction recordIsLoaded(cached, filterDeleted = false) {\n  if (!cached) {\n    return false;\n  }\n  const isNew = cached.isNew;\n  const isEmpty = cacheIsEmpty(cached);\n\n  // if we are new we must consider ourselves loaded\n  if (isNew) {\n    return !cached.isDeleted;\n  }\n  // even if we have a past request, if we are now empty we are not loaded\n  // typically this is true after an unloadRecord call\n\n  // if we are not empty, not new && we have a fulfilled request then we are loaded\n  // we should consider allowing for something to be loaded that is simply \"not empty\".\n  // which is how RecordState currently handles this case; however, RecordState is buggy\n  // in that it does not account for unloading.\n  return filterDeleted && cached.isDeletionCommitted ? false : !isEmpty;\n}\nfunction _isLoading(peeked, capabilities, identifier) {\n  assertPrivateCapabilities(capabilities);\n  // TODO refactor things such that the cache is not required to know\n  // about isLoading\n  const req = capabilities._store.getRequestStateService();\n  // const fulfilled = req.getLastRequestForRecord(identifier);\n  const isLoaded = recordIsLoaded(peeked);\n  return !isLoaded &&\n  // fulfilled === null &&\n  req.getPendingRequestsForRecord(identifier).some(r => r.type === 'query');\n}\nfunction setupRelationships(graph, fields, identifier, data) {\n  for (const name in data.relationships) {\n    const relationshipData = data.relationships[name];\n    const field = fields.get(name);\n    // TODO consider asserting if the relationship is not in the schema\n    // we intentionally ignore relationships that are not in the schema\n    if (!relationshipData || !field || !isRelationship(field)) continue;\n    graph.push({\n      op: 'updateRelationship',\n      record: identifier,\n      field: name,\n      value: relationshipData\n    });\n  }\n}\nfunction isRelationship(field) {\n  const {\n    kind\n  } = field;\n  return kind === 'hasMany' || kind === 'belongsTo' || kind === 'resource' || kind === 'collection';\n}\nfunction patchLocalAttributes(cached, changedRemoteKeys) {\n  const {\n    localAttrs,\n    remoteAttrs,\n    inflightAttrs,\n    defaultAttrs,\n    changes\n  } = cached;\n  if (!localAttrs) {\n    cached.changes = null;\n    return false;\n  }\n  let hasAppliedPatch = false;\n  const mutatedKeys = Object.keys(localAttrs);\n  for (let i = 0, length = mutatedKeys.length; i < length; i++) {\n    const attr = mutatedKeys[i];\n    const existing = inflightAttrs && attr in inflightAttrs ? inflightAttrs[attr] : remoteAttrs && attr in remoteAttrs ? remoteAttrs[attr] : undefined;\n    if (existing === localAttrs[attr]) {\n      hasAppliedPatch = true;\n\n      // if the local change is committed, then\n      // the remoteKeyChange is no longer relevant\n      changedRemoteKeys?.delete(attr);\n      delete localAttrs[attr];\n      delete changes[attr];\n    }\n    if (defaultAttrs && attr in defaultAttrs) {\n      delete defaultAttrs[attr];\n    }\n  }\n  return hasAppliedPatch;\n}\nfunction putOne(cache, identifiers, resource) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You must include an 'id' for the resource data ${resource.type}`);\n    }\n  })(resource.id !== null && resource.id !== undefined && resource.id !== '') : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Missing Resource Type: received resource data with a type '${resource.type}' but no schema could be found with that name.`);\n    }\n  })(cache._capabilities.schema.hasResource(resource)) : {};\n  let identifier = identifiers.peekResourceKey(resource);\n  if (identifier) {\n    identifier = identifiers.updateRecordIdentifier(identifier, resource);\n  } else {\n    identifier = identifiers.getOrCreateRecordIdentifier(resource);\n  }\n  cache.upsert(identifier, resource, cache._capabilities.hasRecord(identifier));\n  // even if the identifier was not \"existing\" before, it is now\n  return identifier;\n}\n\n/*\n    Iterates over the set of internal models reachable from `this` across exactly one\n    relationship.\n  */\nfunction _directlyRelatedIdentifiersIterable(storeWrapper, originating) {\n  const graph = peekGraph(storeWrapper);\n  const initializedRelationships = graph?.identifiers.get(originating);\n  if (!initializedRelationships) {\n    return EMPTY_ITERATOR;\n  }\n  const initializedRelationshipsArr = [];\n  Object.keys(initializedRelationships).forEach(key => {\n    const rel = initializedRelationships[key];\n    if (rel && !isImplicit(rel)) {\n      initializedRelationshipsArr.push(rel);\n    }\n  });\n  let i = 0;\n  let j = 0;\n  let k = 0;\n  const findNext = () => {\n    while (i < initializedRelationshipsArr.length) {\n      while (j < 2) {\n        const relatedIdentifiers = j === 0 ? getLocalState(initializedRelationshipsArr[i]) : getRemoteState(initializedRelationshipsArr[i]);\n        while (k < relatedIdentifiers.length) {\n          const relatedIdentifier = relatedIdentifiers[k++];\n          if (relatedIdentifier !== null) {\n            return relatedIdentifier;\n          }\n        }\n        k = 0;\n        j++;\n      }\n      j = 0;\n      i++;\n    }\n    return undefined;\n  };\n  return {\n    iterator() {\n      return {\n        next: () => {\n          const value = findNext();\n          return {\n            value,\n            done: value === undefined\n          };\n        }\n      };\n    }\n  };\n}\n\n/*\n      Computes the set of Identifiers reachable from this Identifier.\n\n      Reachability is determined over the relationship graph (ie a graph where\n      nodes are identifiers and edges are belongs to or has many\n      relationships).\n\n      Returns an array including `this` and all identifiers reachable\n      from `this.identifier`.\n    */\nfunction _allRelatedIdentifiers(storeWrapper, originating) {\n  const array = [];\n  const queue = [];\n  const seen = new Set();\n  queue.push(originating);\n  while (queue.length > 0) {\n    const identifier = queue.shift();\n    array.push(identifier);\n    seen.add(identifier);\n    const iterator = _directlyRelatedIdentifiersIterable(storeWrapper, originating).iterator();\n    for (let obj = iterator.next(); !obj.done; obj = iterator.next()) {\n      const relatedIdentifier = obj.value;\n      if (relatedIdentifier && !seen.has(relatedIdentifier)) {\n        seen.add(relatedIdentifier);\n        queue.push(relatedIdentifier);\n      }\n    }\n  }\n  return array;\n}\nfunction fromBaseDocument(doc) {\n  const resourceDocument = {};\n  const jsonApiDoc = doc.content;\n  if (jsonApiDoc) {\n    copyLinksAndMeta(resourceDocument, jsonApiDoc);\n  }\n  return resourceDocument;\n}\nfunction fromStructuredError(doc) {\n  const errorDoc = {};\n  if (doc.content) {\n    copyLinksAndMeta(errorDoc, doc.content);\n    if ('errors' in doc.content) {\n      errorDoc.errors = doc.content.errors;\n    } else if (typeof doc.error === 'object' && 'errors' in doc.error) {\n      errorDoc.errors = doc.error.errors;\n    } else {\n      errorDoc.errors = [{\n        title: doc.message\n      }];\n    }\n  }\n  return errorDoc;\n}\nfunction copyLinksAndMeta(target, source) {\n  if ('links' in source) {\n    target.links = source.links;\n  }\n  if ('meta' in source) {\n    target.meta = source.meta;\n  }\n}\nfunction cacheUpsert(cache, identifier, data, calculateChanges) {\n  let changedKeys;\n  const peeked = cache.__safePeek(identifier, false);\n  const existed = !!peeked;\n  const cached = peeked || cache._createCache(identifier);\n  const isLoading = /*#__NOINLINE__*/_isLoading(peeked, cache._capabilities, identifier) || !recordIsLoaded(peeked);\n  const isUpdate = /*#__NOINLINE__*/!_isEmpty(peeked) && !isLoading;\n  if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE)) {\n    if (getGlobalConfig().WarpDrive.debug.LOG_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE) {\n      logGroup('cache', 'upsert', identifier.type, identifier.lid, existed ? 'merged' : 'inserted', calculateChanges ? 'has-subscription' : '');\n      try {\n        const _data = JSON.parse(JSON.stringify(data));\n\n        // eslint-disable-next-line no-console\n        console.log(_data);\n      } catch {\n        // eslint-disable-next-line no-console\n        console.log(data);\n      }\n    }\n  }\n  if (cached.isNew) {\n    cached.isNew = false;\n    cache._capabilities.notifyChange(identifier, 'identity', null);\n    cache._capabilities.notifyChange(identifier, 'state', null);\n  }\n  const fields = getCacheFields(cache, identifier);\n\n  // if no cache entry existed, no record exists / property has been accessed\n  // and thus we do not need to notify changes to any properties.\n  if (calculateChanges && existed && data.attributes) {\n    changedKeys = calculateChangedKeys(cached, data.attributes, fields);\n  }\n  cached.remoteAttrs = Object.assign(cached.remoteAttrs || Object.create(null), data.attributes);\n  if (cached.localAttrs) {\n    if (patchLocalAttributes(cached, changedKeys)) {\n      cache._capabilities.notifyChange(identifier, 'state', null);\n    }\n  }\n  if (!isUpdate) {\n    cache._capabilities.notifyChange(identifier, 'added', null);\n  }\n  if (data.id) {\n    cached.id = data.id;\n  }\n  if (data.relationships) {\n    setupRelationships(cache.__graph, fields, identifier, data);\n  }\n  if (changedKeys?.size) {\n    notifyAttributes(cache._capabilities, identifier, changedKeys);\n  }\n  if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE)) {\n    if (getGlobalConfig().WarpDrive.debug.LOG_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE) {\n      // eslint-disable-next-line no-console\n      console.groupEnd();\n    }\n  }\n  return changedKeys?.size ? Array.from(changedKeys) : undefined;\n}\nfunction patchCache(Cache, op) {\n  const isRecord = isResourceKey(op.record);\n  const isDocument = !isRecord && isRequestKey(op.record);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected Cache.patch op.record to be a record or document identifier`);\n    }\n  })(isRecord || isDocument) : {};\n  if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE)) {\n    if (getGlobalConfig().WarpDrive.debug.LOG_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE) {\n      logGroup('cache', 'patch', isRecord ? op.record.type : '<@document>', op.record.lid, op.op, 'field' in op ? op.field : op.op === 'mergeIdentifiers' ? op.value.lid : '');\n      try {\n        const _data = JSON.parse(JSON.stringify(op));\n        // eslint-disable-next-line no-console\n        console.log(_data);\n      } catch {\n        // eslint-disable-next-line no-console\n        console.log(op);\n      }\n    }\n  }\n  switch (op.op) {\n    case 'mergeIdentifiers':\n      {\n        const cache = Cache.__cache.get(op.record);\n        if (cache) {\n          Cache.__cache.set(op.value, cache);\n          Cache.__cache.delete(op.record);\n        }\n        Cache.__graph.update(op, true);\n        break;\n      }\n    case 'update':\n      {\n        if (isRecord) {\n          if ('field' in op) {\n            const field = getCacheFields(Cache, op.record).get(op.field);\n            macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n              if (!test) {\n                throw new Error(`Expected ${op.field} to be a field on ${op.record.type}`);\n              }\n            })(field) : {};\n            if (isRelationship(field)) {\n              Cache.__graph.push(op);\n            } else {\n              Cache.upsert(op.record, {\n                type: op.record.type,\n                id: op.record.id,\n                attributes: {\n                  [op.field]: op.value\n                }\n              }, Cache._capabilities.hasRecord(op.record));\n            }\n          } else {\n            Cache.upsert(op.record, op.value, Cache._capabilities.hasRecord(op.record));\n          }\n        } else {\n          macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n            {\n              throw new Error(`Update operations on documents is not supported`);\n            }\n          })() : {};\n        }\n        break;\n      }\n    case 'add':\n      {\n        if (isRecord) {\n          if ('field' in op) {\n            Cache.__graph.push(op);\n          } else {\n            Cache.upsert(op.record, op.value, Cache._capabilities.hasRecord(op.record));\n          }\n        } else {\n          macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n            if (!test) {\n              throw new Error(`Expected a field in the add operation`);\n            }\n          })('field' in op) : {};\n          addResourceToDocument(Cache, op);\n        }\n        break;\n      }\n    case 'remove':\n      {\n        if (isRecord) {\n          if ('field' in op) {\n            Cache.__graph.push(op);\n          } else {\n            const cached = Cache.__safePeek(op.record, false);\n            if (cached) {\n              cached.isDeleted = true;\n              cached.isDeletionCommitted = true;\n              Cache.unloadRecord(op.record);\n            } else {\n              peekGraph(Cache._capabilities)?.push({\n                op: 'deleteRecord',\n                record: op.record,\n                isNew: false\n              });\n            }\n          }\n        } else {\n          if ('field' in op) {\n            macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n              if (!test) {\n                throw new Error(`Expected a field in the remove operation`);\n              }\n            })('field' in op) : {};\n            removeResourceFromDocument(Cache, op);\n          } else {\n            // TODO @runspired teardown associated state ... notify subscribers etc.\n            // This likely means that the instance cache needs to handle\n            // holding onto reactive documents instead of the CacheHandler\n            // and use a subscription to remove them.\n            // Cache.__documents.delete(op.record.lid);\n            macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n              {\n                throw new Error(`Removing documents from the cache is not yet supported`);\n              }\n            })() : {};\n          }\n        }\n        break;\n      }\n    default:\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        {\n          throw new Error(`Unhandled cache.patch operation ${op.op}`);\n        }\n      })() : {};\n  }\n  if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_CACHE)) {\n    if (getGlobalConfig().WarpDrive.debug.LOG_CACHE || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE) {\n      // eslint-disable-next-line no-console\n      console.groupEnd();\n    }\n  }\n}\nfunction getCacheFields(cache, identifier) {\n  if (cache._capabilities.schema.cacheFields) {\n    const result = cache._capabilities.schema.cacheFields(identifier);\n    if (result) {\n      return result;\n    }\n  }\n\n  // the model schema service cannot process fields that are not cache fields\n  return cache._capabilities.schema.fields(identifier);\n}\nfunction commitDidError(cache, identifier, errors) {\n  const cached = cache.__peek(identifier, false);\n  if (cached.inflightAttrs) {\n    const keys = Object.keys(cached.inflightAttrs);\n    if (keys.length > 0) {\n      const attrs = cached.localAttrs = cached.localAttrs || Object.create(null);\n      for (let i = 0; i < keys.length; i++) {\n        if (attrs[keys[i]] === undefined) {\n          attrs[keys[i]] = cached.inflightAttrs[keys[i]];\n        }\n      }\n    }\n    cached.inflightAttrs = null;\n  }\n  if (errors) {\n    cached.errors = errors;\n  }\n  cache._capabilities.notifyChange(identifier, 'errors', null);\n}\nfunction didCommit(cache, committedIdentifier, data, op) {\n  if (!data) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Your ${committedIdentifier.type} record was saved to the server, but the response does not have an id and no id has been set client side. Records must have ids. Please update the server response to provide an id in the response or generate the id on the client side either before saving the record or while normalizing the response.`);\n      }\n    })(committedIdentifier.id) : {};\n  }\n  const {\n    cacheKeyManager\n  } = cache._capabilities;\n  const existingId = committedIdentifier.id;\n  const identifier = op !== 'deleteRecord' && data ? cacheKeyManager.updateRecordIdentifier(committedIdentifier, data) : committedIdentifier;\n  const cached = cache.__peek(identifier, false);\n  if (cached.isDeleted || op === 'deleteRecord') {\n    cache.__graph.push({\n      op: 'deleteRecord',\n      record: identifier,\n      isNew: false\n    });\n    cached.isDeleted = true;\n    cached.isDeletionCommitted = true;\n    cache._capabilities.notifyChange(identifier, 'removed', null);\n    // TODO @runspired should we early exit here?\n  }\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    if (cached.isNew && !identifier.id && (typeof data?.id !== 'string' || data.id.length > 0)) {\n      const error = new Error(`Expected an id ${String(identifier)} in response ${JSON.stringify(data)}`);\n      //@ts-expect-error\n      error.isAdapterError = true;\n      //@ts-expect-error\n      error.code = 'InvalidError';\n      throw error;\n    }\n  }\n  const fields = getCacheFields(cache, identifier);\n  cached.isNew = false;\n  let newCanonicalAttributes;\n  if (data) {\n    if (data.id && !cached.id) {\n      cached.id = data.id;\n    }\n    if (identifier === committedIdentifier && identifier.id !== existingId) {\n      cache._capabilities.notifyChange(identifier, 'identity', null);\n    }\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected the ID received for the primary '${identifier.type}' resource being saved to match the current id '${cached.id}' but received '${identifier.id}'.`);\n      }\n    })(identifier.id === cached.id) : {};\n    if (data.relationships) {\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        if (macroCondition(!getGlobalConfig().WarpDrive.deprecations.DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE)) {\n          // assert against bad API behavior where a belongsTo relationship\n          // is saved but the return payload indicates a different final state.\n          fields.forEach((field, name) => {\n            if (field.kind === 'belongsTo') {\n              const relationshipData = data.relationships[name]?.data;\n              if (relationshipData !== undefined) {\n                const inFlightData = cached.inflightRelationships?.[name];\n                if (!inFlightData || !('data' in inFlightData)) {\n                  return;\n                }\n                const actualData = relationshipData ? cache._capabilities.cacheKeyManager.getOrCreateRecordIdentifier(relationshipData) : null;\n                macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n                  if (!test) {\n                    throw new Error(`Expected the resource relationship '<${identifier.type}>.${name}' on ${identifier.lid} to be saved as ${inFlightData.data ? inFlightData.data.lid : '<null>'} but it was saved as ${actualData ? actualData.lid : '<null>'}`);\n                  }\n                })(inFlightData.data === actualData) : {};\n              }\n            }\n          });\n          cached.inflightRelationships = null;\n        }\n      }\n      setupRelationships(cache.__graph, fields, identifier, data);\n    }\n    newCanonicalAttributes = data.attributes;\n  }\n  const changedKeys = newCanonicalAttributes && calculateChangedKeys(cached, newCanonicalAttributes, fields);\n  cached.remoteAttrs = Object.assign(cached.remoteAttrs || Object.create(null), cached.inflightAttrs, newCanonicalAttributes);\n  cached.inflightAttrs = null;\n  patchLocalAttributes(cached, changedKeys);\n  if (cached.errors) {\n    cached.errors = null;\n    cache._capabilities.notifyChange(identifier, 'errors', null);\n  }\n  if (changedKeys?.size) notifyAttributes(cache._capabilities, identifier, changedKeys);\n  cache._capabilities.notifyChange(identifier, 'state', null);\n}\nfunction willCommit(cache, identifier) {\n  const cached = cache.__peek(identifier, false);\n\n  /*\n      if we have multiple saves in flight at once then\n      we have information loss no matter what. This\n      attempts to lose the least information.\n       If we were to clear inflightAttrs, previous requests\n      would not be able to use it during their didCommit.\n       If we upsert inflightattrs, previous requests incorrectly\n      see more recent inflight changes as part of their own and\n      will incorrectly mark the new state as the correct remote state.\n       We choose this latter behavior to avoid accidentally removing\n      earlier changes.\n       If apps do not want this behavior they can either\n      - chain save requests serially vs allowing concurrent saves\n      - move to using a request handler that caches the inflight state\n        on a per-request basis\n      - change their save requests to only send a \"PATCH\" instead of a \"PUT\"\n        so that only latest changes are involved in each request, and then also\n        ensure that the API or their handler reflects only those changes back\n        for upsert into the cache.\n    */\n  if (cached.inflightAttrs) {\n    if (cached.localAttrs) {\n      Object.assign(cached.inflightAttrs, cached.localAttrs);\n    }\n  } else {\n    cached.inflightAttrs = cached.localAttrs;\n  }\n  cached.localAttrs = null;\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    if (macroCondition(!getGlobalConfig().WarpDrive.deprecations.DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE)) {\n      // save off info about saved relationships\n      const fields = getCacheFields(cache, identifier);\n      fields.forEach((schema, name) => {\n        if (schema.kind === 'belongsTo') {\n          if (cache.__graph._isDirty(identifier, name)) {\n            const relationshipData = cache.__graph.getData(identifier, name);\n            const inFlight = cached.inflightRelationships = cached.inflightRelationships || Object.create(null);\n            inFlight[name] = relationshipData;\n          }\n        }\n      });\n    }\n  }\n}\n\nexport { JSONAPICache };\n","import { getOwner } from '@ember/application';\nimport { recordIdentifierFor } from '@warp-drive/core';\nimport { assertPrivateStore, _deprecatingNormalize } from '@warp-drive/core/store/-private';\nimport '@warp-drive/core/reactive/-private';\nimport { p as payloadIsNotBlank, n as normalizeResponseHelper, i as iterateData, F as FetchManager, S as SaveOp, a as assertIdentifierHasId, b as SnapshotRecordArray } from \"./-private-BG3bMiKp.js\";\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\nimport { waitFor } from '@warp-drive/core/signals/-leaked';\nfunction _findHasMany(adapter, store, identifier, link, relationship, options) {\n  const promise = Promise.resolve().then(() => {\n    const snapshot = store._fetchManager.createSnapshot(identifier, options);\n    const useLink = !link || typeof link === 'string';\n    const relatedLink = useLink ? link : link.href;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to load a hasMany relationship from a specified 'link' in the original payload, but the specified link is empty. You must provide a valid 'link' in the original payload to use 'findHasMany'`);\n      }\n    })(relatedLink) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected the adapter to implement 'findHasMany' but it does not`);\n      }\n    })(typeof adapter.findHasMany === 'function') : {};\n    return adapter.findHasMany(store, snapshot, relatedLink, relationship);\n  });\n  return promise.then(adapterPayload => {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You made a 'findHasMany' request for a ${identifier.type}'s '${relationship.name}' relationship, using link '${JSON.stringify(link)}' , but the adapter's response did not have any data`);\n      }\n    })(payloadIsNotBlank(adapterPayload)) : {};\n    const modelClass = store.modelFor(relationship.type);\n    const serializer = store.serializerFor(relationship.type);\n    let payload = normalizeResponseHelper(serializer, store, modelClass, adapterPayload, null, 'findHasMany');\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`fetched the hasMany relationship '${relationship.name}' for ${identifier.type}:${identifier.id} with link '${JSON.stringify(link)}', but no data member is present in the response. If no data exists, the response should set { data: [] }`);\n      }\n    })('data' in payload && Array.isArray(payload.data)) : {};\n    payload = syncRelationshipDataFromLink(store, payload, identifier, relationship);\n    return store._push(payload, true);\n  }, null);\n}\nfunction _findBelongsTo(store, identifier, link, relationship, options) {\n  const promise = Promise.resolve().then(() => {\n    const adapter = store.adapterFor(identifier.type);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You tried to load a belongsTo relationship but you have no adapter (for ${identifier.type})`);\n      }\n    })(adapter) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You tried to load a belongsTo relationship from a specified 'link' in the original payload but your adapter does not implement 'findBelongsTo'`);\n      }\n    })(typeof adapter.findBelongsTo === 'function') : {};\n    const snapshot = store._fetchManager.createSnapshot(identifier, options);\n    const useLink = !link || typeof link === 'string';\n    const relatedLink = useLink ? link : link.href;\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Attempted to load a belongsTo relationship from a specified 'link' in the original payload, but the specified link is empty. You must provide a valid 'link' in the original payload to use 'findBelongsTo'`);\n      }\n    })(relatedLink) : {};\n    return adapter.findBelongsTo(store, snapshot, relatedLink, relationship);\n  });\n  return promise.then(adapterPayload => {\n    const modelClass = store.modelFor(relationship.type);\n    const serializer = store.serializerFor(relationship.type);\n    let payload = normalizeResponseHelper(serializer, store, modelClass, adapterPayload, null, 'findBelongsTo');\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`fetched the belongsTo relationship '${relationship.name}' for ${identifier.type}:${identifier.id} with link '${JSON.stringify(link)}', but no data member is present in the response. If no data exists, the response should set { data: null }`);\n      }\n    })('data' in payload && (payload.data === null || typeof payload.data === 'object' && !Array.isArray(payload.data))) : {};\n    if (!payload.data && !payload.links && !payload.meta) {\n      return null;\n    }\n    payload = syncRelationshipDataFromLink(store, payload, identifier, relationship);\n    return store._push(payload, true);\n  }, null);\n}\n\n// sync\n// iterate over records in payload.data\n// for each record\n//   assert that record.relationships[inverse] is either undefined (so we can fix it)\n//     or provide a data: {id, type} that matches the record that requested it\n//   return the relationship data for the parent\nfunction syncRelationshipDataFromLink(store, payload, parentIdentifier, relationship) {\n  // ensure the right hand side (incoming payload) points to the parent record that\n  // requested this relationship\n  const relationshipData = payload.data ? iterateData(payload.data, (data, index) => {\n    const {\n      id,\n      type\n    } = data;\n    ensureRelationshipIsSetToParent(data, parentIdentifier, store, relationship, index);\n    return {\n      id,\n      type\n    };\n  }) : null;\n  const relatedDataHash = {};\n  if ('meta' in payload) {\n    relatedDataHash.meta = payload.meta;\n  }\n  if ('links' in payload) {\n    relatedDataHash.links = payload.links;\n  }\n  if ('data' in payload) {\n    relatedDataHash.data = relationshipData;\n  }\n\n  // now, push the left hand side (the parent record) to ensure things are in sync, since\n  // the payload will be pushed with store._push\n  const parentPayload = {\n    id: parentIdentifier.id,\n    type: parentIdentifier.type,\n    relationships: {\n      [relationship.name]: relatedDataHash\n    }\n  };\n  if (!Array.isArray(payload.included)) {\n    payload.included = [];\n  }\n  payload.included.push(parentPayload);\n  return payload;\n}\nfunction ensureRelationshipIsSetToParent(payload, parentIdentifier, store, parentRelationship, index) {\n  const {\n    id,\n    type\n  } = payload;\n  if (!payload.relationships) {\n    payload.relationships = {};\n  }\n  const {\n    relationships\n  } = payload;\n  const inverse = getInverse(store, parentIdentifier, parentRelationship, type);\n  if (inverse) {\n    const {\n      inverseKey,\n      kind\n    } = inverse;\n    const relationshipData = relationships[inverseKey]?.data;\n    if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n      if (typeof relationshipData !== 'undefined' && !relationshipDataPointsToParent(relationshipData, parentIdentifier)) {\n        const inspect = function inspect(thing) {\n          return `'${JSON.stringify(thing)}'`;\n        };\n        const quotedType = inspect(type);\n        const quotedInverse = inspect(inverseKey);\n        const expected = inspect({\n          id: parentIdentifier.id,\n          type: parentIdentifier.type\n        });\n        const expectedModel = `${parentIdentifier.type}:${parentIdentifier.id}`;\n        const got = inspect(relationshipData);\n        const prefix = typeof index === 'number' ? `data[${index}]` : `data`;\n        const path = `${prefix}.relationships.${inverseKey}.data`;\n        const data = Array.isArray(relationshipData) ? relationshipData[0] : relationshipData;\n        const other = data ? `<${data.type}:${data.id}>` : null;\n        const relationshipFetched = `${expectedModel}.${parentRelationship.kind}(\"${parentRelationship.name}\")`;\n        const includedRecord = `<${type}:${id}>`;\n        const message = [`Encountered mismatched relationship: WarpDrive expected ${path} in the payload from ${relationshipFetched} to include ${expected} but got ${got} instead.\\n`, `The ${includedRecord} record loaded at ${prefix} in the payload specified ${other} as its ${quotedInverse}, but should have specified ${expectedModel} (the record the relationship is being loaded from) as its ${quotedInverse} instead.`, `This could mean that the response for ${relationshipFetched} may have accidentally returned ${quotedType} records that aren't related to ${expectedModel} and could be related to a different ${parentIdentifier.type} record instead.`, `WarpDrive has corrected the ${includedRecord} record's ${quotedInverse} relationship to ${expectedModel} so that ${relationshipFetched} will include ${includedRecord}.`, `Please update the response from the server or change your serializer to either ensure that the response for only includes ${quotedType} records that specify ${expectedModel} as their ${quotedInverse}, or omit the ${quotedInverse} relationship from the response.`].join('\\n');\n        macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n          {\n            throw new Error(message);\n          }\n        })() : {};\n      }\n    }\n    if (kind !== 'hasMany' || typeof relationshipData !== 'undefined') {\n      relationships[inverseKey] = relationships[inverseKey] || {};\n      relationships[inverseKey].data = fixRelationshipData(relationshipData ?? null, kind, parentIdentifier);\n    }\n  }\n}\nfunction inverseForRelationship(store, identifier, key) {\n  const definition = store.schema.fields(identifier).get(key);\n  if (!definition) {\n    return null;\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected the field definition to be a relationship`);\n    }\n  })(definition.kind === 'hasMany' || definition.kind === 'belongsTo') : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected the relationship defintion to specify the inverse type or null.`);\n    }\n  })(definition.options?.inverse === null || typeof definition.options?.inverse === 'string' && definition.options.inverse.length > 0) : {};\n  return definition.options.inverse;\n}\nfunction getInverse(store, parentIdentifier, parentRelationship, type) {\n  const {\n    name: lhs_relationshipName\n  } = parentRelationship;\n  const {\n    type: parentType\n  } = parentIdentifier;\n  const inverseKey = inverseForRelationship(store, {\n    type: parentType\n  }, lhs_relationshipName);\n  if (inverseKey) {\n    const definition = store.schema.fields({\n      type\n    }).get(inverseKey);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected the field definition to be a relationship`);\n      }\n    })(definition && (definition.kind === 'hasMany' || definition.kind === 'belongsTo')) : {};\n    return {\n      inverseKey,\n      kind: definition.kind\n    };\n  }\n}\nfunction relationshipDataPointsToParent(relationshipData, identifier) {\n  if (relationshipData === null) {\n    return false;\n  }\n  if (Array.isArray(relationshipData)) {\n    if (relationshipData.length === 0) {\n      return false;\n    }\n    for (let i = 0; i < relationshipData.length; i++) {\n      const entry = relationshipData[i];\n      if (validateRelationshipEntry(entry, identifier)) {\n        return true;\n      }\n    }\n  } else {\n    return validateRelationshipEntry(relationshipData, identifier);\n  }\n  return false;\n}\nfunction fixRelationshipData(relationshipData, relationshipKind, {\n  id,\n  type\n}) {\n  const parentRelationshipData = {\n    id,\n    type\n  };\n  let payload = null;\n  if (relationshipKind === 'hasMany') {\n    const relData = relationshipData || [];\n    if (relationshipData) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        if (!test) {\n          throw new Error('expected the relationship data to be an array');\n        }\n      })(Array.isArray(relationshipData)) : {};\n      // these arrays could be massive so this is better than filter\n      // Note: this is potentially problematic if type/id are not in the\n      // same state of normalization.\n      const found = relationshipData.find(v => {\n        return v.type === parentRelationshipData.type && v.id === parentRelationshipData.id;\n      });\n      if (!found) {\n        relData.push(parentRelationshipData);\n      }\n    } else {\n      relData.push(parentRelationshipData);\n    }\n    payload = relData;\n  } else {\n    const relData = relationshipData || {};\n    Object.assign(relData, parentRelationshipData);\n    payload = relData;\n  }\n  return payload;\n}\nfunction validateRelationshipEntry({\n  id\n}, {\n  id: parentModelID\n}) {\n  return !!id && id.toString() === parentModelID;\n}\nconst PotentialLegacyOperations = new Set(['findRecord', 'findAll', 'query', 'queryRecord', 'findBelongsTo', 'findHasMany', 'updateRecord', 'createRecord', 'deleteRecord']);\nconst LegacyNetworkHandler = {\n  request(context, next) {\n    // if we are not a legacy request, move on\n    if (context.request.url || !context.request.op || !PotentialLegacyOperations.has(context.request.op)) {\n      return next(context.request);\n    }\n    const {\n      store\n    } = context.request;\n    if (!store._fetchManager) {\n      store._fetchManager = new FetchManager(store);\n    }\n    switch (context.request.op) {\n      case 'findRecord':\n        return findRecord(context);\n      case 'findAll':\n        return findAll(context);\n      case 'query':\n        return query(context);\n      case 'queryRecord':\n        return queryRecord(context);\n      case 'findBelongsTo':\n        return findBelongsTo(context);\n      case 'findHasMany':\n        return findHasMany(context);\n      case 'updateRecord':\n        return saveRecord(context);\n      case 'createRecord':\n        return saveRecord(context);\n      case 'deleteRecord':\n        return saveRecord(context);\n      default:\n        return next(context.request);\n    }\n  }\n};\nfunction findBelongsTo(context) {\n  const {\n    store,\n    data,\n    records: identifiers\n  } = context.request;\n  const {\n    options,\n    record,\n    links,\n    useLink,\n    field\n  } = data;\n  const identifier = identifiers?.[0];\n\n  // short circuit if we are already loading\n  const pendingRequest = identifier && store._fetchManager.getPendingFetch(identifier, options);\n  if (pendingRequest) {\n    return pendingRequest;\n  }\n  if (useLink) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected a related link when calling store.findBelongsTo, found ${String(links)}`);\n      }\n    })(links && links.related) : {};\n    return _findBelongsTo(store, record, links.related, field, options);\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected an identifier`);\n    }\n  })(Array.isArray(identifiers) && identifiers.length === 1) : {};\n  const manager = store._fetchManager;\n  assertIdentifierHasId(identifier);\n  return options.reload ? manager.scheduleFetch(identifier, options, context.request) : manager.fetchDataIfNeededForIdentifier(identifier, options, context.request);\n}\nfunction findHasMany(context) {\n  const {\n    store,\n    data,\n    records: identifiers\n  } = context.request;\n  const {\n    options,\n    record,\n    links,\n    useLink,\n    field\n  } = data;\n\n  // link case\n  if (useLink) {\n    const adapter = store.adapterFor(record.type);\n    /*\n    If a relationship was originally populated by the adapter as a link\n    (as opposed to a list of IDs), this method is called when the\n    relationship is fetched.\n     The link (which is usually a URL) is passed through unchanged, so the\n    adapter can make whatever request it wants.\n     The usual use-case is for the server to register a URL as a link, and\n    then use that URL in the future to make a request for the relationship.\n    */\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You tried to load a hasMany relationship but you have no adapter (for ${record.type})`);\n      }\n    })(adapter) : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You tried to load a hasMany relationship from a specified 'link' in the original payload but your adapter does not implement 'findHasMany'`);\n      }\n    })(typeof adapter.findHasMany === 'function') : {};\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected a related link when calling store.findHasMany, found ${String(links)}`);\n      }\n    })(links && links.related) : {};\n    return _findHasMany(adapter, store, record, links.related, field, options);\n  }\n\n  // identifiers case\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected an array of identifiers to fetch`);\n    }\n  })(Array.isArray(identifiers)) : {};\n  const fetches = new Array(identifiers.length);\n  const manager = store._fetchManager;\n  for (let i = 0; i < identifiers.length; i++) {\n    const identifier = identifiers[i];\n    // TODO we probably can be lenient here and return from cache for the isNew case\n    assertIdentifierHasId(identifier);\n    fetches[i] = options.reload ? manager.scheduleFetch(identifier, options, context.request) : manager.fetchDataIfNeededForIdentifier(identifier, options, context.request);\n  }\n  return Promise.all(fetches);\n}\nfunction saveRecord(context) {\n  const {\n    store,\n    data,\n    op: operation\n  } = context.request;\n  const {\n    options,\n    record: identifier\n  } = data;\n  assertPrivateStore(store);\n  store.cache.willCommit(identifier, context);\n  const saveOptions = Object.assign({\n    [SaveOp]: operation\n  }, options);\n  const fetchManagerPromise = store._fetchManager.scheduleSave(identifier, saveOptions);\n  return fetchManagerPromise.then(payload => {\n    let result;\n    store._join(() => {\n      // @ts-expect-error we don't have access to a response in legacy\n      result = store.cache.didCommit(identifier, {\n        request: context.request,\n        content: payload\n      });\n    });\n\n    // blatantly lie if we were a createRecord request\n    // to give some semblance of cache-control to the\n    // CachePolicy while legacy is still around\n    if (store.lifetimes?.didRequest && operation === 'createRecord') {\n      store.lifetimes.didRequest(context.request, {\n        status: 201\n      }, null, store);\n    }\n    return store.peekRecord(result.data);\n  }).catch(e => {\n    let err = e;\n    if (!e) {\n      err = new Error(`Unknown Error Occurred During Request`);\n    } else if (typeof e === 'string') {\n      err = new Error(e);\n    }\n    adapterDidInvalidate(store, identifier, err);\n    throw err;\n  });\n}\nfunction adapterDidInvalidate(store, identifier, error) {\n  if (error && error.isAdapterError === true && error.code === 'InvalidError') {\n    const serializer = store.serializerFor(identifier.type);\n\n    // TODO @deprecate extractErrors being called\n    // TODO remove extractErrors from the default serializers.\n    if (serializer && typeof serializer.extractErrors === 'function') {\n      const errorsHash = serializer.extractErrors(store, store.modelFor(identifier.type), error, identifier.id);\n      error.errors = errorsHashToArray(errorsHash);\n    }\n  }\n  const cache = store.cache;\n  if (error.errors) {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`Expected the cache in use by resource ${String(identifier)} to have a getErrors(identifier) method for retrieving errors.`);\n      }\n    })(typeof cache.getErrors === 'function') : {};\n    let jsonApiErrors = error.errors;\n    if (jsonApiErrors.length === 0) {\n      jsonApiErrors = [{\n        title: 'Invalid Error',\n        detail: '',\n        source: {\n          pointer: '/data'\n        }\n      }];\n    }\n    cache.commitWasRejected(identifier, jsonApiErrors);\n  } else {\n    cache.commitWasRejected(identifier);\n  }\n}\nfunction makeArray(value) {\n  return Array.isArray(value) ? value : [value];\n}\nconst PRIMARY_ATTRIBUTE_KEY = 'base';\nfunction errorsHashToArray(errors) {\n  const out = [];\n  if (errors) {\n    Object.keys(errors).forEach(key => {\n      const messages = makeArray(errors[key]);\n      for (let i = 0; i < messages.length; i++) {\n        let title = 'Invalid Attribute';\n        let pointer = `/data/attributes/${key}`;\n        if (key === PRIMARY_ATTRIBUTE_KEY) {\n          title = 'Invalid Document';\n          pointer = `/data`;\n        }\n        out.push({\n          title: title,\n          detail: messages[i],\n          source: {\n            pointer: pointer\n          }\n        });\n      }\n    });\n  }\n  return out;\n}\nfunction findRecord(context) {\n  const {\n    store,\n    data\n  } = context.request;\n  const {\n    record: identifier,\n    options\n  } = data;\n  assertPrivateStore(store);\n  let promise;\n\n  // if not loaded start loading\n  if (!store._instanceCache.recordIsLoaded(identifier)) {\n    promise = store._fetchManager.fetchDataIfNeededForIdentifier(identifier, options, context.request);\n\n    // Refetch if the reload option is passed\n  } else if (options.reload) {\n    assertIdentifierHasId(identifier);\n    promise = store._fetchManager.scheduleFetch(identifier, options, context.request);\n  } else {\n    let snapshot = null;\n    const adapter = store.adapterFor(identifier.type);\n\n    // Refetch the record if the adapter thinks the record is stale\n    if (typeof options.reload === 'undefined' && adapter.shouldReloadRecord && adapter.shouldReloadRecord(store, snapshot = store._fetchManager.createSnapshot(identifier, options))) {\n      assertIdentifierHasId(identifier);\n      if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n        promise = store._fetchManager.scheduleFetch(identifier, Object.assign({}, options, {\n          reload: true\n        }), context.request);\n      } else {\n        options.reload = true;\n        promise = store._fetchManager.scheduleFetch(identifier, options, context.request);\n      }\n    } else {\n      // Trigger the background refetch if backgroundReload option is passed\n      if (options.backgroundReload !== false && (options.backgroundReload || !adapter.shouldBackgroundReloadRecord || adapter.shouldBackgroundReloadRecord(store, snapshot = snapshot || store._fetchManager.createSnapshot(identifier, options)))) {\n        assertIdentifierHasId(identifier);\n        if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n          void store._fetchManager.scheduleFetch(identifier, Object.assign({}, options, {\n            backgroundReload: true\n          }), context.request);\n        } else {\n          options.backgroundReload = true;\n          void store._fetchManager.scheduleFetch(identifier, options, context.request);\n        }\n      }\n\n      // Return the cached record\n      promise = Promise.resolve(identifier);\n    }\n  }\n  return promise.then(i => store.peekRecord(i));\n}\nfunction findAll(context) {\n  const {\n    store,\n    data\n  } = context.request;\n  const {\n    type,\n    options\n  } = data;\n  assertPrivateStore(store);\n  const adapter = store.adapterFor(type);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You tried to load all records but you have no adapter (for ${type})`);\n    }\n  })(adapter) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You tried to load all records but your adapter does not implement 'findAll'`);\n    }\n  })(typeof adapter.findAll === 'function') : {};\n\n  // avoid initializing the liveArray just to set `isUpdating`\n  const maybeRecordArray = store.recordArrayManager._live.get(type);\n  const snapshotArray = new SnapshotRecordArray(store, type, options);\n  const shouldReload = options.reload || options.reload !== false && (adapter.shouldReloadAll && adapter.shouldReloadAll(store, snapshotArray) || !adapter.shouldReloadAll && snapshotArray.length === 0);\n  let fetch;\n  if (shouldReload) {\n    // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n    maybeRecordArray && (maybeRecordArray.isUpdating = true);\n    fetch = _findAll(adapter, store, type, snapshotArray, context.request, true);\n  } else {\n    fetch = Promise.resolve(store.peekAll(type));\n    if (options.backgroundReload || options.backgroundReload !== false && (!adapter.shouldBackgroundReloadAll || adapter.shouldBackgroundReloadAll(store, snapshotArray))) {\n      // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n      maybeRecordArray && (maybeRecordArray.isUpdating = true);\n      void _findAll(adapter, store, type, snapshotArray, context.request, false);\n    }\n  }\n  return fetch;\n}\nfunction _findAll(adapter, store, type, snapshotArray, request, isAsyncFlush) {\n  const schema = store.modelFor(type);\n  let promise = Promise.resolve().then(() => adapter.findAll(store, schema, null, snapshotArray));\n  promise = promise.then(adapterPayload => {\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error(`You made a 'findAll' request for '${type}' records, but the adapter's response did not have any data`);\n      }\n    })(payloadIsNotBlank(adapterPayload)) : {};\n    const serializer = store.serializerFor(type);\n    const payload = normalizeResponseHelper(serializer, store, schema, adapterPayload, null, 'findAll');\n    store._push(payload, isAsyncFlush);\n    snapshotArray._recordArray.isUpdating = false;\n    if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_REQUESTS)) {\n      if (getGlobalConfig().WarpDrive.debug.LOG_REQUESTS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REQUESTS) {\n        // eslint-disable-next-line no-console\n        console.log(`request: findAll<${type}> background reload complete`);\n      }\n    }\n    return snapshotArray._recordArray;\n  });\n  if (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {\n    if (!request.disableTestWaiter) {\n      promise = waitFor(promise);\n    }\n  }\n  return promise;\n}\nfunction query(context) {\n  const {\n    store,\n    data\n  } = context.request;\n  assertPrivateStore(store);\n  let {\n    options\n  } = data;\n  // eslint-disable-next-line @typescript-eslint/no-shadow\n  const {\n    type,\n    query\n  } = data;\n  const adapter = store.adapterFor(type);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You tried to make a query but you have no adapter (for ${type})`);\n    }\n  })(adapter) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You tried to make a query but your adapter does not implement 'query'`);\n    }\n  })(typeof adapter.query === 'function') : {};\n  const recordArray = options._recordArray || store.recordArrayManager.getCollection({\n    type,\n    query\n  });\n  if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {\n    options = Object.assign({}, options);\n    delete options._recordArray;\n  } else {\n    delete options._recordArray;\n  }\n  const schema = store.modelFor(type);\n  const promise = Promise.resolve().then(() => adapter.query(store, schema, query, recordArray, options));\n  return promise.then(adapterPayload => {\n    const serializer = store.serializerFor(type);\n    const payload = normalizeResponseHelper(serializer, store, schema, adapterPayload, null, 'query');\n    const identifiers = store._push(payload, true);\n    macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n      if (!test) {\n        throw new Error('The response to store.query is expected to be an array but it was a single record. Please wrap your response in an array or use `store.queryRecord` to query for a single record.');\n      }\n    })(Array.isArray(identifiers)) : {};\n    store.recordArrayManager.populateManagedArray(recordArray, identifiers, payload);\n    return recordArray;\n  });\n}\nfunction assertSingleResourceDocument(payload) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Expected the primary data returned by the serializer for a 'queryRecord' response to be a single object or null but instead it was an array.`);\n    }\n  })(!Array.isArray(payload.data)) : {};\n}\nfunction queryRecord(context) {\n  const {\n    store,\n    data\n  } = context.request;\n  // eslint-disable-next-line @typescript-eslint/no-shadow\n  const {\n    type,\n    query,\n    options\n  } = data;\n  const adapter = store.adapterFor(type);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You tried to make a query but you have no adapter (for ${type})`);\n    }\n  })(adapter) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You tried to make a query but your adapter does not implement 'queryRecord'`);\n    }\n  })(typeof adapter.queryRecord === 'function') : {};\n  const schema = store.modelFor(type);\n  const promise = Promise.resolve().then(() => adapter.queryRecord(store, schema, query, options));\n  return promise.then(adapterPayload => {\n    const serializer = store.serializerFor(type);\n    const payload = normalizeResponseHelper(serializer, store, schema, adapterPayload, null, 'queryRecord');\n    assertSingleResourceDocument(payload);\n    const identifier = store._push(payload, true);\n    return identifier ? store.peekRecord(identifier) : null;\n  });\n}\n\n/**\n * Extends the signature of {@link Store} with additional\n * methods available when using the legacy network layer.\n *\n * @public\n * @noInheritDoc\n * @legacy\n */\n\n/**\n * @deprecated - use {@link LegacyStoreCompat} instead\n */\n\n/**\n  Returns an instance of the adapter for a given type. For\n  example, `adapterFor('person')` will return an instance of\n  the adapter located at `app/adapters/person.js`\n\n  If no `person` adapter is found, this method will look\n  for an `application` adapter (the default adapter for\n  your entire application).\n\n  @public\n  @param modelName\n*/\n\nfunction adapterFor(modelName, _allowMissing) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Attempted to call store.adapterFor(), but the store instance has already been destroyed.`);\n    }\n  })(!(this.isDestroying || this.isDestroyed)) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You need to pass a model name to the store's adapterFor method`);\n    }\n  })(modelName) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Passing classes to store.adapterFor has been removed. Please pass a dasherized string instead of ${modelName}`);\n    }\n  })(typeof modelName === 'string') : {};\n  this._adapterCache = this._adapterCache || Object.create(null);\n  const normalizedModelName = _deprecatingNormalize(modelName);\n  const {\n    _adapterCache\n  } = this;\n  let adapter = _adapterCache[normalizedModelName];\n  if (adapter) {\n    return adapter;\n  }\n  const owner = getOwner(this);\n\n  // name specific adapter\n  adapter = owner.lookup(`adapter:${normalizedModelName}`);\n  if (adapter !== undefined) {\n    _adapterCache[normalizedModelName] = adapter;\n    return adapter;\n  }\n\n  // no adapter found for the specific name, fallback and check for application adapter\n  adapter = _adapterCache.application || owner.lookup('adapter:application');\n  if (adapter !== undefined) {\n    _adapterCache[normalizedModelName] = adapter;\n    _adapterCache.application = adapter;\n    return adapter;\n  }\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`No adapter was found for '${modelName}' and no 'application' adapter was found as a fallback.`);\n    }\n  })(_allowMissing) : {};\n}\n\n/**\n  Returns an instance of the serializer for a given type. For\n  example, `serializerFor('person')` will return an instance of\n  `App.PersonSerializer`.\n\n  If no `App.PersonSerializer` is found, this method will look\n  for an `App.ApplicationSerializer` (the default serializer for\n  your entire application).\n\n  If a serializer cannot be found on the adapter, it will fall back\n  to an instance of `JSONSerializer`.\n\n  @public\n  @param modelName the record to serialize\n  */\nfunction serializerFor(modelName) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Attempted to call store.serializerFor(), but the store instance has already been destroyed.`);\n    }\n  })(!(this.isDestroying || this.isDestroyed)) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You need to pass a model name to the store's serializerFor method`);\n    }\n  })(modelName) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Passing classes to store.serializerFor has been removed. Please pass a dasherized string instead of ${modelName}`);\n    }\n  })(typeof modelName === 'string') : {};\n  this._serializerCache = this._serializerCache || Object.create(null);\n  const normalizedModelName = _deprecatingNormalize(modelName);\n  const {\n    _serializerCache\n  } = this;\n  let serializer = _serializerCache[normalizedModelName];\n  if (serializer) {\n    return serializer;\n  }\n\n  // by name\n  const owner = getOwner(this);\n  serializer = owner.lookup(`serializer:${normalizedModelName}`);\n  if (serializer !== undefined) {\n    _serializerCache[normalizedModelName] = serializer;\n    return serializer;\n  }\n\n  // no serializer found for the specific model, fallback and check for application serializer\n  serializer = _serializerCache.application || owner.lookup('serializer:application');\n  if (serializer !== undefined) {\n    _serializerCache[normalizedModelName] = serializer;\n    _serializerCache.application = serializer;\n    return serializer;\n  }\n  return null;\n}\n\n/**\n  `normalize` converts a json payload into the normalized form expected by\n  {@link Store.push | push} using the serializer specified by `modelName`\n\n  :::warning\n  Generally it would be better to invoke the serializer yourself directly,\n  or write a more specialized normalization utility.\n  :::\n\n  Example\n\n  ```js\n  socket.on('message', function(message) {\n    let modelName = message.model;\n    let data = message.data;\n    store.push(store.normalize(modelName, data));\n  });\n  ```\n\n  @legacy\n  @public\n  @param modelName The name of the model type for this payload\n  @return The normalized payload\n*/\n// TODO @runspired @deprecate users should call normalize on the associated serializer directly\nfunction normalize(modelName, payload) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Attempted to call store.normalize(), but the store instance has already been destroyed.`);\n    }\n  })(!(this.isDestroying || this.isDestroyed)) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You need to pass a model name to the store's normalize method`);\n    }\n  })(modelName) : {};\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${typeof modelName}`);\n    }\n  })(typeof modelName === 'string') : {};\n  const normalizedModelName = _deprecatingNormalize(modelName);\n  const serializer = this.serializerFor(normalizedModelName);\n  const schema = this.modelFor(normalizedModelName);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You must define a normalize method in your serializer in order to call store.normalize`);\n    }\n  })(typeof serializer?.normalize === 'function') : {};\n  return serializer.normalize(schema, payload);\n}\n\n/**\n    Push some raw data into the store.\n\n    This method can be used both to push in brand new\n    records, as well as to update existing records. You\n    can push in more than one type of object at once.\n    All objects should be in the format expected by the\n    serializer.\n\n    ```js [app/serializers/application.js]\n    import RESTSerializer from '@warp-drive/legacy/serializer/rest';\n\n    export default class ApplicationSerializer extends RESTSerializer;\n    ```\n\n    ```js\n    let pushData = {\n      posts: [\n        { id: 1, postTitle: \"Great post\", commentIds: [2] }\n      ],\n      comments: [\n        { id: 2, commentBody: \"Insightful comment\" }\n      ]\n    }\n\n    store.pushPayload(pushData);\n    ```\n\n    By default, the data will be deserialized using a default\n    serializer (the application serializer if it exists).\n\n    Alternatively, `pushPayload` will accept a model type which\n    will determine which serializer will process the payload.\n\n    ```js [app/serializers/application.js]\n    import RESTSerializer from '@warp-drive/legacy/serializer/rest';\n\n     export default class ApplicationSerializer extends RESTSerializer;\n    ```\n\n    ```js [app/serializers/post.js]\n    import JSONSerializer from '@warp-drive/legacy/serializer/json';\n\n    export default JSONSerializer;\n    ```\n\n    ```js\n    store.pushPayload(pushData); // Will use the application serializer\n    store.pushPayload('post', pushData); // Will use the post serializer\n    ```\n\n    @public\n    @param modelName Optionally, a model type used to determine which serializer will be used\n    @param inputPayload\n  */\n// TODO @runspired @deprecate pushPayload in favor of looking up the serializer\nfunction pushPayload(modelName, inputPayload) {\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`Attempted to call store.pushPayload(), but the store instance has already been destroyed.`);\n    }\n  })(!(this.isDestroying || this.isDestroyed)) : {};\n  const payload = inputPayload || modelName;\n  const normalizedModelName = inputPayload ? _deprecatingNormalize(modelName) : 'application';\n  const serializer = this.serializerFor(normalizedModelName);\n  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n    if (!test) {\n      throw new Error(`You cannot use 'store.pushPayload(<type>, <payload>)' unless the serializer for '${normalizedModelName}' defines 'pushPayload'`);\n    }\n  })(serializer && typeof serializer.pushPayload === 'function') : {};\n  serializer.pushPayload(this, payload);\n}\n\n// TODO @runspired @deprecate records should implement their own serialization if desired\nfunction serializeRecord(record, options) {\n  // TODO we used to check if the record was destroyed here\n  if (!this._fetchManager) {\n    this._fetchManager = new FetchManager(this);\n  }\n  return this._fetchManager.createSnapshot(recordIdentifierFor(record)).serialize(options);\n}\nfunction cleanup() {\n  // enqueue destruction of any adapters/serializers we have created\n  for (const adapterName in this._adapterCache) {\n    const adapter = this._adapterCache[adapterName];\n    if (typeof adapter.destroy === 'function') {\n      adapter.destroy();\n    }\n  }\n  for (const serializerName in this._serializerCache) {\n    const serializer = this._serializerCache[serializerName];\n    if (typeof serializer.destroy === 'function') {\n      serializer.destroy();\n    }\n  }\n}\nexport { LegacyNetworkHandler, adapterFor, cleanup, normalize, pushPayload, serializeRecord, serializerFor };","import { deprecate } from '@ember/debug';\nimport JSONAPICache from '@ember-data/json-api';\nimport { LegacyNetworkHandler, adapterFor, serializerFor, pushPayload, normalize, serializeRecord, cleanup } from '@ember-data/legacy-compat';\nimport { buildSchema, instantiateRecord, teardownRecord, modelFor } from '@ember-data/model';\nimport RequestManager from '@ember-data/request';\nimport Fetch from '@ember-data/request/fetch';\nimport BaseStore, { CacheHandler } from '@ember-data/store';\nimport { macroCondition, getGlobalConfig } from '@embroider/macros';\n\nfunction hasRequestManager(store) {\n  return 'requestManager' in store;\n}\nclass Store extends BaseStore {\n  constructor(args) {\n    super(args);\n    if (!hasRequestManager(this)) {\n      this.requestManager = new RequestManager();\n      this.requestManager.use(macroCondition(getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_REQUEST_METHODS) ? [LegacyNetworkHandler, Fetch] : [Fetch]);\n    }\n    this.requestManager.useCache(CacheHandler);\n  }\n  createSchemaService() {\n    return buildSchema(this);\n  }\n  createCache(storeWrapper) {\n    return new JSONAPICache(storeWrapper);\n  }\n  instantiateRecord(key, createRecordArgs) {\n    return instantiateRecord.call(this, key, createRecordArgs);\n  }\n  teardownRecord(record) {\n    return teardownRecord.call(this, record);\n  }\n  modelFor(type) {\n    return modelFor.call(this, type) || super.modelFor(type);\n  }\n  adapterFor(modelName, _allowMissing) {\n    if (macroCondition(!getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_REQUEST_METHODS)) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        {\n          throw new Error(`You cannot use store.adapterFor when ENABLE_LEGACY_REQUEST_METHODS is false without explicitly registering the adapterFor hook from @ember-data/legacy-compat or @warp-drive/legacy.`);\n        }\n      })() : {};\n    } else {\n      deprecate(`store.adapterFor is deprecated, please use store.request to perform requests and builders/handlers/utils to produce and process them, or explicitly register the adapterFor hook and LegacyNetworkHandler from @ember-data/legacy-compat or @warp-drive/legacy.`, false, {\n        id: 'warp-drive:deprecate-legacy-request-methods',\n        until: '6.0',\n        for: '@warp-drive/core',\n        url: 'https://docs.warp-drive.io/api/@warp-drive/core/build-config/deprecations/variables/ENABLE_LEGACY_REQUEST_METHODS',\n        since: {\n          enabled: '5.7',\n          available: '5.7'\n        }\n      });\n\n      // @ts-expect-error\n      return adapterFor.call(this, modelName, _allowMissing);\n    }\n  }\n  serializerFor = (...args) => {\n    if (macroCondition(!getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_REQUEST_METHODS)) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        {\n          throw new Error(`You cannot use store.serializerFor when ENABLE_LEGACY_REQUEST_METHODS is false without explicitly registering the serializerFor hook from @ember-data/legacy-compat or @warp-drive/legacy.`);\n        }\n      })() : {};\n    } else {\n      deprecate(`store.serializerFor is deprecated, please use store.request to perform requests and builders/handlers/utils to produce and process them, or explicitly register the serializerFor hook and LegacyNetworkHandler from @ember-data/legacy-compat or @warp-drive/legacy.`, false, {\n        id: 'warp-drive:deprecate-legacy-request-methods',\n        until: '6.0',\n        for: '@warp-drive/core',\n        url: 'https://docs.warp-drive.io/api/@warp-drive/core/build-config/deprecations/variables/ENABLE_LEGACY_REQUEST_METHODS',\n        since: {\n          enabled: '5.7',\n          available: '5.7'\n        }\n      });\n      return serializerFor.call(this, ...args);\n    }\n  };\n  pushPayload = (...args) => {\n    if (macroCondition(!getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_REQUEST_METHODS)) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        {\n          throw new Error(`You cannot use store.pushPayload when ENABLE_LEGACY_REQUEST_METHODS is false without explicitly registering the pushPayload hook from @ember-data/legacy-compat or @warp-drive/legacy.`);\n        }\n      })() : {};\n    } else {\n      deprecate(`store.pushPayload is deprecated, please use store.request to perform requests and builders/handlers/utils to produce and process them, or explicitly register the pushPayload and serializerFor hooks from @ember-data/legacy-compat or @warp-drive/legacy.`, false, {\n        id: 'warp-drive:deprecate-legacy-request-methods',\n        until: '6.0',\n        for: '@warp-drive/core',\n        url: 'https://docs.warp-drive.io/api/@warp-drive/core/build-config/deprecations/variables/ENABLE_LEGACY_REQUEST_METHODS',\n        since: {\n          enabled: '5.7',\n          available: '5.7'\n        }\n      });\n      return pushPayload.call(this, ...args);\n    }\n  };\n  normalize = (...args) => {\n    if (macroCondition(!getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_REQUEST_METHODS)) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        {\n          throw new Error(`You cannot use store.normalize when ENABLE_LEGACY_REQUEST_METHODS is false without explicitly registering the normalize hook from @ember-data/legacy-compat or @warp-drive/legacy.`);\n        }\n      })() : {};\n    } else {\n      deprecate(`store.normalize is deprecated, please use store.request to perform requests and builders/handlers/utils to produce and process them, or explicitly register the normalize and serializerFor hooks from @ember-data/legacy-compat or @warp-drive/legacy.`, false, {\n        id: 'warp-drive:deprecate-legacy-request-methods',\n        until: '6.0',\n        for: '@warp-drive/core',\n        url: 'https://docs.warp-drive.io/api/@warp-drive/core/build-config/deprecations/variables/ENABLE_LEGACY_REQUEST_METHODS',\n        since: {\n          enabled: '5.7',\n          available: '5.7'\n        }\n      });\n      return normalize.call(this, ...args);\n    }\n  };\n  serializeRecord = (...args) => {\n    if (macroCondition(!getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_REQUEST_METHODS)) {\n      macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {\n        {\n          throw new Error(`You cannot use store.serializeRecord when ENABLE_LEGACY_REQUEST_METHODS is false without explicitly registering the serializeRecord hook from @ember-data/legacy-compat or @warp-drive/legacy.`);\n        }\n      })() : {};\n    } else {\n      deprecate(`store.serializeRecord is deprecated, please use store.request to perform requests and builders/handlers/utils to produce and process them, or explicitly register the serializeRecord and serializerFor hooks from @ember-data/legacy-compat or @warp-drive/legacy.`, false, {\n        id: 'warp-drive:deprecate-legacy-request-methods',\n        until: '6.0',\n        for: '@warp-drive/core',\n        url: 'https://docs.warp-drive.io/api/@warp-drive/core/build-config/deprecations/variables/ENABLE_LEGACY_REQUEST_METHODS',\n        since: {\n          enabled: '5.7',\n          available: '5.7'\n        }\n      });\n      return serializeRecord.call(this, ...args);\n    }\n  };\n  destroy() {\n    cleanup.call(this);\n    super.destroy();\n  }\n}\n\nexport { Store as default };\n","// eslint-disable-next-line ember/no-classic-components\nimport EmberComponent from '@ember/component';\nimport Helper from '@ember/component/helper';\nimport { assert, runInDebug } from '@ember/debug';\n\nimport type { ComponentLike } from '@glint/template';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nfunction UNINITIALIZED() { }\n\nexport type ElementFromTagName<T extends string> = T extends keyof HTMLElementTagNameMap\n  ? HTMLElementTagNameMap[T]\n  : Element;\n\ntype Positional<T extends string> = [name: T];\ntype Return<T extends string> = ComponentLike<{\n  Element: ElementFromTagName<T>;\n  Blocks: { default: [] };\n}>;\n\nexport interface ElementSignature<T extends string> {\n  Args: {\n    Positional: Positional<T>;\n  };\n  Return: Return<T> | undefined;\n}\n\nexport default class ElementHelper<T extends string> extends Helper<ElementSignature<T>> {\n  tagName: string | (() => void) = UNINITIALIZED;\n  componentClass?: Return<T>;\n\n  compute(params: Positional<T>, hash: object) {\n    assert('The `element` helper takes a single positional argument', params.length === 1);\n    assert(\n      'The `element` helper does not take any named arguments',\n      Object.keys(hash).length === 0\n    );\n\n    let tagName = params[0];\n\n    if (tagName !== this.tagName) {\n      this.tagName = tagName;\n\n      if (typeof tagName === 'string') {\n        this.componentClass =\n          class DynamicElement extends EmberComponent {\n            tagName = tagName;\n          } as unknown as Return<T>;\n      } else {\n        this.componentClass = undefined;\n\n        runInDebug(() => {\n          let message = 'The argument passed to the `element` helper must be a string';\n\n          try {\n            message += ` (you passed \\`${tagName}\\`)`;\n          } catch (e) {\n            // ignore\n          }\n\n          assert(message, tagName === undefined || tagName === null);\n        });\n      }\n    }\n\n    return this.componentClass;\n  }\n}\n","\"use strict\";\nif (typeof Object.assign !== \"function\") {\n    Object.assign = function (target) {\n        var args = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            args[_i - 1] = arguments[_i];\n        }\n        if (!target) {\n            throw TypeError(\"Cannot convert undefined or null to object\");\n        }\n        var _loop_1 = function (source) {\n            if (source) {\n                Object.keys(source).forEach(function (key) { return (target[key] = source[key]); });\n            }\n        };\n        for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {\n            var source = args_1[_a];\n            _loop_1(source);\n        }\n        return target;\n    };\n}\n","export var HOOKS = [\n    \"onChange\",\n    \"onClose\",\n    \"onDayCreate\",\n    \"onDestroy\",\n    \"onKeyDown\",\n    \"onMonthChange\",\n    \"onOpen\",\n    \"onParseConfig\",\n    \"onReady\",\n    \"onValueUpdate\",\n    \"onYearChange\",\n    \"onPreCalendarPosition\",\n];\nexport var defaults = {\n    _disable: [],\n    allowInput: false,\n    allowInvalidPreload: false,\n    altFormat: \"F j, Y\",\n    altInput: false,\n    altInputClass: \"form-control input\",\n    animate: typeof window === \"object\" &&\n        window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n    ariaDateFormat: \"F j, Y\",\n    autoFillDefaultTime: true,\n    clickOpens: true,\n    closeOnSelect: true,\n    conjunction: \", \",\n    dateFormat: \"Y-m-d\",\n    defaultHour: 12,\n    defaultMinute: 0,\n    defaultSeconds: 0,\n    disable: [],\n    disableMobile: false,\n    enableSeconds: false,\n    enableTime: false,\n    errorHandler: function (err) {\n        return typeof console !== \"undefined\" && console.warn(err);\n    },\n    getWeek: function (givenDate) {\n        var date = new Date(givenDate.getTime());\n        date.setHours(0, 0, 0, 0);\n        date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));\n        var week1 = new Date(date.getFullYear(), 0, 4);\n        return (1 +\n            Math.round(((date.getTime() - week1.getTime()) / 86400000 -\n                3 +\n                ((week1.getDay() + 6) % 7)) /\n                7));\n    },\n    hourIncrement: 1,\n    ignoredFocusElements: [],\n    inline: false,\n    locale: \"default\",\n    minuteIncrement: 5,\n    mode: \"single\",\n    monthSelectorType: \"dropdown\",\n    nextArrow: \"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>\",\n    noCalendar: false,\n    now: new Date(),\n    onChange: [],\n    onClose: [],\n    onDayCreate: [],\n    onDestroy: [],\n    onKeyDown: [],\n    onMonthChange: [],\n    onOpen: [],\n    onParseConfig: [],\n    onReady: [],\n    onValueUpdate: [],\n    onYearChange: [],\n    onPreCalendarPosition: [],\n    plugins: [],\n    position: \"auto\",\n    positionElement: undefined,\n    prevArrow: \"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>\",\n    shorthandCurrentMonth: false,\n    showMonths: 1,\n    static: false,\n    time_24hr: false,\n    weekNumbers: false,\n    wrap: false,\n};\n","export var english = {\n    weekdays: {\n        shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n        longhand: [\n            \"Sunday\",\n            \"Monday\",\n            \"Tuesday\",\n            \"Wednesday\",\n            \"Thursday\",\n            \"Friday\",\n            \"Saturday\",\n        ],\n    },\n    months: {\n        shorthand: [\n            \"Jan\",\n            \"Feb\",\n            \"Mar\",\n            \"Apr\",\n            \"May\",\n            \"Jun\",\n            \"Jul\",\n            \"Aug\",\n            \"Sep\",\n            \"Oct\",\n            \"Nov\",\n            \"Dec\",\n        ],\n        longhand: [\n            \"January\",\n            \"February\",\n            \"March\",\n            \"April\",\n            \"May\",\n            \"June\",\n            \"July\",\n            \"August\",\n            \"September\",\n            \"October\",\n            \"November\",\n            \"December\",\n        ],\n    },\n    daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n    firstDayOfWeek: 0,\n    ordinal: function (nth) {\n        var s = nth % 100;\n        if (s > 3 && s < 21)\n            return \"th\";\n        switch (s % 10) {\n            case 1:\n                return \"st\";\n            case 2:\n                return \"nd\";\n            case 3:\n                return \"rd\";\n            default:\n                return \"th\";\n        }\n    },\n    rangeSeparator: \" to \",\n    weekAbbreviation: \"Wk\",\n    scrollTitle: \"Scroll to increment\",\n    toggleTitle: \"Click to toggle\",\n    amPM: [\"AM\", \"PM\"],\n    yearAriaLabel: \"Year\",\n    monthAriaLabel: \"Month\",\n    hourAriaLabel: \"Hour\",\n    minuteAriaLabel: \"Minute\",\n    time_24hr: false,\n};\nexport default english;\n","export var pad = function (number, length) {\n    if (length === void 0) { length = 2; }\n    return (\"000\" + number).slice(length * -1);\n};\nexport var int = function (bool) { return (bool === true ? 1 : 0); };\nexport function debounce(fn, wait) {\n    var t;\n    return function () {\n        var _this = this;\n        var args = arguments;\n        clearTimeout(t);\n        t = setTimeout(function () { return fn.apply(_this, args); }, wait);\n    };\n}\nexport var arrayify = function (obj) {\n    return obj instanceof Array ? obj : [obj];\n};\n","export function toggleClass(elem, className, bool) {\n    if (bool === true)\n        return elem.classList.add(className);\n    elem.classList.remove(className);\n}\nexport function createElement(tag, className, content) {\n    var e = window.document.createElement(tag);\n    className = className || \"\";\n    content = content || \"\";\n    e.className = className;\n    if (content !== undefined)\n        e.textContent = content;\n    return e;\n}\nexport function clearNode(node) {\n    while (node.firstChild)\n        node.removeChild(node.firstChild);\n}\nexport function findParent(node, condition) {\n    if (condition(node))\n        return node;\n    else if (node.parentNode)\n        return findParent(node.parentNode, condition);\n    return undefined;\n}\nexport function createNumberInput(inputClassName, opts) {\n    var wrapper = createElement(\"div\", \"numInputWrapper\"), numInput = createElement(\"input\", \"numInput \" + inputClassName), arrowUp = createElement(\"span\", \"arrowUp\"), arrowDown = createElement(\"span\", \"arrowDown\");\n    if (navigator.userAgent.indexOf(\"MSIE 9.0\") === -1) {\n        numInput.type = \"number\";\n    }\n    else {\n        numInput.type = \"text\";\n        numInput.pattern = \"\\\\d*\";\n    }\n    if (opts !== undefined)\n        for (var key in opts)\n            numInput.setAttribute(key, opts[key]);\n    wrapper.appendChild(numInput);\n    wrapper.appendChild(arrowUp);\n    wrapper.appendChild(arrowDown);\n    return wrapper;\n}\nexport function getEventTarget(event) {\n    try {\n        if (typeof event.composedPath === \"function\") {\n            var path = event.composedPath();\n            return path[0];\n        }\n        return event.target;\n    }\n    catch (error) {\n        return event.target;\n    }\n}\n","import { int, pad } from \"../utils\";\nvar doNothing = function () { return undefined; };\nexport var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? \"shorthand\" : \"longhand\"][monthNumber]; };\nexport var revFormat = {\n    D: doNothing,\n    F: function (dateObj, monthName, locale) {\n        dateObj.setMonth(locale.months.longhand.indexOf(monthName));\n    },\n    G: function (dateObj, hour) {\n        dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n    },\n    H: function (dateObj, hour) {\n        dateObj.setHours(parseFloat(hour));\n    },\n    J: function (dateObj, day) {\n        dateObj.setDate(parseFloat(day));\n    },\n    K: function (dateObj, amPM, locale) {\n        dateObj.setHours((dateObj.getHours() % 12) +\n            12 * int(new RegExp(locale.amPM[1], \"i\").test(amPM)));\n    },\n    M: function (dateObj, shortMonth, locale) {\n        dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));\n    },\n    S: function (dateObj, seconds) {\n        dateObj.setSeconds(parseFloat(seconds));\n    },\n    U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); },\n    W: function (dateObj, weekNum, locale) {\n        var weekNumber = parseInt(weekNum);\n        var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);\n        date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);\n        return date;\n    },\n    Y: function (dateObj, year) {\n        dateObj.setFullYear(parseFloat(year));\n    },\n    Z: function (_, ISODate) { return new Date(ISODate); },\n    d: function (dateObj, day) {\n        dateObj.setDate(parseFloat(day));\n    },\n    h: function (dateObj, hour) {\n        dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n    },\n    i: function (dateObj, minutes) {\n        dateObj.setMinutes(parseFloat(minutes));\n    },\n    j: function (dateObj, day) {\n        dateObj.setDate(parseFloat(day));\n    },\n    l: doNothing,\n    m: function (dateObj, month) {\n        dateObj.setMonth(parseFloat(month) - 1);\n    },\n    n: function (dateObj, month) {\n        dateObj.setMonth(parseFloat(month) - 1);\n    },\n    s: function (dateObj, seconds) {\n        dateObj.setSeconds(parseFloat(seconds));\n    },\n    u: function (_, unixMillSeconds) {\n        return new Date(parseFloat(unixMillSeconds));\n    },\n    w: doNothing,\n    y: function (dateObj, year) {\n        dateObj.setFullYear(2000 + parseFloat(year));\n    },\n};\nexport var tokenRegex = {\n    D: \"\",\n    F: \"\",\n    G: \"(\\\\d\\\\d|\\\\d)\",\n    H: \"(\\\\d\\\\d|\\\\d)\",\n    J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n    K: \"\",\n    M: \"\",\n    S: \"(\\\\d\\\\d|\\\\d)\",\n    U: \"(.+)\",\n    W: \"(\\\\d\\\\d|\\\\d)\",\n    Y: \"(\\\\d{4})\",\n    Z: \"(.+)\",\n    d: \"(\\\\d\\\\d|\\\\d)\",\n    h: \"(\\\\d\\\\d|\\\\d)\",\n    i: \"(\\\\d\\\\d|\\\\d)\",\n    j: \"(\\\\d\\\\d|\\\\d)\",\n    l: \"\",\n    m: \"(\\\\d\\\\d|\\\\d)\",\n    n: \"(\\\\d\\\\d|\\\\d)\",\n    s: \"(\\\\d\\\\d|\\\\d)\",\n    u: \"(.+)\",\n    w: \"(\\\\d\\\\d|\\\\d)\",\n    y: \"(\\\\d{2})\",\n};\nexport var formats = {\n    Z: function (date) { return date.toISOString(); },\n    D: function (date, locale, options) {\n        return locale.weekdays.shorthand[formats.w(date, locale, options)];\n    },\n    F: function (date, locale, options) {\n        return monthToStr(formats.n(date, locale, options) - 1, false, locale);\n    },\n    G: function (date, locale, options) {\n        return pad(formats.h(date, locale, options));\n    },\n    H: function (date) { return pad(date.getHours()); },\n    J: function (date, locale) {\n        return locale.ordinal !== undefined\n            ? date.getDate() + locale.ordinal(date.getDate())\n            : date.getDate();\n    },\n    K: function (date, locale) { return locale.amPM[int(date.getHours() > 11)]; },\n    M: function (date, locale) {\n        return monthToStr(date.getMonth(), true, locale);\n    },\n    S: function (date) { return pad(date.getSeconds()); },\n    U: function (date) { return date.getTime() / 1000; },\n    W: function (date, _, options) {\n        return options.getWeek(date);\n    },\n    Y: function (date) { return pad(date.getFullYear(), 4); },\n    d: function (date) { return pad(date.getDate()); },\n    h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); },\n    i: function (date) { return pad(date.getMinutes()); },\n    j: function (date) { return date.getDate(); },\n    l: function (date, locale) {\n        return locale.weekdays.longhand[date.getDay()];\n    },\n    m: function (date) { return pad(date.getMonth() + 1); },\n    n: function (date) { return date.getMonth() + 1; },\n    s: function (date) { return date.getSeconds(); },\n    u: function (date) { return date.getTime(); },\n    w: function (date) { return date.getDay(); },\n    y: function (date) { return String(date.getFullYear()).substring(2); },\n};\n","import { tokenRegex, revFormat, formats, } from \"./formatting\";\nimport { defaults } from \"../types/options\";\nimport { english } from \"../l10n/default\";\nexport var createDateFormatter = function (_a) {\n    var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c, _d = _a.isMobile, isMobile = _d === void 0 ? false : _d;\n    return function (dateObj, frmt, overrideLocale) {\n        var locale = overrideLocale || l10n;\n        if (config.formatDate !== undefined && !isMobile) {\n            return config.formatDate(dateObj, frmt, locale);\n        }\n        return frmt\n            .split(\"\")\n            .map(function (c, i, arr) {\n            return formats[c] && arr[i - 1] !== \"\\\\\"\n                ? formats[c](dateObj, locale, config)\n                : c !== \"\\\\\"\n                    ? c\n                    : \"\";\n        })\n            .join(\"\");\n    };\n};\nexport var createDateParser = function (_a) {\n    var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;\n    return function (date, givenFormat, timeless, customLocale) {\n        if (date !== 0 && !date)\n            return undefined;\n        var locale = customLocale || l10n;\n        var parsedDate;\n        var dateOrig = date;\n        if (date instanceof Date)\n            parsedDate = new Date(date.getTime());\n        else if (typeof date !== \"string\" &&\n            date.toFixed !== undefined)\n            parsedDate = new Date(date);\n        else if (typeof date === \"string\") {\n            var format = givenFormat || (config || defaults).dateFormat;\n            var datestr = String(date).trim();\n            if (datestr === \"today\") {\n                parsedDate = new Date();\n                timeless = true;\n            }\n            else if (config && config.parseDate) {\n                parsedDate = config.parseDate(date, format);\n            }\n            else if (/Z$/.test(datestr) ||\n                /GMT$/.test(datestr)) {\n                parsedDate = new Date(date);\n            }\n            else {\n                var matched = void 0, ops = [];\n                for (var i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n                    var token = format[i];\n                    var isBackSlash = token === \"\\\\\";\n                    var escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n                    if (tokenRegex[token] && !escaped) {\n                        regexStr += tokenRegex[token];\n                        var match = new RegExp(regexStr).exec(date);\n                        if (match && (matched = true)) {\n                            ops[token !== \"Y\" ? \"push\" : \"unshift\"]({\n                                fn: revFormat[token],\n                                val: match[++matchIndex],\n                            });\n                        }\n                    }\n                    else if (!isBackSlash)\n                        regexStr += \".\";\n                }\n                parsedDate =\n                    !config || !config.noCalendar\n                        ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)\n                        : new Date(new Date().setHours(0, 0, 0, 0));\n                ops.forEach(function (_a) {\n                    var fn = _a.fn, val = _a.val;\n                    return (parsedDate = fn(parsedDate, val, locale) || parsedDate);\n                });\n                parsedDate = matched ? parsedDate : undefined;\n            }\n        }\n        if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {\n            config.errorHandler(new Error(\"Invalid date provided: \" + dateOrig));\n            return undefined;\n        }\n        if (timeless === true)\n            parsedDate.setHours(0, 0, 0, 0);\n        return parsedDate;\n    };\n};\nexport function compareDates(date1, date2, timeless) {\n    if (timeless === void 0) { timeless = true; }\n    if (timeless !== false) {\n        return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -\n            new Date(date2.getTime()).setHours(0, 0, 0, 0));\n    }\n    return date1.getTime() - date2.getTime();\n}\nexport function compareTimes(date1, date2) {\n    return (3600 * (date1.getHours() - date2.getHours()) +\n        60 * (date1.getMinutes() - date2.getMinutes()) +\n        date1.getSeconds() -\n        date2.getSeconds());\n}\nexport var isBetween = function (ts, ts1, ts2) {\n    return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);\n};\nexport var calculateSecondsSinceMidnight = function (hours, minutes, seconds) {\n    return hours * 3600 + minutes * 60 + seconds;\n};\nexport var parseSeconds = function (secondsSinceMidnight) {\n    var hours = Math.floor(secondsSinceMidnight / 3600), minutes = (secondsSinceMidnight - hours * 3600) / 60;\n    return [hours, minutes, secondsSinceMidnight - hours * 3600 - minutes * 60];\n};\nexport var duration = {\n    DAY: 86400000,\n};\nexport function getDefaultHours(config) {\n    var hours = config.defaultHour;\n    var minutes = config.defaultMinute;\n    var seconds = config.defaultSeconds;\n    if (config.minDate !== undefined) {\n        var minHour = config.minDate.getHours();\n        var minMinutes = config.minDate.getMinutes();\n        var minSeconds = config.minDate.getSeconds();\n        if (hours < minHour) {\n            hours = minHour;\n        }\n        if (hours === minHour && minutes < minMinutes) {\n            minutes = minMinutes;\n        }\n        if (hours === minHour && minutes === minMinutes && seconds < minSeconds)\n            seconds = config.minDate.getSeconds();\n    }\n    if (config.maxDate !== undefined) {\n        var maxHr = config.maxDate.getHours();\n        var maxMinutes = config.maxDate.getMinutes();\n        hours = Math.min(hours, maxHr);\n        if (hours === maxHr)\n            minutes = Math.min(maxMinutes, minutes);\n        if (hours === maxHr && minutes === maxMinutes)\n            seconds = config.maxDate.getSeconds();\n    }\n    return { hours: hours, minutes: minutes, seconds: seconds };\n}\n","var __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n            r[k] = a[j];\n    return r;\n};\nimport { defaults as defaultOptions, HOOKS, } from \"./types/options\";\nimport English from \"./l10n/default\";\nimport { arrayify, debounce, int, pad } from \"./utils\";\nimport { clearNode, createElement, createNumberInput, findParent, toggleClass, getEventTarget, } from \"./utils/dom\";\nimport { compareDates, createDateParser, createDateFormatter, duration, isBetween, getDefaultHours, calculateSecondsSinceMidnight, parseSeconds, } from \"./utils/dates\";\nimport { tokenRegex, monthToStr } from \"./utils/formatting\";\nimport \"./utils/polyfills\";\nvar DEBOUNCED_CHANGE_MS = 300;\nfunction FlatpickrInstance(element, instanceConfig) {\n    var self = {\n        config: __assign(__assign({}, defaultOptions), flatpickr.defaultConfig),\n        l10n: English,\n    };\n    self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n    self._handlers = [];\n    self.pluginElements = [];\n    self.loadedPlugins = [];\n    self._bind = bind;\n    self._setHoursFromDate = setHoursFromDate;\n    self._positionCalendar = positionCalendar;\n    self.changeMonth = changeMonth;\n    self.changeYear = changeYear;\n    self.clear = clear;\n    self.close = close;\n    self.onMouseOver = onMouseOver;\n    self._createElement = createElement;\n    self.createDay = createDay;\n    self.destroy = destroy;\n    self.isEnabled = isEnabled;\n    self.jumpToDate = jumpToDate;\n    self.updateValue = updateValue;\n    self.open = open;\n    self.redraw = redraw;\n    self.set = set;\n    self.setDate = setDate;\n    self.toggle = toggle;\n    function setupHelperFunctions() {\n        self.utils = {\n            getDaysInMonth: function (month, yr) {\n                if (month === void 0) { month = self.currentMonth; }\n                if (yr === void 0) { yr = self.currentYear; }\n                if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))\n                    return 29;\n                return self.l10n.daysInMonth[month];\n            },\n        };\n    }\n    function init() {\n        self.element = self.input = element;\n        self.isOpen = false;\n        parseConfig();\n        setupLocale();\n        setupInputs();\n        setupDates();\n        setupHelperFunctions();\n        if (!self.isMobile)\n            build();\n        bindEvents();\n        if (self.selectedDates.length || self.config.noCalendar) {\n            if (self.config.enableTime) {\n                setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj : undefined);\n            }\n            updateValue(false);\n        }\n        setCalendarWidth();\n        var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n        if (!self.isMobile && isSafari) {\n            positionCalendar();\n        }\n        triggerEvent(\"onReady\");\n    }\n    function getClosestActiveElement() {\n        var _a;\n        return (((_a = self.calendarContainer) === null || _a === void 0 ? void 0 : _a.getRootNode())\n            .activeElement || document.activeElement);\n    }\n    function bindToInstance(fn) {\n        return fn.bind(self);\n    }\n    function setCalendarWidth() {\n        var config = self.config;\n        if (config.weekNumbers === false && config.showMonths === 1) {\n            return;\n        }\n        else if (config.noCalendar !== true) {\n            window.requestAnimationFrame(function () {\n                if (self.calendarContainer !== undefined) {\n                    self.calendarContainer.style.visibility = \"hidden\";\n                    self.calendarContainer.style.display = \"block\";\n                }\n                if (self.daysContainer !== undefined) {\n                    var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;\n                    self.daysContainer.style.width = daysWidth + \"px\";\n                    self.calendarContainer.style.width =\n                        daysWidth +\n                            (self.weekWrapper !== undefined\n                                ? self.weekWrapper.offsetWidth\n                                : 0) +\n                            \"px\";\n                    self.calendarContainer.style.removeProperty(\"visibility\");\n                    self.calendarContainer.style.removeProperty(\"display\");\n                }\n            });\n        }\n    }\n    function updateTime(e) {\n        if (self.selectedDates.length === 0) {\n            var defaultDate = self.config.minDate === undefined ||\n                compareDates(new Date(), self.config.minDate) >= 0\n                ? new Date()\n                : new Date(self.config.minDate.getTime());\n            var defaults = getDefaultHours(self.config);\n            defaultDate.setHours(defaults.hours, defaults.minutes, defaults.seconds, defaultDate.getMilliseconds());\n            self.selectedDates = [defaultDate];\n            self.latestSelectedDateObj = defaultDate;\n        }\n        if (e !== undefined && e.type !== \"blur\") {\n            timeWrapper(e);\n        }\n        var prevValue = self._input.value;\n        setHoursFromInputs();\n        updateValue();\n        if (self._input.value !== prevValue) {\n            self._debouncedChange();\n        }\n    }\n    function ampm2military(hour, amPM) {\n        return (hour % 12) + 12 * int(amPM === self.l10n.amPM[1]);\n    }\n    function military2ampm(hour) {\n        switch (hour % 24) {\n            case 0:\n            case 12:\n                return 12;\n            default:\n                return hour % 12;\n        }\n    }\n    function setHoursFromInputs() {\n        if (self.hourElement === undefined || self.minuteElement === undefined)\n            return;\n        var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n            ? (parseInt(self.secondElement.value, 10) || 0) % 60\n            : 0;\n        if (self.amPM !== undefined) {\n            hours = ampm2military(hours, self.amPM.textContent);\n        }\n        var limitMinHours = self.config.minTime !== undefined ||\n            (self.config.minDate &&\n                self.minDateHasTime &&\n                self.latestSelectedDateObj &&\n                compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n                    0);\n        var limitMaxHours = self.config.maxTime !== undefined ||\n            (self.config.maxDate &&\n                self.maxDateHasTime &&\n                self.latestSelectedDateObj &&\n                compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n                    0);\n        if (self.config.maxTime !== undefined &&\n            self.config.minTime !== undefined &&\n            self.config.minTime > self.config.maxTime) {\n            var minBound = calculateSecondsSinceMidnight(self.config.minTime.getHours(), self.config.minTime.getMinutes(), self.config.minTime.getSeconds());\n            var maxBound = calculateSecondsSinceMidnight(self.config.maxTime.getHours(), self.config.maxTime.getMinutes(), self.config.maxTime.getSeconds());\n            var currentTime = calculateSecondsSinceMidnight(hours, minutes, seconds);\n            if (currentTime > maxBound && currentTime < minBound) {\n                var result = parseSeconds(minBound);\n                hours = result[0];\n                minutes = result[1];\n                seconds = result[2];\n            }\n        }\n        else {\n            if (limitMaxHours) {\n                var maxTime = self.config.maxTime !== undefined\n                    ? self.config.maxTime\n                    : self.config.maxDate;\n                hours = Math.min(hours, maxTime.getHours());\n                if (hours === maxTime.getHours())\n                    minutes = Math.min(minutes, maxTime.getMinutes());\n                if (minutes === maxTime.getMinutes())\n                    seconds = Math.min(seconds, maxTime.getSeconds());\n            }\n            if (limitMinHours) {\n                var minTime = self.config.minTime !== undefined\n                    ? self.config.minTime\n                    : self.config.minDate;\n                hours = Math.max(hours, minTime.getHours());\n                if (hours === minTime.getHours() && minutes < minTime.getMinutes())\n                    minutes = minTime.getMinutes();\n                if (minutes === minTime.getMinutes())\n                    seconds = Math.max(seconds, minTime.getSeconds());\n            }\n        }\n        setHours(hours, minutes, seconds);\n    }\n    function setHoursFromDate(dateObj) {\n        var date = dateObj || self.latestSelectedDateObj;\n        if (date && date instanceof Date) {\n            setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n        }\n    }\n    function setHours(hours, minutes, seconds) {\n        if (self.latestSelectedDateObj !== undefined) {\n            self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n        }\n        if (!self.hourElement || !self.minuteElement || self.isMobile)\n            return;\n        self.hourElement.value = pad(!self.config.time_24hr\n            ? ((12 + hours) % 12) + 12 * int(hours % 12 === 0)\n            : hours);\n        self.minuteElement.value = pad(minutes);\n        if (self.amPM !== undefined)\n            self.amPM.textContent = self.l10n.amPM[int(hours >= 12)];\n        if (self.secondElement !== undefined)\n            self.secondElement.value = pad(seconds);\n    }\n    function onYearInput(event) {\n        var eventTarget = getEventTarget(event);\n        var year = parseInt(eventTarget.value) + (event.delta || 0);\n        if (year / 1000 > 1 ||\n            (event.key === \"Enter\" && !/[^\\d]/.test(year.toString()))) {\n            changeYear(year);\n        }\n    }\n    function bind(element, event, handler, options) {\n        if (event instanceof Array)\n            return event.forEach(function (ev) { return bind(element, ev, handler, options); });\n        if (element instanceof Array)\n            return element.forEach(function (el) { return bind(el, event, handler, options); });\n        element.addEventListener(event, handler, options);\n        self._handlers.push({\n            remove: function () { return element.removeEventListener(event, handler, options); },\n        });\n    }\n    function triggerChange() {\n        triggerEvent(\"onChange\");\n    }\n    function bindEvents() {\n        if (self.config.wrap) {\n            [\"open\", \"close\", \"toggle\", \"clear\"].forEach(function (evt) {\n                Array.prototype.forEach.call(self.element.querySelectorAll(\"[data-\" + evt + \"]\"), function (el) {\n                    return bind(el, \"click\", self[evt]);\n                });\n            });\n        }\n        if (self.isMobile) {\n            setupMobile();\n            return;\n        }\n        var debouncedResize = debounce(onResize, 50);\n        self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);\n        if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent))\n            bind(self.daysContainer, \"mouseover\", function (e) {\n                if (self.config.mode === \"range\")\n                    onMouseOver(getEventTarget(e));\n            });\n        bind(self._input, \"keydown\", onKeyDown);\n        if (self.calendarContainer !== undefined) {\n            bind(self.calendarContainer, \"keydown\", onKeyDown);\n        }\n        if (!self.config.inline && !self.config.static)\n            bind(window, \"resize\", debouncedResize);\n        if (window.ontouchstart !== undefined)\n            bind(window.document, \"touchstart\", documentClick);\n        else\n            bind(window.document, \"mousedown\", documentClick);\n        bind(window.document, \"focus\", documentClick, { capture: true });\n        if (self.config.clickOpens === true) {\n            bind(self._input, \"focus\", self.open);\n            bind(self._input, \"click\", self.open);\n        }\n        if (self.daysContainer !== undefined) {\n            bind(self.monthNav, \"click\", onMonthNavClick);\n            bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n            bind(self.daysContainer, \"click\", selectDate);\n        }\n        if (self.timeContainer !== undefined &&\n            self.minuteElement !== undefined &&\n            self.hourElement !== undefined) {\n            var selText = function (e) {\n                return getEventTarget(e).select();\n            };\n            bind(self.timeContainer, [\"increment\"], updateTime);\n            bind(self.timeContainer, \"blur\", updateTime, { capture: true });\n            bind(self.timeContainer, \"click\", timeIncrement);\n            bind([self.hourElement, self.minuteElement], [\"focus\", \"click\"], selText);\n            if (self.secondElement !== undefined)\n                bind(self.secondElement, \"focus\", function () { return self.secondElement && self.secondElement.select(); });\n            if (self.amPM !== undefined) {\n                bind(self.amPM, \"click\", function (e) {\n                    updateTime(e);\n                });\n            }\n        }\n        if (self.config.allowInput) {\n            bind(self._input, \"blur\", onBlur);\n        }\n    }\n    function jumpToDate(jumpDate, triggerChange) {\n        var jumpTo = jumpDate !== undefined\n            ? self.parseDate(jumpDate)\n            : self.latestSelectedDateObj ||\n                (self.config.minDate && self.config.minDate > self.now\n                    ? self.config.minDate\n                    : self.config.maxDate && self.config.maxDate < self.now\n                        ? self.config.maxDate\n                        : self.now);\n        var oldYear = self.currentYear;\n        var oldMonth = self.currentMonth;\n        try {\n            if (jumpTo !== undefined) {\n                self.currentYear = jumpTo.getFullYear();\n                self.currentMonth = jumpTo.getMonth();\n            }\n        }\n        catch (e) {\n            e.message = \"Invalid date supplied: \" + jumpTo;\n            self.config.errorHandler(e);\n        }\n        if (triggerChange && self.currentYear !== oldYear) {\n            triggerEvent(\"onYearChange\");\n            buildMonthSwitch();\n        }\n        if (triggerChange &&\n            (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {\n            triggerEvent(\"onMonthChange\");\n        }\n        self.redraw();\n    }\n    function timeIncrement(e) {\n        var eventTarget = getEventTarget(e);\n        if (~eventTarget.className.indexOf(\"arrow\"))\n            incrementNumInput(e, eventTarget.classList.contains(\"arrowUp\") ? 1 : -1);\n    }\n    function incrementNumInput(e, delta, inputElem) {\n        var target = e && getEventTarget(e);\n        var input = inputElem ||\n            (target && target.parentNode && target.parentNode.firstChild);\n        var event = createEvent(\"increment\");\n        event.delta = delta;\n        input && input.dispatchEvent(event);\n    }\n    function build() {\n        var fragment = window.document.createDocumentFragment();\n        self.calendarContainer = createElement(\"div\", \"flatpickr-calendar\");\n        self.calendarContainer.tabIndex = -1;\n        if (!self.config.noCalendar) {\n            fragment.appendChild(buildMonthNav());\n            self.innerContainer = createElement(\"div\", \"flatpickr-innerContainer\");\n            if (self.config.weekNumbers) {\n                var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers;\n                self.innerContainer.appendChild(weekWrapper);\n                self.weekNumbers = weekNumbers;\n                self.weekWrapper = weekWrapper;\n            }\n            self.rContainer = createElement(\"div\", \"flatpickr-rContainer\");\n            self.rContainer.appendChild(buildWeekdays());\n            if (!self.daysContainer) {\n                self.daysContainer = createElement(\"div\", \"flatpickr-days\");\n                self.daysContainer.tabIndex = -1;\n            }\n            buildDays();\n            self.rContainer.appendChild(self.daysContainer);\n            self.innerContainer.appendChild(self.rContainer);\n            fragment.appendChild(self.innerContainer);\n        }\n        if (self.config.enableTime) {\n            fragment.appendChild(buildTime());\n        }\n        toggleClass(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n        toggleClass(self.calendarContainer, \"animate\", self.config.animate === true);\n        toggleClass(self.calendarContainer, \"multiMonth\", self.config.showMonths > 1);\n        self.calendarContainer.appendChild(fragment);\n        var customAppend = self.config.appendTo !== undefined &&\n            self.config.appendTo.nodeType !== undefined;\n        if (self.config.inline || self.config.static) {\n            self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n            if (self.config.inline) {\n                if (!customAppend && self.element.parentNode)\n                    self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);\n                else if (self.config.appendTo !== undefined)\n                    self.config.appendTo.appendChild(self.calendarContainer);\n            }\n            if (self.config.static) {\n                var wrapper = createElement(\"div\", \"flatpickr-wrapper\");\n                if (self.element.parentNode)\n                    self.element.parentNode.insertBefore(wrapper, self.element);\n                wrapper.appendChild(self.element);\n                if (self.altInput)\n                    wrapper.appendChild(self.altInput);\n                wrapper.appendChild(self.calendarContainer);\n            }\n        }\n        if (!self.config.static && !self.config.inline)\n            (self.config.appendTo !== undefined\n                ? self.config.appendTo\n                : window.document.body).appendChild(self.calendarContainer);\n    }\n    function createDay(className, date, _dayNumber, i) {\n        var dateIsEnabled = isEnabled(date, true), dayElement = createElement(\"span\", className, date.getDate().toString());\n        dayElement.dateObj = date;\n        dayElement.$i = i;\n        dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n        if (className.indexOf(\"hidden\") === -1 &&\n            compareDates(date, self.now) === 0) {\n            self.todayDateElem = dayElement;\n            dayElement.classList.add(\"today\");\n            dayElement.setAttribute(\"aria-current\", \"date\");\n        }\n        if (dateIsEnabled) {\n            dayElement.tabIndex = -1;\n            if (isDateSelected(date)) {\n                dayElement.classList.add(\"selected\");\n                self.selectedDateElem = dayElement;\n                if (self.config.mode === \"range\") {\n                    toggleClass(dayElement, \"startRange\", self.selectedDates[0] &&\n                        compareDates(date, self.selectedDates[0], true) === 0);\n                    toggleClass(dayElement, \"endRange\", self.selectedDates[1] &&\n                        compareDates(date, self.selectedDates[1], true) === 0);\n                    if (className === \"nextMonthDay\")\n                        dayElement.classList.add(\"inRange\");\n                }\n            }\n        }\n        else {\n            dayElement.classList.add(\"flatpickr-disabled\");\n        }\n        if (self.config.mode === \"range\") {\n            if (isDateInRange(date) && !isDateSelected(date))\n                dayElement.classList.add(\"inRange\");\n        }\n        if (self.weekNumbers &&\n            self.config.showMonths === 1 &&\n            className !== \"prevMonthDay\" &&\n            i % 7 === 6) {\n            self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"<span class='flatpickr-day'>\" + self.config.getWeek(date) + \"</span>\");\n        }\n        triggerEvent(\"onDayCreate\", dayElement);\n        return dayElement;\n    }\n    function focusOnDayElem(targetNode) {\n        targetNode.focus();\n        if (self.config.mode === \"range\")\n            onMouseOver(targetNode);\n    }\n    function getFirstAvailableDay(delta) {\n        var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;\n        var endMonth = delta > 0 ? self.config.showMonths : -1;\n        for (var m = startMonth; m != endMonth; m += delta) {\n            var month = self.daysContainer.children[m];\n            var startIndex = delta > 0 ? 0 : month.children.length - 1;\n            var endIndex = delta > 0 ? month.children.length : -1;\n            for (var i = startIndex; i != endIndex; i += delta) {\n                var c = month.children[i];\n                if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj))\n                    return c;\n            }\n        }\n        return undefined;\n    }\n    function getNextAvailableDay(current, delta) {\n        var givenMonth = current.className.indexOf(\"Month\") === -1\n            ? current.dateObj.getMonth()\n            : self.currentMonth;\n        var endMonth = delta > 0 ? self.config.showMonths : -1;\n        var loopDelta = delta > 0 ? 1 : -1;\n        for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {\n            var month = self.daysContainer.children[m];\n            var startIndex = givenMonth - self.currentMonth === m\n                ? current.$i + delta\n                : delta < 0\n                    ? month.children.length - 1\n                    : 0;\n            var numMonthDays = month.children.length;\n            for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {\n                var c = month.children[i];\n                if (c.className.indexOf(\"hidden\") === -1 &&\n                    isEnabled(c.dateObj) &&\n                    Math.abs(current.$i - i) >= Math.abs(delta))\n                    return focusOnDayElem(c);\n            }\n        }\n        self.changeMonth(loopDelta);\n        focusOnDay(getFirstAvailableDay(loopDelta), 0);\n        return undefined;\n    }\n    function focusOnDay(current, offset) {\n        var activeElement = getClosestActiveElement();\n        var dayFocused = isInView(activeElement || document.body);\n        var startElem = current !== undefined\n            ? current\n            : dayFocused\n                ? activeElement\n                : self.selectedDateElem !== undefined && isInView(self.selectedDateElem)\n                    ? self.selectedDateElem\n                    : self.todayDateElem !== undefined && isInView(self.todayDateElem)\n                        ? self.todayDateElem\n                        : getFirstAvailableDay(offset > 0 ? 1 : -1);\n        if (startElem === undefined) {\n            self._input.focus();\n        }\n        else if (!dayFocused) {\n            focusOnDayElem(startElem);\n        }\n        else {\n            getNextAvailableDay(startElem, offset);\n        }\n    }\n    function buildMonthDays(year, month) {\n        var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;\n        var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12, year);\n        var daysInMonth = self.utils.getDaysInMonth(month, year), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? \"prevMonthDay hidden\" : \"prevMonthDay\", nextMonthDayClass = isMultiMonth ? \"nextMonthDay hidden\" : \"nextMonthDay\";\n        var dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0;\n        for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {\n            days.appendChild(createDay(\"flatpickr-day \" + prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));\n        }\n        for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n            days.appendChild(createDay(\"flatpickr-day\", new Date(year, month, dayNumber), dayNumber, dayIndex));\n        }\n        for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth &&\n            (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {\n            days.appendChild(createDay(\"flatpickr-day \" + nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));\n        }\n        var dayContainer = createElement(\"div\", \"dayContainer\");\n        dayContainer.appendChild(days);\n        return dayContainer;\n    }\n    function buildDays() {\n        if (self.daysContainer === undefined) {\n            return;\n        }\n        clearNode(self.daysContainer);\n        if (self.weekNumbers)\n            clearNode(self.weekNumbers);\n        var frag = document.createDocumentFragment();\n        for (var i = 0; i < self.config.showMonths; i++) {\n            var d = new Date(self.currentYear, self.currentMonth, 1);\n            d.setMonth(self.currentMonth + i);\n            frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));\n        }\n        self.daysContainer.appendChild(frag);\n        self.days = self.daysContainer.firstChild;\n        if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n            onMouseOver();\n        }\n    }\n    function buildMonthSwitch() {\n        if (self.config.showMonths > 1 ||\n            self.config.monthSelectorType !== \"dropdown\")\n            return;\n        var shouldBuildMonth = function (month) {\n            if (self.config.minDate !== undefined &&\n                self.currentYear === self.config.minDate.getFullYear() &&\n                month < self.config.minDate.getMonth()) {\n                return false;\n            }\n            return !(self.config.maxDate !== undefined &&\n                self.currentYear === self.config.maxDate.getFullYear() &&\n                month > self.config.maxDate.getMonth());\n        };\n        self.monthsDropdownContainer.tabIndex = -1;\n        self.monthsDropdownContainer.innerHTML = \"\";\n        for (var i = 0; i < 12; i++) {\n            if (!shouldBuildMonth(i))\n                continue;\n            var month = createElement(\"option\", \"flatpickr-monthDropdown-month\");\n            month.value = new Date(self.currentYear, i).getMonth().toString();\n            month.textContent = monthToStr(i, self.config.shorthandCurrentMonth, self.l10n);\n            month.tabIndex = -1;\n            if (self.currentMonth === i) {\n                month.selected = true;\n            }\n            self.monthsDropdownContainer.appendChild(month);\n        }\n    }\n    function buildMonth() {\n        var container = createElement(\"div\", \"flatpickr-month\");\n        var monthNavFragment = window.document.createDocumentFragment();\n        var monthElement;\n        if (self.config.showMonths > 1 ||\n            self.config.monthSelectorType === \"static\") {\n            monthElement = createElement(\"span\", \"cur-month\");\n        }\n        else {\n            self.monthsDropdownContainer = createElement(\"select\", \"flatpickr-monthDropdown-months\");\n            self.monthsDropdownContainer.setAttribute(\"aria-label\", self.l10n.monthAriaLabel);\n            bind(self.monthsDropdownContainer, \"change\", function (e) {\n                var target = getEventTarget(e);\n                var selectedMonth = parseInt(target.value, 10);\n                self.changeMonth(selectedMonth - self.currentMonth);\n                triggerEvent(\"onMonthChange\");\n            });\n            buildMonthSwitch();\n            monthElement = self.monthsDropdownContainer;\n        }\n        var yearInput = createNumberInput(\"cur-year\", { tabindex: \"-1\" });\n        var yearElement = yearInput.getElementsByTagName(\"input\")[0];\n        yearElement.setAttribute(\"aria-label\", self.l10n.yearAriaLabel);\n        if (self.config.minDate) {\n            yearElement.setAttribute(\"min\", self.config.minDate.getFullYear().toString());\n        }\n        if (self.config.maxDate) {\n            yearElement.setAttribute(\"max\", self.config.maxDate.getFullYear().toString());\n            yearElement.disabled =\n                !!self.config.minDate &&\n                    self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n        }\n        var currentMonth = createElement(\"div\", \"flatpickr-current-month\");\n        currentMonth.appendChild(monthElement);\n        currentMonth.appendChild(yearInput);\n        monthNavFragment.appendChild(currentMonth);\n        container.appendChild(monthNavFragment);\n        return {\n            container: container,\n            yearElement: yearElement,\n            monthElement: monthElement,\n        };\n    }\n    function buildMonths() {\n        clearNode(self.monthNav);\n        self.monthNav.appendChild(self.prevMonthNav);\n        if (self.config.showMonths) {\n            self.yearElements = [];\n            self.monthElements = [];\n        }\n        for (var m = self.config.showMonths; m--;) {\n            var month = buildMonth();\n            self.yearElements.push(month.yearElement);\n            self.monthElements.push(month.monthElement);\n            self.monthNav.appendChild(month.container);\n        }\n        self.monthNav.appendChild(self.nextMonthNav);\n    }\n    function buildMonthNav() {\n        self.monthNav = createElement(\"div\", \"flatpickr-months\");\n        self.yearElements = [];\n        self.monthElements = [];\n        self.prevMonthNav = createElement(\"span\", \"flatpickr-prev-month\");\n        self.prevMonthNav.innerHTML = self.config.prevArrow;\n        self.nextMonthNav = createElement(\"span\", \"flatpickr-next-month\");\n        self.nextMonthNav.innerHTML = self.config.nextArrow;\n        buildMonths();\n        Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n            get: function () { return self.__hidePrevMonthArrow; },\n            set: function (bool) {\n                if (self.__hidePrevMonthArrow !== bool) {\n                    toggleClass(self.prevMonthNav, \"flatpickr-disabled\", bool);\n                    self.__hidePrevMonthArrow = bool;\n                }\n            },\n        });\n        Object.defineProperty(self, \"_hideNextMonthArrow\", {\n            get: function () { return self.__hideNextMonthArrow; },\n            set: function (bool) {\n                if (self.__hideNextMonthArrow !== bool) {\n                    toggleClass(self.nextMonthNav, \"flatpickr-disabled\", bool);\n                    self.__hideNextMonthArrow = bool;\n                }\n            },\n        });\n        self.currentYearElement = self.yearElements[0];\n        updateNavigationCurrentMonth();\n        return self.monthNav;\n    }\n    function buildTime() {\n        self.calendarContainer.classList.add(\"hasTime\");\n        if (self.config.noCalendar)\n            self.calendarContainer.classList.add(\"noCalendar\");\n        var defaults = getDefaultHours(self.config);\n        self.timeContainer = createElement(\"div\", \"flatpickr-time\");\n        self.timeContainer.tabIndex = -1;\n        var separator = createElement(\"span\", \"flatpickr-time-separator\", \":\");\n        var hourInput = createNumberInput(\"flatpickr-hour\", {\n            \"aria-label\": self.l10n.hourAriaLabel,\n        });\n        self.hourElement = hourInput.getElementsByTagName(\"input\")[0];\n        var minuteInput = createNumberInput(\"flatpickr-minute\", {\n            \"aria-label\": self.l10n.minuteAriaLabel,\n        });\n        self.minuteElement = minuteInput.getElementsByTagName(\"input\")[0];\n        self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n        self.hourElement.value = pad(self.latestSelectedDateObj\n            ? self.latestSelectedDateObj.getHours()\n            : self.config.time_24hr\n                ? defaults.hours\n                : military2ampm(defaults.hours));\n        self.minuteElement.value = pad(self.latestSelectedDateObj\n            ? self.latestSelectedDateObj.getMinutes()\n            : defaults.minutes);\n        self.hourElement.setAttribute(\"step\", self.config.hourIncrement.toString());\n        self.minuteElement.setAttribute(\"step\", self.config.minuteIncrement.toString());\n        self.hourElement.setAttribute(\"min\", self.config.time_24hr ? \"0\" : \"1\");\n        self.hourElement.setAttribute(\"max\", self.config.time_24hr ? \"23\" : \"12\");\n        self.hourElement.setAttribute(\"maxlength\", \"2\");\n        self.minuteElement.setAttribute(\"min\", \"0\");\n        self.minuteElement.setAttribute(\"max\", \"59\");\n        self.minuteElement.setAttribute(\"maxlength\", \"2\");\n        self.timeContainer.appendChild(hourInput);\n        self.timeContainer.appendChild(separator);\n        self.timeContainer.appendChild(minuteInput);\n        if (self.config.time_24hr)\n            self.timeContainer.classList.add(\"time24hr\");\n        if (self.config.enableSeconds) {\n            self.timeContainer.classList.add(\"hasSeconds\");\n            var secondInput = createNumberInput(\"flatpickr-second\");\n            self.secondElement = secondInput.getElementsByTagName(\"input\")[0];\n            self.secondElement.value = pad(self.latestSelectedDateObj\n                ? self.latestSelectedDateObj.getSeconds()\n                : defaults.seconds);\n            self.secondElement.setAttribute(\"step\", self.minuteElement.getAttribute(\"step\"));\n            self.secondElement.setAttribute(\"min\", \"0\");\n            self.secondElement.setAttribute(\"max\", \"59\");\n            self.secondElement.setAttribute(\"maxlength\", \"2\");\n            self.timeContainer.appendChild(createElement(\"span\", \"flatpickr-time-separator\", \":\"));\n            self.timeContainer.appendChild(secondInput);\n        }\n        if (!self.config.time_24hr) {\n            self.amPM = createElement(\"span\", \"flatpickr-am-pm\", self.l10n.amPM[int((self.latestSelectedDateObj\n                ? self.hourElement.value\n                : self.config.defaultHour) > 11)]);\n            self.amPM.title = self.l10n.toggleTitle;\n            self.amPM.tabIndex = -1;\n            self.timeContainer.appendChild(self.amPM);\n        }\n        return self.timeContainer;\n    }\n    function buildWeekdays() {\n        if (!self.weekdayContainer)\n            self.weekdayContainer = createElement(\"div\", \"flatpickr-weekdays\");\n        else\n            clearNode(self.weekdayContainer);\n        for (var i = self.config.showMonths; i--;) {\n            var container = createElement(\"div\", \"flatpickr-weekdaycontainer\");\n            self.weekdayContainer.appendChild(container);\n        }\n        updateWeekdays();\n        return self.weekdayContainer;\n    }\n    function updateWeekdays() {\n        if (!self.weekdayContainer) {\n            return;\n        }\n        var firstDayOfWeek = self.l10n.firstDayOfWeek;\n        var weekdays = __spreadArrays(self.l10n.weekdays.shorthand);\n        if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n            weekdays = __spreadArrays(weekdays.splice(firstDayOfWeek, weekdays.length), weekdays.splice(0, firstDayOfWeek));\n        }\n        for (var i = self.config.showMonths; i--;) {\n            self.weekdayContainer.children[i].innerHTML = \"\\n      <span class='flatpickr-weekday'>\\n        \" + weekdays.join(\"</span><span class='flatpickr-weekday'>\") + \"\\n      </span>\\n      \";\n        }\n    }\n    function buildWeeks() {\n        self.calendarContainer.classList.add(\"hasWeeks\");\n        var weekWrapper = createElement(\"div\", \"flatpickr-weekwrapper\");\n        weekWrapper.appendChild(createElement(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n        var weekNumbers = createElement(\"div\", \"flatpickr-weeks\");\n        weekWrapper.appendChild(weekNumbers);\n        return {\n            weekWrapper: weekWrapper,\n            weekNumbers: weekNumbers,\n        };\n    }\n    function changeMonth(value, isOffset) {\n        if (isOffset === void 0) { isOffset = true; }\n        var delta = isOffset ? value : value - self.currentMonth;\n        if ((delta < 0 && self._hidePrevMonthArrow === true) ||\n            (delta > 0 && self._hideNextMonthArrow === true))\n            return;\n        self.currentMonth += delta;\n        if (self.currentMonth < 0 || self.currentMonth > 11) {\n            self.currentYear += self.currentMonth > 11 ? 1 : -1;\n            self.currentMonth = (self.currentMonth + 12) % 12;\n            triggerEvent(\"onYearChange\");\n            buildMonthSwitch();\n        }\n        buildDays();\n        triggerEvent(\"onMonthChange\");\n        updateNavigationCurrentMonth();\n    }\n    function clear(triggerChangeEvent, toInitial) {\n        if (triggerChangeEvent === void 0) { triggerChangeEvent = true; }\n        if (toInitial === void 0) { toInitial = true; }\n        self.input.value = \"\";\n        if (self.altInput !== undefined)\n            self.altInput.value = \"\";\n        if (self.mobileInput !== undefined)\n            self.mobileInput.value = \"\";\n        self.selectedDates = [];\n        self.latestSelectedDateObj = undefined;\n        if (toInitial === true) {\n            self.currentYear = self._initialDate.getFullYear();\n            self.currentMonth = self._initialDate.getMonth();\n        }\n        if (self.config.enableTime === true) {\n            var _a = getDefaultHours(self.config), hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds;\n            setHours(hours, minutes, seconds);\n        }\n        self.redraw();\n        if (triggerChangeEvent)\n            triggerEvent(\"onChange\");\n    }\n    function close() {\n        self.isOpen = false;\n        if (!self.isMobile) {\n            if (self.calendarContainer !== undefined) {\n                self.calendarContainer.classList.remove(\"open\");\n            }\n            if (self._input !== undefined) {\n                self._input.classList.remove(\"active\");\n            }\n        }\n        triggerEvent(\"onClose\");\n    }\n    function destroy() {\n        if (self.config !== undefined)\n            triggerEvent(\"onDestroy\");\n        for (var i = self._handlers.length; i--;) {\n            self._handlers[i].remove();\n        }\n        self._handlers = [];\n        if (self.mobileInput) {\n            if (self.mobileInput.parentNode)\n                self.mobileInput.parentNode.removeChild(self.mobileInput);\n            self.mobileInput = undefined;\n        }\n        else if (self.calendarContainer && self.calendarContainer.parentNode) {\n            if (self.config.static && self.calendarContainer.parentNode) {\n                var wrapper = self.calendarContainer.parentNode;\n                wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);\n                if (wrapper.parentNode) {\n                    while (wrapper.firstChild)\n                        wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);\n                    wrapper.parentNode.removeChild(wrapper);\n                }\n            }\n            else\n                self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n        }\n        if (self.altInput) {\n            self.input.type = \"text\";\n            if (self.altInput.parentNode)\n                self.altInput.parentNode.removeChild(self.altInput);\n            delete self.altInput;\n        }\n        if (self.input) {\n            self.input.type = self.input._type;\n            self.input.classList.remove(\"flatpickr-input\");\n            self.input.removeAttribute(\"readonly\");\n        }\n        [\n            \"_showTimeInput\",\n            \"latestSelectedDateObj\",\n            \"_hideNextMonthArrow\",\n            \"_hidePrevMonthArrow\",\n            \"__hideNextMonthArrow\",\n            \"__hidePrevMonthArrow\",\n            \"isMobile\",\n            \"isOpen\",\n            \"selectedDateElem\",\n            \"minDateHasTime\",\n            \"maxDateHasTime\",\n            \"days\",\n            \"daysContainer\",\n            \"_input\",\n            \"_positionElement\",\n            \"innerContainer\",\n            \"rContainer\",\n            \"monthNav\",\n            \"todayDateElem\",\n            \"calendarContainer\",\n            \"weekdayContainer\",\n            \"prevMonthNav\",\n            \"nextMonthNav\",\n            \"monthsDropdownContainer\",\n            \"currentMonthElement\",\n            \"currentYearElement\",\n            \"navigationCurrentMonth\",\n            \"selectedDateElem\",\n            \"config\",\n        ].forEach(function (k) {\n            try {\n                delete self[k];\n            }\n            catch (_) { }\n        });\n    }\n    function isCalendarElem(elem) {\n        return self.calendarContainer.contains(elem);\n    }\n    function documentClick(e) {\n        if (self.isOpen && !self.config.inline) {\n            var eventTarget_1 = getEventTarget(e);\n            var isCalendarElement = isCalendarElem(eventTarget_1);\n            var isInput = eventTarget_1 === self.input ||\n                eventTarget_1 === self.altInput ||\n                self.element.contains(eventTarget_1) ||\n                (e.path &&\n                    e.path.indexOf &&\n                    (~e.path.indexOf(self.input) ||\n                        ~e.path.indexOf(self.altInput)));\n            var lostFocus = !isInput &&\n                !isCalendarElement &&\n                !isCalendarElem(e.relatedTarget);\n            var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {\n                return elem.contains(eventTarget_1);\n            });\n            if (lostFocus && isIgnored) {\n                if (self.config.allowInput) {\n                    self.setDate(self._input.value, false, self.config.altInput\n                        ? self.config.altFormat\n                        : self.config.dateFormat);\n                }\n                if (self.timeContainer !== undefined &&\n                    self.minuteElement !== undefined &&\n                    self.hourElement !== undefined &&\n                    self.input.value !== \"\" &&\n                    self.input.value !== undefined) {\n                    updateTime();\n                }\n                self.close();\n                if (self.config &&\n                    self.config.mode === \"range\" &&\n                    self.selectedDates.length === 1)\n                    self.clear(false);\n            }\n        }\n    }\n    function changeYear(newYear) {\n        if (!newYear ||\n            (self.config.minDate && newYear < self.config.minDate.getFullYear()) ||\n            (self.config.maxDate && newYear > self.config.maxDate.getFullYear()))\n            return;\n        var newYearNum = newYear, isNewYear = self.currentYear !== newYearNum;\n        self.currentYear = newYearNum || self.currentYear;\n        if (self.config.maxDate &&\n            self.currentYear === self.config.maxDate.getFullYear()) {\n            self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n        }\n        else if (self.config.minDate &&\n            self.currentYear === self.config.minDate.getFullYear()) {\n            self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n        }\n        if (isNewYear) {\n            self.redraw();\n            triggerEvent(\"onYearChange\");\n            buildMonthSwitch();\n        }\n    }\n    function isEnabled(date, timeless) {\n        var _a;\n        if (timeless === void 0) { timeless = true; }\n        var dateToCheck = self.parseDate(date, undefined, timeless);\n        if ((self.config.minDate &&\n            dateToCheck &&\n            compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) ||\n            (self.config.maxDate &&\n                dateToCheck &&\n                compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0))\n            return false;\n        if (!self.config.enable && self.config.disable.length === 0)\n            return true;\n        if (dateToCheck === undefined)\n            return false;\n        var bool = !!self.config.enable, array = (_a = self.config.enable) !== null && _a !== void 0 ? _a : self.config.disable;\n        for (var i = 0, d = void 0; i < array.length; i++) {\n            d = array[i];\n            if (typeof d === \"function\" &&\n                d(dateToCheck))\n                return bool;\n            else if (d instanceof Date &&\n                dateToCheck !== undefined &&\n                d.getTime() === dateToCheck.getTime())\n                return bool;\n            else if (typeof d === \"string\") {\n                var parsed = self.parseDate(d, undefined, true);\n                return parsed && parsed.getTime() === dateToCheck.getTime()\n                    ? bool\n                    : !bool;\n            }\n            else if (typeof d === \"object\" &&\n                dateToCheck !== undefined &&\n                d.from &&\n                d.to &&\n                dateToCheck.getTime() >= d.from.getTime() &&\n                dateToCheck.getTime() <= d.to.getTime())\n                return bool;\n        }\n        return !bool;\n    }\n    function isInView(elem) {\n        if (self.daysContainer !== undefined)\n            return (elem.className.indexOf(\"hidden\") === -1 &&\n                elem.className.indexOf(\"flatpickr-disabled\") === -1 &&\n                self.daysContainer.contains(elem));\n        return false;\n    }\n    function onBlur(e) {\n        var isInput = e.target === self._input;\n        var valueChanged = self._input.value.trimEnd() !== getDateStr();\n        if (isInput &&\n            valueChanged &&\n            !(e.relatedTarget && isCalendarElem(e.relatedTarget))) {\n            self.setDate(self._input.value, true, e.target === self.altInput\n                ? self.config.altFormat\n                : self.config.dateFormat);\n        }\n    }\n    function onKeyDown(e) {\n        var eventTarget = getEventTarget(e);\n        var isInput = self.config.wrap\n            ? element.contains(eventTarget)\n            : eventTarget === self._input;\n        var allowInput = self.config.allowInput;\n        var allowKeydown = self.isOpen && (!allowInput || !isInput);\n        var allowInlineKeydown = self.config.inline && isInput && !allowInput;\n        if (e.keyCode === 13 && isInput) {\n            if (allowInput) {\n                self.setDate(self._input.value, true, eventTarget === self.altInput\n                    ? self.config.altFormat\n                    : self.config.dateFormat);\n                self.close();\n                return eventTarget.blur();\n            }\n            else {\n                self.open();\n            }\n        }\n        else if (isCalendarElem(eventTarget) ||\n            allowKeydown ||\n            allowInlineKeydown) {\n            var isTimeObj = !!self.timeContainer &&\n                self.timeContainer.contains(eventTarget);\n            switch (e.keyCode) {\n                case 13:\n                    if (isTimeObj) {\n                        e.preventDefault();\n                        updateTime();\n                        focusAndClose();\n                    }\n                    else\n                        selectDate(e);\n                    break;\n                case 27:\n                    e.preventDefault();\n                    focusAndClose();\n                    break;\n                case 8:\n                case 46:\n                    if (isInput && !self.config.allowInput) {\n                        e.preventDefault();\n                        self.clear();\n                    }\n                    break;\n                case 37:\n                case 39:\n                    if (!isTimeObj && !isInput) {\n                        e.preventDefault();\n                        var activeElement = getClosestActiveElement();\n                        if (self.daysContainer !== undefined &&\n                            (allowInput === false ||\n                                (activeElement && isInView(activeElement)))) {\n                            var delta_1 = e.keyCode === 39 ? 1 : -1;\n                            if (!e.ctrlKey)\n                                focusOnDay(undefined, delta_1);\n                            else {\n                                e.stopPropagation();\n                                changeMonth(delta_1);\n                                focusOnDay(getFirstAvailableDay(1), 0);\n                            }\n                        }\n                    }\n                    else if (self.hourElement)\n                        self.hourElement.focus();\n                    break;\n                case 38:\n                case 40:\n                    e.preventDefault();\n                    var delta = e.keyCode === 40 ? 1 : -1;\n                    if ((self.daysContainer &&\n                        eventTarget.$i !== undefined) ||\n                        eventTarget === self.input ||\n                        eventTarget === self.altInput) {\n                        if (e.ctrlKey) {\n                            e.stopPropagation();\n                            changeYear(self.currentYear - delta);\n                            focusOnDay(getFirstAvailableDay(1), 0);\n                        }\n                        else if (!isTimeObj)\n                            focusOnDay(undefined, delta * 7);\n                    }\n                    else if (eventTarget === self.currentYearElement) {\n                        changeYear(self.currentYear - delta);\n                    }\n                    else if (self.config.enableTime) {\n                        if (!isTimeObj && self.hourElement)\n                            self.hourElement.focus();\n                        updateTime(e);\n                        self._debouncedChange();\n                    }\n                    break;\n                case 9:\n                    if (isTimeObj) {\n                        var elems = [\n                            self.hourElement,\n                            self.minuteElement,\n                            self.secondElement,\n                            self.amPM,\n                        ]\n                            .concat(self.pluginElements)\n                            .filter(function (x) { return x; });\n                        var i = elems.indexOf(eventTarget);\n                        if (i !== -1) {\n                            var target = elems[i + (e.shiftKey ? -1 : 1)];\n                            e.preventDefault();\n                            (target || self._input).focus();\n                        }\n                    }\n                    else if (!self.config.noCalendar &&\n                        self.daysContainer &&\n                        self.daysContainer.contains(eventTarget) &&\n                        e.shiftKey) {\n                        e.preventDefault();\n                        self._input.focus();\n                    }\n                    break;\n                default:\n                    break;\n            }\n        }\n        if (self.amPM !== undefined && eventTarget === self.amPM) {\n            switch (e.key) {\n                case self.l10n.amPM[0].charAt(0):\n                case self.l10n.amPM[0].charAt(0).toLowerCase():\n                    self.amPM.textContent = self.l10n.amPM[0];\n                    setHoursFromInputs();\n                    updateValue();\n                    break;\n                case self.l10n.amPM[1].charAt(0):\n                case self.l10n.amPM[1].charAt(0).toLowerCase():\n                    self.amPM.textContent = self.l10n.amPM[1];\n                    setHoursFromInputs();\n                    updateValue();\n                    break;\n            }\n        }\n        if (isInput || isCalendarElem(eventTarget)) {\n            triggerEvent(\"onKeyDown\", e);\n        }\n    }\n    function onMouseOver(elem, cellClass) {\n        if (cellClass === void 0) { cellClass = \"flatpickr-day\"; }\n        if (self.selectedDates.length !== 1 ||\n            (elem &&\n                (!elem.classList.contains(cellClass) ||\n                    elem.classList.contains(\"flatpickr-disabled\"))))\n            return;\n        var hoverDate = elem\n            ? elem.dateObj.getTime()\n            : self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());\n        var containsDisabled = false;\n        var minRange = 0, maxRange = 0;\n        for (var t = rangeStartDate; t < rangeEndDate; t += duration.DAY) {\n            if (!isEnabled(new Date(t), true)) {\n                containsDisabled =\n                    containsDisabled || (t > rangeStartDate && t < rangeEndDate);\n                if (t < initialDate && (!minRange || t > minRange))\n                    minRange = t;\n                else if (t > initialDate && (!maxRange || t < maxRange))\n                    maxRange = t;\n            }\n        }\n        var hoverableCells = Array.from(self.rContainer.querySelectorAll(\"*:nth-child(-n+\" + self.config.showMonths + \") > .\" + cellClass));\n        hoverableCells.forEach(function (dayElem) {\n            var date = dayElem.dateObj;\n            var timestamp = date.getTime();\n            var outOfRange = (minRange > 0 && timestamp < minRange) ||\n                (maxRange > 0 && timestamp > maxRange);\n            if (outOfRange) {\n                dayElem.classList.add(\"notAllowed\");\n                [\"inRange\", \"startRange\", \"endRange\"].forEach(function (c) {\n                    dayElem.classList.remove(c);\n                });\n                return;\n            }\n            else if (containsDisabled && !outOfRange)\n                return;\n            [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach(function (c) {\n                dayElem.classList.remove(c);\n            });\n            if (elem !== undefined) {\n                elem.classList.add(hoverDate <= self.selectedDates[0].getTime()\n                    ? \"startRange\"\n                    : \"endRange\");\n                if (initialDate < hoverDate && timestamp === initialDate)\n                    dayElem.classList.add(\"startRange\");\n                else if (initialDate > hoverDate && timestamp === initialDate)\n                    dayElem.classList.add(\"endRange\");\n                if (timestamp >= minRange &&\n                    (maxRange === 0 || timestamp <= maxRange) &&\n                    isBetween(timestamp, initialDate, hoverDate))\n                    dayElem.classList.add(\"inRange\");\n            }\n        });\n    }\n    function onResize() {\n        if (self.isOpen && !self.config.static && !self.config.inline)\n            positionCalendar();\n    }\n    function open(e, positionElement) {\n        if (positionElement === void 0) { positionElement = self._positionElement; }\n        if (self.isMobile === true) {\n            if (e) {\n                e.preventDefault();\n                var eventTarget = getEventTarget(e);\n                if (eventTarget) {\n                    eventTarget.blur();\n                }\n            }\n            if (self.mobileInput !== undefined) {\n                self.mobileInput.focus();\n                self.mobileInput.click();\n            }\n            triggerEvent(\"onOpen\");\n            return;\n        }\n        else if (self._input.disabled || self.config.inline) {\n            return;\n        }\n        var wasOpen = self.isOpen;\n        self.isOpen = true;\n        if (!wasOpen) {\n            self.calendarContainer.classList.add(\"open\");\n            self._input.classList.add(\"active\");\n            triggerEvent(\"onOpen\");\n            positionCalendar(positionElement);\n        }\n        if (self.config.enableTime === true && self.config.noCalendar === true) {\n            if (self.config.allowInput === false &&\n                (e === undefined ||\n                    !self.timeContainer.contains(e.relatedTarget))) {\n                setTimeout(function () { return self.hourElement.select(); }, 50);\n            }\n        }\n    }\n    function minMaxDateSetter(type) {\n        return function (date) {\n            var dateObj = (self.config[\"_\" + type + \"Date\"] = self.parseDate(date, self.config.dateFormat));\n            var inverseDateObj = self.config[\"_\" + (type === \"min\" ? \"max\" : \"min\") + \"Date\"];\n            if (dateObj !== undefined) {\n                self[type === \"min\" ? \"minDateHasTime\" : \"maxDateHasTime\"] =\n                    dateObj.getHours() > 0 ||\n                        dateObj.getMinutes() > 0 ||\n                        dateObj.getSeconds() > 0;\n            }\n            if (self.selectedDates) {\n                self.selectedDates = self.selectedDates.filter(function (d) { return isEnabled(d); });\n                if (!self.selectedDates.length && type === \"min\")\n                    setHoursFromDate(dateObj);\n                updateValue();\n            }\n            if (self.daysContainer) {\n                redraw();\n                if (dateObj !== undefined)\n                    self.currentYearElement[type] = dateObj.getFullYear().toString();\n                else\n                    self.currentYearElement.removeAttribute(type);\n                self.currentYearElement.disabled =\n                    !!inverseDateObj &&\n                        dateObj !== undefined &&\n                        inverseDateObj.getFullYear() === dateObj.getFullYear();\n            }\n        };\n    }\n    function parseConfig() {\n        var boolOpts = [\n            \"wrap\",\n            \"weekNumbers\",\n            \"allowInput\",\n            \"allowInvalidPreload\",\n            \"clickOpens\",\n            \"time_24hr\",\n            \"enableTime\",\n            \"noCalendar\",\n            \"altInput\",\n            \"shorthandCurrentMonth\",\n            \"inline\",\n            \"static\",\n            \"enableSeconds\",\n            \"disableMobile\",\n        ];\n        var userConfig = __assign(__assign({}, JSON.parse(JSON.stringify(element.dataset || {}))), instanceConfig);\n        var formats = {};\n        self.config.parseDate = userConfig.parseDate;\n        self.config.formatDate = userConfig.formatDate;\n        Object.defineProperty(self.config, \"enable\", {\n            get: function () { return self.config._enable; },\n            set: function (dates) {\n                self.config._enable = parseDateRules(dates);\n            },\n        });\n        Object.defineProperty(self.config, \"disable\", {\n            get: function () { return self.config._disable; },\n            set: function (dates) {\n                self.config._disable = parseDateRules(dates);\n            },\n        });\n        var timeMode = userConfig.mode === \"time\";\n        if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {\n            var defaultDateFormat = flatpickr.defaultConfig.dateFormat || defaultOptions.dateFormat;\n            formats.dateFormat =\n                userConfig.noCalendar || timeMode\n                    ? \"H:i\" + (userConfig.enableSeconds ? \":S\" : \"\")\n                    : defaultDateFormat + \" H:i\" + (userConfig.enableSeconds ? \":S\" : \"\");\n        }\n        if (userConfig.altInput &&\n            (userConfig.enableTime || timeMode) &&\n            !userConfig.altFormat) {\n            var defaultAltFormat = flatpickr.defaultConfig.altFormat || defaultOptions.altFormat;\n            formats.altFormat =\n                userConfig.noCalendar || timeMode\n                    ? \"h:i\" + (userConfig.enableSeconds ? \":S K\" : \" K\")\n                    : defaultAltFormat + (\" h:i\" + (userConfig.enableSeconds ? \":S\" : \"\") + \" K\");\n        }\n        Object.defineProperty(self.config, \"minDate\", {\n            get: function () { return self.config._minDate; },\n            set: minMaxDateSetter(\"min\"),\n        });\n        Object.defineProperty(self.config, \"maxDate\", {\n            get: function () { return self.config._maxDate; },\n            set: minMaxDateSetter(\"max\"),\n        });\n        var minMaxTimeSetter = function (type) { return function (val) {\n            self.config[type === \"min\" ? \"_minTime\" : \"_maxTime\"] = self.parseDate(val, \"H:i:S\");\n        }; };\n        Object.defineProperty(self.config, \"minTime\", {\n            get: function () { return self.config._minTime; },\n            set: minMaxTimeSetter(\"min\"),\n        });\n        Object.defineProperty(self.config, \"maxTime\", {\n            get: function () { return self.config._maxTime; },\n            set: minMaxTimeSetter(\"max\"),\n        });\n        if (userConfig.mode === \"time\") {\n            self.config.noCalendar = true;\n            self.config.enableTime = true;\n        }\n        Object.assign(self.config, formats, userConfig);\n        for (var i = 0; i < boolOpts.length; i++)\n            self.config[boolOpts[i]] =\n                self.config[boolOpts[i]] === true ||\n                    self.config[boolOpts[i]] === \"true\";\n        HOOKS.filter(function (hook) { return self.config[hook] !== undefined; }).forEach(function (hook) {\n            self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance);\n        });\n        self.isMobile =\n            !self.config.disableMobile &&\n                !self.config.inline &&\n                self.config.mode === \"single\" &&\n                !self.config.disable.length &&\n                !self.config.enable &&\n                !self.config.weekNumbers &&\n                /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n        for (var i = 0; i < self.config.plugins.length; i++) {\n            var pluginConf = self.config.plugins[i](self) || {};\n            for (var key in pluginConf) {\n                if (HOOKS.indexOf(key) > -1) {\n                    self.config[key] = arrayify(pluginConf[key])\n                        .map(bindToInstance)\n                        .concat(self.config[key]);\n                }\n                else if (typeof userConfig[key] === \"undefined\")\n                    self.config[key] = pluginConf[key];\n            }\n        }\n        if (!userConfig.altInputClass) {\n            self.config.altInputClass =\n                getInputElem().className + \" \" + self.config.altInputClass;\n        }\n        triggerEvent(\"onParseConfig\");\n    }\n    function getInputElem() {\n        return self.config.wrap\n            ? element.querySelector(\"[data-input]\")\n            : element;\n    }\n    function setupLocale() {\n        if (typeof self.config.locale !== \"object\" &&\n            typeof flatpickr.l10ns[self.config.locale] === \"undefined\")\n            self.config.errorHandler(new Error(\"flatpickr: invalid locale \" + self.config.locale));\n        self.l10n = __assign(__assign({}, flatpickr.l10ns.default), (typeof self.config.locale === \"object\"\n            ? self.config.locale\n            : self.config.locale !== \"default\"\n                ? flatpickr.l10ns[self.config.locale]\n                : undefined));\n        tokenRegex.D = \"(\" + self.l10n.weekdays.shorthand.join(\"|\") + \")\";\n        tokenRegex.l = \"(\" + self.l10n.weekdays.longhand.join(\"|\") + \")\";\n        tokenRegex.M = \"(\" + self.l10n.months.shorthand.join(\"|\") + \")\";\n        tokenRegex.F = \"(\" + self.l10n.months.longhand.join(\"|\") + \")\";\n        tokenRegex.K = \"(\" + self.l10n.amPM[0] + \"|\" + self.l10n.amPM[1] + \"|\" + self.l10n.amPM[0].toLowerCase() + \"|\" + self.l10n.amPM[1].toLowerCase() + \")\";\n        var userConfig = __assign(__assign({}, instanceConfig), JSON.parse(JSON.stringify(element.dataset || {})));\n        if (userConfig.time_24hr === undefined &&\n            flatpickr.defaultConfig.time_24hr === undefined) {\n            self.config.time_24hr = self.l10n.time_24hr;\n        }\n        self.formatDate = createDateFormatter(self);\n        self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n    }\n    function positionCalendar(customPositionElement) {\n        if (typeof self.config.position === \"function\") {\n            return void self.config.position(self, customPositionElement);\n        }\n        if (self.calendarContainer === undefined)\n            return;\n        triggerEvent(\"onPreCalendarPosition\");\n        var positionElement = customPositionElement || self._positionElement;\n        var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, (function (acc, child) { return acc + child.offsetHeight; }), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(\" \"), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === \"above\" ||\n            (configPosVertical !== \"below\" &&\n                distanceFromBottom < calendarHeight &&\n                inputBounds.top > calendarHeight);\n        var top = window.pageYOffset +\n            inputBounds.top +\n            (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n        toggleClass(self.calendarContainer, \"arrowTop\", !showOnTop);\n        toggleClass(self.calendarContainer, \"arrowBottom\", showOnTop);\n        if (self.config.inline)\n            return;\n        var left = window.pageXOffset + inputBounds.left;\n        var isCenter = false;\n        var isRight = false;\n        if (configPosHorizontal === \"center\") {\n            left -= (calendarWidth - inputBounds.width) / 2;\n            isCenter = true;\n        }\n        else if (configPosHorizontal === \"right\") {\n            left -= calendarWidth - inputBounds.width;\n            isRight = true;\n        }\n        toggleClass(self.calendarContainer, \"arrowLeft\", !isCenter && !isRight);\n        toggleClass(self.calendarContainer, \"arrowCenter\", isCenter);\n        toggleClass(self.calendarContainer, \"arrowRight\", isRight);\n        var right = window.document.body.offsetWidth -\n            (window.pageXOffset + inputBounds.right);\n        var rightMost = left + calendarWidth > window.document.body.offsetWidth;\n        var centerMost = right + calendarWidth > window.document.body.offsetWidth;\n        toggleClass(self.calendarContainer, \"rightMost\", rightMost);\n        if (self.config.static)\n            return;\n        self.calendarContainer.style.top = top + \"px\";\n        if (!rightMost) {\n            self.calendarContainer.style.left = left + \"px\";\n            self.calendarContainer.style.right = \"auto\";\n        }\n        else if (!centerMost) {\n            self.calendarContainer.style.left = \"auto\";\n            self.calendarContainer.style.right = right + \"px\";\n        }\n        else {\n            var doc = getDocumentStyleSheet();\n            if (doc === undefined)\n                return;\n            var bodyWidth = window.document.body.offsetWidth;\n            var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n            var centerBefore = \".flatpickr-calendar.centerMost:before\";\n            var centerAfter = \".flatpickr-calendar.centerMost:after\";\n            var centerIndex = doc.cssRules.length;\n            var centerStyle = \"{left:\" + inputBounds.left + \"px;right:auto;}\";\n            toggleClass(self.calendarContainer, \"rightMost\", false);\n            toggleClass(self.calendarContainer, \"centerMost\", true);\n            doc.insertRule(centerBefore + \",\" + centerAfter + centerStyle, centerIndex);\n            self.calendarContainer.style.left = centerLeft + \"px\";\n            self.calendarContainer.style.right = \"auto\";\n        }\n    }\n    function getDocumentStyleSheet() {\n        var editableSheet = null;\n        for (var i = 0; i < document.styleSheets.length; i++) {\n            var sheet = document.styleSheets[i];\n            if (!sheet.cssRules)\n                continue;\n            try {\n                sheet.cssRules;\n            }\n            catch (err) {\n                continue;\n            }\n            editableSheet = sheet;\n            break;\n        }\n        return editableSheet != null ? editableSheet : createStyleSheet();\n    }\n    function createStyleSheet() {\n        var style = document.createElement(\"style\");\n        document.head.appendChild(style);\n        return style.sheet;\n    }\n    function redraw() {\n        if (self.config.noCalendar || self.isMobile)\n            return;\n        buildMonthSwitch();\n        updateNavigationCurrentMonth();\n        buildDays();\n    }\n    function focusAndClose() {\n        self._input.focus();\n        if (window.navigator.userAgent.indexOf(\"MSIE\") !== -1 ||\n            navigator.msMaxTouchPoints !== undefined) {\n            setTimeout(self.close, 0);\n        }\n        else {\n            self.close();\n        }\n    }\n    function selectDate(e) {\n        e.preventDefault();\n        e.stopPropagation();\n        var isSelectable = function (day) {\n            return day.classList &&\n                day.classList.contains(\"flatpickr-day\") &&\n                !day.classList.contains(\"flatpickr-disabled\") &&\n                !day.classList.contains(\"notAllowed\");\n        };\n        var t = findParent(getEventTarget(e), isSelectable);\n        if (t === undefined)\n            return;\n        var target = t;\n        var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));\n        var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth ||\n            selectedDate.getMonth() >\n                self.currentMonth + self.config.showMonths - 1) &&\n            self.config.mode !== \"range\";\n        self.selectedDateElem = target;\n        if (self.config.mode === \"single\")\n            self.selectedDates = [selectedDate];\n        else if (self.config.mode === \"multiple\") {\n            var selectedIndex = isDateSelected(selectedDate);\n            if (selectedIndex)\n                self.selectedDates.splice(parseInt(selectedIndex), 1);\n            else\n                self.selectedDates.push(selectedDate);\n        }\n        else if (self.config.mode === \"range\") {\n            if (self.selectedDates.length === 2) {\n                self.clear(false, false);\n            }\n            self.latestSelectedDateObj = selectedDate;\n            self.selectedDates.push(selectedDate);\n            if (compareDates(selectedDate, self.selectedDates[0], true) !== 0)\n                self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n        }\n        setHoursFromInputs();\n        if (shouldChangeMonth) {\n            var isNewYear = self.currentYear !== selectedDate.getFullYear();\n            self.currentYear = selectedDate.getFullYear();\n            self.currentMonth = selectedDate.getMonth();\n            if (isNewYear) {\n                triggerEvent(\"onYearChange\");\n                buildMonthSwitch();\n            }\n            triggerEvent(\"onMonthChange\");\n        }\n        updateNavigationCurrentMonth();\n        buildDays();\n        updateValue();\n        if (!shouldChangeMonth &&\n            self.config.mode !== \"range\" &&\n            self.config.showMonths === 1)\n            focusOnDayElem(target);\n        else if (self.selectedDateElem !== undefined &&\n            self.hourElement === undefined) {\n            self.selectedDateElem && self.selectedDateElem.focus();\n        }\n        if (self.hourElement !== undefined)\n            self.hourElement !== undefined && self.hourElement.focus();\n        if (self.config.closeOnSelect) {\n            var single = self.config.mode === \"single\" && !self.config.enableTime;\n            var range = self.config.mode === \"range\" &&\n                self.selectedDates.length === 2 &&\n                !self.config.enableTime;\n            if (single || range) {\n                focusAndClose();\n            }\n        }\n        triggerChange();\n    }\n    var CALLBACKS = {\n        locale: [setupLocale, updateWeekdays],\n        showMonths: [buildMonths, setCalendarWidth, buildWeekdays],\n        minDate: [jumpToDate],\n        maxDate: [jumpToDate],\n        positionElement: [updatePositionElement],\n        clickOpens: [\n            function () {\n                if (self.config.clickOpens === true) {\n                    bind(self._input, \"focus\", self.open);\n                    bind(self._input, \"click\", self.open);\n                }\n                else {\n                    self._input.removeEventListener(\"focus\", self.open);\n                    self._input.removeEventListener(\"click\", self.open);\n                }\n            },\n        ],\n    };\n    function set(option, value) {\n        if (option !== null && typeof option === \"object\") {\n            Object.assign(self.config, option);\n            for (var key in option) {\n                if (CALLBACKS[key] !== undefined)\n                    CALLBACKS[key].forEach(function (x) { return x(); });\n            }\n        }\n        else {\n            self.config[option] = value;\n            if (CALLBACKS[option] !== undefined)\n                CALLBACKS[option].forEach(function (x) { return x(); });\n            else if (HOOKS.indexOf(option) > -1)\n                self.config[option] = arrayify(value);\n        }\n        self.redraw();\n        updateValue(true);\n    }\n    function setSelectedDate(inputDate, format) {\n        var dates = [];\n        if (inputDate instanceof Array)\n            dates = inputDate.map(function (d) { return self.parseDate(d, format); });\n        else if (inputDate instanceof Date || typeof inputDate === \"number\")\n            dates = [self.parseDate(inputDate, format)];\n        else if (typeof inputDate === \"string\") {\n            switch (self.config.mode) {\n                case \"single\":\n                case \"time\":\n                    dates = [self.parseDate(inputDate, format)];\n                    break;\n                case \"multiple\":\n                    dates = inputDate\n                        .split(self.config.conjunction)\n                        .map(function (date) { return self.parseDate(date, format); });\n                    break;\n                case \"range\":\n                    dates = inputDate\n                        .split(self.l10n.rangeSeparator)\n                        .map(function (date) { return self.parseDate(date, format); });\n                    break;\n                default:\n                    break;\n            }\n        }\n        else\n            self.config.errorHandler(new Error(\"Invalid date supplied: \" + JSON.stringify(inputDate)));\n        self.selectedDates = (self.config.allowInvalidPreload\n            ? dates\n            : dates.filter(function (d) { return d instanceof Date && isEnabled(d, false); }));\n        if (self.config.mode === \"range\")\n            self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n    }\n    function setDate(date, triggerChange, format) {\n        if (triggerChange === void 0) { triggerChange = false; }\n        if (format === void 0) { format = self.config.dateFormat; }\n        if ((date !== 0 && !date) || (date instanceof Array && date.length === 0))\n            return self.clear(triggerChange);\n        setSelectedDate(date, format);\n        self.latestSelectedDateObj =\n            self.selectedDates[self.selectedDates.length - 1];\n        self.redraw();\n        jumpToDate(undefined, triggerChange);\n        setHoursFromDate();\n        if (self.selectedDates.length === 0) {\n            self.clear(false);\n        }\n        updateValue(triggerChange);\n        if (triggerChange)\n            triggerEvent(\"onChange\");\n    }\n    function parseDateRules(arr) {\n        return arr\n            .slice()\n            .map(function (rule) {\n            if (typeof rule === \"string\" ||\n                typeof rule === \"number\" ||\n                rule instanceof Date) {\n                return self.parseDate(rule, undefined, true);\n            }\n            else if (rule &&\n                typeof rule === \"object\" &&\n                rule.from &&\n                rule.to)\n                return {\n                    from: self.parseDate(rule.from, undefined),\n                    to: self.parseDate(rule.to, undefined),\n                };\n            return rule;\n        })\n            .filter(function (x) { return x; });\n    }\n    function setupDates() {\n        self.selectedDates = [];\n        self.now = self.parseDate(self.config.now) || new Date();\n        var preloadedDate = self.config.defaultDate ||\n            ((self.input.nodeName === \"INPUT\" ||\n                self.input.nodeName === \"TEXTAREA\") &&\n                self.input.placeholder &&\n                self.input.value === self.input.placeholder\n                ? null\n                : self.input.value);\n        if (preloadedDate)\n            setSelectedDate(preloadedDate, self.config.dateFormat);\n        self._initialDate =\n            self.selectedDates.length > 0\n                ? self.selectedDates[0]\n                : self.config.minDate &&\n                    self.config.minDate.getTime() > self.now.getTime()\n                    ? self.config.minDate\n                    : self.config.maxDate &&\n                        self.config.maxDate.getTime() < self.now.getTime()\n                        ? self.config.maxDate\n                        : self.now;\n        self.currentYear = self._initialDate.getFullYear();\n        self.currentMonth = self._initialDate.getMonth();\n        if (self.selectedDates.length > 0)\n            self.latestSelectedDateObj = self.selectedDates[0];\n        if (self.config.minTime !== undefined)\n            self.config.minTime = self.parseDate(self.config.minTime, \"H:i\");\n        if (self.config.maxTime !== undefined)\n            self.config.maxTime = self.parseDate(self.config.maxTime, \"H:i\");\n        self.minDateHasTime =\n            !!self.config.minDate &&\n                (self.config.minDate.getHours() > 0 ||\n                    self.config.minDate.getMinutes() > 0 ||\n                    self.config.minDate.getSeconds() > 0);\n        self.maxDateHasTime =\n            !!self.config.maxDate &&\n                (self.config.maxDate.getHours() > 0 ||\n                    self.config.maxDate.getMinutes() > 0 ||\n                    self.config.maxDate.getSeconds() > 0);\n    }\n    function setupInputs() {\n        self.input = getInputElem();\n        if (!self.input) {\n            self.config.errorHandler(new Error(\"Invalid input element specified\"));\n            return;\n        }\n        self.input._type = self.input.type;\n        self.input.type = \"text\";\n        self.input.classList.add(\"flatpickr-input\");\n        self._input = self.input;\n        if (self.config.altInput) {\n            self.altInput = createElement(self.input.nodeName, self.config.altInputClass);\n            self._input = self.altInput;\n            self.altInput.placeholder = self.input.placeholder;\n            self.altInput.disabled = self.input.disabled;\n            self.altInput.required = self.input.required;\n            self.altInput.tabIndex = self.input.tabIndex;\n            self.altInput.type = \"text\";\n            self.input.setAttribute(\"type\", \"hidden\");\n            if (!self.config.static && self.input.parentNode)\n                self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n        }\n        if (!self.config.allowInput)\n            self._input.setAttribute(\"readonly\", \"readonly\");\n        updatePositionElement();\n    }\n    function updatePositionElement() {\n        self._positionElement = self.config.positionElement || self._input;\n    }\n    function setupMobile() {\n        var inputType = self.config.enableTime\n            ? self.config.noCalendar\n                ? \"time\"\n                : \"datetime-local\"\n            : \"date\";\n        self.mobileInput = createElement(\"input\", self.input.className + \" flatpickr-mobile\");\n        self.mobileInput.tabIndex = 1;\n        self.mobileInput.type = inputType;\n        self.mobileInput.disabled = self.input.disabled;\n        self.mobileInput.required = self.input.required;\n        self.mobileInput.placeholder = self.input.placeholder;\n        self.mobileFormatStr =\n            inputType === \"datetime-local\"\n                ? \"Y-m-d\\\\TH:i:S\"\n                : inputType === \"date\"\n                    ? \"Y-m-d\"\n                    : \"H:i:S\";\n        if (self.selectedDates.length > 0) {\n            self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n        }\n        if (self.config.minDate)\n            self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n        if (self.config.maxDate)\n            self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n        if (self.input.getAttribute(\"step\"))\n            self.mobileInput.step = String(self.input.getAttribute(\"step\"));\n        self.input.type = \"hidden\";\n        if (self.altInput !== undefined)\n            self.altInput.type = \"hidden\";\n        try {\n            if (self.input.parentNode)\n                self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n        }\n        catch (_a) { }\n        bind(self.mobileInput, \"change\", function (e) {\n            self.setDate(getEventTarget(e).value, false, self.mobileFormatStr);\n            triggerEvent(\"onChange\");\n            triggerEvent(\"onClose\");\n        });\n    }\n    function toggle(e) {\n        if (self.isOpen === true)\n            return self.close();\n        self.open(e);\n    }\n    function triggerEvent(event, data) {\n        if (self.config === undefined)\n            return;\n        var hooks = self.config[event];\n        if (hooks !== undefined && hooks.length > 0) {\n            for (var i = 0; hooks[i] && i < hooks.length; i++)\n                hooks[i](self.selectedDates, self.input.value, self, data);\n        }\n        if (event === \"onChange\") {\n            self.input.dispatchEvent(createEvent(\"change\"));\n            self.input.dispatchEvent(createEvent(\"input\"));\n        }\n    }\n    function createEvent(name) {\n        var e = document.createEvent(\"Event\");\n        e.initEvent(name, true, true);\n        return e;\n    }\n    function isDateSelected(date) {\n        for (var i = 0; i < self.selectedDates.length; i++) {\n            var selectedDate = self.selectedDates[i];\n            if (selectedDate instanceof Date &&\n                compareDates(selectedDate, date) === 0)\n                return \"\" + i;\n        }\n        return false;\n    }\n    function isDateInRange(date) {\n        if (self.config.mode !== \"range\" || self.selectedDates.length < 2)\n            return false;\n        return (compareDates(date, self.selectedDates[0]) >= 0 &&\n            compareDates(date, self.selectedDates[1]) <= 0);\n    }\n    function updateNavigationCurrentMonth() {\n        if (self.config.noCalendar || self.isMobile || !self.monthNav)\n            return;\n        self.yearElements.forEach(function (yearElement, i) {\n            var d = new Date(self.currentYear, self.currentMonth, 1);\n            d.setMonth(self.currentMonth + i);\n            if (self.config.showMonths > 1 ||\n                self.config.monthSelectorType === \"static\") {\n                self.monthElements[i].textContent =\n                    monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + \" \";\n            }\n            else {\n                self.monthsDropdownContainer.value = d.getMonth().toString();\n            }\n            yearElement.value = d.getFullYear().toString();\n        });\n        self._hidePrevMonthArrow =\n            self.config.minDate !== undefined &&\n                (self.currentYear === self.config.minDate.getFullYear()\n                    ? self.currentMonth <= self.config.minDate.getMonth()\n                    : self.currentYear < self.config.minDate.getFullYear());\n        self._hideNextMonthArrow =\n            self.config.maxDate !== undefined &&\n                (self.currentYear === self.config.maxDate.getFullYear()\n                    ? self.currentMonth + 1 > self.config.maxDate.getMonth()\n                    : self.currentYear > self.config.maxDate.getFullYear());\n    }\n    function getDateStr(specificFormat) {\n        var format = specificFormat ||\n            (self.config.altInput ? self.config.altFormat : self.config.dateFormat);\n        return self.selectedDates\n            .map(function (dObj) { return self.formatDate(dObj, format); })\n            .filter(function (d, i, arr) {\n            return self.config.mode !== \"range\" ||\n                self.config.enableTime ||\n                arr.indexOf(d) === i;\n        })\n            .join(self.config.mode !== \"range\"\n            ? self.config.conjunction\n            : self.l10n.rangeSeparator);\n    }\n    function updateValue(triggerChange) {\n        if (triggerChange === void 0) { triggerChange = true; }\n        if (self.mobileInput !== undefined && self.mobileFormatStr) {\n            self.mobileInput.value =\n                self.latestSelectedDateObj !== undefined\n                    ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)\n                    : \"\";\n        }\n        self.input.value = getDateStr(self.config.dateFormat);\n        if (self.altInput !== undefined) {\n            self.altInput.value = getDateStr(self.config.altFormat);\n        }\n        if (triggerChange !== false)\n            triggerEvent(\"onValueUpdate\");\n    }\n    function onMonthNavClick(e) {\n        var eventTarget = getEventTarget(e);\n        var isPrevMonth = self.prevMonthNav.contains(eventTarget);\n        var isNextMonth = self.nextMonthNav.contains(eventTarget);\n        if (isPrevMonth || isNextMonth) {\n            changeMonth(isPrevMonth ? -1 : 1);\n        }\n        else if (self.yearElements.indexOf(eventTarget) >= 0) {\n            eventTarget.select();\n        }\n        else if (eventTarget.classList.contains(\"arrowUp\")) {\n            self.changeYear(self.currentYear + 1);\n        }\n        else if (eventTarget.classList.contains(\"arrowDown\")) {\n            self.changeYear(self.currentYear - 1);\n        }\n    }\n    function timeWrapper(e) {\n        e.preventDefault();\n        var isKeyDown = e.type === \"keydown\", eventTarget = getEventTarget(e), input = eventTarget;\n        if (self.amPM !== undefined && eventTarget === self.amPM) {\n            self.amPM.textContent =\n                self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n        }\n        var min = parseFloat(input.getAttribute(\"min\")), max = parseFloat(input.getAttribute(\"max\")), step = parseFloat(input.getAttribute(\"step\")), curValue = parseInt(input.value, 10), delta = e.delta ||\n            (isKeyDown ? (e.which === 38 ? 1 : -1) : 0);\n        var newValue = curValue + step * delta;\n        if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n            var isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement;\n            if (newValue < min) {\n                newValue =\n                    max +\n                        newValue +\n                        int(!isHourElem) +\n                        (int(isHourElem) && int(!self.amPM));\n                if (isMinuteElem)\n                    incrementNumInput(undefined, -1, self.hourElement);\n            }\n            else if (newValue > max) {\n                newValue =\n                    input === self.hourElement ? newValue - max - int(!self.amPM) : min;\n                if (isMinuteElem)\n                    incrementNumInput(undefined, 1, self.hourElement);\n            }\n            if (self.amPM &&\n                isHourElem &&\n                (step === 1\n                    ? newValue + curValue === 23\n                    : Math.abs(newValue - curValue) > step)) {\n                self.amPM.textContent =\n                    self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n            }\n            input.value = pad(newValue);\n        }\n    }\n    init();\n    return self;\n}\nfunction _flatpickr(nodeList, config) {\n    var nodes = Array.prototype.slice\n        .call(nodeList)\n        .filter(function (x) { return x instanceof HTMLElement; });\n    var instances = [];\n    for (var i = 0; i < nodes.length; i++) {\n        var node = nodes[i];\n        try {\n            if (node.getAttribute(\"data-fp-omit\") !== null)\n                continue;\n            if (node._flatpickr !== undefined) {\n                node._flatpickr.destroy();\n                node._flatpickr = undefined;\n            }\n            node._flatpickr = FlatpickrInstance(node, config || {});\n            instances.push(node._flatpickr);\n        }\n        catch (e) {\n            console.error(e);\n        }\n    }\n    return instances.length === 1 ? instances[0] : instances;\n}\nif (typeof HTMLElement !== \"undefined\" &&\n    typeof HTMLCollection !== \"undefined\" &&\n    typeof NodeList !== \"undefined\") {\n    HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n        return _flatpickr(this, config);\n    };\n    HTMLElement.prototype.flatpickr = function (config) {\n        return _flatpickr([this], config);\n    };\n}\nvar flatpickr = function (selector, config) {\n    if (typeof selector === \"string\") {\n        return _flatpickr(window.document.querySelectorAll(selector), config);\n    }\n    else if (selector instanceof Node) {\n        return _flatpickr([selector], config);\n    }\n    else {\n        return _flatpickr(selector, config);\n    }\n};\nflatpickr.defaultConfig = {};\nflatpickr.l10ns = {\n    en: __assign({}, English),\n    default: __assign({}, English),\n};\nflatpickr.localize = function (l10n) {\n    flatpickr.l10ns.default = __assign(__assign({}, flatpickr.l10ns.default), l10n);\n};\nflatpickr.setDefaults = function (config) {\n    flatpickr.defaultConfig = __assign(__assign({}, flatpickr.defaultConfig), config);\n};\nflatpickr.parseDate = createDateParser({});\nflatpickr.formatDate = createDateFormatter({});\nflatpickr.compareDates = compareDates;\nif (typeof jQuery !== \"undefined\" && typeof jQuery.fn !== \"undefined\") {\n    jQuery.fn.flatpickr = function (config) {\n        return _flatpickr(this, config);\n    };\n}\nDate.prototype.fp_incr = function (days) {\n    return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === \"string\" ? parseInt(days, 10) : days));\n};\nif (typeof window !== \"undefined\") {\n    window.flatpickr = flatpickr;\n}\nexport default flatpickr;\n","/** @documenter yuidoc */\n\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { assert } from '@ember/debug';\nimport { scheduleOnce } from '@ember/runloop';\nimport { waitForPromise } from '@ember/test-waiters';\nimport type { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';\nimport type { BaseOptions as FlatpickrOptions } from 'flatpickr/dist/types/options';\nimport flatpickr from 'flatpickr';\nimport { getOwner } from '@ember/owner';\n\ninterface EmberFlatpickrArgs extends FlatpickrOptions {\n  date: FlatpickrOptions['defaultDate'];\n  disabled: boolean;\n}\n\ninterface EmberFlatpickrSignature {\n  Element: HTMLInputElement;\n  Args: EmberFlatpickrArgs;\n  Blocks: { default: [] };\n}\n\ntype FastbootService = {\n  isFastBoot: boolean;\n};\n\n/**\n * Ember component that wraps the lightweight [`flatpickr`](https://flatpickr.js.org) datetime\n * chooser.\n *\n * The `EmberFlatpickr` component requires that you pass in at the very least a `date` property\n * and an `onChange` callback.\n *\n * ```handlebars\n *  <EmberFlatpickr @date={{model.someDate}} @onChange={{this.onChange}} />\n * ```\n *\n * The `EmberFlatpickr` component internally makes use of `...attributes`. This means that any\n * native input attributes that you pass in should be passed in without the `@` symbol.\n * For example\n *\n * ```handlebars\n *  <EmberFlatpickr\n *    aria-activedescendent=\"aria-activedescendent\"\n *    aria-autocomplete=\"aria-autocomplete\"\n *    aria-describedby=\"described by\"\n *    placeholder=\"Pick a date\"\n *    @date={{model.someDate}}\n *    @onChange={{this.onChange}} />\n * ```\n *\n * @class EmberFlatpickr\n * @element EmberFlatpickr\n * @public\n * @uses Flatpickr\n */\nexport default class EmberFlatpickr extends Component<EmberFlatpickrSignature> {\n  flatpickrRef?: FlatpickrInstance;\n\n  /**\n   * The date(s) that will be used to initialize the flatpickr.  When present, the date(s) will\n   * be formatted accordingly.\n   *\n   * Supply one of the following:\n   *  * A single dateObject\n   *  * A single string containing a date formatted accordingly to dateFormat\n   *  * An array of dateObject\n   *  * An array of string containing dates formatted accordingly to dateFormat\n   *\n   * @argument date\n   * @type {Array<Date>|Array<String>|Date|String}\n   */\n\n  /**\n   * A string of characters which are used to define how the date will be displayed in the input box.\n   *\n   * [The supported characters are defined here.](https://flatpickr.js.org/formatting/)\n   *\n   * @argument dateFormat\n   * @type {String}\n   */\n\n  @action\n  onInsert(element: HTMLInputElement): void {\n    this.setupFlatpickr(element);\n  }\n\n  @action\n  onWillDestroy(): void {\n    this.flatpickrRef?.destroy();\n  }\n\n  setupFlatpickr(element: HTMLInputElement): void {\n    const { date, onChange, wrap } = this.args;\n\n    // Require that users pass a date\n    assert(\n      '<EmberFlatpickr> requires a `date` to be passed as the value for flatpickr.',\n      date !== undefined,\n    );\n\n    // Require that users pass an onChange\n    assert(\n      '<EmberFlatpickr> requires an `onChange` action or null for no action.',\n      onChange !== undefined,\n    );\n\n    // Wrap is not supported\n    assert(\n      '<EmberFlatpickr> does not support the wrap option. Please see documentation for an alternative.',\n      wrap !== true,\n    );\n\n    // Pass all values and setup flatpickr\n    scheduleOnce('afterRender', this, this._setFlatpickrOptions, element);\n  }\n\n  async _setFlatpickrOptions(element: HTMLInputElement): Promise<void> {\n    const fastboot = getOwner(this)?.lookup('service:fastboot') as unknown as\n      | FastbootService\n      | undefined;\n\n    if (fastboot && fastboot['isFastBoot']) {\n      return;\n    }\n\n    const {\n      date,\n      disabled = false,\n      onChange,\n      onReady,\n      onOpen,\n      onClose,\n      ...rest\n    } = this.args;\n\n    const config: Partial<FlatpickrOptions> = Object.fromEntries(\n      Object.entries(rest).filter((entry) => entry[1] !== undefined),\n    );\n\n    if (typeof this.args.locale === 'string' && this.args.locale !== 'en') {\n      await waitForPromise(\n        import(`flatpickr/dist/l10n/${this.args.locale}.js`),\n      );\n    }\n\n    this.flatpickrRef = flatpickr(element, {\n      onChange,\n      onClose: onClose || this.onClose,\n      onOpen: onOpen || this.onOpen,\n      onReady: onReady || this.onReady,\n      ...config,\n      defaultDate: date,\n    });\n\n    this._setDisabled(disabled);\n  }\n\n  _setDisabled(disabled: boolean): void {\n    if (!this.flatpickrRef) {\n      return;\n    }\n\n    const altInput = this.flatpickrRef.altInput;\n    const element: HTMLInputElement = this.flatpickrRef\n      .element as HTMLInputElement;\n\n    if (altInput && element?.nextSibling) {\n      // `element` is the hidden input storing the alternate date value sent to the server\n      // @see https://flatpickr.js.org/options/ `altInput` config options\n      // Refactored during https://github.com/RobbieTheWagner/ember-flatpickr/issues/306 to instead\n      // extend Ember's `@ember/component/text-field`\n      // `element.nextSibling` is the text input that the user will interact with, so\n      // long as it is enabled\n      (element.nextSibling as HTMLInputElement).disabled = disabled;\n    } else {\n      element.disabled = disabled;\n    }\n  }\n\n  /**\n   * Triggered when the calendar is closed.\n   *\n   * @method onClose\n   * @param {Date[]} selectedDates an array of Date objects selected by the user. When there are\n   * no dates selected, the array is empty.\n   * @param {String} dateStr a string representation of the latest selected Date object by the\n   * user. The string is formatted as per the dateFormat option\n   * @param {Object} instance the flatpickr object, containing various methods and properties.\n   * @type {Action}\n   */\n\n  @action\n  onClose(): void {\n    // Intentionaly empty. This method should be overridden.\n  }\n\n  /**\n   * Triggered when the calendar is closed.\n   *\n   * @method onOpen\n   * @param {Date[]} selectedDates an array of Date objects selected by the user. When there are\n   * no dates selected, the array is empty.\n   * @param {String} dateStr a string representation of the latest selected Date object by the\n   * user. The string is formatted as per the dateFormat option\n   * @param {Object} instance the flatpickr object, containing various methods and properties.\n   * @type {Action}\n   */\n\n  @action\n  onOpen(): void {\n    // Intentionaly empty. This method should be overridden.\n  }\n\n  /**\n   * Triggered once the calendar is in a ready state.\n   *\n   * @method onReady\n   * @param {Date[]} selectedDates an array of Date objects selected by the user. When there are\n   * no dates selected, the array is empty.\n   * @param {String} dateStr a string representation of the latest selected Date object by the\n   * user. The string is formatted as per the dateFormat option\n   * @param {Object} instance the flatpickr object, containing various methods and properties.\n   * @type {Action}\n   */\n\n  @action\n  onReady(): void {\n    // Intentionaly empty. This method should be overridden.\n  }\n\n  @action\n  onAltFormatUpdated(): void {\n    this.flatpickrRef?.set('altFormat', this.args.altFormat);\n  }\n\n  @action\n  onAltInputClassUpdated(): void {\n    const { altInputClass } = this.args;\n\n    // updating config anyways, just to keep them in sync:\n    this.flatpickrRef?.set('altInputClass', altInputClass || '');\n\n    // https://github.com/flatpickr/flatpickr/issues/861\n    const altInput = this.flatpickrRef?.altInput;\n\n    if (altInput) {\n      altInput.className = altInputClass || '';\n    }\n  }\n\n  @action\n  onDateUpdated(): void {\n    const { date } = this.args;\n\n    if (typeof date !== 'undefined') {\n      this.flatpickrRef?.setDate(date);\n    }\n  }\n\n  @action\n  onDisabledUpdated(): void {\n    const { disabled } = this.args;\n\n    if (typeof disabled !== 'undefined') {\n      this._setDisabled(disabled);\n    }\n  }\n\n  @action\n  onLocaleUpdated(element: HTMLInputElement): void {\n    this.flatpickrRef?.destroy();\n    this.setupFlatpickr(element);\n  }\n\n  @action\n  onMaxDateUpdated(): void {\n    this.flatpickrRef?.set('maxDate', this.args.maxDate);\n  }\n\n  @action\n  onMinDateUpdated(): void {\n    this.flatpickrRef?.set('minDate', this.args.minDate);\n  }\n}\n","const candidateSelectors = [\n  'input',\n  'select',\n  'textarea',\n  'a[href]',\n  'button',\n  '[tabindex]:not(slot)',\n  'audio[controls]',\n  'video[controls]',\n  '[contenteditable]:not([contenteditable=\"false\"])',\n  'details>summary:first-of-type',\n  'details',\n];\nconst candidateSelector = /* #__PURE__ */ candidateSelectors.join(',');\n\nconst NoElement = typeof Element === 'undefined';\n\nconst matches = NoElement\n  ? function () {}\n  : Element.prototype.matches ||\n    Element.prototype.msMatchesSelector ||\n    Element.prototype.webkitMatchesSelector;\n\nconst getRootNode =\n  !NoElement && Element.prototype.getRootNode\n    ? (element) => element.getRootNode()\n    : (element) => element.ownerDocument;\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nconst getCandidates = function (el, includeContainer, filter) {\n  let candidates = Array.prototype.slice.apply(\n    el.querySelectorAll(candidateSelector)\n  );\n  if (includeContainer && matches.call(el, candidateSelector)) {\n    candidates.unshift(el);\n  }\n  candidates = candidates.filter(filter);\n  return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidatesScope\n * @property {Element} scope contains inner candidates\n * @property {Element[]} candidates\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n *  if a function, implies shadow support is enabled and either returns the shadow root of an element\n *  or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidatesScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidatesScope>}\n */\nconst getCandidatesIteratively = function (\n  elements,\n  includeContainer,\n  options\n) {\n  const candidates = [];\n  const elementsToCheck = Array.from(elements);\n  while (elementsToCheck.length) {\n    const element = elementsToCheck.shift();\n    if (element.tagName === 'SLOT') {\n      // add shadow dom slot scope (slot itself cannot be focusable)\n      const assigned = element.assignedElements();\n      const content = assigned.length ? assigned : element.children;\n      const nestedCandidates = getCandidatesIteratively(content, true, options);\n      if (options.flatten) {\n        candidates.push(...nestedCandidates);\n      } else {\n        candidates.push({\n          scope: element,\n          candidates: nestedCandidates,\n        });\n      }\n    } else {\n      // check candidate element\n      const validCandidate = matches.call(element, candidateSelector);\n      if (\n        validCandidate &&\n        options.filter(element) &&\n        (includeContainer || !elements.includes(element))\n      ) {\n        candidates.push(element);\n      }\n\n      // iterate over shadow content if possible\n      const shadowRoot =\n        element.shadowRoot ||\n        // check for an undisclosed shadow\n        (typeof options.getShadowRoot === 'function' &&\n          options.getShadowRoot(element));\n\n      const validShadowRoot =\n        !options.shadowRootFilter || options.shadowRootFilter(element);\n\n      if (shadowRoot && validShadowRoot) {\n        // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n        //  shadow exists, so look at light dom children as fallback BUT create a scope for any\n        //  child candidates found because they're likely slotted elements (elements that are\n        //  children of the web component element (which has the shadow), in the light dom, but\n        //  slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n        //  _after_ we return from this recursive call\n        const nestedCandidates = getCandidatesIteratively(\n          shadowRoot === true ? element.children : shadowRoot.children,\n          true,\n          options\n        );\n\n        if (options.flatten) {\n          candidates.push(...nestedCandidates);\n        } else {\n          candidates.push({\n            scope: element,\n            candidates: nestedCandidates,\n          });\n        }\n      } else {\n        // there's not shadow so just dig into the element's (light dom) children\n        //  __without__ giving the element special scope treatment\n        elementsToCheck.unshift(...element.children);\n      }\n    }\n  }\n  return candidates;\n};\n\nconst getTabindex = function (node, isScope) {\n  if (node.tabIndex < 0) {\n    // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n    // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n    // yet they are still part of the regular tab order; in FF, they get a default\n    // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n    // order, consider their tab index to be 0.\n    // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n    // so if they don't have a tabindex attribute specifically set, assume it's 0.\n    //\n    // isScope is positive for custom element with shadow root or slot that by default\n    // have tabIndex -1, but need to be sorted by document order in order for their\n    // content to be inserted in the correct position\n    if (\n      (isScope ||\n        /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) ||\n        node.isContentEditable) &&\n      isNaN(parseInt(node.getAttribute('tabindex'), 10))\n    ) {\n      return 0;\n    }\n  }\n\n  return node.tabIndex;\n};\n\nconst sortOrderedTabbables = function (a, b) {\n  return a.tabIndex === b.tabIndex\n    ? a.documentOrder - b.documentOrder\n    : a.tabIndex - b.tabIndex;\n};\n\nconst isInput = function (node) {\n  return node.tagName === 'INPUT';\n};\n\nconst isHiddenInput = function (node) {\n  return isInput(node) && node.type === 'hidden';\n};\n\nconst isDetailsWithSummary = function (node) {\n  const r =\n    node.tagName === 'DETAILS' &&\n    Array.prototype.slice\n      .apply(node.children)\n      .some((child) => child.tagName === 'SUMMARY');\n  return r;\n};\n\nconst getCheckedRadio = function (nodes, form) {\n  for (let i = 0; i < nodes.length; i++) {\n    if (nodes[i].checked && nodes[i].form === form) {\n      return nodes[i];\n    }\n  }\n};\n\nconst isTabbableRadio = function (node) {\n  if (!node.name) {\n    return true;\n  }\n  const radioScope = node.form || getRootNode(node);\n  const queryRadios = function (name) {\n    return radioScope.querySelectorAll(\n      'input[type=\"radio\"][name=\"' + name + '\"]'\n    );\n  };\n\n  let radioSet;\n  if (\n    typeof window !== 'undefined' &&\n    typeof window.CSS !== 'undefined' &&\n    typeof window.CSS.escape === 'function'\n  ) {\n    radioSet = queryRadios(window.CSS.escape(node.name));\n  } else {\n    try {\n      radioSet = queryRadios(node.name);\n    } catch (err) {\n      // eslint-disable-next-line no-console\n      console.error(\n        'Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s',\n        err.message\n      );\n      return false;\n    }\n  }\n\n  const checked = getCheckedRadio(radioSet, node.form);\n  return !checked || checked === node;\n};\n\nconst isRadio = function (node) {\n  return isInput(node) && node.type === 'radio';\n};\n\nconst isNonTabbableRadio = function (node) {\n  return isRadio(node) && !isTabbableRadio(node);\n};\n\nconst isZeroArea = function (node) {\n  const { width, height } = node.getBoundingClientRect();\n  return width === 0 && height === 0;\n};\nconst isHidden = function (node, { displayCheck, getShadowRoot }) {\n  // NOTE: visibility will be `undefined` if node is detached from the document\n  //  (see notes about this further down), which means we will consider it visible\n  //  (this is legacy behavior from a very long way back)\n  // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n  //  _visibility_ check, not a _display_ check\n  if (getComputedStyle(node).visibility === 'hidden') {\n    return true;\n  }\n\n  const isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n  const nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n  if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n    return true;\n  }\n\n  // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n  //  (but NOT _the_ document; see second 'If' comment below for more).\n  // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n  //  is attached, and the one we need to check if it's in the document or not (because the\n  //  shadow, and all nodes it contains, is never considered in the document since shadows\n  //  behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n  //  is hidden, or is not in the document itself but is detached, it will affect the shadow's\n  //  visibility, including all the nodes it contains). The host could be any normal node,\n  //  or a custom element (i.e. web component). Either way, that's the one that is considered\n  //  part of the document, not the shadow root, nor any of its children (i.e. the node being\n  //  tested).\n  // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n  //  document (per the docs) and while it's a Document-type object, that document does not\n  //  appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n  //  to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n  //  using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n  //  node is actually detached.\n  const nodeRootHost = getRootNode(node).host;\n  const nodeIsAttached =\n    nodeRootHost?.ownerDocument.contains(nodeRootHost) ||\n    node.ownerDocument.contains(node);\n\n  if (!displayCheck || displayCheck === 'full') {\n    if (typeof getShadowRoot === 'function') {\n      // figure out if we should consider the node to be in an undisclosed shadow and use the\n      //  'non-zero-area' fallback\n      const originalNode = node;\n      while (node) {\n        const parentElement = node.parentElement;\n        const rootNode = getRootNode(node);\n        if (\n          parentElement &&\n          !parentElement.shadowRoot &&\n          getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n        ) {\n          // node has an undisclosed shadow which means we can only treat it as a black box, so we\n          //  fall back to a non-zero-area test\n          return isZeroArea(node);\n        } else if (node.assignedSlot) {\n          // iterate up slot\n          node = node.assignedSlot;\n        } else if (!parentElement && rootNode !== node.ownerDocument) {\n          // cross shadow boundary\n          node = rootNode.host;\n        } else {\n          // iterate up normal dom\n          node = parentElement;\n        }\n      }\n\n      node = originalNode;\n    }\n    // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n    //  (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n    //  it might be a falsy value, which means shadow DOM support is disabled\n\n    // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n    //  now we can just test to see if it would normally be visible or not, provided it's\n    //  attached to the main document.\n    // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n    //  `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n    if (nodeIsAttached) {\n      // this works wherever the node is: if there's at least one client rect, it's\n      //  somehow displayed; it also covers the CSS 'display: contents' case where the\n      //  node itself is hidden in place of its contents; and there's no need to search\n      //  up the hierarchy either\n      return !node.getClientRects().length;\n    }\n\n    // Else, the node isn't attached to the document, which means the `getClientRects()`\n    //  API will __always__ return zero rects (this can happen, for example, if React\n    //  is used to render nodes onto a detached tree, as confirmed in this thread:\n    //  https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n    //\n    // It also means that even window.getComputedStyle(node).display will return `undefined`\n    //  because styles are only computed for nodes that are in the document.\n    //\n    // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n    //  somehow. Though it was never stated officially, anyone who has ever used tabbable\n    //  APIs on nodes in detached containers has actually implicitly used tabbable in what\n    //  was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n    //  considering __everything__ to be visible because of the innability to determine styles.\n  } else if (displayCheck === 'non-zero-area') {\n    // NOTE: Even though this tests that the node's client rect is non-zero to determine\n    //  whether it's displayed, and that a detached node will __always__ have a zero-area\n    //  client rect, we don't special-case for whether the node is attached or not. In\n    //  this mode, we do want to consider nodes that have a zero area to be hidden at all\n    //  times, and that includes attached or not.\n    return isZeroArea(node);\n  }\n\n  // visible, as far as we can tell, or per current `displayCheck` mode\n  return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n//  unless they are in the _first_ <legend> element of the top-most disabled\n//  fieldset\nconst isDisabledFromFieldset = function (node) {\n  if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n    let parentNode = node.parentElement;\n    // check if `node` is contained in a disabled <fieldset>\n    while (parentNode) {\n      if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n        // look for the first <legend> among the children of the disabled <fieldset>\n        for (let i = 0; i < parentNode.children.length; i++) {\n          const child = parentNode.children.item(i);\n          // when the first <legend> (in document order) is found\n          if (child.tagName === 'LEGEND') {\n            // if its parent <fieldset> is not nested in another disabled <fieldset>,\n            // return whether `node` is a descendant of its first <legend>\n            return matches.call(parentNode, 'fieldset[disabled] *')\n              ? true\n              : !child.contains(node);\n          }\n        }\n        // the disabled <fieldset> containing `node` has no <legend>\n        return true;\n      }\n      parentNode = parentNode.parentElement;\n    }\n  }\n\n  // else, node's tabbable/focusable state should not be affected by a fieldset's\n  //  enabled/disabled state\n  return false;\n};\n\nconst isNodeMatchingSelectorFocusable = function (options, node) {\n  if (\n    node.disabled ||\n    isHiddenInput(node) ||\n    isHidden(node, options) ||\n    // For a details element with a summary, the summary element gets the focus\n    isDetailsWithSummary(node) ||\n    isDisabledFromFieldset(node)\n  ) {\n    return false;\n  }\n  return true;\n};\n\nconst isNodeMatchingSelectorTabbable = function (options, node) {\n  if (\n    isNonTabbableRadio(node) ||\n    getTabindex(node) < 0 ||\n    !isNodeMatchingSelectorFocusable(options, node)\n  ) {\n    return false;\n  }\n  return true;\n};\n\nconst isValidShadowRootTabbable = function (shadowHostNode) {\n  const tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n  if (isNaN(tabIndex) || tabIndex >= 0) {\n    return true;\n  }\n  // If a custom element has an explicit negative tabindex,\n  // browsers will not allow tab targeting said element's children.\n  return false;\n};\n\n/**\n * @param {Array.<Element|CandidatesScope>} candidates\n * @returns Element[]\n */\nconst sortByOrder = function (candidates) {\n  const regularTabbables = [];\n  const orderedTabbables = [];\n  candidates.forEach(function (item, i) {\n    const isScope = !!item.scope;\n    const element = isScope ? item.scope : item;\n    const candidateTabindex = getTabindex(element, isScope);\n    const elements = isScope ? sortByOrder(item.candidates) : element;\n    if (candidateTabindex === 0) {\n      isScope\n        ? regularTabbables.push(...elements)\n        : regularTabbables.push(element);\n    } else {\n      orderedTabbables.push({\n        documentOrder: i,\n        tabIndex: candidateTabindex,\n        item: item,\n        isScope: isScope,\n        content: elements,\n      });\n    }\n  });\n\n  return orderedTabbables\n    .sort(sortOrderedTabbables)\n    .reduce((acc, sortable) => {\n      sortable.isScope\n        ? acc.push(...sortable.content)\n        : acc.push(sortable.content);\n      return acc;\n    }, [])\n    .concat(regularTabbables);\n};\n\nconst tabbable = function (el, options) {\n  options = options || {};\n\n  let candidates;\n  if (options.getShadowRoot) {\n    candidates = getCandidatesIteratively([el], options.includeContainer, {\n      filter: isNodeMatchingSelectorTabbable.bind(null, options),\n      flatten: false,\n      getShadowRoot: options.getShadowRoot,\n      shadowRootFilter: isValidShadowRootTabbable,\n    });\n  } else {\n    candidates = getCandidates(\n      el,\n      options.includeContainer,\n      isNodeMatchingSelectorTabbable.bind(null, options)\n    );\n  }\n  return sortByOrder(candidates);\n};\n\nconst focusable = function (el, options) {\n  options = options || {};\n\n  let candidates;\n  if (options.getShadowRoot) {\n    candidates = getCandidatesIteratively([el], options.includeContainer, {\n      filter: isNodeMatchingSelectorFocusable.bind(null, options),\n      flatten: true,\n      getShadowRoot: options.getShadowRoot,\n    });\n  } else {\n    candidates = getCandidates(\n      el,\n      options.includeContainer,\n      isNodeMatchingSelectorFocusable.bind(null, options)\n    );\n  }\n\n  return candidates;\n};\n\nconst isTabbable = function (node, options) {\n  options = options || {};\n  if (!node) {\n    throw new Error('No node provided');\n  }\n  if (matches.call(node, candidateSelector) === false) {\n    return false;\n  }\n  return isNodeMatchingSelectorTabbable(options, node);\n};\n\nconst focusableCandidateSelector = /* #__PURE__ */ candidateSelectors\n  .concat('iframe')\n  .join(',');\n\nconst isFocusable = function (node, options) {\n  options = options || {};\n  if (!node) {\n    throw new Error('No node provided');\n  }\n  if (matches.call(node, focusableCandidateSelector) === false) {\n    return false;\n  }\n  return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { tabbable, focusable, isTabbable, isFocusable };\n","import { tabbable, focusable, isFocusable, isTabbable } from 'tabbable';\n\nconst activeFocusTraps = (function () {\n  const trapQueue = [];\n  return {\n    activateTrap(trap) {\n      if (trapQueue.length > 0) {\n        const activeTrap = trapQueue[trapQueue.length - 1];\n        if (activeTrap !== trap) {\n          activeTrap.pause();\n        }\n      }\n\n      const trapIndex = trapQueue.indexOf(trap);\n      if (trapIndex === -1) {\n        trapQueue.push(trap);\n      } else {\n        // move this existing trap to the front of the queue\n        trapQueue.splice(trapIndex, 1);\n        trapQueue.push(trap);\n      }\n    },\n\n    deactivateTrap(trap) {\n      const trapIndex = trapQueue.indexOf(trap);\n      if (trapIndex !== -1) {\n        trapQueue.splice(trapIndex, 1);\n      }\n\n      if (trapQueue.length > 0) {\n        trapQueue[trapQueue.length - 1].unpause();\n      }\n    },\n  };\n})();\n\nconst isSelectableInput = function (node) {\n  return (\n    node.tagName &&\n    node.tagName.toLowerCase() === 'input' &&\n    typeof node.select === 'function'\n  );\n};\n\nconst isEscapeEvent = function (e) {\n  return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;\n};\n\nconst isTabEvent = function (e) {\n  return e.key === 'Tab' || e.keyCode === 9;\n};\n\nconst delay = function (fn) {\n  return setTimeout(fn, 0);\n};\n\n// Array.find/findIndex() are not supported on IE; this replicates enough\n//  of Array.findIndex() for our needs\nconst findIndex = function (arr, fn) {\n  let idx = -1;\n\n  arr.every(function (value, i) {\n    if (fn(value)) {\n      idx = i;\n      return false; // break\n    }\n\n    return true; // next\n  });\n\n  return idx;\n};\n\n/**\n * Get an option's value when it could be a plain value, or a handler that provides\n *  the value.\n * @param {*} value Option's value to check.\n * @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.\n * @returns {*} The `value`, or the handler's returned value.\n */\nconst valueOrHandler = function (value, ...params) {\n  return typeof value === 'function' ? value(...params) : value;\n};\n\nconst getActualTarget = function (event) {\n  // NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the\n  //  shadow host. However, event.target.composedPath() will be an array of\n  //  nodes \"clicked\" from inner-most (the actual element inside the shadow) to\n  //  outer-most (the host HTML document). If we have access to composedPath(),\n  //  then use its first element; otherwise, fall back to event.target (and\n  //  this only works for an _open_ shadow DOM; otherwise,\n  //  composedPath()[0] === event.target always).\n  return event.target.shadowRoot && typeof event.composedPath === 'function'\n    ? event.composedPath()[0]\n    : event.target;\n};\n\nconst createFocusTrap = function (elements, userOptions) {\n  // SSR: a live trap shouldn't be created in this type of environment so this\n  //  should be safe code to execute if the `document` option isn't specified\n  const doc = userOptions?.document || document;\n\n  const config = {\n    returnFocusOnDeactivate: true,\n    escapeDeactivates: true,\n    delayInitialFocus: true,\n    ...userOptions,\n  };\n\n  const state = {\n    // containers given to createFocusTrap()\n    // @type {Array<HTMLElement>}\n    containers: [],\n\n    // list of objects identifying tabbable nodes in `containers` in the trap\n    // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap\n    //  is active, but the trap should never get to a state where there isn't at least one group\n    //  with at least one tabbable node in it (that would lead to an error condition that would\n    //  result in an error being thrown)\n    // @type {Array<{\n    //   container: HTMLElement,\n    //   tabbableNodes: Array<HTMLElement>, // empty if none\n    //   focusableNodes: Array<HTMLElement>, // empty if none\n    //   firstTabbableNode: HTMLElement|null,\n    //   lastTabbableNode: HTMLElement|null,\n    //   nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined\n    // }>}\n    containerGroups: [], // same order/length as `containers` list\n\n    // references to objects in `containerGroups`, but only those that actually have\n    //  tabbable nodes in them\n    // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__\n    //  the same length\n    tabbableGroups: [],\n\n    nodeFocusedBeforeActivation: null,\n    mostRecentlyFocusedNode: null,\n    active: false,\n    paused: false,\n\n    // timer ID for when delayInitialFocus is true and initial focus in this trap\n    //  has been delayed during activation\n    delayInitialFocusTimer: undefined,\n  };\n\n  let trap; // eslint-disable-line prefer-const -- some private functions reference it, and its methods reference private functions, so we must declare here and define later\n\n  /**\n   * Gets a configuration option value.\n   * @param {Object|undefined} configOverrideOptions If true, and option is defined in this set,\n   *  value will be taken from this object. Otherwise, value will be taken from base configuration.\n   * @param {string} optionName Name of the option whose value is sought.\n   * @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`\n   *  IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.\n   */\n  const getOption = (configOverrideOptions, optionName, configOptionName) => {\n    return configOverrideOptions &&\n      configOverrideOptions[optionName] !== undefined\n      ? configOverrideOptions[optionName]\n      : config[configOptionName || optionName];\n  };\n\n  /**\n   * Finds the index of the container that contains the element.\n   * @param {HTMLElement} element\n   * @returns {number} Index of the container in either `state.containers` or\n   *  `state.containerGroups` (the order/length of these lists are the same); -1\n   *  if the element isn't found.\n   */\n  const findContainerIndex = function (element) {\n    // NOTE: search `containerGroups` because it's possible a group contains no tabbable\n    //  nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)\n    //  and we still need to find the element in there\n    return state.containerGroups.findIndex(\n      ({ container, tabbableNodes }) =>\n        container.contains(element) ||\n        // fall back to explicit tabbable search which will take into consideration any\n        //  web components if the `tabbableOptions.getShadowRoot` option was used for\n        //  the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't\n        //  look inside web components even if open)\n        tabbableNodes.find((node) => node === element)\n    );\n  };\n\n  /**\n   * Gets the node for the given option, which is expected to be an option that\n   *  can be either a DOM node, a string that is a selector to get a node, `false`\n   *  (if a node is explicitly NOT given), or a function that returns any of these\n   *  values.\n   * @param {string} optionName\n   * @returns {undefined | false | HTMLElement | SVGElement} Returns\n   *  `undefined` if the option is not specified; `false` if the option\n   *  resolved to `false` (node explicitly not given); otherwise, the resolved\n   *  DOM node.\n   * @throws {Error} If the option is set, not `false`, and is not, or does not\n   *  resolve to a node.\n   */\n  const getNodeForOption = function (optionName, ...params) {\n    let optionValue = config[optionName];\n\n    if (typeof optionValue === 'function') {\n      optionValue = optionValue(...params);\n    }\n\n    if (optionValue === true) {\n      optionValue = undefined; // use default value\n    }\n\n    if (!optionValue) {\n      if (optionValue === undefined || optionValue === false) {\n        return optionValue;\n      }\n      // else, empty string (invalid), null (invalid), 0 (invalid)\n\n      throw new Error(\n        `\\`${optionName}\\` was specified but was not a node, or did not return a node`\n      );\n    }\n\n    let node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point\n\n    if (typeof optionValue === 'string') {\n      node = doc.querySelector(optionValue); // resolve to node, or null if fails\n      if (!node) {\n        throw new Error(\n          `\\`${optionName}\\` as selector refers to no known node`\n        );\n      }\n    }\n\n    return node;\n  };\n\n  const getInitialFocusNode = function () {\n    let node = getNodeForOption('initialFocus');\n\n    // false explicitly indicates we want no initialFocus at all\n    if (node === false) {\n      return false;\n    }\n\n    if (node === undefined) {\n      // option not specified: use fallback options\n      if (findContainerIndex(doc.activeElement) >= 0) {\n        node = doc.activeElement;\n      } else {\n        const firstTabbableGroup = state.tabbableGroups[0];\n        const firstTabbableNode =\n          firstTabbableGroup && firstTabbableGroup.firstTabbableNode;\n\n        // NOTE: `fallbackFocus` option function cannot return `false` (not supported)\n        node = firstTabbableNode || getNodeForOption('fallbackFocus');\n      }\n    }\n\n    if (!node) {\n      throw new Error(\n        'Your focus-trap needs to have at least one focusable element'\n      );\n    }\n\n    return node;\n  };\n\n  const updateTabbableNodes = function () {\n    state.containerGroups = state.containers.map((container) => {\n      const tabbableNodes = tabbable(container, config.tabbableOptions);\n\n      // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes\n      //  are a superset of tabbable nodes\n      const focusableNodes = focusable(container, config.tabbableOptions);\n\n      return {\n        container,\n        tabbableNodes,\n        focusableNodes,\n        firstTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[0] : null,\n        lastTabbableNode:\n          tabbableNodes.length > 0\n            ? tabbableNodes[tabbableNodes.length - 1]\n            : null,\n\n        /**\n         * Finds the __tabbable__ node that follows the given node in the specified direction,\n         *  in this container, if any.\n         * @param {HTMLElement} node\n         * @param {boolean} [forward] True if going in forward tab order; false if going\n         *  in reverse.\n         * @returns {HTMLElement|undefined} The next tabbable node, if any.\n         */\n        nextTabbableNode(node, forward = true) {\n          // NOTE: If tabindex is positive (in order to manipulate the tab order separate\n          //  from the DOM order), this __will not work__ because the list of focusableNodes,\n          //  while it contains tabbable nodes, does not sort its nodes in any order other\n          //  than DOM order, because it can't: Where would you place focusable (but not\n          //  tabbable) nodes in that order? They have no order, because they aren't tabbale...\n          // Support for positive tabindex is already broken and hard to manage (possibly\n          //  not supportable, TBD), so this isn't going to make things worse than they\n          //  already are, and at least makes things better for the majority of cases where\n          //  tabindex is either 0/unset or negative.\n          // FYI, positive tabindex issue: https://github.com/focus-trap/focus-trap/issues/375\n          const nodeIdx = focusableNodes.findIndex((n) => n === node);\n          if (nodeIdx < 0) {\n            return undefined;\n          }\n\n          if (forward) {\n            return focusableNodes\n              .slice(nodeIdx + 1)\n              .find((n) => isTabbable(n, config.tabbableOptions));\n          }\n\n          return focusableNodes\n            .slice(0, nodeIdx)\n            .reverse()\n            .find((n) => isTabbable(n, config.tabbableOptions));\n        },\n      };\n    });\n\n    state.tabbableGroups = state.containerGroups.filter(\n      (group) => group.tabbableNodes.length > 0\n    );\n\n    // throw if no groups have tabbable nodes and we don't have a fallback focus node either\n    if (\n      state.tabbableGroups.length <= 0 &&\n      !getNodeForOption('fallbackFocus') // returning false not supported for this option\n    ) {\n      throw new Error(\n        'Your focus-trap must have at least one container with at least one tabbable node in it at all times'\n      );\n    }\n  };\n\n  const tryFocus = function (node) {\n    if (node === false) {\n      return;\n    }\n\n    if (node === doc.activeElement) {\n      return;\n    }\n\n    if (!node || !node.focus) {\n      tryFocus(getInitialFocusNode());\n      return;\n    }\n\n    node.focus({ preventScroll: !!config.preventScroll });\n    state.mostRecentlyFocusedNode = node;\n\n    if (isSelectableInput(node)) {\n      node.select();\n    }\n  };\n\n  const getReturnFocusNode = function (previousActiveElement) {\n    const node = getNodeForOption('setReturnFocus', previousActiveElement);\n    return node ? node : node === false ? false : previousActiveElement;\n  };\n\n  // This needs to be done on mousedown and touchstart instead of click\n  // so that it precedes the focus event.\n  const checkPointerDown = function (e) {\n    const target = getActualTarget(e);\n\n    if (findContainerIndex(target) >= 0) {\n      // allow the click since it ocurred inside the trap\n      return;\n    }\n\n    if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n      // immediately deactivate the trap\n      trap.deactivate({\n        // if, on deactivation, we should return focus to the node originally-focused\n        //  when the trap was activated (or the configured `setReturnFocus` node),\n        //  then assume it's also OK to return focus to the outside node that was\n        //  just clicked, causing deactivation, as long as that node is focusable;\n        //  if it isn't focusable, then return focus to the original node focused\n        //  on activation (or the configured `setReturnFocus` node)\n        // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,\n        //  which will result in the outside click setting focus to the node\n        //  that was clicked, whether it's focusable or not; by setting\n        //  `returnFocus: true`, we'll attempt to re-focus the node originally-focused\n        //  on activation (or the configured `setReturnFocus` node)\n        returnFocus:\n          config.returnFocusOnDeactivate &&\n          !isFocusable(target, config.tabbableOptions),\n      });\n      return;\n    }\n\n    // This is needed for mobile devices.\n    // (If we'll only let `click` events through,\n    // then on mobile they will be blocked anyways if `touchstart` is blocked.)\n    if (valueOrHandler(config.allowOutsideClick, e)) {\n      // allow the click outside the trap to take place\n      return;\n    }\n\n    // otherwise, prevent the click\n    e.preventDefault();\n  };\n\n  // In case focus escapes the trap for some strange reason, pull it back in.\n  const checkFocusIn = function (e) {\n    const target = getActualTarget(e);\n    const targetContained = findContainerIndex(target) >= 0;\n\n    // In Firefox when you Tab out of an iframe the Document is briefly focused.\n    if (targetContained || target instanceof Document) {\n      if (targetContained) {\n        state.mostRecentlyFocusedNode = target;\n      }\n    } else {\n      // escaped! pull it back in to where it just left\n      e.stopImmediatePropagation();\n      tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());\n    }\n  };\n\n  // Hijack Tab events on the first and last focusable nodes of the trap,\n  // in order to prevent focus from escaping. If it escapes for even a\n  // moment it can end up scrolling the page and causing confusion so we\n  // kind of need to capture the action at the keydown phase.\n  const checkTab = function (e) {\n    const target = getActualTarget(e);\n    updateTabbableNodes();\n\n    let destinationNode = null;\n\n    if (state.tabbableGroups.length > 0) {\n      // make sure the target is actually contained in a group\n      // NOTE: the target may also be the container itself if it's focusable\n      //  with tabIndex='-1' and was given initial focus\n      const containerIndex = findContainerIndex(target);\n      const containerGroup =\n        containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;\n\n      if (containerIndex < 0) {\n        // target not found in any group: quite possible focus has escaped the trap,\n        //  so bring it back in to...\n        if (e.shiftKey) {\n          // ...the last node in the last group\n          destinationNode =\n            state.tabbableGroups[state.tabbableGroups.length - 1]\n              .lastTabbableNode;\n        } else {\n          // ...the first node in the first group\n          destinationNode = state.tabbableGroups[0].firstTabbableNode;\n        }\n      } else if (e.shiftKey) {\n        // REVERSE\n\n        // is the target the first tabbable node in a group?\n        let startOfGroupIndex = findIndex(\n          state.tabbableGroups,\n          ({ firstTabbableNode }) => target === firstTabbableNode\n        );\n\n        if (\n          startOfGroupIndex < 0 &&\n          (containerGroup.container === target ||\n            (isFocusable(target, config.tabbableOptions) &&\n              !isTabbable(target, config.tabbableOptions) &&\n              !containerGroup.nextTabbableNode(target, false)))\n        ) {\n          // an exception case where the target is either the container itself, or\n          //  a non-tabbable node that was given focus (i.e. tabindex is negative\n          //  and user clicked on it or node was programmatically given focus)\n          //  and is not followed by any other tabbable node, in which\n          //  case, we should handle shift+tab as if focus were on the container's\n          //  first tabbable node, and go to the last tabbable node of the LAST group\n          startOfGroupIndex = containerIndex;\n        }\n\n        if (startOfGroupIndex >= 0) {\n          // YES: then shift+tab should go to the last tabbable node in the\n          //  previous group (and wrap around to the last tabbable node of\n          //  the LAST group if it's the first tabbable node of the FIRST group)\n          const destinationGroupIndex =\n            startOfGroupIndex === 0\n              ? state.tabbableGroups.length - 1\n              : startOfGroupIndex - 1;\n\n          const destinationGroup = state.tabbableGroups[destinationGroupIndex];\n          destinationNode = destinationGroup.lastTabbableNode;\n        }\n      } else {\n        // FORWARD\n\n        // is the target the last tabbable node in a group?\n        let lastOfGroupIndex = findIndex(\n          state.tabbableGroups,\n          ({ lastTabbableNode }) => target === lastTabbableNode\n        );\n\n        if (\n          lastOfGroupIndex < 0 &&\n          (containerGroup.container === target ||\n            (isFocusable(target, config.tabbableOptions) &&\n              !isTabbable(target, config.tabbableOptions) &&\n              !containerGroup.nextTabbableNode(target)))\n        ) {\n          // an exception case where the target is the container itself, or\n          //  a non-tabbable node that was given focus (i.e. tabindex is negative\n          //  and user clicked on it or node was programmatically given focus)\n          //  and is not followed by any other tabbable node, in which\n          //  case, we should handle tab as if focus were on the container's\n          //  last tabbable node, and go to the first tabbable node of the FIRST group\n          lastOfGroupIndex = containerIndex;\n        }\n\n        if (lastOfGroupIndex >= 0) {\n          // YES: then tab should go to the first tabbable node in the next\n          //  group (and wrap around to the first tabbable node of the FIRST\n          //  group if it's the last tabbable node of the LAST group)\n          const destinationGroupIndex =\n            lastOfGroupIndex === state.tabbableGroups.length - 1\n              ? 0\n              : lastOfGroupIndex + 1;\n\n          const destinationGroup = state.tabbableGroups[destinationGroupIndex];\n          destinationNode = destinationGroup.firstTabbableNode;\n        }\n      }\n    } else {\n      // NOTE: the fallbackFocus option does not support returning false to opt-out\n      destinationNode = getNodeForOption('fallbackFocus');\n    }\n\n    if (destinationNode) {\n      e.preventDefault();\n      tryFocus(destinationNode);\n    }\n    // else, let the browser take care of [shift+]tab and move the focus\n  };\n\n  const checkKey = function (e) {\n    if (\n      isEscapeEvent(e) &&\n      valueOrHandler(config.escapeDeactivates, e) !== false\n    ) {\n      e.preventDefault();\n      trap.deactivate();\n      return;\n    }\n\n    if (isTabEvent(e)) {\n      checkTab(e);\n      return;\n    }\n  };\n\n  const checkClick = function (e) {\n    const target = getActualTarget(e);\n\n    if (findContainerIndex(target) >= 0) {\n      return;\n    }\n\n    if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n      return;\n    }\n\n    if (valueOrHandler(config.allowOutsideClick, e)) {\n      return;\n    }\n\n    e.preventDefault();\n    e.stopImmediatePropagation();\n  };\n\n  //\n  // EVENT LISTENERS\n  //\n\n  const addListeners = function () {\n    if (!state.active) {\n      return;\n    }\n\n    // There can be only one listening focus trap at a time\n    activeFocusTraps.activateTrap(trap);\n\n    // Delay ensures that the focused element doesn't capture the event\n    // that caused the focus trap activation.\n    state.delayInitialFocusTimer = config.delayInitialFocus\n      ? delay(function () {\n          tryFocus(getInitialFocusNode());\n        })\n      : tryFocus(getInitialFocusNode());\n\n    doc.addEventListener('focusin', checkFocusIn, true);\n    doc.addEventListener('mousedown', checkPointerDown, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('touchstart', checkPointerDown, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('click', checkClick, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('keydown', checkKey, {\n      capture: true,\n      passive: false,\n    });\n\n    return trap;\n  };\n\n  const removeListeners = function () {\n    if (!state.active) {\n      return;\n    }\n\n    doc.removeEventListener('focusin', checkFocusIn, true);\n    doc.removeEventListener('mousedown', checkPointerDown, true);\n    doc.removeEventListener('touchstart', checkPointerDown, true);\n    doc.removeEventListener('click', checkClick, true);\n    doc.removeEventListener('keydown', checkKey, true);\n\n    return trap;\n  };\n\n  //\n  // TRAP DEFINITION\n  //\n\n  trap = {\n    get active() {\n      return state.active;\n    },\n\n    get paused() {\n      return state.paused;\n    },\n\n    activate(activateOptions) {\n      if (state.active) {\n        return this;\n      }\n\n      const onActivate = getOption(activateOptions, 'onActivate');\n      const onPostActivate = getOption(activateOptions, 'onPostActivate');\n      const checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');\n\n      if (!checkCanFocusTrap) {\n        updateTabbableNodes();\n      }\n\n      state.active = true;\n      state.paused = false;\n      state.nodeFocusedBeforeActivation = doc.activeElement;\n\n      if (onActivate) {\n        onActivate();\n      }\n\n      const finishActivation = () => {\n        if (checkCanFocusTrap) {\n          updateTabbableNodes();\n        }\n        addListeners();\n        if (onPostActivate) {\n          onPostActivate();\n        }\n      };\n\n      if (checkCanFocusTrap) {\n        checkCanFocusTrap(state.containers.concat()).then(\n          finishActivation,\n          finishActivation\n        );\n        return this;\n      }\n\n      finishActivation();\n      return this;\n    },\n\n    deactivate(deactivateOptions) {\n      if (!state.active) {\n        return this;\n      }\n\n      const options = {\n        onDeactivate: config.onDeactivate,\n        onPostDeactivate: config.onPostDeactivate,\n        checkCanReturnFocus: config.checkCanReturnFocus,\n        ...deactivateOptions,\n      };\n\n      clearTimeout(state.delayInitialFocusTimer); // noop if undefined\n      state.delayInitialFocusTimer = undefined;\n\n      removeListeners();\n      state.active = false;\n      state.paused = false;\n\n      activeFocusTraps.deactivateTrap(trap);\n\n      const onDeactivate = getOption(options, 'onDeactivate');\n      const onPostDeactivate = getOption(options, 'onPostDeactivate');\n      const checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');\n      const returnFocus = getOption(\n        options,\n        'returnFocus',\n        'returnFocusOnDeactivate'\n      );\n\n      if (onDeactivate) {\n        onDeactivate();\n      }\n\n      const finishDeactivation = () => {\n        delay(() => {\n          if (returnFocus) {\n            tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));\n          }\n          if (onPostDeactivate) {\n            onPostDeactivate();\n          }\n        });\n      };\n\n      if (returnFocus && checkCanReturnFocus) {\n        checkCanReturnFocus(\n          getReturnFocusNode(state.nodeFocusedBeforeActivation)\n        ).then(finishDeactivation, finishDeactivation);\n        return this;\n      }\n\n      finishDeactivation();\n      return this;\n    },\n\n    pause() {\n      if (state.paused || !state.active) {\n        return this;\n      }\n\n      state.paused = true;\n      removeListeners();\n\n      return this;\n    },\n\n    unpause() {\n      if (!state.paused || !state.active) {\n        return this;\n      }\n\n      state.paused = false;\n      updateTabbableNodes();\n      addListeners();\n\n      return this;\n    },\n\n    updateContainerElements(containerElements) {\n      const elementsAsArray = [].concat(containerElements).filter(Boolean);\n\n      state.containers = elementsAsArray.map((element) =>\n        typeof element === 'string' ? doc.querySelector(element) : element\n      );\n\n      if (state.active) {\n        updateTabbableNodes();\n      }\n\n      return this;\n    },\n  };\n\n  // initialize container elements\n  trap.updateContainerElements(elements);\n\n  return trap;\n};\n\nexport { createFocusTrap };\n","import { capabilities, setModifierManager } from '@ember/modifier';\nimport { createFocusTrap } from 'focus-trap';\n\nlet cap;\ntry {\n  cap = capabilities('3.22');\n} catch {\n  cap = capabilities('3.13');\n}\nvar focusTrap = setModifierManager(() => {\n  return {\n    capabilities: cap,\n    createModifier() {\n      return {\n        focusTrapOptions: undefined,\n        isActive: true,\n        isPaused: false,\n        shouldSelfFocus: false,\n        focusTrap: undefined\n      };\n    },\n    installModifier(state, element, {\n      named: {\n        isActive,\n        isPaused,\n        shouldSelfFocus,\n        focusTrapOptions,\n        additionalElements,\n        _createFocusTrap\n      }\n    }) {\n      // treat the original focusTrapOptions as immutable, so do a shallow copy here\n      state.focusTrapOptions = {\n        ...focusTrapOptions\n      } || {};\n      if (typeof isActive !== 'undefined') {\n        state.isActive = isActive;\n      }\n      if (typeof isPaused !== 'undefined') {\n        state.isPaused = isPaused;\n      }\n      if (state.focusTrapOptions && typeof state.focusTrapOptions.initialFocus === 'undefined' && shouldSelfFocus) {\n        state.focusTrapOptions.initialFocus = element;\n      }\n\n      // Private to allow mocking FocusTrap in tests\n      let createFocusTrap$1 = createFocusTrap;\n      if (_createFocusTrap) {\n        createFocusTrap$1 = _createFocusTrap;\n      }\n      if (state.focusTrapOptions.returnFocusOnDeactivate !== false) {\n        state.focusTrapOptions.returnFocusOnDeactivate = true;\n      }\n      state.focusTrap = createFocusTrap$1(typeof additionalElements !== 'undefined' ? [element, ...additionalElements] : element, state.focusTrapOptions);\n      if (state.isActive) {\n        state.focusTrap.activate();\n      }\n      if (state.isPaused) {\n        state.focusTrap.pause();\n      }\n    },\n    updateModifier(state, {\n      named: params\n    }) {\n      const focusTrapOptions = params.focusTrapOptions || {};\n      if (state.isActive && !params.isActive) {\n        const {\n          returnFocusOnDeactivate\n        } = focusTrapOptions;\n        const returnFocus = typeof returnFocusOnDeactivate === 'undefined' ? true : false;\n        state.focusTrap.deactivate({\n          returnFocus\n        });\n      } else if (!state.isActive && params.isActive) {\n        state.focusTrap.activate();\n      }\n      if (state.isPaused && !params.isPaused) {\n        state.focusTrap.unpause();\n      } else if (!state.isPaused && params.isPaused) {\n        state.focusTrap.pause();\n      }\n\n      // Update state\n      state.focusTrapOptions = focusTrapOptions;\n      if (typeof params.isActive !== 'undefined') {\n        state.isActive = params.isActive;\n      }\n      if (typeof params.isPaused !== 'undefined') {\n        state.isPaused = params.isPaused;\n      }\n    },\n    destroyModifier({\n      focusTrap\n    }) {\n      focusTrap.deactivate();\n    }\n  };\n}, class FocusTrapModifier {});\n\nexport { focusTrap as default };\n","/* eslint-disable import/extensions */\nimport { pluralize } from 'ember-inflector';\nimport makeHelper from '../lib/utils/make-helper';\n\n/**\n *\n * If you have Ember Inflector (such as if Ember Data is present),\n * pluralize a word. For example, turn \"ox\" into \"oxen\".\n *\n * Example:\n *\n * {{pluralize count myProperty}}\n * {{pluralize 1 \"oxen\"}}\n * {{pluralize myProperty}}\n * {{pluralize \"ox\"}}\n *\n * @for Ember.HTMLBars.helpers\n * @method pluralize\n * @param {Number|Property} [count] count of objects\n * @param {String|Property} word word to pluralize\n */\nexport default makeHelper(function (params, hash) {\n  let fullParams = new Array(...params);\n\n  if (fullParams.length === 2) {\n    fullParams.push({ withoutCount: hash['without-count'] });\n  }\n\n  return pluralize(...fullParams);\n});\n","/* eslint-disable import/extensions */\nimport { singularize } from 'ember-inflector';\nimport makeHelper from '../lib/utils/make-helper';\n\n/**\n *\n * If you have Ember Inflector (such as if Ember Data is present),\n * singularize a word. For example, turn \"oxen\" into \"ox\".\n *\n * Example:\n *\n * {{singularize myProperty}}\n * {{singularize \"oxen\"}}\n *\n * @for Ember.HTMLBars.helpers\n * @method singularize\n * @param {String|Property} word word to singularize\n */\nexport default makeHelper(function (params) {\n  return singularize(params[0]);\n});\n","export default {\n  plurals: [\n    [/$/, 's'],\n    [/s$/i, 's'],\n    [/^(ax|test)is$/i, '$1es'],\n    [/(octop|vir)us$/i, '$1i'],\n    [/(octop|vir)i$/i, '$1i'],\n    [/(alias|status|bonus)$/i, '$1es'],\n    [/(bu)s$/i, '$1ses'],\n    [/(buffal|tomat)o$/i, '$1oes'],\n    [/([ti])um$/i, '$1a'],\n    [/([ti])a$/i, '$1a'],\n    [/sis$/i, 'ses'],\n    [/(?:([^f])fe|([lr])f)$/i, '$1$2ves'],\n    [/(hive)$/i, '$1s'],\n    [/([^aeiouy]|qu)y$/i, '$1ies'],\n    [/(x|ch|ss|sh)$/i, '$1es'],\n    [/(matr|vert|ind)(?:ix|ex)$/i, '$1ices'],\n    [/^(m|l)ouse$/i, '$1ice'],\n    [/^(m|l)ice$/i, '$1ice'],\n    [/^(ox)$/i, '$1en'],\n    [/^(oxen)$/i, '$1'],\n    [/(quiz)$/i, '$1zes'],\n  ],\n\n  singular: [\n    [/s$/i, ''],\n    [/(ss)$/i, '$1'],\n    [/(n)ews$/i, '$1ews'],\n    [/([ti])a$/i, '$1um'],\n    [\n      /((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(sis|ses)$/i,\n      '$1sis',\n    ],\n    [/(^analy)(sis|ses)$/i, '$1sis'],\n    [/([^f])ves$/i, '$1fe'],\n    [/(hive)s$/i, '$1'],\n    [/(tive)s$/i, '$1'],\n    [/([lr])ves$/i, '$1f'],\n    [/([^aeiouy]|qu)ies$/i, '$1y'],\n    [/(s)eries$/i, '$1eries'],\n    [/(m)ovies$/i, '$1ovie'],\n    [/(x|ch|ss|sh)es$/i, '$1'],\n    [/^(m|l)ice$/i, '$1ouse'],\n    [/(bus)(es)?$/i, '$1'],\n    [/(o)es$/i, '$1'],\n    [/(shoe)s$/i, '$1'],\n    [/(cris|test)(is|es)$/i, '$1is'],\n    [/^(a)x[ie]s$/i, '$1xis'],\n    [/(octop|vir)(us|i)$/i, '$1us'],\n    [/(alias|status|bonus)(es)?$/i, '$1'],\n    [/^(ox)en/i, '$1'],\n    [/(vert|ind)ices$/i, '$1ex'],\n    [/(matr)ices$/i, '$1ix'],\n    [/(quiz)zes$/i, '$1'],\n    [/(database)s$/i, '$1'],\n  ],\n\n  irregularPairs: [\n    ['person', 'people'],\n    ['man', 'men'],\n    ['child', 'children'],\n    ['sex', 'sexes'],\n    ['move', 'moves'],\n    ['cow', 'kine'],\n    ['zombie', 'zombies'],\n  ],\n\n  uncountable: [\n    'equipment',\n    'information',\n    'rice',\n    'money',\n    'species',\n    'series',\n    'fish',\n    'sheep',\n    'jeans',\n    'police',\n    'meta',\n  ],\n};\n","/* eslint-disable import/extensions, prettier/prettier */\nimport defaultRules from './inflections';\n\nconst BLANK_REGEX = /^\\s*$/;\nconst LAST_WORD_DASHED_REGEX = /([\\w/-]+[_/\\s-])([a-z\\d]+$)/;\nconst LAST_WORD_CAMELIZED_REGEX = /([\\w/\\s-]+)([A-Z][a-z\\d]*$)/;\nconst CAMELIZED_REGEX = /[A-Z][a-z\\d]*$/;\nconst CAPITALIZE_REGEX = /(^|\\/)([a-z\\u00C0-\\u024F])/g;\n\nfunction capitalize(str) {\n  return str.replace(CAPITALIZE_REGEX, (match) => match.toUpperCase());\n}\n\nfunction loadUncountable(rules, uncountable) {\n  for (let i = 0, length = uncountable.length; i < length; i++) {\n    rules.uncountable[uncountable[i].toLowerCase()] = true;\n  }\n}\n\nfunction loadIrregular(rules, irregularPairs) {\n  let pair;\n\n  for (let i = 0, length = irregularPairs.length; i < length; i++) {\n    pair = irregularPairs[i];\n\n    //pluralizing\n    rules.irregular[pair[0].toLowerCase()] = pair[1];\n    rules.irregular[pair[1].toLowerCase()] = pair[1];\n\n    //singularizing\n    rules.irregularInverse[pair[1].toLowerCase()] = pair[0];\n    rules.irregularInverse[pair[0].toLowerCase()] = pair[0];\n  }\n}\n\n/**\n  Inflector.Ember provides a mechanism for supplying inflection rules for your\n  application. Ember includes a default set of inflection rules, and provides an\n  API for providing additional rules.\n\n  Examples:\n\n  Creating an inflector with no rules.\n\n  ```js\n  var inflector = new Ember.Inflector();\n  ```\n\n  Creating an inflector with the default ember ruleset.\n\n  ```js\n  var inflector = new Ember.Inflector(Ember.Inflector.defaultRules);\n\n  inflector.pluralize('cow'); //=> 'kine'\n  inflector.singularize('kine'); //=> 'cow'\n  ```\n\n  Creating an inflector and adding rules later.\n\n  ```javascript\n  var inflector = Ember.Inflector.inflector;\n\n  inflector.pluralize('advice'); // => 'advices'\n  inflector.uncountable('advice');\n  inflector.pluralize('advice'); // => 'advice'\n\n  inflector.pluralize('formula'); // => 'formulas'\n  inflector.irregular('formula', 'formulae');\n  inflector.pluralize('formula'); // => 'formulae'\n\n  // you would not need to add these as they are the default rules\n  inflector.plural(/$/, 's');\n  inflector.singular(/s$/i, '');\n  ```\n\n  Creating an inflector with a nondefault ruleset.\n\n  ```javascript\n  var rules = {\n    plurals:  [\n      [ /$/, 's' ]\n    ],\n    singular: [\n      [ /\\s$/, '' ]\n    ],\n    irregularPairs: [\n      [ 'cow', 'kine' ]\n    ],\n    uncountable: [ 'fish' ]\n  };\n\n  var inflector = new Ember.Inflector(rules);\n  ```\n\n  @class Inflector\n  @namespace Ember\n*/\nfunction Inflector(ruleSet) {\n  ruleSet = ruleSet || {};\n  ruleSet.uncountable = ruleSet.uncountable || makeDictionary();\n  ruleSet.irregularPairs = ruleSet.irregularPairs || makeDictionary();\n\n  const rules = (this.rules = {\n    plurals: ruleSet.plurals || [],\n    singular: ruleSet.singular || [],\n    irregular: makeDictionary(),\n    irregularInverse: makeDictionary(),\n    uncountable: makeDictionary(),\n  });\n\n  loadUncountable(rules, ruleSet.uncountable);\n  loadIrregular(rules, ruleSet.irregularPairs);\n\n  this.enableCache();\n}\n\nif (!Object.create && !Object.create(null).hasOwnProperty) {\n  throw new Error(\n    'This browser does not support Object.create(null), please polyfil with es5-sham: http://git.io/yBU2rg'\n  );\n}\n\nfunction makeDictionary() {\n  var cache = Object.create(null);\n  cache['_dict'] = null;\n  delete cache['_dict'];\n  return cache;\n}\n\nInflector.prototype = {\n  /**\n    @public\n\n    As inflections can be costly, and commonly the same subset of words are repeatedly\n    inflected an optional cache is provided.\n\n    @method enableCache\n  */\n  enableCache() {\n    this.purgeCache();\n\n    this.singularize = function (word) {\n      this._cacheUsed = true;\n      return (\n        this._sCache[word] || (this._sCache[word] = this._singularize(word))\n      );\n    };\n\n    this.pluralize = function (numberOrWord, word, options = {}) {\n      this._cacheUsed = true;\n      var cacheKey = [numberOrWord, word, options.withoutCount];\n      return (\n        this._pCache[cacheKey] ||\n        (this._pCache[cacheKey] = this._pluralize(numberOrWord, word, options))\n      );\n    };\n  },\n\n  /**\n    @public\n\n    @method purgeCache\n  */\n  purgeCache() {\n    this._cacheUsed = false;\n    this._sCache = makeDictionary();\n    this._pCache = makeDictionary();\n  },\n\n  /**\n    @public\n    disable caching\n\n    @method disableCache;\n  */\n  disableCache() {\n    this._sCache = null;\n    this._pCache = null;\n    this.singularize = function (word) {\n      return this._singularize(word);\n    };\n\n    this.pluralize = function () {\n      return this._pluralize(...arguments);\n    };\n  },\n\n  /**\n    @method plural\n    @param {RegExp} regex\n    @param {String} string\n  */\n  plural(regex, string) {\n    if (this._cacheUsed) {\n      this.purgeCache();\n    }\n    this.rules.plurals.push([regex, string.toLowerCase()]);\n  },\n\n  /**\n    @method singular\n    @param {RegExp} regex\n    @param {String} string\n  */\n  singular(regex, string) {\n    if (this._cacheUsed) {\n      this.purgeCache();\n    }\n    this.rules.singular.push([regex, string.toLowerCase()]);\n  },\n\n  /**\n    @method uncountable\n    @param {String} regex\n  */\n  uncountable(string) {\n    if (this._cacheUsed) {\n      this.purgeCache();\n    }\n    loadUncountable(this.rules, [string.toLowerCase()]);\n  },\n\n  /**\n    @method irregular\n    @param {String} singular\n    @param {String} plural\n  */\n  irregular(singular, plural) {\n    if (this._cacheUsed) {\n      this.purgeCache();\n    }\n    loadIrregular(this.rules, [[singular, plural]]);\n  },\n\n  /**\n    @method pluralize\n    @param {String} word\n  */\n  pluralize() {\n    return this._pluralize(...arguments);\n  },\n\n  _pluralize(wordOrCount, word, options = {}) {\n    if (word === undefined) {\n      return this.inflect(\n        wordOrCount,\n        this.rules.plurals,\n        this.rules.irregular\n      );\n    }\n\n    if (parseFloat(wordOrCount) !== 1) {\n      word = this.inflect(word, this.rules.plurals, this.rules.irregular);\n    }\n\n    return options.withoutCount ? word : `${wordOrCount} ${word}`;\n  },\n\n  /**\n    @method singularize\n    @param {String} word\n  */\n  singularize(word) {\n    return this._singularize(word);\n  },\n\n  _singularize(word) {\n    return this.inflect(word, this.rules.singular, this.rules.irregularInverse);\n  },\n\n  /**\n    @protected\n\n    @method inflect\n    @param {String} word\n    @param {Object} typeRules\n    @param {Object} irregular\n  */\n  inflect(word, typeRules, irregular) {\n    let inflection,\n      substitution,\n      result,\n      lowercase,\n      wordSplit,\n      lastWord,\n      isBlank,\n      isCamelized,\n      rule,\n      isUncountable;\n\n    isBlank = !word || BLANK_REGEX.test(word);\n    isCamelized = CAMELIZED_REGEX.test(word);\n\n    if (isBlank) {\n      return word;\n    }\n\n    lowercase = word.toLowerCase();\n    wordSplit =\n      LAST_WORD_DASHED_REGEX.exec(word) || LAST_WORD_CAMELIZED_REGEX.exec(word);\n\n    if (wordSplit) {\n      lastWord = wordSplit[2].toLowerCase();\n    }\n\n    isUncountable =\n      this.rules.uncountable[lowercase] || this.rules.uncountable[lastWord];\n\n    if (isUncountable) {\n      return word;\n    }\n\n    for (rule in irregular) {\n      if (lowercase.match(rule + '$')) {\n        substitution = irregular[rule];\n\n        if (isCamelized && irregular[lastWord]) {\n          substitution = capitalize(substitution);\n          rule = capitalize(rule);\n        }\n\n        return word.replace(new RegExp(rule, 'i'), substitution);\n      }\n    }\n\n    for (var i = typeRules.length, min = 0; i > min; i--) {\n      inflection = typeRules[i - 1];\n      rule = inflection[0];\n\n      if (rule.test(word)) {\n        break;\n      }\n    }\n\n    inflection = inflection || [];\n\n    rule = inflection[0];\n    substitution = inflection[1];\n\n    result = word.replace(rule, substitution);\n\n    return result;\n  },\n};\n\nInflector.defaultRules = defaultRules;\nInflector.inflector = new Inflector(defaultRules);\n\nexport default Inflector;\n","/* eslint-disable import/extensions */\nimport Inflector from './inflector';\n\nfunction pluralize() {\n  return Inflector.inflector.pluralize(...arguments);\n}\n\nfunction singularize(word) {\n  return Inflector.inflector.singularize(word);\n}\n\nexport { pluralize, singularize };\n","import Ember from 'ember';\nimport Helper from '@ember/component/helper';\n\nexport default function makeHelper(helperFunction) {\n  if (Helper) {\n    return Helper.helper(helperFunction);\n  }\n  if (Ember.HTMLBars) {\n    return Ember.HTMLBars.makeBoundHelper(helperFunction);\n  }\n  return Ember.Handlebars.makeBoundHelper(helperFunction);\n}\n","import Helper from '@ember/component/helper';\nimport { service } from '@ember/service';\n\nimport type IntlService from '../services/intl.ts';\n\ntype FormatParameters = Parameters<IntlService['formatDateRange']>;\ntype From = FormatParameters[0];\ntype To = FormatParameters[1];\ntype Options = FormatParameters[2];\n\ninterface FormatDateRangeSignature {\n  Args: {\n    Named?: Options;\n    Positional: [From, To];\n  };\n  Return: string;\n}\n\nexport default class FormatDateRangeHelper extends Helper<FormatDateRangeSignature> {\n  @service declare intl: IntlService;\n\n  compute(\n    [from, to]: FormatDateRangeSignature['Args']['Positional'],\n    options: FormatDateRangeSignature['Args']['Named'],\n  ): FormatDateRangeSignature['Return'] {\n    return this.intl.formatDateRange(from, to, options);\n  }\n}\n","import Helper from '@ember/component/helper';\nimport { service } from '@ember/service';\n\nimport type IntlService from '../services/intl.ts';\n\ntype FormatParameters = Parameters<IntlService['formatDate']>;\ntype Value = FormatParameters[0];\ntype Options = FormatParameters[1];\n\ninterface FormatDateSignature {\n  Args: {\n    Named?: Options;\n    Positional: [Value];\n  };\n  Return: string;\n}\n\nexport default class FormatDateHelper extends Helper<FormatDateSignature> {\n  @service declare intl: IntlService;\n\n  compute(\n    [value]: FormatDateSignature['Args']['Positional'],\n    options: FormatDateSignature['Args']['Named'],\n  ): FormatDateSignature['Return'] {\n    return this.intl.formatDate(value, options);\n  }\n}\n","import Helper from '@ember/component/helper';\nimport { service } from '@ember/service';\n\nimport type IntlService from '../services/intl.ts';\n\ntype FormatParameters = Parameters<IntlService['formatDisplayName']>;\ntype Value = FormatParameters[0];\ntype Options = FormatParameters[1];\n\ninterface FormatDisplayNameSignature {\n  Args: {\n    Named: Options;\n    Positional: [Value];\n  };\n  Return: string;\n}\n\nexport default class FormatDisplayNameHelper extends Helper<FormatDisplayNameSignature> {\n  @service declare intl: IntlService;\n\n  compute(\n    [value]: FormatDisplayNameSignature['Args']['Positional'],\n    options: FormatDisplayNameSignature['Args']['Named'],\n  ): FormatDisplayNameSignature['Return'] {\n    return this.intl.formatDisplayName(value, options);\n  }\n}\n","import Helper from '@ember/component/helper';\nimport { service } from '@ember/service';\n\nimport type IntlService from '../services/intl.ts';\n\ntype FormatParameters = Parameters<IntlService['formatList']>;\ntype Value = FormatParameters[0];\ntype Options = FormatParameters[1];\n\ninterface FormatListSignature {\n  Args: {\n    Named?: Options;\n    Positional: [Value];\n  };\n  Return: string;\n}\n\nexport default class FormatListHelper extends Helper<FormatListSignature> {\n  @service declare intl: IntlService;\n\n  compute(\n    [value]: FormatListSignature['Args']['Positional'],\n    options: FormatListSignature['Args']['Named'],\n  ): FormatListSignature['Return'] {\n    return this.intl.formatList(value, options);\n  }\n}\n","import Helper from '@ember/component/helper';\nimport { service } from '@ember/service';\n\nimport type IntlService from '../services/intl.ts';\n\ntype FormatParameters = Parameters<IntlService['formatMessage']>;\ntype Value = FormatParameters[0];\ntype Options = FormatParameters[1];\n\ninterface FormatMessageSignature {\n  Args: {\n    Named?: Options;\n    Positional: [Value];\n  };\n  Return: string;\n}\n\nexport default class FormatMessageHelper extends Helper<FormatMessageSignature> {\n  @service declare intl: IntlService;\n\n  compute(\n    [value]: FormatMessageSignature['Args']['Positional'],\n    options: FormatMessageSignature['Args']['Named'],\n  ): FormatMessageSignature['Return'] {\n    return this.intl.formatMessage(value, options);\n  }\n}\n","import Helper from '@ember/component/helper';\nimport { service } from '@ember/service';\n\nimport type IntlService from '../services/intl.ts';\n\ntype FormatParameters = Parameters<IntlService['formatNumber']>;\ntype Value = FormatParameters[0];\ntype Options = FormatParameters[1];\n\ninterface FormatNumberSignature {\n  Args: {\n    Named?: Options;\n    Positional: [Value];\n  };\n  Return: string;\n}\n\nexport default class FormatNumberHelper extends Helper<FormatNumberSignature> {\n  @service declare intl: IntlService;\n\n  compute(\n    [value]: FormatNumberSignature['Args']['Positional'],\n    options: FormatNumberSignature['Args']['Named'],\n  ): FormatNumberSignature['Return'] {\n    return this.intl.formatNumber(value, options);\n  }\n}\n","import Helper from '@ember/component/helper';\nimport { service } from '@ember/service';\n\nimport type IntlService from '../services/intl.ts';\n\ntype FormatParameters = Parameters<IntlService['formatRelativeTime']>;\ntype Value = FormatParameters[0];\ntype Options = FormatParameters[1];\n\ninterface FormatRelativeTimeSignature {\n  Args: {\n    Named?: Options;\n    Positional: [Value];\n  };\n  Return: string;\n}\n\nexport default class FormatRelativeTimeHelper extends Helper<FormatRelativeTimeSignature> {\n  @service declare intl: IntlService;\n\n  compute(\n    [value]: FormatRelativeTimeSignature['Args']['Positional'],\n    options: FormatRelativeTimeSignature['Args']['Named'],\n  ): FormatRelativeTimeSignature['Return'] {\n    return this.intl.formatRelativeTime(value, options);\n  }\n}\n","import Helper from '@ember/component/helper';\nimport { service } from '@ember/service';\n\nimport type IntlService from '../services/intl.ts';\n\ntype FormatParameters = Parameters<IntlService['formatTime']>;\ntype Value = FormatParameters[0];\ntype Options = FormatParameters[1];\n\ninterface FormatTimeSignature {\n  Args: {\n    Named?: Options;\n    Positional: [Value];\n  };\n  Return: string;\n}\n\nexport default class FormatTimeHelper extends Helper<FormatTimeSignature> {\n  @service declare intl: IntlService;\n\n  compute(\n    [value]: FormatTimeSignature['Args']['Positional'],\n    options: FormatTimeSignature['Args']['Named'],\n  ): FormatTimeSignature['Return'] {\n    return this.intl.formatTime(value, options);\n  }\n}\n","export default function tKey<T extends string>(key: T): T {\n  return key;\n}\n","import Helper from '@ember/component/helper';\nimport { service } from '@ember/service';\n\nimport type IntlService from '../services/intl.ts';\n\ntype TParameters = Parameters<IntlService['t']>;\ntype Key = TParameters[0];\ntype Options = TParameters[1];\n\ninterface TSignature {\n  Args: {\n    Named?: Options;\n    Positional: [Key, Options] | [Key];\n  };\n  Return: string;\n}\n\nexport default class THelper extends Helper<TSignature> {\n  @service declare intl: IntlService;\n\n  compute(\n    [key, positionalOptions]: TSignature['Args']['Positional'],\n    namedOptions: TSignature['Args']['Named'],\n  ): TSignature['Return'] {\n    const options = positionalOptions\n      ? Object.assign({}, positionalOptions, namedOptions)\n      : namedOptions;\n\n    return this.intl.t(key, options);\n  }\n}\n","//\n// Main\n//\n\ntype Func = (...args: any[]) => any\n\nexport interface Cache<K, V> {\n  create: CacheCreateFunc<K, V>\n}\n\ninterface CacheCreateFunc<K, V> {\n  (): DefaultCache<K, V>\n}\n\ninterface DefaultCache<K, V> {\n  get(key: K): V | undefined\n  set(key: K, value: V | undefined): void\n}\n\nexport type Serializer = (args: any[]) => string\n\nexport interface Options<F extends Func> {\n  cache?: Cache<string, ReturnType<F>>\n  serializer?: Serializer\n  strategy?: MemoizeFunc<F>\n}\n\nexport interface ResolvedOptions<F extends Func> {\n  cache: Cache<string, ReturnType<F>>\n  serializer: Serializer\n}\n\nexport interface MemoizeFunc<F extends Func> {\n  (fn: F, options?: Options<F>): F\n}\n\nexport function memoize<F extends Func>(fn: F, options?: Options<F>): F {\n  const cache = options && options.cache ? options.cache : cacheDefault\n\n  const serializer =\n    options && options.serializer ? options.serializer : serializerDefault\n\n  const strategy =\n    options && options.strategy ? options.strategy : strategyDefault\n\n  return strategy(fn, {\n    cache,\n    serializer,\n  })\n}\n\n//\n// Strategy\n//\n\nfunction isPrimitive(value: any): boolean {\n  return (\n    value == null || typeof value === 'number' || typeof value === 'boolean'\n  ) // || typeof value === \"string\" 'unsafe' primitive for our needs\n}\n\nexport type StrategyFn = <F extends Func>(\n  this: unknown,\n  fn: F,\n  cache: DefaultCache<string, ReturnType<F>>,\n  serializer: Serializer,\n  arg: any\n) => any\n\nfunction monadic<F extends Func>(\n  this: unknown,\n  fn: F,\n  cache: DefaultCache<string, ReturnType<F>>,\n  serializer: Serializer,\n  arg: any\n) {\n  const cacheKey = isPrimitive(arg) ? arg : serializer(arg)\n\n  let computedValue = cache.get(cacheKey)\n  if (typeof computedValue === 'undefined') {\n    computedValue = fn.call(this, arg)\n    cache.set(cacheKey, computedValue)\n  }\n\n  return computedValue\n}\n\nfunction variadic<F extends Func>(\n  this: unknown,\n  fn: F,\n  cache: DefaultCache<string, ReturnType<F>>,\n  serializer: Serializer\n) {\n  const args = Array.prototype.slice.call(arguments, 3)\n  const cacheKey = serializer(args)\n\n  let computedValue = cache.get(cacheKey)\n  if (typeof computedValue === 'undefined') {\n    computedValue = fn.apply(this, args)\n    cache.set(cacheKey, computedValue)\n  }\n\n  return computedValue\n}\n\nfunction assemble<F extends Func>(\n  fn: F,\n  context: unknown,\n  strategy: StrategyFn,\n  cache: DefaultCache<string, ReturnType<F>>,\n  serialize: Serializer\n): F {\n  return strategy.bind(context, fn, cache, serialize) as F\n}\n\nfunction strategyDefault<F extends Func>(\n  this: unknown,\n  fn: F,\n  options: ResolvedOptions<F>\n) {\n  const strategy = fn.length === 1 ? monadic : variadic\n\n  return assemble(\n    fn,\n    this,\n    strategy,\n    options.cache.create(),\n    options.serializer\n  )\n}\n\nfunction strategyVariadic<F extends Func>(\n  this: unknown,\n  fn: F,\n  options: ResolvedOptions<F>\n) {\n  return assemble(\n    fn,\n    this,\n    variadic,\n    options.cache.create(),\n    options.serializer\n  )\n}\n\nfunction strategyMonadic<F extends Func>(\n  this: unknown,\n  fn: F,\n  options: ResolvedOptions<F>\n) {\n  return assemble(fn, this, monadic, options.cache.create(), options.serializer)\n}\n\n//\n// Serializer\n//\n\nconst serializerDefault: Serializer = function (): string {\n  return JSON.stringify(arguments)\n}\n\n//\n// Cache\n//\n\nclass ObjectWithoutPrototypeCache {\n  private cache: Record<string, any>\n\n  constructor() {\n    this.cache = Object.create(null) as Record<string, any>\n  }\n\n  get(key: string) {\n    return this.cache[key]\n  }\n\n  set<T>(key: string, value: T): void {\n    this.cache[key] = value\n  }\n}\n\nconst cacheDefault: Cache<any, any> = {\n  create: function create() {\n    return new ObjectWithoutPrototypeCache()\n  },\n}\n\n//\n// API\n//\n\nexport interface Strategies<F extends Func> {\n  variadic: MemoizeFunc<F>\n  monadic: MemoizeFunc<F>\n}\n\nexport const strategies: Strategies<Func> = {\n  variadic: strategyVariadic as MemoizeFunc<Func>,\n  monadic: strategyMonadic as MemoizeFunc<Func>,\n}\n","/**\n * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js\n * with some tweaks\n */\nconst DATE_TIME_REGEX =\n  /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g\n\n/**\n * Parse Date time skeleton into Intl.DateTimeFormatOptions\n * Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * @public\n * @param skeleton skeleton string\n */\nexport function parseDateTimeSkeleton(\n  skeleton: string\n): Intl.DateTimeFormatOptions {\n  const result: Intl.DateTimeFormatOptions = {}\n  skeleton.replace(DATE_TIME_REGEX, match => {\n    const len = match.length\n    switch (match[0]) {\n      // Era\n      case 'G':\n        result.era = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short'\n        break\n      // Year\n      case 'y':\n        result.year = len === 2 ? '2-digit' : 'numeric'\n        break\n      case 'Y':\n      case 'u':\n      case 'U':\n      case 'r':\n        throw new RangeError(\n          '`Y/u/U/r` (year) patterns are not supported, use `y` instead'\n        )\n      // Quarter\n      case 'q':\n      case 'Q':\n        throw new RangeError('`q/Q` (quarter) patterns are not supported')\n      // Month\n      case 'M':\n      case 'L':\n        result.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][\n          len - 1\n        ] as 'numeric'\n        break\n      // Week\n      case 'w':\n      case 'W':\n        throw new RangeError('`w/W` (week) patterns are not supported')\n      case 'd':\n        result.day = ['numeric', '2-digit'][len - 1] as 'numeric'\n        break\n      case 'D':\n      case 'F':\n      case 'g':\n        throw new RangeError(\n          '`D/F/g` (day) patterns are not supported, use `d` instead'\n        )\n      // Weekday\n      case 'E':\n        result.weekday = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short'\n        break\n      case 'e':\n        if (len < 4) {\n          throw new RangeError('`e..eee` (weekday) patterns are not supported')\n        }\n        result.weekday = ['short', 'long', 'narrow', 'short'][\n          len - 3\n        ] as 'short'\n        break\n      case 'c':\n        if (len < 4) {\n          throw new RangeError('`c..ccc` (weekday) patterns are not supported')\n        }\n        result.weekday = ['short', 'long', 'narrow', 'short'][\n          len - 3\n        ] as 'short'\n        break\n\n      // Period\n      case 'a': // AM, PM\n        result.hour12 = true\n        break\n      case 'b': // am, pm, noon, midnight\n      case 'B': // flexible day periods\n        throw new RangeError(\n          '`b/B` (period) patterns are not supported, use `a` instead'\n        )\n      // Hour\n      case 'h':\n        result.hourCycle = 'h12'\n        result.hour = ['numeric', '2-digit'][len - 1] as 'numeric'\n        break\n      case 'H':\n        result.hourCycle = 'h23'\n        result.hour = ['numeric', '2-digit'][len - 1] as 'numeric'\n        break\n      case 'K':\n        result.hourCycle = 'h11'\n        result.hour = ['numeric', '2-digit'][len - 1] as 'numeric'\n        break\n      case 'k':\n        result.hourCycle = 'h24'\n        result.hour = ['numeric', '2-digit'][len - 1] as 'numeric'\n        break\n      case 'j':\n      case 'J':\n      case 'C':\n        throw new RangeError(\n          '`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead'\n        )\n      // Minute\n      case 'm':\n        result.minute = ['numeric', '2-digit'][len - 1] as 'numeric'\n        break\n      // Second\n      case 's':\n        result.second = ['numeric', '2-digit'][len - 1] as 'numeric'\n        break\n      case 'S':\n      case 'A':\n        throw new RangeError(\n          '`S/A` (second) patterns are not supported, use `s` instead'\n        )\n      // Zone\n      case 'z': // 1..3, 4: specific non-location format\n        result.timeZoneName = len < 4 ? 'short' : 'long'\n        break\n      case 'Z': // 1..3, 4, 5: The ISO8601 varios formats\n      case 'O': // 1, 4: milliseconds in day short, long\n      case 'v': // 1, 4: generic non-location format\n      case 'V': // 1, 2, 3, 4: time zone ID or city\n      case 'X': // 1, 2, 3, 4: The ISO8601 varios formats\n      case 'x': // 1, 2, 3, 4: The ISO8601 varios formats\n        throw new RangeError(\n          '`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead'\n        )\n    }\n    return ''\n  })\n  return result\n}\n","// @generated from regex-gen.ts\nexport const WHITE_SPACE_REGEX = /[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;\n","import type {NumberFormatOptions} from '#packages/ecma402-abstract/types/number.js'\nimport {WHITE_SPACE_REGEX} from '@formatjs_generated/unicode/icu-skeleton-parser-regex.js'\n\nexport interface ExtendedNumberFormatOptions extends NumberFormatOptions {\n  scale?: number\n}\nexport interface NumberSkeletonToken {\n  stem: string\n  options: string[]\n}\n\nexport function parseNumberSkeletonFromString(\n  skeleton: string\n): NumberSkeletonToken[] {\n  if (skeleton.length === 0) {\n    throw new Error('Number skeleton cannot be empty')\n  }\n  // Parse the skeleton\n  const stringTokens = skeleton\n    .split(WHITE_SPACE_REGEX)\n    .filter(x => x.length > 0)\n\n  const tokens: NumberSkeletonToken[] = []\n  for (const stringToken of stringTokens) {\n    let stemAndOptions = stringToken.split('/')\n    if (stemAndOptions.length === 0) {\n      throw new Error('Invalid number skeleton')\n    }\n\n    const [stem, ...options] = stemAndOptions\n    for (const option of options) {\n      if (option.length === 0) {\n        throw new Error('Invalid number skeleton')\n      }\n    }\n\n    tokens.push({stem, options})\n  }\n  return tokens\n}\n\nfunction icuUnitToEcma(unit: string): ExtendedNumberFormatOptions['unit'] {\n  return unit.replace(/^(.*?)-/, '') as ExtendedNumberFormatOptions['unit']\n}\n\nconst FRACTION_PRECISION_REGEX = /^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g\nconst SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\\+|#+)?[rs]?$/g\nconst INTEGER_WIDTH_REGEX = /(\\*)(0+)|(#+)(0+)|(0+)/g\nconst CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/\n\nfunction parseSignificantPrecision(str: string): ExtendedNumberFormatOptions {\n  const result: ExtendedNumberFormatOptions = {}\n  if (str[str.length - 1] === 'r') {\n    result.roundingPriority = 'morePrecision'\n  } else if (str[str.length - 1] === 's') {\n    result.roundingPriority = 'lessPrecision'\n  }\n  str.replace(\n    SIGNIFICANT_PRECISION_REGEX,\n    function (_: string, g1: string, g2: string | number) {\n      // @@@ case\n      if (typeof g2 !== 'string') {\n        result.minimumSignificantDigits = g1.length\n        result.maximumSignificantDigits = g1.length\n      }\n      // @@@+ case\n      else if (g2 === '+') {\n        result.minimumSignificantDigits = g1.length\n      }\n      // .### case\n      else if (g1[0] === '#') {\n        result.maximumSignificantDigits = g1.length\n      }\n      // .@@## or .@@@ case\n      else {\n        result.minimumSignificantDigits = g1.length\n        result.maximumSignificantDigits =\n          g1.length + (typeof g2 === 'string' ? g2.length : 0)\n      }\n      return ''\n    }\n  )\n  return result\n}\n\nfunction parseSign(str: string): ExtendedNumberFormatOptions | undefined {\n  switch (str) {\n    case 'sign-auto':\n      return {\n        signDisplay: 'auto',\n      }\n    case 'sign-accounting':\n    case '()':\n      return {\n        currencySign: 'accounting',\n      }\n    case 'sign-always':\n    case '+!':\n      return {\n        signDisplay: 'always',\n      }\n    case 'sign-accounting-always':\n    case '()!':\n      return {\n        signDisplay: 'always',\n        currencySign: 'accounting',\n      }\n    case 'sign-except-zero':\n    case '+?':\n      return {\n        signDisplay: 'exceptZero',\n      }\n    case 'sign-accounting-except-zero':\n    case '()?':\n      return {\n        signDisplay: 'exceptZero',\n        currencySign: 'accounting',\n      }\n    case 'sign-never':\n    case '+_':\n      return {\n        signDisplay: 'never',\n      }\n  }\n}\n\nfunction parseConciseScientificAndEngineeringStem(\n  stem: string\n): ExtendedNumberFormatOptions | undefined {\n  // Engineering\n  let result: ExtendedNumberFormatOptions | undefined\n  if (stem[0] === 'E' && stem[1] === 'E') {\n    result = {\n      notation: 'engineering',\n    }\n    stem = stem.slice(2)\n  } else if (stem[0] === 'E') {\n    result = {\n      notation: 'scientific',\n    }\n    stem = stem.slice(1)\n  }\n  if (result) {\n    const signDisplay = stem.slice(0, 2)\n    if (signDisplay === '+!') {\n      result.signDisplay = 'always'\n      stem = stem.slice(2)\n    } else if (signDisplay === '+?') {\n      result.signDisplay = 'exceptZero'\n      stem = stem.slice(2)\n    }\n    if (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) {\n      throw new Error('Malformed concise eng/scientific notation')\n    }\n    result.minimumIntegerDigits = stem.length\n  }\n  return result\n}\n\nfunction parseNotationOptions(opt: string): ExtendedNumberFormatOptions {\n  const result: ExtendedNumberFormatOptions = {}\n  const signOpts = parseSign(opt)\n  if (signOpts) {\n    return signOpts\n  }\n  return result\n}\n\n/**\n * https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options\n */\nexport function parseNumberSkeleton(\n  tokens: NumberSkeletonToken[]\n): ExtendedNumberFormatOptions {\n  let result: ExtendedNumberFormatOptions = {}\n  for (const token of tokens) {\n    switch (token.stem) {\n      case 'percent':\n      case '%':\n        result.style = 'percent'\n        continue\n      case '%x100':\n        result.style = 'percent'\n        result.scale = 100\n        continue\n      case 'currency':\n        result.style = 'currency'\n        result.currency = token.options[0]\n        continue\n      case 'group-off':\n      case ',_':\n        result.useGrouping = false\n        continue\n      case 'precision-integer':\n      case '.':\n        result.maximumFractionDigits = 0\n        continue\n      case 'measure-unit':\n      case 'unit':\n        result.style = 'unit'\n        result.unit = icuUnitToEcma(token.options[0])\n        continue\n      case 'compact-short':\n      case 'K':\n        result.notation = 'compact'\n        result.compactDisplay = 'short'\n        continue\n      case 'compact-long':\n      case 'KK':\n        result.notation = 'compact'\n        result.compactDisplay = 'long'\n        continue\n      case 'scientific':\n        result = {\n          ...result,\n          notation: 'scientific',\n          ...token.options.reduce(\n            (all, opt) => ({...all, ...parseNotationOptions(opt)}),\n            {}\n          ),\n        }\n        continue\n      case 'engineering':\n        result = {\n          ...result,\n          notation: 'engineering',\n          ...token.options.reduce(\n            (all, opt) => ({...all, ...parseNotationOptions(opt)}),\n            {}\n          ),\n        }\n        continue\n      case 'notation-simple':\n        result.notation = 'standard'\n        continue\n      // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h\n      case 'unit-width-narrow':\n        result.currencyDisplay = 'narrowSymbol'\n        result.unitDisplay = 'narrow'\n        continue\n      case 'unit-width-short':\n        result.currencyDisplay = 'code'\n        result.unitDisplay = 'short'\n        continue\n      case 'unit-width-full-name':\n        result.currencyDisplay = 'name'\n        result.unitDisplay = 'long'\n        continue\n      case 'unit-width-iso-code':\n        result.currencyDisplay = 'symbol'\n        continue\n      case 'scale':\n        result.scale = parseFloat(token.options[0])\n        continue\n      case 'rounding-mode-floor':\n        result.roundingMode = 'floor'\n        continue\n      case 'rounding-mode-ceiling':\n        result.roundingMode = 'ceil'\n        continue\n      case 'rounding-mode-down':\n        result.roundingMode = 'trunc'\n        continue\n      case 'rounding-mode-up':\n        result.roundingMode = 'expand'\n        continue\n      case 'rounding-mode-half-even':\n        result.roundingMode = 'halfEven'\n        continue\n      case 'rounding-mode-half-down':\n        result.roundingMode = 'halfTrunc'\n        continue\n      case 'rounding-mode-half-up':\n        result.roundingMode = 'halfExpand'\n        continue\n      // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n      case 'integer-width':\n        if (token.options.length > 1) {\n          throw new RangeError(\n            'integer-width stems only accept a single optional option'\n          )\n        }\n        token.options[0].replace(\n          INTEGER_WIDTH_REGEX,\n          function (\n            _: string,\n            g1: string,\n            g2: string,\n            g3: string,\n            g4: string,\n            g5: string\n          ) {\n            if (g1) {\n              result.minimumIntegerDigits = g2.length\n            } else if (g3 && g4) {\n              throw new Error(\n                'We currently do not support maximum integer digits'\n              )\n            } else if (g5) {\n              throw new Error(\n                'We currently do not support exact integer digits'\n              )\n            }\n            return ''\n          }\n        )\n        continue\n    }\n    // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n    if (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) {\n      result.minimumIntegerDigits = token.stem.length\n      continue\n    }\n    if (FRACTION_PRECISION_REGEX.test(token.stem)) {\n      // Precision\n      // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision\n      // precision-integer case\n      if (token.options.length > 1) {\n        throw new RangeError(\n          'Fraction-precision stems only accept a single optional option'\n        )\n      }\n      token.stem.replace(\n        FRACTION_PRECISION_REGEX,\n        function (\n          _: string,\n          g1: string,\n          g2: string | number,\n          g3: string,\n          g4: string,\n          g5: string\n        ) {\n          // .000* case (before ICU67 it was .000+)\n          if (g2 === '*') {\n            result.minimumFractionDigits = g1.length\n          }\n          // .### case\n          else if (g3 && g3[0] === '#') {\n            result.maximumFractionDigits = g3.length\n          }\n          // .00## case\n          else if (g4 && g5) {\n            result.minimumFractionDigits = g4.length\n            result.maximumFractionDigits = g4.length + g5.length\n          } else {\n            result.minimumFractionDigits = g1.length\n            result.maximumFractionDigits = g1.length\n          }\n          return ''\n        }\n      )\n\n      const opt = token.options[0]\n      // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display\n      if (opt === 'w') {\n        result = {...result, trailingZeroDisplay: 'stripIfInteger'}\n      } else if (opt) {\n        result = {...result, ...parseSignificantPrecision(opt)}\n      }\n      continue\n    }\n    // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision\n    if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {\n      result = {...result, ...parseSignificantPrecision(token.stem)}\n      continue\n    }\n    const signOpts = parseSign(token.stem)\n    if (signOpts) {\n      result = {...result, ...signOpts}\n    }\n    const conciseScientificAndEngineeringOpts =\n      parseConciseScientificAndEngineeringStem(token.stem)\n    if (conciseScientificAndEngineeringOpts) {\n      result = {...result, ...conciseScientificAndEngineeringOpts}\n    }\n  }\n  return result\n}\n","import {type Location} from '#packages/icu-messageformat-parser/types.js'\n\nexport interface ParserError {\n  kind: ErrorKind\n  message: string\n  location: Location\n}\n\nexport enum ErrorKind {\n  /** Argument is unclosed (e.g. `{0`) */\n  EXPECT_ARGUMENT_CLOSING_BRACE = 1,\n  /** Argument is empty (e.g. `{}`). */\n  EMPTY_ARGUMENT = 2,\n  /** Argument is malformed (e.g. `{foo!}``) */\n  MALFORMED_ARGUMENT = 3,\n  /** Expect an argument type (e.g. `{foo,}`) */\n  EXPECT_ARGUMENT_TYPE = 4,\n  /** Unsupported argument type (e.g. `{foo,foo}`) */\n  INVALID_ARGUMENT_TYPE = 5,\n  /** Expect an argument style (e.g. `{foo, number, }`) */\n  EXPECT_ARGUMENT_STYLE = 6,\n  /** The number skeleton is invalid. */\n  INVALID_NUMBER_SKELETON = 7,\n  /** The date time skeleton is invalid. */\n  INVALID_DATE_TIME_SKELETON = 8,\n  /** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */\n  EXPECT_NUMBER_SKELETON = 9,\n  /** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */\n  EXPECT_DATE_TIME_SKELETON = 10,\n  /** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */\n  UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11,\n  /** Missing select argument options (e.g. `{foo, select}`) */\n  EXPECT_SELECT_ARGUMENT_OPTIONS = 12,\n\n  /** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */\n  EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13,\n  /** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */\n  INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14,\n\n  /** Expecting a selector in `select` argument (e.g `{foo, select}`) */\n  EXPECT_SELECT_ARGUMENT_SELECTOR = 15,\n  /** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */\n  EXPECT_PLURAL_ARGUMENT_SELECTOR = 16,\n\n  /** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */\n  EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17,\n  /**\n   * Expecting a message fragment after the `plural` or `selectordinal` selector\n   * (e.g. `{foo, plural, one}`)\n   */\n  EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18,\n\n  /** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */\n  INVALID_PLURAL_ARGUMENT_SELECTOR = 19,\n\n  /**\n   * Duplicate selectors in `plural` or `selectordinal` argument.\n   * (e.g. {foo, plural, one {#} one {#}})\n   */\n  DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20,\n  /** Duplicate selectors in `select` argument.\n   * (e.g. {foo, select, apple {apple} apple {apple}})\n   */\n  DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21,\n\n  /** Plural or select argument option must have `other` clause. */\n  MISSING_OTHER_CLAUSE = 22,\n\n  /** The tag is malformed. (e.g. `<bold!>foo</bold!>) */\n  INVALID_TAG = 23,\n  /** The tag name is invalid. (e.g. `<123>foo</123>`) */\n  INVALID_TAG_NAME = 25,\n  /** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */\n  UNMATCHED_CLOSING_TAG = 26,\n  /** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */\n  UNCLOSED_TAG = 27,\n}\n","import type {NumberFormatOptions} from '#packages/ecma402-abstract/types/number.js'\nimport {type NumberSkeletonToken} from '@formatjs/icu-skeleton-parser'\n\nexport interface ExtendedNumberFormatOptions extends NumberFormatOptions {\n  scale?: number\n}\n\nexport enum TYPE {\n  /**\n   * Raw text\n   */\n  literal,\n  /**\n   * Variable w/o any format, e.g `var` in `this is a {var}`\n   */\n  argument,\n  /**\n   * Variable w/ number format\n   */\n  number,\n  /**\n   * Variable w/ date format\n   */\n  date,\n  /**\n   * Variable w/ time format\n   */\n  time,\n  /**\n   * Variable w/ select format\n   */\n  select,\n  /**\n   * Variable w/ plural format\n   */\n  plural,\n  /**\n   * Only possible within plural argument.\n   * This is the `#` symbol that will be substituted with the count.\n   */\n  pound,\n  /**\n   * XML-like tag\n   */\n  tag,\n}\n\nexport enum SKELETON_TYPE {\n  number,\n  dateTime,\n}\n\nexport interface LocationDetails {\n  offset: number\n  line: number\n  column: number\n}\nexport interface Location {\n  start: LocationDetails\n  end: LocationDetails\n}\n\nexport interface BaseElement<T extends TYPE> {\n  type: T\n  value: string\n  location?: Location\n}\n\nexport type LiteralElement = BaseElement<TYPE.literal>\nexport type ArgumentElement = BaseElement<TYPE.argument>\nexport interface TagElement extends BaseElement<TYPE.tag> {\n  children: MessageFormatElement[]\n}\n\nexport interface SimpleFormatElement<\n  T extends TYPE,\n  S extends Skeleton,\n> extends BaseElement<T> {\n  style?: string | S | null\n}\n\nexport type NumberElement = SimpleFormatElement<TYPE.number, NumberSkeleton>\nexport type DateElement = SimpleFormatElement<TYPE.date, DateTimeSkeleton>\nexport type TimeElement = SimpleFormatElement<TYPE.time, DateTimeSkeleton>\n\nexport type ValidPluralRule =\n  | 'zero'\n  | 'one'\n  | 'two'\n  | 'few'\n  | 'many'\n  | 'other'\n  | string\n\nexport interface PluralOrSelectOption {\n  value: MessageFormatElement[]\n  location?: Location\n}\n\nexport interface SelectElement extends BaseElement<TYPE.select> {\n  options: Record<string, PluralOrSelectOption>\n}\n\nexport interface PluralElement extends BaseElement<TYPE.plural> {\n  options: Record<ValidPluralRule, PluralOrSelectOption>\n  offset: number\n  pluralType: Intl.PluralRulesOptions['type']\n}\n\nexport interface PoundElement {\n  type: TYPE.pound\n  location?: Location\n}\n\nexport type MessageFormatElement =\n  | ArgumentElement\n  | DateElement\n  | LiteralElement\n  | NumberElement\n  | PluralElement\n  | PoundElement\n  | SelectElement\n  | TagElement\n  | TimeElement\n\nexport interface NumberSkeleton {\n  type: SKELETON_TYPE.number\n  tokens: NumberSkeletonToken[]\n  location?: Location\n  parsedOptions: ExtendedNumberFormatOptions\n}\n\nexport interface DateTimeSkeleton {\n  type: SKELETON_TYPE.dateTime\n  pattern: string\n  location?: Location\n  parsedOptions: Intl.DateTimeFormatOptions\n}\n\nexport type Skeleton = NumberSkeleton | DateTimeSkeleton\n\n/**\n * Type Guards\n */\nexport function isLiteralElement(\n  el: MessageFormatElement\n): el is LiteralElement {\n  return el.type === TYPE.literal\n}\nexport function isArgumentElement(\n  el: MessageFormatElement\n): el is ArgumentElement {\n  return el.type === TYPE.argument\n}\nexport function isNumberElement(el: MessageFormatElement): el is NumberElement {\n  return el.type === TYPE.number\n}\nexport function isDateElement(el: MessageFormatElement): el is DateElement {\n  return el.type === TYPE.date\n}\nexport function isTimeElement(el: MessageFormatElement): el is TimeElement {\n  return el.type === TYPE.time\n}\nexport function isSelectElement(el: MessageFormatElement): el is SelectElement {\n  return el.type === TYPE.select\n}\nexport function isPluralElement(el: MessageFormatElement): el is PluralElement {\n  return el.type === TYPE.plural\n}\nexport function isPoundElement(el: MessageFormatElement): el is PoundElement {\n  return el.type === TYPE.pound\n}\nexport function isTagElement(el: MessageFormatElement): el is TagElement {\n  return el.type === TYPE.tag\n}\nexport function isNumberSkeleton(\n  el: NumberElement['style'] | Skeleton\n): el is NumberSkeleton {\n  return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.number)\n}\nexport function isDateTimeSkeleton(\n  el?: DateElement['style'] | TimeElement['style'] | Skeleton\n): el is DateTimeSkeleton {\n  return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.dateTime)\n}\n\nexport function createLiteralElement(value: string): LiteralElement {\n  return {\n    type: TYPE.literal,\n    value,\n  }\n}\n\nexport function createNumberElement(\n  value: string,\n  style?: string | null\n): NumberElement {\n  return {\n    type: TYPE.number,\n    value,\n    style,\n  }\n}\n","// @generated from regex-gen.ts\nexport const SPACE_SEPARATOR_REGEX = /[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/;\nexport const WHITE_SPACE_REGEX = /[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/;\n","// @generated from time-data-gen.ts\n// prettier-ignore\nexport const timeData = {\n\t\"001\": [\"H\", \"h\"],\n\t\"419\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"AC\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"AD\": [\"H\", \"hB\"],\n\t\"AE\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"AF\": [\n\t\t\"H\",\n\t\t\"hb\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"AG\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"AI\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"AL\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"AM\": [\"H\", \"hB\"],\n\t\"AO\": [\"H\", \"hB\"],\n\t\"AR\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"AS\": [\"h\", \"H\"],\n\t\"AT\": [\"H\", \"hB\"],\n\t\"AU\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"AW\": [\"H\", \"hB\"],\n\t\"AX\": [\"H\"],\n\t\"AZ\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"BA\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"BB\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"BD\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"H\"\n\t],\n\t\"BE\": [\"H\", \"hB\"],\n\t\"BF\": [\"H\", \"hB\"],\n\t\"BG\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"BH\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"BI\": [\"H\", \"h\"],\n\t\"BJ\": [\"H\", \"hB\"],\n\t\"BL\": [\"H\", \"hB\"],\n\t\"BM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"BN\": [\n\t\t\"hb\",\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"BO\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"BQ\": [\"H\"],\n\t\"BR\": [\"H\", \"hB\"],\n\t\"BS\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"BT\": [\"h\", \"H\"],\n\t\"BW\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"BY\": [\"H\", \"h\"],\n\t\"BZ\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"CA\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"CC\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"CD\": [\"hB\", \"H\"],\n\t\"CF\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"CG\": [\"H\", \"hB\"],\n\t\"CH\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"CI\": [\"H\", \"hB\"],\n\t\"CK\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"CL\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"CM\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"CN\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\"\n\t],\n\t\"CO\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"CP\": [\"H\"],\n\t\"CR\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"CU\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"CV\": [\"H\", \"hB\"],\n\t\"CW\": [\"H\", \"hB\"],\n\t\"CX\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"CY\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"CZ\": [\"H\"],\n\t\"DE\": [\"H\", \"hB\"],\n\t\"DG\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"DJ\": [\"h\", \"H\"],\n\t\"DK\": [\"H\"],\n\t\"DM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"DO\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"DZ\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"EA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"EC\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"EE\": [\"H\", \"hB\"],\n\t\"EG\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"EH\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"ER\": [\"h\", \"H\"],\n\t\"ES\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"hb\"\n\t],\n\t\"ET\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"FI\": [\"H\"],\n\t\"FJ\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"FK\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"FM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"FO\": [\"H\", \"h\"],\n\t\"FR\": [\"H\", \"hB\"],\n\t\"GA\": [\"H\", \"hB\"],\n\t\"GB\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"GD\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"GE\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"GF\": [\"H\", \"hB\"],\n\t\"GG\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"GH\": [\"h\", \"H\"],\n\t\"GI\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"GL\": [\"H\", \"h\"],\n\t\"GM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"GN\": [\"H\", \"hB\"],\n\t\"GP\": [\"H\", \"hB\"],\n\t\"GQ\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"hb\"\n\t],\n\t\"GR\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"GS\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"GT\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"GU\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"GW\": [\"H\", \"hB\"],\n\t\"GY\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"HK\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"HN\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"HR\": [\"H\", \"hB\"],\n\t\"HU\": [\"H\", \"h\"],\n\t\"IC\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"ID\": [\"H\"],\n\t\"IE\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"IL\": [\"H\", \"hB\"],\n\t\"IM\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"IN\": [\"h\", \"H\"],\n\t\"IO\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"IQ\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"IR\": [\"hB\", \"H\"],\n\t\"IS\": [\"H\"],\n\t\"IT\": [\"H\", \"hB\"],\n\t\"JE\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"JM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"JO\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"JP\": [\n\t\t\"H\",\n\t\t\"K\",\n\t\t\"h\"\n\t],\n\t\"KE\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"h\"\n\t],\n\t\"KG\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"KH\": [\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hb\"\n\t],\n\t\"KI\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"KM\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"KN\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"KP\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"KR\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"KW\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"KY\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"KZ\": [\"H\", \"hB\"],\n\t\"LA\": [\n\t\t\"H\",\n\t\t\"hb\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"LB\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"LC\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"LI\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"LK\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"LR\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"LS\": [\"h\", \"H\"],\n\t\"LT\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"LU\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"LV\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\"\n\t],\n\t\"LY\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"MA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"MC\": [\"H\", \"hB\"],\n\t\"MD\": [\"H\", \"hB\"],\n\t\"ME\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"MF\": [\"H\", \"hB\"],\n\t\"MG\": [\"H\", \"h\"],\n\t\"MH\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"MK\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"ML\": [\"H\"],\n\t\"MM\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"h\"\n\t],\n\t\"MN\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"MO\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"MP\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"MQ\": [\"H\", \"hB\"],\n\t\"MR\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"MS\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"MT\": [\"H\", \"h\"],\n\t\"MU\": [\"H\", \"h\"],\n\t\"MV\": [\"H\", \"h\"],\n\t\"MW\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"MX\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"MY\": [\n\t\t\"hb\",\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"MZ\": [\"H\", \"hB\"],\n\t\"NA\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"NC\": [\"H\", \"hB\"],\n\t\"NE\": [\"H\"],\n\t\"NF\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"NG\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"NI\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"NL\": [\"H\", \"hB\"],\n\t\"NO\": [\"H\", \"h\"],\n\t\"NP\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"NR\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"NU\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"NZ\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"OM\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"PA\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"PE\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"PF\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"PG\": [\"h\", \"H\"],\n\t\"PH\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"PK\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"H\"\n\t],\n\t\"PL\": [\"H\", \"h\"],\n\t\"PM\": [\"H\", \"hB\"],\n\t\"PN\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"PR\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"PS\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"PT\": [\"H\", \"hB\"],\n\t\"PW\": [\"h\", \"H\"],\n\t\"PY\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"QA\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"RE\": [\"H\", \"hB\"],\n\t\"RO\": [\"H\", \"hB\"],\n\t\"RS\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"RU\": [\"H\"],\n\t\"RW\": [\"H\", \"h\"],\n\t\"SA\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"SB\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"SC\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"SD\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"SE\": [\"H\"],\n\t\"SG\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"SH\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"SI\": [\"H\", \"hB\"],\n\t\"SJ\": [\"H\"],\n\t\"SK\": [\"H\"],\n\t\"SL\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"SM\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"SN\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"SO\": [\"h\", \"H\"],\n\t\"SR\": [\"H\", \"hB\"],\n\t\"SS\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"ST\": [\"H\", \"hB\"],\n\t\"SV\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"SX\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"SY\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"SZ\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"TA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"TC\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"TD\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"TF\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"TG\": [\"H\", \"hB\"],\n\t\"TH\": [\"H\", \"h\"],\n\t\"TJ\": [\"H\", \"h\"],\n\t\"TL\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\"\n\t],\n\t\"TM\": [\"H\", \"h\"],\n\t\"TN\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"TO\": [\"h\", \"H\"],\n\t\"TR\": [\"H\", \"hB\"],\n\t\"TT\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"TW\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"TZ\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"h\"\n\t],\n\t\"UA\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"UG\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"h\"\n\t],\n\t\"UM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"US\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"UY\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"UZ\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"VA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"VC\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"VE\": [\n\t\t\"h\",\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"VG\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"VI\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"VN\": [\"H\", \"h\"],\n\t\"VU\": [\"h\", \"H\"],\n\t\"WF\": [\"H\", \"hB\"],\n\t\"WS\": [\"h\", \"H\"],\n\t\"XK\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"h\"\n\t],\n\t\"YE\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"YT\": [\"H\", \"hB\"],\n\t\"ZA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"ZM\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"ZW\": [\"H\", \"h\"],\n\t\"af-ZA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"ar-001\": [\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"ca-ES\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"en-001\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"en-HK\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"en-IL\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"hB\"\n\t],\n\t\"en-MY\": [\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\",\n\t\t\"hB\"\n\t],\n\t\"es-BR\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"es-ES\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"es-GQ\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\",\n\t\t\"hb\"\n\t],\n\t\"fr-CA\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"gl-ES\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"gu-IN\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"hi-IN\": [\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"it-CH\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"it-IT\": [\n\t\t\"H\",\n\t\t\"h\",\n\t\t\"hB\"\n\t],\n\t\"kn-IN\": [\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"ku-SY\": [\"H\", \"hB\"],\n\t\"ml-IN\": [\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"mr-IN\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"pa-IN\": [\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"ta-IN\": [\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"hb\",\n\t\t\"H\"\n\t],\n\t\"te-IN\": [\n\t\t\"hB\",\n\t\t\"h\",\n\t\t\"H\"\n\t],\n\t\"zu-ZA\": [\n\t\t\"H\",\n\t\t\"hB\",\n\t\t\"hb\",\n\t\t\"h\"\n\t]\n};\n","import {timeData} from '@formatjs_generated/cldr.core/time-data.js'\n\n/**\n * Returns the best matching date time pattern if a date time skeleton\n * pattern is provided with a locale. Follows the Unicode specification:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns\n * @param skeleton date time skeleton pattern that possibly includes j, J or C\n * @param locale\n */\nexport function getBestPattern(skeleton: string, locale: Intl.Locale): string {\n  let skeletonCopy = ''\n  for (let patternPos = 0; patternPos < skeleton.length; patternPos++) {\n    const patternChar = skeleton.charAt(patternPos)\n\n    if (patternChar === 'j') {\n      let extraLength = 0\n      while (\n        patternPos + 1 < skeleton.length &&\n        skeleton.charAt(patternPos + 1) === patternChar\n      ) {\n        extraLength++\n        patternPos++\n      }\n\n      let hourLen = 1 + (extraLength & 1)\n      let dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1)\n      let dayPeriodChar = 'a'\n      let hourChar = getDefaultHourSymbolFromLocale(locale)\n\n      if (hourChar == 'H' || hourChar == 'k') {\n        dayPeriodLen = 0\n      }\n\n      while (dayPeriodLen-- > 0) {\n        skeletonCopy += dayPeriodChar\n      }\n      while (hourLen-- > 0) {\n        skeletonCopy = hourChar + skeletonCopy\n      }\n    } else if (patternChar === 'J') {\n      skeletonCopy += 'H'\n    } else {\n      skeletonCopy += patternChar\n    }\n  }\n\n  return skeletonCopy\n}\n\n/**\n * Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)\n * of the given `locale` to the corresponding time pattern.\n * @param locale\n */\nfunction getDefaultHourSymbolFromLocale(locale: Intl.Locale): string {\n  let hourCycle = locale.hourCycle\n\n  if (\n    hourCycle === undefined &&\n    // @ts-ignore hourCycle(s) is not identified yet\n    locale.hourCycles &&\n    // @ts-ignore\n    locale.hourCycles.length\n  ) {\n    // @ts-ignore\n    hourCycle = locale.hourCycles[0]\n  }\n\n  if (hourCycle) {\n    switch (hourCycle) {\n      case 'h24':\n        return 'k'\n      case 'h23':\n        return 'H'\n      case 'h12':\n        return 'h'\n      case 'h11':\n        return 'K'\n      default:\n        throw new Error('Invalid hourCycle')\n    }\n  }\n\n  // TODO: Once hourCycle is fully supported remove the following with data generation\n  const languageTag = locale.language\n  let regionTag: string | undefined\n  if (languageTag !== 'root') {\n    regionTag = locale.maximize().region\n  }\n  const hourCycles =\n    timeData[regionTag || ''] ||\n    timeData[languageTag || ''] ||\n    timeData[`${languageTag}-001`] ||\n    timeData['001']\n  return hourCycles[0]\n}\n","import {\n  ErrorKind,\n  type ParserError,\n} from '#packages/icu-messageformat-parser/error.js'\nimport {\n  type DateTimeSkeleton,\n  type LiteralElement,\n  type Location,\n  type MessageFormatElement,\n  type NumberSkeleton,\n  type PluralOrSelectOption,\n  SKELETON_TYPE,\n  type TagElement,\n  TYPE,\n} from '#packages/icu-messageformat-parser/types.js'\nimport {SPACE_SEPARATOR_REGEX} from '@formatjs_generated/unicode/icu-messageformat-parser-regex.js'\nimport {\n  type NumberSkeletonToken,\n  parseNumberSkeleton,\n  parseNumberSkeletonFromString,\n  parseDateTimeSkeleton,\n} from '@formatjs/icu-skeleton-parser'\nimport {getBestPattern} from '#packages/icu-messageformat-parser/date-time-pattern-generator.js'\n\nconst SPACE_SEPARATOR_START_REGEX = new RegExp(\n  `^${SPACE_SEPARATOR_REGEX.source}*`\n)\nconst SPACE_SEPARATOR_END_REGEX = new RegExp(\n  `${SPACE_SEPARATOR_REGEX.source}*$`\n)\n\nexport interface Position {\n  /** Offset in terms of UTF-16 *code unit*. */\n  offset: number\n  line: number\n  /** Column offset in terms of unicode *code point*. */\n  column: number\n}\n\nexport interface ParserOptions {\n  /**\n   * Whether to treat HTML/XML tags as string literal\n   * instead of parsing them as tag token.\n   * When this is false we only allow simple tags without\n   * any attributes\n   */\n  ignoreTag?: boolean\n  /**\n   * Should `select`, `selectordinal`, and `plural` arguments always include\n   * the `other` case clause.\n   */\n  requiresOtherClause?: boolean\n  /**\n   * Whether to parse number/datetime skeleton\n   * into Intl.NumberFormatOptions and Intl.DateTimeFormatOptions, respectively.\n   */\n  shouldParseSkeletons?: boolean\n  /**\n   * Capture location info in AST\n   * Default is false\n   */\n  captureLocation?: boolean\n  /**\n   * Instance of Intl.Locale to resolve locale-dependent skeleton\n   */\n  locale?: Intl.Locale\n}\n\nexport type Result<T, E> = {val: T; err: null} | {val: null; err: E}\ntype ArgType =\n  | 'number'\n  | 'date'\n  | 'time'\n  | 'select'\n  | 'plural'\n  | 'selectordinal'\n  | ''\n\nfunction createLocation(start: Position, end: Position): Location {\n  return {start, end}\n}\n\n// #region Ponyfills\n// Consolidate these variables up top for easier toggling during debugging\nconst hasNativeFromEntries = !!(Object as any).fromEntries\nconst hasTrimStart = !!(String.prototype as any).trimStart\nconst hasTrimEnd = !!(String.prototype as any).trimEnd\n\nconst fromEntries: <T = any>(\n  entries: readonly (readonly [string, T])[]\n) => {[k: string]: T} =\n  // native\n  hasNativeFromEntries\n    ? (Object as any).fromEntries\n    : // Ponyfill\n      function fromEntries(entries) {\n        const obj: Record<string, any> = {}\n        for (const [k, v] of entries) {\n          obj[k] = v\n        }\n        return obj\n      }\n\nconst trimStart: (s: string) => string = hasTrimStart\n  ? // Native\n    function trimStart(s) {\n      return (s as any).trimStart()\n    }\n  : // Ponyfill\n    function trimStart(s) {\n      return s.replace(SPACE_SEPARATOR_START_REGEX, '')\n    }\n\nconst trimEnd: (s: string) => string = hasTrimEnd\n  ? // Native\n    function trimEnd(s) {\n      return (s as any).trimEnd()\n    }\n  : // Ponyfill\n    function trimEnd(s) {\n      return s.replace(SPACE_SEPARATOR_END_REGEX, '')\n    }\n\n// #endregion\n\nconst IDENTIFIER_PREFIX_RE = new RegExp(\n  '([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)',\n  'yu'\n)\n\nfunction matchIdentifierAtIndex(s: string, index: number): string {\n  IDENTIFIER_PREFIX_RE.lastIndex = index\n  const match = IDENTIFIER_PREFIX_RE.exec(s)!\n  return match[1] ?? ''\n}\n\nfunction plainTopLevelEndPosition(message: string): Position | null {\n  if (message.length === 0) {\n    return null\n  }\n  let line = 1\n  let column = 1\n  for (let offset = 0; offset < message.length;) {\n    const code = message.charCodeAt(offset)\n    switch (code) {\n      case 35: // #\n      case 39: // '\n      case 60: // <\n      case 123: // {\n      case 125: // }\n        return null\n    }\n    if (code === 10 /* '\\n' */) {\n      line++\n      column = 1\n      offset++\n    } else {\n      column++\n      if (code >= 0xd800 && code <= 0xdbff && offset + 1 < message.length) {\n        const next = message.charCodeAt(offset + 1)\n        offset += next >= 0xdc00 && next <= 0xdfff ? 2 : 1\n      } else {\n        offset++\n      }\n    }\n  }\n  return {offset: message.length, line, column}\n}\n\nexport class Parser {\n  private message: string\n  private position: Position\n  private locale?: Intl.Locale\n\n  private ignoreTag: boolean\n  private requiresOtherClause: boolean\n  private shouldParseSkeletons?: boolean\n\n  constructor(message: string, options: ParserOptions = {}) {\n    this.message = message\n    this.position = {offset: 0, line: 1, column: 1}\n    this.ignoreTag = !!options.ignoreTag\n    this.locale = options.locale\n    this.requiresOtherClause = !!options.requiresOtherClause\n    this.shouldParseSkeletons = !!options.shouldParseSkeletons\n  }\n\n  parse(): Result<MessageFormatElement[], ParserError> {\n    if (this.offset() !== 0) {\n      throw Error('parser can only be used once')\n    }\n    if (this.message.length > 0) {\n      const firstCode = this.message.charCodeAt(0)\n      if (\n        firstCode !== 35 /* # */ &&\n        firstCode !== 39 /* ' */ &&\n        firstCode !== 60 /* < */ &&\n        firstCode !== 123 /* { */ &&\n        firstCode !== 125 /* } */\n      ) {\n        const plainEndPosition = plainTopLevelEndPosition(this.message)\n        if (plainEndPosition) {\n          const start = this.clonePosition()\n          this.position = plainEndPosition\n          return {\n            val: [\n              {\n                type: TYPE.literal,\n                value: this.message,\n                location: createLocation(start, this.clonePosition()),\n              },\n            ],\n            err: null,\n          }\n        }\n      }\n    }\n    return this.parseMessage(0, '', false)\n  }\n\n  private parseMessage(\n    nestingLevel: number,\n    parentArgType: ArgType,\n    expectingCloseTag: boolean\n  ): Result<MessageFormatElement[], ParserError> {\n    let elements: MessageFormatElement[] = []\n\n    while (!this.isEOF()) {\n      const char = this.char()\n      if (char === 123 /* `{` */) {\n        const result = this.parseArgument(nestingLevel, expectingCloseTag)\n        if (result.err) {\n          return result\n        }\n        elements.push(result.val)\n      } else if (char === 125 /* `}` */ && nestingLevel > 0) {\n        break\n      } else if (\n        char === 35 /* `#` */ &&\n        (parentArgType === 'plural' || parentArgType === 'selectordinal')\n      ) {\n        const position = this.clonePosition()\n        this.bump()\n        elements.push({\n          type: TYPE.pound,\n          location: createLocation(position, this.clonePosition()),\n        })\n      } else if (\n        char === 60 /* `<` */ &&\n        !this.ignoreTag &&\n        this.peek() === 47 // char code for '/'\n      ) {\n        if (expectingCloseTag) {\n          break\n        } else {\n          return this.error(\n            ErrorKind.UNMATCHED_CLOSING_TAG,\n            createLocation(this.clonePosition(), this.clonePosition())\n          )\n        }\n      } else if (\n        char === 60 /* `<` */ &&\n        !this.ignoreTag &&\n        _isAlpha(this.peek() || 0)\n      ) {\n        const result = this.parseTag(nestingLevel, parentArgType)\n        if (result.err) {\n          return result\n        }\n        elements.push(result.val)\n      } else {\n        const result = this.parseLiteral(nestingLevel, parentArgType)\n        if (result.err) {\n          return result\n        }\n        elements.push(result.val)\n      }\n    }\n\n    return {val: elements, err: null}\n  }\n  /**\n   * A tag name must start with an ASCII lower/upper case letter. The grammar is based on the\n   * [custom element name][] except that a dash is NOT always mandatory and uppercase letters\n   * are accepted:\n   *\n   * ```\n   * tag ::= \"<\" tagName (whitespace)* \"/>\" | \"<\" tagName (whitespace)* \">\" message \"</\" tagName (whitespace)* \">\"\n   * tagName ::= [a-z] (PENChar)*\n   * PENChar ::=\n   *     \"-\" | \".\" | [0-9] | \"_\" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |\n   *     [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |\n   *     [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n   * ```\n   *\n   * [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\n   * NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do\n   * since other tag-based engines like React allow it\n   */\n  private parseTag(\n    nestingLevel: number,\n    parentArgType: ArgType\n  ): Result<TagElement | LiteralElement, ParserError> {\n    const startPosition = this.clonePosition()\n    this.bump() // `<`\n\n    const tagName = this.parseTagName()\n    this.bumpSpace()\n\n    if (this.bumpIf('/>')) {\n      // Self closing tag\n      return {\n        val: {\n          type: TYPE.literal,\n          value: `<${tagName}/>`,\n          location: createLocation(startPosition, this.clonePosition()),\n        } as LiteralElement,\n        err: null,\n      }\n    } else if (this.bumpIf('>')) {\n      const childrenResult = this.parseMessage(\n        nestingLevel + 1,\n        parentArgType,\n        true\n      )\n      if (childrenResult.err) {\n        return childrenResult\n      }\n      const children = childrenResult.val\n\n      // Expecting a close tag\n      const endTagStartPosition = this.clonePosition()\n\n      if (this.bumpIf('</')) {\n        if (this.isEOF() || !_isAlpha(this.char())) {\n          return this.error(\n            ErrorKind.INVALID_TAG,\n            createLocation(endTagStartPosition, this.clonePosition())\n          )\n        }\n\n        const closingTagNameStartPosition = this.clonePosition()\n        const closingTagName = this.parseTagName()\n        if (tagName !== closingTagName) {\n          return this.error(\n            ErrorKind.UNMATCHED_CLOSING_TAG,\n            createLocation(closingTagNameStartPosition, this.clonePosition())\n          )\n        }\n\n        this.bumpSpace()\n        if (!this.bumpIf('>')) {\n          return this.error(\n            ErrorKind.INVALID_TAG,\n            createLocation(endTagStartPosition, this.clonePosition())\n          )\n        }\n\n        return {\n          val: {\n            type: TYPE.tag,\n            value: tagName,\n            children,\n            location: createLocation(startPosition, this.clonePosition()),\n          },\n          err: null,\n        }\n      } else {\n        return this.error(\n          ErrorKind.UNCLOSED_TAG,\n          createLocation(startPosition, this.clonePosition())\n        )\n      }\n    } else {\n      return this.error(\n        ErrorKind.INVALID_TAG,\n        createLocation(startPosition, this.clonePosition())\n      )\n    }\n  }\n\n  /**\n   * This method assumes that the caller has peeked ahead for the first tag character.\n   */\n  private parseTagName(): string {\n    const startOffset = this.offset()\n\n    this.bump() // the first tag name character\n    while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {\n      this.bump()\n    }\n    return this.message.slice(startOffset, this.offset())\n  }\n\n  private parseLiteral(\n    nestingLevel: number,\n    parentArgType: ArgType\n  ): Result<LiteralElement, ParserError> {\n    const start = this.clonePosition()\n\n    let value = ''\n    while (true) {\n      const parseQuoteResult = this.tryParseQuote(parentArgType)\n      if (parseQuoteResult) {\n        value += parseQuoteResult\n        continue\n      }\n\n      const parseUnquotedResult = this.tryParseUnquoted(\n        nestingLevel,\n        parentArgType\n      )\n      if (parseUnquotedResult) {\n        value += parseUnquotedResult\n        continue\n      }\n\n      const parseLeftAngleResult = this.tryParseLeftAngleBracket()\n      if (parseLeftAngleResult) {\n        value += parseLeftAngleResult\n        continue\n      }\n\n      break\n    }\n\n    const location = createLocation(start, this.clonePosition())\n    return {\n      val: {type: TYPE.literal, value, location},\n      err: null,\n    }\n  }\n\n  tryParseLeftAngleBracket(): string | null {\n    if (\n      !this.isEOF() &&\n      this.char() === 60 /* `<` */ &&\n      (this.ignoreTag ||\n        // If at the opening tag or closing tag position, bail.\n        !_isAlphaOrSlash(this.peek() || 0))\n    ) {\n      this.bump() // `<`\n      return '<'\n    }\n    return null\n  }\n\n  /**\n   * Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes\n   * a character that requires quoting (that is, \"only where needed\"), and works the same in\n   * nested messages as on the top level of the pattern. The new behavior is otherwise compatible.\n   */\n  private tryParseQuote(parentArgType: ArgType): string | null {\n    if (this.isEOF() || this.char() !== 39 /* `'` */) {\n      return null\n    }\n\n    // Parse escaped char following the apostrophe, or early return if there is no escaped char.\n    // Check if is valid escaped character\n    switch (this.peek()) {\n      case 39 /* `'` */:\n        // double quote, should return as a single quote.\n        this.bump()\n        this.bump()\n        return \"'\"\n      // '{', '<', '>', '}'\n      case 123:\n      case 60:\n      case 62:\n      case 125:\n        break\n      case 35: // '#'\n        if (parentArgType === 'plural' || parentArgType === 'selectordinal') {\n          break\n        }\n        return null\n      default:\n        return null\n    }\n\n    this.bump() // apostrophe\n    const codePoints = [this.char()] // escaped char\n    this.bump()\n\n    // read chars until the optional closing apostrophe is found\n    while (!this.isEOF()) {\n      const ch = this.char()\n      if (ch === 39 /* `'` */) {\n        if (this.peek() === 39 /* `'` */) {\n          codePoints.push(39)\n          // Bump one more time because we need to skip 2 characters.\n          this.bump()\n        } else {\n          // Optional closing apostrophe.\n          this.bump()\n          break\n        }\n      } else {\n        codePoints.push(ch)\n      }\n      this.bump()\n    }\n\n    return String.fromCodePoint(...codePoints)\n  }\n\n  private tryParseUnquoted(\n    nestingLevel: number,\n    parentArgType: ArgType\n  ): string | null {\n    if (this.isEOF()) {\n      return null\n    }\n    const ch = this.char()\n\n    if (\n      ch === 60 /* `<` */ ||\n      ch === 123 /* `{` */ ||\n      (ch === 35 /* `#` */ &&\n        (parentArgType === 'plural' || parentArgType === 'selectordinal')) ||\n      (ch === 125 /* `}` */ && nestingLevel > 0)\n    ) {\n      return null\n    } else {\n      this.bump()\n      return String.fromCodePoint(ch)\n    }\n  }\n\n  private parseArgument(\n    nestingLevel: number,\n    expectingCloseTag: boolean\n  ): Result<MessageFormatElement, ParserError> {\n    const openingBracePosition = this.clonePosition()\n    this.bump() // `{`\n\n    this.bumpSpace()\n\n    if (this.isEOF()) {\n      return this.error(\n        ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE,\n        createLocation(openingBracePosition, this.clonePosition())\n      )\n    }\n\n    if (this.char() === 125 /* `}` */) {\n      this.bump()\n      return this.error(\n        ErrorKind.EMPTY_ARGUMENT,\n        createLocation(openingBracePosition, this.clonePosition())\n      )\n    }\n\n    // argument name\n    let value = this.parseIdentifierIfPossible().value\n    if (!value) {\n      return this.error(\n        ErrorKind.MALFORMED_ARGUMENT,\n        createLocation(openingBracePosition, this.clonePosition())\n      )\n    }\n\n    this.bumpSpace()\n\n    if (this.isEOF()) {\n      return this.error(\n        ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE,\n        createLocation(openingBracePosition, this.clonePosition())\n      )\n    }\n\n    switch (this.char()) {\n      // Simple argument: `{name}`\n      case 125 /* `}` */: {\n        this.bump() // `}`\n        return {\n          val: {\n            type: TYPE.argument,\n            // value does not include the opening and closing braces.\n            value,\n            location: createLocation(\n              openingBracePosition,\n              this.clonePosition()\n            ),\n          },\n          err: null,\n        }\n      }\n      // Argument with options: `{name, format, ...}`\n      case 44 /* `,` */: {\n        this.bump() // `,`\n        this.bumpSpace()\n\n        if (this.isEOF()) {\n          return this.error(\n            ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE,\n            createLocation(openingBracePosition, this.clonePosition())\n          )\n        }\n\n        return this.parseArgumentOptions(\n          nestingLevel,\n          expectingCloseTag,\n          value,\n          openingBracePosition\n        )\n      }\n      default:\n        return this.error(\n          ErrorKind.MALFORMED_ARGUMENT,\n          createLocation(openingBracePosition, this.clonePosition())\n        )\n    }\n  }\n\n  /**\n   * Advance the parser until the end of the identifier, if it is currently on\n   * an identifier character. Return an empty string otherwise.\n   */\n  private parseIdentifierIfPossible(): {value: string; location: Location} {\n    const startingPosition = this.clonePosition()\n\n    const startOffset = this.offset()\n    const value = matchIdentifierAtIndex(this.message, startOffset)\n    const endOffset = startOffset + value.length\n\n    this.bumpTo(endOffset)\n\n    const endPosition = this.clonePosition()\n    const location = createLocation(startingPosition, endPosition)\n\n    return {value, location}\n  }\n\n  private parseArgumentOptions(\n    nestingLevel: number,\n    expectingCloseTag: boolean,\n    value: string,\n    openingBracePosition: Position\n  ): Result<MessageFormatElement, ParserError> {\n    // Parse this range:\n    // {name, type, style}\n    //        ^---^\n    let typeStartPosition = this.clonePosition()\n    let argType = this.parseIdentifierIfPossible().value\n    let typeEndPosition = this.clonePosition()\n\n    switch (argType) {\n      case '':\n        // Expecting a style string number, date, time, plural, selectordinal, or select.\n        return this.error(\n          ErrorKind.EXPECT_ARGUMENT_TYPE,\n          createLocation(typeStartPosition, typeEndPosition)\n        )\n      case 'number':\n      case 'date':\n      case 'time': {\n        // Parse this range:\n        // {name, number, style}\n        //              ^-------^\n        this.bumpSpace()\n        let styleAndLocation: {\n          style: string\n          styleLocation: Location\n        } | null = null\n\n        if (this.bumpIf(',')) {\n          this.bumpSpace()\n\n          const styleStartPosition = this.clonePosition()\n          const result = this.parseSimpleArgStyleIfPossible()\n          if (result.err) {\n            return result\n          }\n          const style = trimEnd(result.val)\n\n          if (style.length === 0) {\n            return this.error(\n              ErrorKind.EXPECT_ARGUMENT_STYLE,\n              createLocation(this.clonePosition(), this.clonePosition())\n            )\n          }\n\n          const styleLocation = createLocation(\n            styleStartPosition,\n            this.clonePosition()\n          )\n          styleAndLocation = {style, styleLocation}\n        }\n\n        const argCloseResult = this.tryParseArgumentClose(openingBracePosition)\n        if (argCloseResult.err) {\n          return argCloseResult\n        }\n\n        const location = createLocation(\n          openingBracePosition,\n          this.clonePosition()\n        )\n\n        // Extract style or skeleton\n        if (styleAndLocation && styleAndLocation.style.startsWith('::')) {\n          // Skeleton starts with `::`.\n          let skeleton = trimStart(styleAndLocation.style.slice(2))\n\n          if (argType === 'number') {\n            const result = this.parseNumberSkeletonFromString(\n              skeleton,\n              styleAndLocation.styleLocation\n            )\n            if (result.err) {\n              return result\n            }\n            return {\n              val: {type: TYPE.number, value, location, style: result.val},\n              err: null,\n            }\n          } else {\n            if (skeleton.length === 0) {\n              return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location)\n            }\n\n            let dateTimePattern = skeleton\n\n            // Get \"best match\" pattern only if locale is passed, if not, let it\n            // pass as-is where `parseDateTimeSkeleton()` will throw an error\n            // for unsupported patterns.\n            if (this.locale) {\n              dateTimePattern = getBestPattern(skeleton, this.locale)\n            }\n\n            const style: DateTimeSkeleton = {\n              type: SKELETON_TYPE.dateTime,\n              pattern: dateTimePattern,\n              location: styleAndLocation.styleLocation,\n              parsedOptions: this.shouldParseSkeletons\n                ? parseDateTimeSkeleton(dateTimePattern)\n                : {},\n            }\n\n            const type = argType === 'date' ? TYPE.date : TYPE.time\n            return {\n              val: {type, value, location, style},\n              err: null,\n            }\n          }\n        }\n\n        // Regular style or no style.\n        return {\n          val: {\n            type:\n              argType === 'number'\n                ? TYPE.number\n                : argType === 'date'\n                  ? TYPE.date\n                  : TYPE.time,\n            value,\n            location,\n            style: styleAndLocation?.style ?? null,\n          },\n          err: null,\n        }\n      }\n      case 'plural':\n      case 'selectordinal':\n      case 'select': {\n        // Parse this range:\n        // {name, plural, options}\n        //              ^---------^\n        const typeEndPosition = this.clonePosition()\n        this.bumpSpace()\n\n        if (!this.bumpIf(',')) {\n          return this.error(\n            ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS,\n            createLocation(typeEndPosition, {...typeEndPosition})\n          )\n        }\n        this.bumpSpace()\n\n        // Parse offset:\n        // {name, plural, offset:1, options}\n        //                ^-----^\n        //\n        // or the first option:\n        //\n        // {name, plural, one {...} other {...}}\n        //                ^--^\n        let identifierAndLocation = this.parseIdentifierIfPossible()\n\n        let pluralOffset = 0\n        if (argType !== 'select' && identifierAndLocation.value === 'offset') {\n          if (!this.bumpIf(':')) {\n            return this.error(\n              ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,\n              createLocation(this.clonePosition(), this.clonePosition())\n            )\n          }\n          this.bumpSpace()\n          const result = this.tryParseDecimalInteger(\n            ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,\n            ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\n          )\n          if (result.err) {\n            return result\n          }\n\n          // Parse another identifier for option parsing\n          this.bumpSpace()\n          identifierAndLocation = this.parseIdentifierIfPossible()\n\n          pluralOffset = result.val\n        }\n\n        const optionsResult = this.tryParsePluralOrSelectOptions(\n          nestingLevel,\n          argType,\n          expectingCloseTag,\n          identifierAndLocation\n        )\n        if (optionsResult.err) {\n          return optionsResult\n        }\n\n        const argCloseResult = this.tryParseArgumentClose(openingBracePosition)\n        if (argCloseResult.err) {\n          return argCloseResult\n        }\n\n        const location = createLocation(\n          openingBracePosition,\n          this.clonePosition()\n        )\n\n        if (argType === 'select') {\n          return {\n            val: {\n              type: TYPE.select,\n              value,\n              options: fromEntries(optionsResult.val),\n              location,\n            },\n            err: null,\n          }\n        } else {\n          return {\n            val: {\n              type: TYPE.plural,\n              value,\n              options: fromEntries(optionsResult.val),\n              offset: pluralOffset,\n              pluralType: argType === 'plural' ? 'cardinal' : 'ordinal',\n              location,\n            },\n            err: null,\n          }\n        }\n      }\n      default:\n        return this.error(\n          ErrorKind.INVALID_ARGUMENT_TYPE,\n          createLocation(typeStartPosition, typeEndPosition)\n        )\n    }\n  }\n\n  private tryParseArgumentClose(\n    openingBracePosition: Position\n  ): Result<true, ParserError> {\n    // Parse: {value, number, ::currency/GBP }\n    //\n    if (this.isEOF() || this.char() !== 125 /* `}` */) {\n      return this.error(\n        ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE,\n        createLocation(openingBracePosition, this.clonePosition())\n      )\n    }\n    this.bump() // `}`\n    return {val: true, err: null}\n  }\n\n  /**\n   * See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659\n   */\n  private parseSimpleArgStyleIfPossible(): Result<string, ParserError> {\n    let nestedBraces = 0\n\n    const startPosition = this.clonePosition()\n    while (!this.isEOF()) {\n      const ch = this.char()\n      switch (ch) {\n        case 39 /* `'` */: {\n          // Treat apostrophe as quoting but include it in the style part.\n          // Find the end of the quoted literal text.\n          this.bump()\n          let apostrophePosition = this.clonePosition()\n\n          if (!this.bumpUntil(\"'\")) {\n            return this.error(\n              ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,\n              createLocation(apostrophePosition, this.clonePosition())\n            )\n          }\n          this.bump()\n          break\n        }\n        case 123 /* `{` */: {\n          nestedBraces += 1\n          this.bump()\n          break\n        }\n        case 125 /* `}` */: {\n          if (nestedBraces > 0) {\n            nestedBraces -= 1\n          } else {\n            return {\n              val: this.message.slice(startPosition.offset, this.offset()),\n              err: null,\n            }\n          }\n          break\n        }\n        default:\n          this.bump()\n          break\n      }\n    }\n    return {\n      val: this.message.slice(startPosition.offset, this.offset()),\n      err: null,\n    }\n  }\n\n  private parseNumberSkeletonFromString(\n    skeleton: string,\n    location: Location\n  ): Result<NumberSkeleton, ParserError> {\n    let tokens: NumberSkeletonToken[] = []\n    try {\n      tokens = parseNumberSkeletonFromString(skeleton)\n    } catch {\n      return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location)\n    }\n\n    return {\n      val: {\n        type: SKELETON_TYPE.number,\n        tokens,\n        location,\n        parsedOptions: this.shouldParseSkeletons\n          ? parseNumberSkeleton(tokens)\n          : {},\n      },\n      err: null,\n    }\n  }\n\n  /**\n   * @param nesting_level The current nesting level of messages.\n   *     This can be positive when parsing message fragment in select or plural argument options.\n   * @param parent_arg_type The parent argument's type.\n   * @param parsed_first_identifier If provided, this is the first identifier-like selector of\n   *     the argument. It is a by-product of a previous parsing attempt.\n   * @param expecting_close_tag If true, this message is directly or indirectly nested inside\n   *     between a pair of opening and closing tags. The nested message will not parse beyond\n   *     the closing tag boundary.\n   */\n  private tryParsePluralOrSelectOptions(\n    nestingLevel: number,\n    parentArgType: ArgType,\n    expectCloseTag: boolean,\n    parsedFirstIdentifier: {value: string; location: Location}\n  ): Result<[string, PluralOrSelectOption][], ParserError> {\n    let hasOtherClause = false\n    const options: [string, PluralOrSelectOption][] = []\n    const parsedSelectors = new Set<string>()\n    let {value: selector, location: selectorLocation} = parsedFirstIdentifier\n\n    // Parse:\n    // one {one apple}\n    // ^--^\n    while (true) {\n      if (selector.length === 0) {\n        const startPosition = this.clonePosition()\n        if (parentArgType !== 'select' && this.bumpIf('=')) {\n          // Try parse `={number}` selector\n          const result = this.tryParseDecimalInteger(\n            ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR,\n            ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR\n          )\n          if (result.err) {\n            return result\n          }\n          selectorLocation = createLocation(startPosition, this.clonePosition())\n          selector = this.message.slice(startPosition.offset, this.offset())\n        } else {\n          break\n        }\n      }\n\n      // Duplicate selector clauses\n      if (parsedSelectors.has(selector)) {\n        return this.error(\n          parentArgType === 'select'\n            ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR\n            : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,\n          selectorLocation\n        )\n      }\n\n      if (selector === 'other') {\n        hasOtherClause = true\n      }\n\n      // Parse:\n      // one {one apple}\n      //     ^----------^\n      this.bumpSpace()\n      const openingBracePosition = this.clonePosition()\n      if (!this.bumpIf('{')) {\n        return this.error(\n          parentArgType === 'select'\n            ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\n            : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,\n          createLocation(this.clonePosition(), this.clonePosition())\n        )\n      }\n\n      const fragmentResult = this.parseMessage(\n        nestingLevel + 1,\n        parentArgType,\n        expectCloseTag\n      )\n      if (fragmentResult.err) {\n        return fragmentResult\n      }\n      const argCloseResult = this.tryParseArgumentClose(openingBracePosition)\n      if (argCloseResult.err) {\n        return argCloseResult\n      }\n\n      options.push([\n        selector,\n        {\n          value: fragmentResult.val,\n          location: createLocation(openingBracePosition, this.clonePosition()),\n        },\n      ])\n      // Keep track of the existing selectors\n      parsedSelectors.add(selector)\n\n      // Prep next selector clause.\n      this.bumpSpace()\n      ;({value: selector, location: selectorLocation} =\n        this.parseIdentifierIfPossible())\n    }\n\n    if (options.length === 0) {\n      return this.error(\n        parentArgType === 'select'\n          ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR\n          : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR,\n        createLocation(this.clonePosition(), this.clonePosition())\n      )\n    }\n\n    if (this.requiresOtherClause && !hasOtherClause) {\n      return this.error(\n        ErrorKind.MISSING_OTHER_CLAUSE,\n        createLocation(this.clonePosition(), this.clonePosition())\n      )\n    }\n\n    return {val: options, err: null}\n  }\n\n  private tryParseDecimalInteger(\n    expectNumberError: ErrorKind,\n    invalidNumberError: ErrorKind\n  ): Result<number, ParserError> {\n    let sign = 1\n    const startingPosition = this.clonePosition()\n\n    if (this.bumpIf('+')) {\n    } else if (this.bumpIf('-')) {\n      sign = -1\n    }\n\n    let hasDigits = false\n    let decimal = 0\n    while (!this.isEOF()) {\n      const ch = this.char()\n      if (ch >= 48 /* `0` */ && ch <= 57 /* `9` */) {\n        hasDigits = true\n        decimal = decimal * 10 + (ch - 48)\n        this.bump()\n      } else {\n        break\n      }\n    }\n\n    const location = createLocation(startingPosition, this.clonePosition())\n\n    if (!hasDigits) {\n      return this.error(expectNumberError, location)\n    }\n\n    decimal *= sign\n    if (!Number.isSafeInteger(decimal)) {\n      return this.error(invalidNumberError, location)\n    }\n\n    return {val: decimal, err: null}\n  }\n\n  private offset(): number {\n    return this.position.offset\n  }\n\n  private isEOF(): boolean {\n    return this.offset() === this.message.length\n  }\n\n  private clonePosition(): Position {\n    // This is much faster than `Object.assign` or spread.\n    return {\n      offset: this.position.offset,\n      line: this.position.line,\n      column: this.position.column,\n    }\n  }\n\n  /**\n   * Return the code point at the current position of the parser.\n   * Throws if the index is out of bound.\n   */\n  private char(): number {\n    const offset = this.position.offset\n    if (offset >= this.message.length) {\n      throw Error('out of bound')\n    }\n    const code = this.message.codePointAt(offset)\n    if (code === undefined) {\n      throw Error(`Offset ${offset} is at invalid UTF-16 code unit boundary`)\n    }\n    return code\n  }\n\n  private error(\n    kind: ErrorKind,\n    location: Location\n  ): Result<never, ParserError> {\n    return {\n      val: null,\n      err: {\n        kind,\n        message: this.message,\n        location,\n      },\n    }\n  }\n\n  /** Bump the parser to the next UTF-16 code unit. */\n  private bump(): void {\n    if (this.isEOF()) {\n      return\n    }\n    const code = this.char()\n    if (code === 10 /* '\\n' */) {\n      this.position.line += 1\n      this.position.column = 1\n      this.position.offset += 1\n    } else {\n      this.position.column += 1\n      // 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.\n      this.position.offset += code < 0x10000 ? 1 : 2\n    }\n  }\n\n  /**\n   * If the substring starting at the current position of the parser has\n   * the given prefix, then bump the parser to the character immediately\n   * following the prefix and return true. Otherwise, don't bump the parser\n   * and return false.\n   */\n  private bumpIf(prefix: string): boolean {\n    if (this.message.startsWith(prefix, this.offset())) {\n      for (let i = 0; i < prefix.length; i++) {\n        this.bump()\n      }\n      return true\n    }\n    return false\n  }\n\n  /**\n   * Bump the parser until the pattern character is found and return `true`.\n   * Otherwise bump to the end of the file and return `false`.\n   */\n  private bumpUntil(pattern: string): boolean {\n    const currentOffset = this.offset()\n    const index = this.message.indexOf(pattern, currentOffset)\n    if (index >= 0) {\n      this.bumpTo(index)\n      return true\n    } else {\n      this.bumpTo(this.message.length)\n      return false\n    }\n  }\n\n  /**\n   * Bump the parser to the target offset.\n   * If target offset is beyond the end of the input, bump the parser to the end of the input.\n   */\n  private bumpTo(targetOffset: number) {\n    if (this.offset() > targetOffset) {\n      throw Error(\n        `targetOffset ${targetOffset} must be greater than or equal to the current offset ${this.offset()}`\n      )\n    }\n\n    targetOffset = Math.min(targetOffset, this.message.length)\n    while (true) {\n      const offset = this.offset()\n      if (offset === targetOffset) {\n        break\n      }\n      if (offset > targetOffset) {\n        throw Error(\n          `targetOffset ${targetOffset} is at invalid UTF-16 code unit boundary`\n        )\n      }\n\n      this.bump()\n      if (this.isEOF()) {\n        break\n      }\n    }\n  }\n\n  /** advance the parser through all whitespace to the next non-whitespace code unit. */\n  private bumpSpace() {\n    while (!this.isEOF() && _isWhiteSpace(this.char())) {\n      this.bump()\n    }\n  }\n\n  /**\n   * Peek at the *next* Unicode codepoint in the input without advancing the parser.\n   * If the input has been exhausted, then this returns null.\n   */\n  private peek(): number | null {\n    if (this.isEOF()) {\n      return null\n    }\n    const code = this.char()\n    const offset = this.offset()\n    const nextCode = this.message.charCodeAt(offset + (code >= 0x10000 ? 2 : 1))\n    return nextCode ?? null\n  }\n}\n\n/**\n * This check if codepoint is alphabet (lower & uppercase)\n * @param codepoint\n * @returns\n */\nfunction _isAlpha(codepoint: number): boolean {\n  return (\n    (codepoint >= 97 && codepoint <= 122) ||\n    (codepoint >= 65 && codepoint <= 90)\n  )\n}\n\nfunction _isAlphaOrSlash(codepoint: number): boolean {\n  return _isAlpha(codepoint) || codepoint === 47 /* '/' */\n}\n\n/** See `parseTag` function docs. */\nfunction _isPotentialElementNameChar(c: number): boolean {\n  return (\n    c === 45 /* '-' */ ||\n    c === 46 /* '.' */ ||\n    (c >= 48 && c <= 57) /* 0..9 */ ||\n    c === 95 /* '_' */ ||\n    (c >= 97 && c <= 122) /** a..z */ ||\n    (c >= 65 && c <= 90) /* A..Z */ ||\n    c == 0xb7 ||\n    (c >= 0xc0 && c <= 0xd6) ||\n    (c >= 0xd8 && c <= 0xf6) ||\n    (c >= 0xf8 && c <= 0x37d) ||\n    (c >= 0x37f && c <= 0x1fff) ||\n    (c >= 0x200c && c <= 0x200d) ||\n    (c >= 0x203f && c <= 0x2040) ||\n    (c >= 0x2070 && c <= 0x218f) ||\n    (c >= 0x2c00 && c <= 0x2fef) ||\n    (c >= 0x3001 && c <= 0xd7ff) ||\n    (c >= 0xf900 && c <= 0xfdcf) ||\n    (c >= 0xfdf0 && c <= 0xfffd) ||\n    (c >= 0x10000 && c <= 0xeffff)\n  )\n}\n\n/**\n * Code point equivalent of regex `\\p{White_Space}`.\n * From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n */\nfunction _isWhiteSpace(c: number) {\n  return (\n    (c >= 0x0009 && c <= 0x000d) ||\n    c === 0x0020 ||\n    c === 0x0085 ||\n    (c >= 0x200e && c <= 0x200f) ||\n    c === 0x2028 ||\n    c === 0x2029\n  )\n}\n","import {type NumberFormatOptions} from '#packages/ecma402-abstract/types/number.js'\nimport {\n  type ExtendedNumberFormatOptions,\n  isArgumentElement,\n  isDateElement,\n  isDateTimeSkeleton,\n  isLiteralElement,\n  isNumberElement,\n  isNumberSkeleton,\n  isPluralElement,\n  isPoundElement,\n  isSelectElement,\n  isTagElement,\n  isTimeElement,\n  type MessageFormatElement,\n} from '@formatjs/icu-messageformat-parser'\nimport {\n  ErrorCode,\n  FormatError,\n  InvalidValueError,\n  InvalidValueTypeError,\n  MissingValueError,\n} from '#packages/intl-messageformat/error.js'\n\ndeclare global {\n  namespace FormatjsIntl {\n    interface Message {}\n    interface IntlConfig {}\n    interface Formats {}\n  }\n}\n\ntype Format<Source = string> = Source extends keyof FormatjsIntl.Formats\n  ? FormatjsIntl.Formats[Source]\n  : string\n\nexport interface Formats {\n  number: Record<Format<'number'>, NumberFormatOptions>\n  date: Record<Format<'date'>, Intl.DateTimeFormatOptions>\n  time: Record<Format<'time'>, Intl.DateTimeFormatOptions>\n}\n\nexport interface FormatterCache {\n  number: Record<string, NumberFormatOptions>\n  dateTime: Record<string, Intl.DateTimeFormat>\n  pluralRules: Record<string, Intl.PluralRules>\n}\n\nexport interface Formatters {\n  getNumberFormat(\n    locals?: string | string[],\n    opts?: NumberFormatOptions\n  ): Intl.NumberFormat\n  getDateTimeFormat(\n    ...args: ConstructorParameters<typeof Intl.DateTimeFormat>\n  ): Intl.DateTimeFormat\n  getPluralRules(\n    ...args: ConstructorParameters<typeof Intl.PluralRules>\n  ): Intl.PluralRules\n}\n\nexport enum PART_TYPE {\n  literal,\n  object,\n}\n\nexport interface LiteralPart {\n  type: PART_TYPE.literal\n  value: string\n}\n\nexport interface ObjectPart<T = any> {\n  type: PART_TYPE.object\n  value: T\n}\n\nexport type MessageFormatPart<T> = LiteralPart | ObjectPart<T>\n\nexport type PrimitiveType =\n  | string\n  | number\n  | bigint\n  | boolean\n  | null\n  | undefined\n  | Date\n\nfunction mergeLiteral<T>(\n  parts: MessageFormatPart<T>[]\n): MessageFormatPart<T>[] {\n  if (parts.length < 2) {\n    return parts\n  }\n  return parts.reduce((all, part) => {\n    const lastPart = all[all.length - 1]\n    if (\n      !lastPart ||\n      lastPart.type !== PART_TYPE.literal ||\n      part.type !== PART_TYPE.literal\n    ) {\n      all.push(part)\n    } else {\n      lastPart.value += part.value\n    }\n    return all\n  }, [] as MessageFormatPart<T>[])\n}\n\nexport function isFormatXMLElementFn<T>(\n  el: PrimitiveType | T | FormatXMLElementFn<T>\n): el is FormatXMLElementFn<T> {\n  return typeof el === 'function'\n}\n\n// TODO(skeleton): add skeleton support\nexport function formatToParts<T>(\n  els: MessageFormatElement[],\n  locales: string | string[],\n  formatters: Formatters,\n  formats: Formats,\n  values?: Record<string, PrimitiveType | T | FormatXMLElementFn<T>>,\n  currentPluralValue?: number,\n  // For debugging\n  originalMessage?: string\n): MessageFormatPart<T>[] {\n  // Hot path for straight simple msg translations\n  if (els.length === 1 && isLiteralElement(els[0])) {\n    return [\n      {\n        type: PART_TYPE.literal,\n        value: els[0].value,\n      },\n    ]\n  }\n  const result: MessageFormatPart<T>[] = []\n  for (const el of els) {\n    // Exit early for string parts.\n    if (isLiteralElement(el)) {\n      result.push({\n        type: PART_TYPE.literal,\n        value: el.value,\n      })\n      continue\n    }\n    // TODO: should this part be literal type?\n    // Replace `#` in plural rules with the actual numeric value.\n    if (isPoundElement(el)) {\n      if (typeof currentPluralValue === 'number') {\n        result.push({\n          type: PART_TYPE.literal,\n          value: formatters.getNumberFormat(locales).format(currentPluralValue),\n        })\n      }\n      continue\n    }\n\n    const {value: varName} = el\n\n    // Enforce that all required values are provided by the caller.\n    if (!(values && varName in values)) {\n      throw new MissingValueError(varName, originalMessage)\n    }\n\n    let value = values[varName]\n    if (isArgumentElement(el)) {\n      if (\n        !value ||\n        typeof value === 'string' ||\n        typeof value === 'number' ||\n        typeof value === 'bigint'\n      ) {\n        value =\n          typeof value === 'string' ||\n          typeof value === 'number' ||\n          typeof value === 'bigint'\n            ? String(value)\n            : ''\n      }\n      result.push({\n        type: typeof value === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n        value,\n      } as ObjectPart<T>)\n      continue\n    }\n\n    // Recursively format plural and select parts' option — which can be a\n    // nested pattern structure. The choosing of the option to use is\n    // abstracted-by and delegated-to the part helper object.\n    if (isDateElement(el)) {\n      const style =\n        typeof el.style === 'string'\n          ? formats.date[el.style]\n          : isDateTimeSkeleton(el.style)\n            ? el.style.parsedOptions\n            : undefined\n      result.push({\n        type: PART_TYPE.literal,\n        value: formatters\n          .getDateTimeFormat(locales, style)\n          .format(value as number),\n      })\n      continue\n    }\n    if (isTimeElement(el)) {\n      const style =\n        typeof el.style === 'string'\n          ? formats.time[el.style]\n          : isDateTimeSkeleton(el.style)\n            ? el.style.parsedOptions\n            : formats.time.medium\n      result.push({\n        type: PART_TYPE.literal,\n        value: formatters\n          .getDateTimeFormat(locales, style)\n          .format(value as number),\n      })\n      continue\n    }\n    if (isNumberElement(el)) {\n      const style =\n        typeof el.style === 'string'\n          ? formats.number[el.style]\n          : isNumberSkeleton(el.style)\n            ? el.style.parsedOptions\n            : undefined\n\n      if (style && (style as ExtendedNumberFormatOptions).scale) {\n        const scale = (style as ExtendedNumberFormatOptions).scale || 1\n        // Handle bigint scale multiplication\n        // BigInt can only be multiplied by BigInt\n        if (typeof value === 'bigint') {\n          // Check if scale is a safe integer that can be converted to BigInt\n          if (!Number.isInteger(scale)) {\n            throw new TypeError(\n              `Cannot apply fractional scale ${scale} to bigint value. Scale must be an integer when formatting bigint.`\n            )\n          }\n          value = value * BigInt(scale)\n        } else {\n          value = (value as number) * scale\n        }\n      }\n      result.push({\n        type: PART_TYPE.literal,\n        value: formatters\n          .getNumberFormat(locales, style)\n          .format(value as number | bigint),\n      })\n      continue\n    }\n    if (isTagElement(el)) {\n      const {children, value} = el\n      const formatFn = values[value]\n      if (!isFormatXMLElementFn<T>(formatFn)) {\n        throw new InvalidValueTypeError(value, 'function', originalMessage)\n      }\n      const parts = formatToParts<T>(\n        children,\n        locales,\n        formatters,\n        formats,\n        values,\n        currentPluralValue\n      )\n      let chunks = formatFn(parts.map(p => p.value))\n      if (!Array.isArray(chunks)) {\n        chunks = [chunks]\n      }\n      result.push(\n        ...chunks.map((c): MessageFormatPart<T> => {\n          return {\n            type: typeof c === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n            value: c,\n          } as MessageFormatPart<T>\n        })\n      )\n    }\n    if (isSelectElement(el)) {\n      // GH #4490: Use hasOwnProperty to avoid prototype chain issues with keys like \"constructor\"\n      const key = value as string\n      const opt =\n        (Object.prototype.hasOwnProperty.call(el.options, key)\n          ? el.options[key]\n          : undefined) || el.options.other\n      if (!opt) {\n        throw new InvalidValueError(\n          el.value,\n          value,\n          Object.keys(el.options),\n          originalMessage\n        )\n      }\n      result.push(\n        ...formatToParts(opt.value, locales, formatters, formats, values)\n      )\n      continue\n    }\n    if (isPluralElement(el)) {\n      // GH #4490: Use hasOwnProperty to avoid prototype chain issues\n      const exactKey = `=${value}`\n      let opt = Object.prototype.hasOwnProperty.call(el.options, exactKey)\n        ? el.options[exactKey]\n        : undefined\n      if (!opt) {\n        if (!Intl.PluralRules) {\n          throw new FormatError(\n            `Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n`,\n            ErrorCode.MISSING_INTL_API,\n            originalMessage\n          )\n        }\n        // Convert bigint to number for PluralRules (which only accepts number)\n        const numericValue =\n          typeof value === 'bigint' ? Number(value) : (value as number)\n        const rule = formatters\n          .getPluralRules(locales, {type: el.pluralType})\n          .select(numericValue - (el.offset || 0))\n        opt =\n          (Object.prototype.hasOwnProperty.call(el.options, rule)\n            ? el.options[rule]\n            : undefined) || el.options.other\n      }\n      if (!opt) {\n        throw new InvalidValueError(\n          el.value,\n          value,\n          Object.keys(el.options),\n          originalMessage\n        )\n      }\n      // Convert bigint to number for currentPluralValue\n      const numericValue =\n        typeof value === 'bigint' ? Number(value) : (value as number)\n      result.push(\n        ...formatToParts(\n          opt.value,\n          locales,\n          formatters,\n          formats,\n          values,\n          numericValue - (el.offset || 0)\n        )\n      )\n      continue\n    }\n  }\n  return mergeLiteral(result)\n}\n\nexport type FormatXMLElementFn<T, R = string | T | (string | T)[]> = (\n  parts: Array<string | T>\n) => R\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\nimport {type Cache, memoize, strategies} from '@formatjs/fast-memoize'\nimport {\n  type MessageFormatElement,\n  parse,\n  type ParserOptions,\n} from '@formatjs/icu-messageformat-parser'\nimport {\n  type Formats,\n  type FormatterCache,\n  type Formatters,\n  formatToParts,\n  type FormatXMLElementFn,\n  type MessageFormatPart,\n  PART_TYPE,\n  type PrimitiveType,\n} from '#packages/intl-messageformat/formatters.js'\n\n// -- MessageFormat --------------------------------------------------------\n\nfunction mergeConfig(c1: Record<string, object>, c2?: Record<string, object>) {\n  if (!c2) {\n    return c1\n  }\n  return {\n    ...c1,\n    ...c2,\n    ...Object.keys(c1).reduce((all: Record<string, object>, k) => {\n      all[k] = {\n        ...c1[k],\n        ...c2[k],\n      }\n      return all\n    }, {}),\n  }\n}\n\nfunction mergeConfigs(\n  defaultConfig: Formats,\n  configs?: Partial<Formats>\n): Formats {\n  if (!configs) {\n    return defaultConfig\n  }\n\n  return (Object.keys(defaultConfig) as Array<keyof Formats>).reduce(\n    (all: Formats, k: keyof Formats) => {\n      all[k] = mergeConfig(defaultConfig[k], configs[k])\n      return all\n    },\n    {...defaultConfig}\n  )\n}\n\nexport interface Options extends Omit<ParserOptions, 'locale'> {\n  formatters?: Formatters\n}\n\nfunction createFastMemoizeCache<V>(\n  store: Record<string, V | undefined>\n): Cache<string, V> {\n  return {\n    create() {\n      return {\n        get(key) {\n          return store[key]\n        },\n        set(key, value) {\n          store[key] = value\n        },\n      }\n    },\n  }\n}\n\nfunction createDefaultFormatters(\n  cache: FormatterCache = {\n    number: {},\n    dateTime: {},\n    pluralRules: {},\n  }\n): Formatters {\n  return {\n    getNumberFormat: memoize((...args) => new Intl.NumberFormat(...args), {\n      cache: createFastMemoizeCache(cache.number),\n      strategy: strategies.variadic,\n    }),\n    getDateTimeFormat: memoize((...args) => new Intl.DateTimeFormat(...args), {\n      cache: createFastMemoizeCache(cache.dateTime),\n      strategy: strategies.variadic,\n    }),\n    getPluralRules: memoize((...args) => new Intl.PluralRules(...args), {\n      cache: createFastMemoizeCache(cache.pluralRules),\n      strategy: strategies.variadic,\n    }),\n  }\n}\n\nexport class IntlMessageFormat {\n  private readonly ast: MessageFormatElement[]\n  private readonly locales: string | string[]\n  private readonly resolvedLocale?: Intl.Locale\n  private readonly formatters: Formatters\n  private readonly formats: Formats\n  private readonly message: string | undefined\n  private readonly formatterCache: FormatterCache = {\n    number: {},\n    dateTime: {},\n    pluralRules: {},\n  }\n  constructor(\n    message: string | MessageFormatElement[],\n    locales: string | string[] = IntlMessageFormat.defaultLocale,\n    overrideFormats?: Partial<Formats>,\n    opts?: Options\n  ) {\n    // Defined first because it's used to build the format pattern.\n    this.locales = locales\n    this.resolvedLocale = IntlMessageFormat.resolveLocale(locales)\n\n    if (typeof message === 'string') {\n      this.message = message\n      if (!IntlMessageFormat.__parse) {\n        throw new TypeError(\n          'IntlMessageFormat.__parse must be set to process `message` of type `string`'\n        )\n      }\n      const {...parseOpts} = opts || {}\n      // Parse string messages into an AST.\n      this.ast = IntlMessageFormat.__parse(message, {\n        ...parseOpts,\n        locale: this.resolvedLocale,\n      })\n    } else {\n      this.ast = message\n    }\n\n    if (!Array.isArray(this.ast)) {\n      throw new TypeError('A message must be provided as a String or AST.')\n    }\n\n    // Creates a new object with the specified `formats` merged with the default\n    // formats.\n    this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats)\n\n    this.formatters =\n      (opts && opts.formatters) || createDefaultFormatters(this.formatterCache)\n  }\n\n  format = <T = void>(\n    values?: Record<string, PrimitiveType | T | FormatXMLElementFn<T>>\n  ): string | T | (string | T)[] => {\n    const parts = this.formatToParts(values)\n    // Hot path for straight simple msg translations\n    if (parts.length === 1) {\n      return parts[0].value\n    }\n    const result = parts.reduce(\n      (all, part) => {\n        if (\n          !all.length ||\n          part.type !== PART_TYPE.literal ||\n          typeof all[all.length - 1] !== 'string'\n        ) {\n          all.push(part.value)\n        } else {\n          all[all.length - 1] += part.value\n        }\n        return all\n      },\n      [] as Array<string | T>\n    )\n\n    if (result.length <= 1) {\n      return result[0] || ''\n    }\n    return result\n  }\n  formatToParts = <T>(\n    values?: Record<string, PrimitiveType | T | FormatXMLElementFn<T>>\n  ): MessageFormatPart<T>[] =>\n    formatToParts(\n      this.ast,\n      this.locales,\n      this.formatters,\n      this.formats,\n      values,\n      undefined,\n      this.message\n    )\n  resolvedOptions = (): {\n    locale: string\n  } => ({\n    locale:\n      this.resolvedLocale?.toString() ||\n      Intl.NumberFormat.supportedLocalesOf(this.locales)[0],\n  })\n  getAst = (): MessageFormatElement[] => this.ast\n  private static memoizedDefaultLocale: string | null = null\n\n  static get defaultLocale(): string {\n    if (!IntlMessageFormat.memoizedDefaultLocale) {\n      IntlMessageFormat.memoizedDefaultLocale =\n        new Intl.NumberFormat().resolvedOptions().locale\n    }\n\n    return IntlMessageFormat.memoizedDefaultLocale\n  }\n  static resolveLocale = (\n    locales: string | string[]\n  ): Intl.Locale | undefined => {\n    if (typeof Intl.Locale === 'undefined') {\n      return\n    }\n    const supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales)\n    if (supportedLocales.length > 0) {\n      return new Intl.Locale(supportedLocales[0])\n    }\n\n    return new Intl.Locale(typeof locales === 'string' ? locales : locales[0])\n  }\n  static __parse: typeof parse | undefined = parse\n  // Default format options used as the prototype of the `formats` provided to the\n  // constructor. These are used when constructing the internal Intl.NumberFormat\n  // and Intl.DateTimeFormat instances.\n  static formats: Formats = {\n    number: {\n      integer: {\n        maximumFractionDigits: 0,\n      },\n      currency: {\n        style: 'currency',\n      },\n\n      percent: {\n        style: 'percent',\n      },\n    },\n\n    date: {\n      short: {\n        month: 'numeric',\n        day: 'numeric',\n        year: '2-digit',\n      },\n\n      medium: {\n        month: 'short',\n        day: 'numeric',\n        year: 'numeric',\n      },\n\n      long: {\n        month: 'long',\n        day: 'numeric',\n        year: 'numeric',\n      },\n\n      full: {\n        weekday: 'long',\n        month: 'long',\n        day: 'numeric',\n        year: 'numeric',\n      },\n    },\n\n    time: {\n      short: {\n        hour: 'numeric',\n        minute: 'numeric',\n      },\n\n      medium: {\n        hour: 'numeric',\n        minute: 'numeric',\n        second: 'numeric',\n      },\n\n      long: {\n        hour: 'numeric',\n        minute: 'numeric',\n        second: 'numeric',\n        timeZoneName: 'short',\n      },\n\n      full: {\n        hour: 'numeric',\n        minute: 'numeric',\n        second: 'numeric',\n        timeZoneName: 'short',\n      },\n    },\n  }\n}\n","import {type NumberFormatOptions} from '#packages/ecma402-abstract/types/number.js'\nimport {type Cache, memoize, strategies} from '@formatjs/fast-memoize'\nimport {IntlMessageFormat} from 'intl-messageformat'\nimport {UnsupportedFormatterError} from '#packages/intl/error.js'\nimport {\n  type CustomFormats,\n  type Formatters,\n  type IntlCache,\n  type OnErrorFn,\n  type OnWarnFn,\n  type ResolvedIntlConfig,\n} from '#packages/intl/types.js'\n\nexport function invariant(\n  condition: boolean,\n  message: string,\n  Err: any = Error\n): asserts condition {\n  if (!condition) {\n    throw new Err(message)\n  }\n}\n\nexport function filterProps<T extends Record<string, any>, K extends string>(\n  props: T,\n  allowlist: Array<K>,\n  defaults: Partial<T> = {}\n): Pick<T, K> {\n  return allowlist.reduce(\n    (filtered, name) => {\n      if (name in props) {\n        filtered[name] = props[name]\n      } else if (name in defaults) {\n        filtered[name] = defaults[name]!\n      }\n\n      return filtered\n    },\n    {} as Pick<T, K>\n  )\n}\n\nconst defaultErrorHandler: OnErrorFn = error => {\n  // @ts-ignore just so we don't need to declare dep on @types/node\n  if (process.env.NODE_ENV !== 'production') {\n    console.error(error)\n  }\n}\n\nconst defaultWarnHandler: OnWarnFn = (warning: string) => {\n  // @ts-ignore just so we don't need to declare dep on @types/node\n  if (process.env.NODE_ENV !== 'production') {\n    console.warn(warning)\n  }\n}\n\nexport const DEFAULT_INTL_CONFIG: Pick<\n  ResolvedIntlConfig<any>,\n  | 'fallbackOnEmptyString'\n  | 'formats'\n  | 'messages'\n  | 'timeZone'\n  | 'defaultLocale'\n  | 'defaultFormats'\n  | 'onError'\n  | 'onWarn'\n> = {\n  formats: {},\n  messages: {},\n  timeZone: undefined,\n\n  defaultLocale: 'en',\n  defaultFormats: {},\n\n  fallbackOnEmptyString: true,\n\n  onError: defaultErrorHandler,\n  onWarn: defaultWarnHandler,\n}\n\nexport function createIntlCache(): IntlCache {\n  return {\n    dateTime: {},\n    number: {},\n    message: {},\n    relativeTime: {},\n    pluralRules: {},\n    list: {},\n    displayNames: {},\n  }\n}\n\nfunction createFastMemoizeCache<V>(\n  store: Record<string, V | undefined>\n): Cache<string, V> {\n  return {\n    create() {\n      return {\n        get(key) {\n          return store[key]\n        },\n        set(key, value) {\n          store[key] = value\n        },\n      }\n    },\n  }\n}\n\n/**\n * Create intl formatters and populate cache\n * @param cache explicit cache to prevent leaking memory\n */\nexport function createFormatters(\n  cache: IntlCache = createIntlCache()\n): Formatters {\n  const RelativeTimeFormat = (Intl as any).RelativeTimeFormat\n  const ListFormat = (Intl as any).ListFormat\n  const DisplayNames = (Intl as any).DisplayNames\n  const getDateTimeFormat = memoize(\n    (...args) => new Intl.DateTimeFormat(...args),\n    {\n      cache: createFastMemoizeCache(cache.dateTime),\n      strategy: strategies.variadic,\n    }\n  )\n  const getNumberFormat = memoize((...args) => new Intl.NumberFormat(...args), {\n    cache: createFastMemoizeCache(cache.number),\n    strategy: strategies.variadic,\n  })\n  const getPluralRules = memoize((...args) => new Intl.PluralRules(...args), {\n    cache: createFastMemoizeCache(cache.pluralRules),\n    strategy: strategies.variadic,\n  })\n  return {\n    getDateTimeFormat,\n    getNumberFormat,\n    getMessageFormat: memoize(\n      (message, locales, overrideFormats, opts) =>\n        new IntlMessageFormat(message, locales, overrideFormats, {\n          formatters: {\n            getNumberFormat,\n            getDateTimeFormat,\n            getPluralRules,\n          },\n          ...opts,\n        }),\n      {\n        cache: createFastMemoizeCache(cache.message),\n        strategy: strategies.variadic,\n      }\n    ),\n    getRelativeTimeFormat: memoize(\n      (...args) => new RelativeTimeFormat(...args),\n      {\n        cache: createFastMemoizeCache(cache.relativeTime),\n        strategy: strategies.variadic,\n      }\n    ),\n    getPluralRules,\n    getListFormat: memoize((...args) => new ListFormat(...args), {\n      cache: createFastMemoizeCache(cache.list),\n      strategy: strategies.variadic,\n    }),\n    getDisplayNames: memoize((...args) => new DisplayNames(...args), {\n      cache: createFastMemoizeCache(cache.displayNames),\n      strategy: strategies.variadic,\n    }),\n  }\n}\n\nexport function getNamedFormat<T extends keyof CustomFormats>(\n  formats: CustomFormats,\n  type: T,\n  name: string,\n  onError: OnErrorFn\n):\n  | NumberFormatOptions\n  | Intl.DateTimeFormatOptions\n  | Intl.RelativeTimeFormatOptions\n  | undefined {\n  const formatType = formats && formats[type]\n  let format\n  if (formatType) {\n    format = formatType[name]\n  }\n  if (format) {\n    return format\n  }\n\n  onError(new UnsupportedFormatterError(`No ${type} format named: ${name}`))\n}\n","import {\n  type CustomFormats,\n  type Formatters,\n  type MessageDescriptor,\n  type OnErrorFn,\n} from '#packages/intl/types.js'\n\nimport {\n  type MessageFormatElement,\n  TYPE,\n} from '@formatjs/icu-messageformat-parser'\nimport {\n  type FormatXMLElementFn,\n  IntlMessageFormat,\n  type Formatters as IntlMessageFormatFormatters,\n  type Options,\n  type PrimitiveType,\n} from 'intl-messageformat'\nimport {\n  MessageFormatError,\n  MissingTranslationError,\n} from '#packages/intl/error.js'\nimport {invariant} from '#packages/intl/utils.js'\n\nfunction setTimeZoneInOptions(\n  opts: Record<string, Intl.DateTimeFormatOptions>,\n  timeZone: string\n): Record<string, Intl.DateTimeFormatOptions> {\n  return Object.keys(opts).reduce(\n    (all: Record<string, Intl.DateTimeFormatOptions>, k) => {\n      all[k] = {\n        timeZone,\n        ...opts[k],\n      }\n      return all\n    },\n    {}\n  )\n}\n\nfunction deepMergeOptions(\n  opts1: Record<string, Intl.DateTimeFormatOptions>,\n  opts2: Record<string, Intl.DateTimeFormatOptions>\n): Record<string, Intl.DateTimeFormatOptions> {\n  const keys = Object.keys({...opts1, ...opts2})\n  return keys.reduce((all: Record<string, Intl.DateTimeFormatOptions>, k) => {\n    all[k] = {\n      ...opts1[k],\n      ...opts2[k],\n    }\n    return all\n  }, {})\n}\n\nfunction deepMergeFormatsAndSetTimeZone(\n  f1: CustomFormats,\n  timeZone?: string\n): CustomFormats {\n  if (!timeZone) {\n    return f1\n  }\n  const mfFormats = IntlMessageFormat.formats\n  return {\n    ...mfFormats,\n    ...f1,\n    date: deepMergeOptions(\n      setTimeZoneInOptions(mfFormats.date, timeZone),\n      setTimeZoneInOptions(f1.date || {}, timeZone)\n    ),\n    time: deepMergeOptions(\n      setTimeZoneInOptions(mfFormats.time, timeZone),\n      setTimeZoneInOptions(f1.time || {}, timeZone)\n    ),\n  }\n}\n\nexport type FormatMessageFn<T> = (\n  {\n    locale,\n    formats,\n    messages,\n    defaultLocale,\n    defaultFormats,\n    fallbackOnEmptyString,\n    onError,\n    timeZone,\n    defaultRichTextElements,\n  }: {\n    locale: string\n    timeZone?: string\n    formats: CustomFormats\n    messages: Record<string, string> | Record<string, MessageFormatElement[]>\n    defaultLocale: string\n    defaultFormats: CustomFormats\n    defaultRichTextElements?: Record<string, FormatXMLElementFn<T>>\n    fallbackOnEmptyString?: boolean\n    onError: OnErrorFn\n  },\n  state: IntlMessageFormatFormatters & Pick<Formatters, 'getMessageFormat'>,\n  messageDescriptor: MessageDescriptor,\n  values?: Record<string, PrimitiveType | T | FormatXMLElementFn<T>>,\n  opts?: Options\n) => T extends string ? string : Array<T | string> | string | T\n\nfunction getMessageDescriptorContext(\n  messageDescriptor: MessageDescriptor\n): string {\n  const {defaultMessage} = messageDescriptor\n  try {\n    return defaultMessage !== undefined\n      ? `\\nDefault Message: ${\n          typeof defaultMessage === 'string'\n            ? defaultMessage\n            : JSON.stringify(defaultMessage)\n        }`\n      : `\\nMessage Descriptor: ${JSON.stringify(messageDescriptor)}`\n  } catch {\n    return ''\n  }\n}\n\nexport const formatMessage: FormatMessageFn<any> = (\n  {\n    locale,\n    formats,\n    messages,\n    defaultLocale,\n    defaultFormats,\n    fallbackOnEmptyString,\n    onError,\n    timeZone,\n    defaultRichTextElements,\n  },\n  state,\n  messageDescriptor = {id: ''},\n  values,\n  opts\n) => {\n  const {id: msgId, defaultMessage} = messageDescriptor\n\n  // `id` is a required field of a Message Descriptor.\n  if (!msgId) {\n    invariant(\n      false,\n      `[@formatjs/intl] An \\`id\\` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.github.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.github.io/docs/tooling/ts-transformer) OR\n2. Configure your \\`eslint\\` config to include [eslint-plugin-formatjs](https://formatjs.github.io/docs/tooling/linter#enforce-id)\nto autofix this issue${getMessageDescriptorContext(messageDescriptor)}`\n    )\n  }\n  const id = String(msgId)\n  const message =\n    // In case messages is Object.create(null)\n    // e.g import('foo.json') from webpack)\n    // See https://github.com/formatjs/formatjs/issues/1914\n    messages &&\n    Object.prototype.hasOwnProperty.call(messages, id) &&\n    messages[id]\n\n  // IMPORTANT: Hot path if `message` is AST with a single literal node\n  if (\n    Array.isArray(message) &&\n    message.length === 1 &&\n    message[0].type === TYPE.literal\n  ) {\n    return message[0].value\n  }\n\n  values = {\n    ...defaultRichTextElements,\n    ...values,\n  }\n  formats = deepMergeFormatsAndSetTimeZone(formats, timeZone)\n  defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone)\n\n  if (!message) {\n    if (fallbackOnEmptyString === false && message === '') {\n      return message\n    }\n\n    if (\n      !defaultMessage ||\n      (locale && locale.toLowerCase() !== defaultLocale.toLowerCase())\n    ) {\n      // This prevents warnings from littering the console in development\n      // when no `messages` are passed into the <IntlProvider> for the\n      // default locale.\n      onError(new MissingTranslationError(messageDescriptor, locale))\n    }\n    if (defaultMessage) {\n      try {\n        const formatter = state.getMessageFormat(\n          defaultMessage,\n          defaultLocale,\n          defaultFormats,\n          opts\n        )\n\n        return formatter.format(values)\n      } catch (e) {\n        onError(\n          new MessageFormatError(\n            `Error formatting default message for: \"${id}\", rendering default message verbatim`,\n            locale,\n            messageDescriptor,\n            e\n          )\n        )\n        return typeof defaultMessage === 'string' ? defaultMessage : id\n      }\n    }\n    return id\n  }\n\n  // We have the translated message\n  try {\n    const formatter = state.getMessageFormat(message, locale, formats, {\n      formatters: state,\n      ...opts,\n    })\n\n    return formatter.format<any>(values)\n  } catch (e) {\n    onError(\n      new MessageFormatError(\n        `Error formatting message: \"${id}\", using ${\n          defaultMessage ? 'default message' : 'id'\n        } as fallback.`,\n        locale,\n        messageDescriptor,\n        e\n      )\n    )\n  }\n\n  if (defaultMessage) {\n    try {\n      const formatter = state.getMessageFormat(\n        defaultMessage,\n        defaultLocale,\n        defaultFormats,\n        opts\n      )\n\n      return formatter.format(values)\n    } catch (e) {\n      onError(\n        new MessageFormatError(\n          `Error formatting the default message for: \"${id}\", rendering message verbatim`,\n          locale,\n          messageDescriptor,\n          e\n        )\n      )\n    }\n  }\n\n  if (typeof message === 'string') {\n    return message\n  }\n  if (typeof defaultMessage === 'string') {\n    return defaultMessage\n  }\n  return id\n}\n","import {\n  type CustomFormats,\n  type Formatters,\n  type IntlFormatters,\n  type OnErrorFn,\n} from '#packages/intl/types.js'\n\nimport {IntlFormatError} from '#packages/intl/error.js'\nimport {filterProps, getNamedFormat} from '#packages/intl/utils.js'\n\nconst DATE_TIME_FORMAT_OPTIONS: Array<keyof Intl.DateTimeFormatOptions> = [\n  'formatMatcher',\n\n  'timeZone',\n  'hour12',\n\n  'weekday',\n  'era',\n  'year',\n  'month',\n  'day',\n  'hour',\n  'minute',\n  'second',\n  'timeZoneName',\n  'hourCycle',\n  'dateStyle',\n  'timeStyle',\n  'calendar',\n  // 'dayPeriod',\n  'numberingSystem',\n  'fractionalSecondDigits',\n]\n\nexport function getFormatter(\n  {\n    locale,\n    formats,\n    onError,\n    timeZone,\n  }: {\n    locale: string\n    timeZone?: string\n    formats: CustomFormats\n    onError: OnErrorFn\n  },\n  type: 'date' | 'time' | 'dateTimeRange',\n  getDateTimeFormat: Formatters['getDateTimeFormat'],\n  options: Parameters<IntlFormatters['formatDate']>[1] = {}\n): Intl.DateTimeFormat {\n  const {format} = options\n  const defaults = {\n    ...(timeZone && {timeZone}),\n    ...(format && getNamedFormat(formats!, type, format, onError)),\n  }\n\n  let filteredOptions = filterProps(\n    options,\n    DATE_TIME_FORMAT_OPTIONS,\n    defaults\n  ) as Intl.DateTimeFormatOptions\n\n  if (\n    type === 'time' &&\n    !filteredOptions.hour &&\n    !filteredOptions.minute &&\n    !filteredOptions.second &&\n    !filteredOptions.timeStyle &&\n    !filteredOptions.dateStyle\n  ) {\n    // Add default formatting options if hour, minute, or second isn't defined.\n    filteredOptions = {...filteredOptions, hour: 'numeric', minute: 'numeric'}\n  }\n\n  return getDateTimeFormat(locale, filteredOptions)\n}\n\nexport function formatDate(\n  config: {\n    locale: string\n    timeZone?: string\n    formats: CustomFormats\n    onError: OnErrorFn\n  },\n  getDateTimeFormat: Formatters['getDateTimeFormat'],\n  value: Parameters<IntlFormatters['formatDate']>[0],\n  options: Parameters<IntlFormatters['formatDate']>[1] = {}\n): string {\n  const date = typeof value === 'string' ? new Date(value || 0) : value\n  try {\n    return getFormatter(config, 'date', getDateTimeFormat, options).format(date)\n  } catch (e) {\n    config.onError(\n      new IntlFormatError('Error formatting date.', config.locale, e)\n    )\n  }\n\n  return String(date)\n}\n\nexport function formatTime(\n  config: {\n    locale: string\n    timeZone?: string\n    formats: CustomFormats\n    onError: OnErrorFn\n  },\n  getDateTimeFormat: Formatters['getDateTimeFormat'],\n  value: Parameters<IntlFormatters['formatTime']>[0],\n  options: Parameters<IntlFormatters['formatTime']>[1] = {}\n): string {\n  const date = typeof value === 'string' ? new Date(value || 0) : value\n\n  try {\n    return getFormatter(config, 'time', getDateTimeFormat, options).format(date)\n  } catch (e) {\n    config.onError(\n      new IntlFormatError('Error formatting time.', config.locale, e)\n    )\n  }\n\n  return String(date)\n}\n\nexport function formatDateTimeRange(\n  config: {\n    locale: string\n    timeZone?: string\n    formats: CustomFormats\n    onError: OnErrorFn\n  },\n  getDateTimeFormat: Formatters['getDateTimeFormat'],\n  from: Parameters<IntlFormatters['formatDateTimeRange']>[0],\n  to: Parameters<IntlFormatters['formatDateTimeRange']>[1],\n  options: Parameters<IntlFormatters['formatDateTimeRange']>[2] = {}\n): string {\n  const fromDate = typeof from === 'string' ? new Date(from || 0) : from\n  const toDate = typeof to === 'string' ? new Date(to || 0) : to\n\n  try {\n    return getFormatter(\n      config,\n      'dateTimeRange',\n      getDateTimeFormat,\n      options\n    ).formatRange(fromDate, toDate)\n  } catch (e) {\n    config.onError(\n      new IntlFormatError('Error formatting date time range.', config.locale, e)\n    )\n  }\n\n  return String(fromDate)\n}\n\nexport function formatDateToParts(\n  config: {\n    locale: string\n    timeZone?: string\n    formats: CustomFormats\n    onError: OnErrorFn\n  },\n  getDateTimeFormat: Formatters['getDateTimeFormat'],\n  value: Parameters<IntlFormatters['formatDate']>[0],\n  options: Parameters<IntlFormatters['formatDate']>[1] = {}\n): Intl.DateTimeFormatPart[] {\n  const date = typeof value === 'string' ? new Date(value || 0) : value\n  try {\n    return getFormatter(\n      config,\n      'date',\n      getDateTimeFormat,\n      options\n    ).formatToParts(date) as Intl.DateTimeFormatPart[] // TODO: remove this when https://github.com/microsoft/TypeScript/pull/50402 is merged\n  } catch (e) {\n    config.onError(\n      new IntlFormatError('Error formatting date.', config.locale, e)\n    )\n  }\n\n  return []\n}\n\nexport function formatTimeToParts(\n  config: {\n    locale: string\n    timeZone?: string\n    formats: CustomFormats\n    onError: OnErrorFn\n  },\n  getDateTimeFormat: Formatters['getDateTimeFormat'],\n  value: Parameters<IntlFormatters['formatTimeToParts']>[0],\n  options: Parameters<IntlFormatters['formatTimeToParts']>[1] = {}\n): Intl.DateTimeFormatPart[] {\n  const date = typeof value === 'string' ? new Date(value || 0) : value\n\n  try {\n    return getFormatter(\n      config,\n      'time',\n      getDateTimeFormat,\n      options\n    ).formatToParts(date) as Intl.DateTimeFormatPart[] // TODO: remove this when https://github.com/microsoft/TypeScript/pull/50402 is merged\n  } catch (e) {\n    config.onError(\n      new IntlFormatError('Error formatting time.', config.locale, e)\n    )\n  }\n\n  return []\n}\n","import {\n  type Formatters,\n  type IntlFormatters,\n  type OnErrorFn,\n} from '#packages/intl/types.js'\nimport {filterProps} from '#packages/intl/utils.js'\n\nimport {ErrorCode, FormatError} from 'intl-messageformat'\nimport {IntlFormatError} from '#packages/intl/error.js'\n\nconst DISPLAY_NAMES_OPTONS: Array<keyof Intl.DisplayNamesOptions> = [\n  'style',\n  'type',\n  'fallback',\n  'languageDisplay',\n]\n\nexport function formatDisplayName(\n  {\n    locale,\n    onError,\n  }: {\n    locale: string\n    onError: OnErrorFn\n  },\n  getDisplayNames: Formatters['getDisplayNames'],\n  value: Parameters<IntlFormatters['formatDisplayName']>[0],\n  options: Parameters<IntlFormatters['formatDisplayName']>[1]\n): string | undefined {\n  const DisplayNames: typeof Intl.DisplayNames = (Intl as any).DisplayNames\n  if (!DisplayNames) {\n    onError(\n      new FormatError(\n        `Intl.DisplayNames is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-displaynames\"\n`,\n        ErrorCode.MISSING_INTL_API\n      )\n    )\n  }\n  const filteredOptions = filterProps(\n    options,\n    DISPLAY_NAMES_OPTONS\n  ) as Intl.DisplayNamesOptions\n  try {\n    return getDisplayNames(locale, filteredOptions).of(value)\n  } catch (e) {\n    onError(new IntlFormatError('Error formatting display name.', locale, e))\n  }\n}\n","import {ErrorCode, FormatError} from 'intl-messageformat'\nimport {IntlFormatError} from '#packages/intl/error.js'\nimport {\n  type Formatters,\n  type IntlFormatters,\n  type OnErrorFn,\n  type Part,\n} from '#packages/intl/types.js'\nimport {filterProps} from '#packages/intl/utils.js'\n\nconst LIST_FORMAT_OPTIONS: Array<keyof Intl.ListFormatOptions> = [\n  'type',\n  'style',\n]\n\nconst now = Date.now()\n\nfunction generateToken(i: number): string {\n  return `${now}_${i}_${now}`\n}\n\nexport function formatList(\n  opts: {\n    locale: string\n    onError: OnErrorFn\n  },\n  getListFormat: Formatters['getListFormat'],\n  values: Iterable<string>,\n  options: Parameters<IntlFormatters['formatList']>[1]\n): string\nexport function formatList<T>(\n  opts: {\n    locale: string\n    onError: OnErrorFn\n  },\n  getListFormat: Formatters['getListFormat'],\n  values: Iterable<string | T>,\n  options: Parameters<IntlFormatters['formatList']>[1] = {}\n): Array<T | string> | T | string {\n  const results = formatListToParts(\n    opts,\n    getListFormat,\n    values,\n    options\n  ).reduce((all: Array<string | T>, el) => {\n    const val = el.value\n    if (typeof val !== 'string') {\n      all.push(val)\n    } else if (typeof all[all.length - 1] === 'string') {\n      all[all.length - 1] += val\n    } else {\n      all.push(val)\n    }\n    return all\n  }, [])\n  return results.length === 1 ? results[0] : results.length === 0 ? '' : results\n}\n\nexport function formatListToParts<T>(\n  opts: {\n    locale: string\n    onError: OnErrorFn\n  },\n  getListFormat: Formatters['getListFormat'],\n  values: Iterable<string | T>,\n  options: Parameters<IntlFormatters['formatList']>[1]\n): Part[]\nexport function formatListToParts<T>(\n  {\n    locale,\n    onError,\n  }: {\n    locale: string\n    onError: OnErrorFn\n  },\n  getListFormat: Formatters['getListFormat'],\n  values: Parameters<IntlFormatters['formatList']>[0],\n  options: Parameters<IntlFormatters['formatList']>[1] = {}\n): Part<T>[] {\n  const ListFormat: typeof Intl.ListFormat = Intl.ListFormat\n  if (!ListFormat) {\n    onError(\n      new FormatError(\n        `Intl.ListFormat is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-listformat\"\n`,\n        ErrorCode.MISSING_INTL_API\n      )\n    )\n  }\n  const filteredOptions = filterProps(\n    options,\n    LIST_FORMAT_OPTIONS\n  ) as Intl.ListFormatOptions\n\n  try {\n    const richValues: Record<string, T> = {}\n    const serializedValues = Array.from(values).map((v, i) => {\n      if (typeof v === 'object' && v !== null) {\n        const id = generateToken(i)\n        richValues[id] = v as any\n        return id\n      }\n      return String(v)\n    })\n    return getListFormat(locale, filteredOptions)\n      .formatToParts(serializedValues)\n      .map(\n        part =>\n          (part.type === 'literal'\n            ? part\n            : {...part, value: richValues[part.value] || part.value}) as Part<T>\n      )\n  } catch (e) {\n    onError(new IntlFormatError('Error formatting list.', locale, e))\n  }\n\n  // @ts-ignore\n  return values\n}\n","import {ErrorCode, FormatError} from 'intl-messageformat'\nimport {IntlFormatError} from '#packages/intl/error.js'\nimport {\n  type Formatters,\n  type IntlFormatters,\n  type OnErrorFn,\n} from '#packages/intl/types.js'\nimport {filterProps} from '#packages/intl/utils.js'\n\nconst PLURAL_FORMAT_OPTIONS: Array<keyof Intl.PluralRulesOptions> = ['type']\n\nexport function formatPlural(\n  {\n    locale,\n    onError,\n  }: {\n    locale: string\n    onError: OnErrorFn\n  },\n  getPluralRules: Formatters['getPluralRules'],\n  value: Parameters<IntlFormatters['formatPlural']>[0],\n  options: Parameters<IntlFormatters['formatPlural']>[1] = {}\n): Intl.LDMLPluralRule {\n  if (!Intl.PluralRules) {\n    onError(\n      new FormatError(\n        `Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n`,\n        ErrorCode.MISSING_INTL_API\n      )\n    )\n  }\n  const filteredOptions = filterProps(\n    options,\n    PLURAL_FORMAT_OPTIONS\n  ) as Intl.PluralRulesOptions\n\n  try {\n    return getPluralRules(locale, filteredOptions).select(\n      value\n    ) as Intl.LDMLPluralRule\n  } catch (e) {\n    onError(new IntlFormatError('Error formatting plural.', locale, e))\n  }\n\n  return 'other'\n}\n","import {\n  type IntlFormatters,\n  type Formatters,\n  type CustomFormats,\n  type OnErrorFn,\n} from '#packages/intl/types.js'\n\nimport {getNamedFormat, filterProps} from '#packages/intl/utils.js'\nimport {FormatError, ErrorCode} from 'intl-messageformat'\nimport {IntlFormatError} from '#packages/intl/error.js'\n\nconst RELATIVE_TIME_FORMAT_OPTIONS: Array<\n  keyof Intl.RelativeTimeFormatOptions\n> = ['numeric', 'style']\n\nfunction getFormatter(\n  {\n    locale,\n    formats,\n    onError,\n  }: {\n    locale: string\n    formats: CustomFormats\n    onError: OnErrorFn\n  },\n  getRelativeTimeFormat: Formatters['getRelativeTimeFormat'],\n  options: Parameters<IntlFormatters['formatRelativeTime']>[2] = {}\n): Intl.RelativeTimeFormat {\n  const {format} = options\n\n  const defaults =\n    (!!format && getNamedFormat(formats, 'relative', format, onError)) || {}\n  const filteredOptions = filterProps(\n    options,\n    RELATIVE_TIME_FORMAT_OPTIONS,\n    defaults as Intl.RelativeTimeFormatOptions\n  ) as Intl.RelativeTimeFormatOptions\n\n  return getRelativeTimeFormat(locale, filteredOptions)\n}\n\nexport function formatRelativeTime(\n  config: {\n    locale: string\n    formats: CustomFormats\n    onError: OnErrorFn\n  },\n  getRelativeTimeFormat: Formatters['getRelativeTimeFormat'],\n  value: Parameters<IntlFormatters['formatRelativeTime']>[0],\n  unit?: Parameters<IntlFormatters['formatRelativeTime']>[1],\n  options: Parameters<IntlFormatters['formatRelativeTime']>[2] = {}\n): string {\n  if (!unit) {\n    unit = 'second'\n  }\n  const RelativeTimeFormat = Intl.RelativeTimeFormat\n  if (!RelativeTimeFormat) {\n    config.onError(\n      new FormatError(\n        `Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-relativetimeformat\"\n`,\n        ErrorCode.MISSING_INTL_API\n      )\n    )\n  }\n  try {\n    return getFormatter(config, getRelativeTimeFormat, options).format(\n      value,\n      unit\n    )\n  } catch (e) {\n    config.onError(\n      new IntlFormatError('Error formatting relative time.', config.locale, e)\n    )\n  }\n\n  return String(value)\n}\n","import type { IntlShape } from '@formatjs/intl';\n\nexport type FormatMessageParameters = Parameters<\n  IntlShape<string>['formatMessage']\n>;\n\nexport function formatMessage(\n  intlShape: IntlShape,\n  ...[descriptor, parameters]: FormatMessageParameters\n): string {\n  return intlShape.formatMessage(descriptor, parameters, {\n    ignoreTag: true,\n  }) as string;\n}\n","export type Locales = [string, ...string[]];\n\n/**\n * @private\n */\nexport function convertToArray(locale: Locales | string): Locales {\n  if (Array.isArray(locale)) {\n    return locale;\n  }\n\n  return [locale];\n}\n\n/**\n * @private\n */\nexport function convertToString(locale: Locales | string): string {\n  if (Array.isArray(locale)) {\n    return locale[0];\n  }\n\n  return locale;\n}\n\n/**\n * @private\n */\nexport function hasLocaleChanged(locale1: Locales, locale2?: Locales): boolean {\n  if (locale2 === undefined) {\n    return true;\n  }\n\n  return locale1.toString() !== locale2.toString();\n}\n\n/**\n * @private\n */\nexport function normalizeLocale(locale: string): string {\n  return locale.replace(/_/g, '-').toLowerCase();\n}\n","import { assert } from '@ember/debug';\nimport { cancel, next, type Timer as EmberRunTimer } from '@ember/runloop';\nimport Service from '@ember/service';\nimport { htmlSafe } from '@ember/template';\nimport { tracked } from '@glimmer/tracking';\n\nimport type {\n  FormatDateParameters,\n  FormatDateRangeParameters,\n  FormatDisplayNameParameters,\n  FormatListParameters,\n  FormatMessageParameters,\n  FormatNumberParameters,\n  FormatRelativeTimeParameters,\n  Formats,\n  FormatTimeParameters,\n  IntlShape,\n  OnErrorFn,\n} from '../-private/formatjs/index.ts';\nimport {\n  convertToFormatjsFormats,\n  createIntl,\n  createIntlCache,\n  formatDate,\n  formatDateRange,\n  formatDisplayName,\n  formatList,\n  formatMessage,\n  formatNumber,\n  formatRelativeTime,\n  formatTime,\n} from '../-private/formatjs/index.ts';\nimport { getHtmlElement } from '../-private/utils/get-html-element.ts';\nimport {\n  convertToArray,\n  convertToString,\n  hasLocaleChanged,\n  type Locales,\n  normalizeLocale,\n} from '../-private/utils/locale.ts';\nimport type { TranslationJson } from '../-private/utils/translations.ts';\n\nexport type { Formats };\n\ntype OnFormatjsError = (error: Parameters<OnErrorFn>[0]) => void;\n\ntype OnMissingTranslation = (\n  key: string,\n  locales: Locales,\n  data?: Record<string, unknown>,\n) => string;\n\nexport default class IntlService extends Service {\n  @tracked private _intls: Record<string, IntlShape> = {};\n  @tracked private _locales?: Locales;\n\n  private _cache = createIntlCache();\n  private _formats: Formats = {};\n  private _onFormatjsError: OnFormatjsError = (error) => {\n    switch (error.code) {\n      // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison\n      case 'MISSING_DATA': {\n        console.warn(error.message);\n        break;\n      }\n\n      // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison\n      case 'MISSING_TRANSLATION': {\n        // Do nothing\n        break;\n      }\n\n      default: {\n        throw error;\n      }\n    }\n  };\n  private _onMissingTranslation: OnMissingTranslation = (key, locales) => {\n    const locale = locales.join(', ');\n\n    return `Missing translation \"${key}\" for locale \"${locale}\"`;\n  };\n  private _timer?: EmberRunTimer;\n\n  get locales(): string[] {\n    return Object.keys(this._intls);\n  }\n\n  get primaryLocale(): string {\n    const primaryLocale = this._locales?.[0];\n\n    assert(\n      'intl.primaryLocale is undefined. Did you call intl.setLocale()?',\n      primaryLocale,\n    );\n\n    return primaryLocale;\n  }\n\n  addTranslations(locale: string, translations: TranslationJson): void {\n    this.updateIntl(locale, translations);\n  }\n\n  private createIntl(\n    locale: Locales | string,\n    messages: Record<string, unknown> = {},\n  ): IntlShape {\n    const resolvedLocale = convertToString(locale);\n    const formats = convertToFormatjsFormats(this._formats);\n\n    return createIntl(\n      {\n        defaultFormats: formats,\n        defaultLocale: resolvedLocale,\n        formats,\n        locale: resolvedLocale,\n        // @ts-expect-error: Type 'Record<string, unknown>' is not assignable\n        messages,\n        onError: this._onFormatjsError,\n      },\n      this._cache,\n    );\n  }\n\n  exists(key: string, locale?: Locales | string): boolean {\n    const locales = locale ? convertToArray(locale) : this._locales!;\n\n    return locales.some((locale) => {\n      return this.getTranslation(key, locale) !== undefined;\n    });\n  }\n\n  formatDate(\n    value: FormatDateParameters[0] | null | undefined,\n    options?: FormatDateParameters[1] & {\n      locale?: string;\n    },\n  ): string {\n    if (value === undefined || value === null) {\n      return '';\n    }\n\n    const intlShape = this.getIntlShape(options?.locale);\n\n    return formatDate(intlShape, value, options);\n  }\n\n  formatDateRange(\n    from: FormatDateRangeParameters[0] | null | undefined,\n    to: FormatDateRangeParameters[1] | null | undefined,\n    options?: FormatDateRangeParameters[2] & {\n      locale?: string;\n    },\n  ): string {\n    if (from === undefined || from === null) {\n      return '';\n    }\n\n    if (to === undefined || to === null) {\n      return '';\n    }\n\n    const intlShape = this.getIntlShape(options?.locale);\n\n    return formatDateRange(intlShape, from, to, options);\n  }\n\n  formatDisplayName(\n    value: FormatDisplayNameParameters[0] | null | undefined,\n    options: FormatDisplayNameParameters[1] & {\n      locale?: string;\n    },\n  ): string {\n    if (value === undefined || value === null) {\n      return '';\n    }\n\n    const intlShape = this.getIntlShape(options?.locale);\n\n    return formatDisplayName(intlShape, value, options);\n  }\n\n  formatList(\n    value: FormatListParameters[0] | null | undefined,\n    options?: FormatListParameters[1] & {\n      locale?: string;\n    },\n  ): string {\n    if (value === undefined || value === null) {\n      return '';\n    }\n\n    const intlShape = this.getIntlShape(options?.locale);\n\n    return formatList(intlShape, value, options);\n  }\n\n  formatMessage(\n    value: FormatMessageParameters[0] | null | string | undefined,\n    options?: FormatMessageParameters[1] & {\n      htmlSafe?: boolean;\n      locale?: string;\n    },\n  ): string {\n    if (value === undefined || value === null) {\n      return '';\n    }\n\n    const intlShape = this.getIntlShape(options?.locale);\n\n    const descriptor =\n      typeof value === 'object'\n        ? value\n        : {\n            defaultMessage: value,\n            description: undefined,\n            id: value,\n          };\n\n    if (options?.htmlSafe) {\n      const output = formatMessage(intlShape, descriptor, options);\n\n      return htmlSafe(output) as unknown as string;\n    }\n\n    return formatMessage(intlShape, descriptor, options);\n  }\n\n  formatNumber(\n    value: FormatNumberParameters[0] | null | undefined,\n    options?: FormatNumberParameters[1] & {\n      locale?: string;\n    },\n  ): string {\n    if (value === undefined || value === null) {\n      return '';\n    }\n\n    const intlShape = this.getIntlShape(options?.locale);\n\n    return formatNumber(intlShape, value, options);\n  }\n\n  formatRelativeTime(\n    value: FormatRelativeTimeParameters[0] | null | undefined,\n    options?: FormatRelativeTimeParameters[2] & {\n      locale?: string;\n      unit?: FormatRelativeTimeParameters[1];\n    },\n  ): string {\n    if (value === undefined || value === null) {\n      return '';\n    }\n\n    const intlShape = this.getIntlShape(options?.locale);\n\n    return formatRelativeTime(intlShape, value, options?.unit, options);\n  }\n\n  formatTime(\n    value: FormatTimeParameters[0] | null | undefined,\n    options?: FormatTimeParameters[1] & {\n      locale?: string;\n    },\n  ): string {\n    if (value === undefined || value === null) {\n      return '';\n    }\n\n    const intlShape = this.getIntlShape(options?.locale);\n\n    return formatTime(intlShape, value, options);\n  }\n\n  private getIntl(locale: Locales | string): IntlShape | undefined {\n    const resolvedLocale = normalizeLocale(convertToString(locale));\n\n    return this._intls[resolvedLocale];\n  }\n\n  private getIntlShape(locale?: string): IntlShape {\n    if (locale) {\n      return this.createIntl(locale);\n    }\n\n    return this.getIntl(this._locales!)!;\n  }\n\n  getTranslation(key: string, locale: string): string | undefined {\n    const messages = this.getIntl(locale)?.messages;\n\n    if (!messages) {\n      return;\n    }\n\n    return messages[key] as string | undefined;\n  }\n\n  setFormats(formats: Formats): void {\n    this._formats = formats;\n\n    // Call `updateIntl` to update `formats` for each locale\n    this.locales.forEach((locale) => {\n      this.updateIntl(locale, {});\n    });\n  }\n\n  setLocale(locale: Locales | string): void {\n    const proposedLocale = convertToArray(locale);\n\n    if (hasLocaleChanged(proposedLocale, this._locales)) {\n      this._locales = proposedLocale;\n\n      // eslint-disable-next-line ember/no-runloop\n      cancel(this._timer);\n\n      // eslint-disable-next-line ember/no-runloop\n      this._timer = next(() => {\n        this.updateDocumentLanguage();\n      });\n    }\n\n    this.updateIntl(proposedLocale);\n  }\n\n  setOnFormatjsError(onFormatjsError: OnFormatjsError): void {\n    this._onFormatjsError = onFormatjsError;\n\n    // Call `updateIntl` to update `onError` for each locale\n    this.locales.forEach((locale) => {\n      this.updateIntl(locale, {});\n    });\n  }\n\n  setOnMissingTranslation(onMissingTranslation: OnMissingTranslation): void {\n    this._onMissingTranslation = onMissingTranslation;\n  }\n\n  t(\n    key: string,\n    options?: FormatMessageParameters[1] & {\n      htmlSafe?: boolean;\n      locale?: string;\n    },\n  ): string {\n    const locales: Locales = options?.locale\n      ? [options.locale]\n      : this._locales!;\n\n    let translation: string | undefined;\n\n    for (const locale of locales) {\n      translation = this.getTranslation(key, locale);\n\n      if (translation !== undefined) {\n        break;\n      }\n    }\n\n    if (translation === undefined) {\n      return this._onMissingTranslation(key, locales, options);\n    }\n\n    // Bypass @formatjs/intl\n    if (translation === '') {\n      return '';\n    }\n\n    return this.formatMessage(\n      {\n        defaultMessage: translation,\n        id: key,\n      },\n      options,\n    );\n  }\n\n  private updateDocumentLanguage(): void {\n    const html = getHtmlElement(this);\n\n    if (!html) {\n      return;\n    }\n\n    html.setAttribute('lang', this.primaryLocale);\n  }\n\n  private updateIntl(\n    locale: Locales | string,\n    messages?: Record<string, unknown>,\n  ): void {\n    const resolvedLocale = normalizeLocale(convertToString(locale));\n    const intl = this._intls[resolvedLocale];\n\n    let newIntl;\n\n    if (!intl) {\n      newIntl = this.createIntl(resolvedLocale, messages);\n    } else if (messages) {\n      newIntl = this.createIntl(resolvedLocale, {\n        ...(intl.messages ?? {}),\n        ...messages,\n      });\n    }\n\n    if (!newIntl) {\n      return;\n    }\n\n    this._intls = {\n      ...this._intls,\n      [resolvedLocale]: newIntl,\n    };\n  }\n\n  willDestroy(): void {\n    super.willDestroy();\n\n    // eslint-disable-next-line ember/no-runloop\n    cancel(this._timer);\n  }\n}\n\n// DO NOT DELETE: this is how TypeScript knows how to look up your services.\ndeclare module '@ember/service' {\n  interface Registry {\n    intl: IntlService;\n  }\n}\n","import type { CustomFormats as FormatjsFormats } from '@formatjs/intl';\n\nexport type Formats = Partial<{\n  formatDate: FormatjsFormats['date'];\n  formatDateRange: FormatjsFormats['dateTimeRange'];\n  formatNumber: FormatjsFormats['number'];\n  formatRelativeTime: FormatjsFormats['relative'];\n  formatTime: FormatjsFormats['time'];\n}>;\n\nexport function convertToFormatjsFormats(formats: Formats): FormatjsFormats {\n  const formatjsFormats: FormatjsFormats = {\n    dateTimeRange: formats.formatDateRange,\n    date: formats.formatDate,\n    number: formats.formatNumber,\n    relative: formats.formatRelativeTime,\n    time: formats.formatTime,\n  };\n\n  return formatjsFormats;\n}\n","import {type MessageFormatElement} from '@formatjs/icu-messageformat-parser'\nimport {\n  formatDate,\n  formatDateTimeRange,\n  formatDateToParts,\n  formatTime,\n  formatTimeToParts,\n} from '#packages/intl/dateTime.js'\nimport {formatDisplayName} from '#packages/intl/displayName.js'\nimport {InvalidConfigError, MissingDataError} from '#packages/intl/error.js'\nimport {formatList, formatListToParts} from '#packages/intl/list.js'\nimport {formatMessage} from '#packages/intl/message.js'\nimport {formatNumber, formatNumberToParts} from '#packages/intl/number.js'\nimport {formatPlural} from '#packages/intl/plural.js'\nimport {formatRelativeTime} from '#packages/intl/relativeTime.js'\nimport {\n  type IntlCache,\n  type IntlConfig,\n  type IntlShape,\n  type ResolvedIntlConfig,\n} from '#packages/intl/types.js'\nimport {createFormatters, DEFAULT_INTL_CONFIG} from '#packages/intl/utils.js'\n\nexport interface CreateIntlFn<\n  T = string,\n  C extends IntlConfig<T> = IntlConfig<T>,\n  S extends IntlShape<T> = IntlShape<T>,\n> {\n  (config: C, cache?: IntlCache): S\n}\n\nfunction messagesContainString(\n  messages: Record<string, string> | Record<string, MessageFormatElement[]>\n): messages is Record<string, MessageFormatElement[]> {\n  const firstMessage = messages ? messages[Object.keys(messages)[0]] : undefined\n\n  return typeof firstMessage === 'string'\n}\n\nfunction verifyConfigMessages<T = string>(config: IntlConfig<T>) {\n  if (\n    config.onWarn &&\n    config.defaultRichTextElements &&\n    messagesContainString(config.messages || {})\n  ) {\n    config.onWarn(`[@formatjs/intl] \"defaultRichTextElements\" was specified but \"message\" was not pre-compiled. \nPlease consider using \"@formatjs/cli\" to pre-compile your messages for performance.\nFor more details see https://formatjs.github.io/docs/getting-started/message-distribution`)\n  }\n}\n\n/**\n * Create intl object\n * @param config intl config\n * @param cache cache for formatter instances to prevent memory leak\n */\nexport function createIntl<T = string>(\n  config: IntlConfig<T>,\n  cache?: IntlCache\n): IntlShape<T> {\n  const formatters = createFormatters(cache)\n  const resolvedConfig: ResolvedIntlConfig<T> = {\n    ...DEFAULT_INTL_CONFIG,\n    ...config,\n  }\n\n  const {locale, defaultLocale, onError} = resolvedConfig\n  if (!locale) {\n    if (onError) {\n      onError(\n        new InvalidConfigError(\n          `\"locale\" was not configured, using \"${defaultLocale}\" as fallback. See https://formatjs.github.io/docs/react-intl/api#intlshape for more details`\n        )\n      )\n    }\n    // Since there's no registered locale data for `locale`, this will\n    // fallback to the `defaultLocale` to make sure things can render.\n    // The `messages` are overridden to the `defaultProps` empty object\n    // to maintain referential equality across re-renders. It's assumed\n    // each <FormattedMessage> contains a `defaultMessage` prop.\n    resolvedConfig.locale = resolvedConfig.defaultLocale || 'en'\n  } else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {\n    onError(\n      new MissingDataError(\n        `Missing locale data for locale: \"${locale}\" in Intl.NumberFormat. Using default locale: \"${defaultLocale}\" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details`\n      )\n    )\n  } else if (\n    !Intl.DateTimeFormat.supportedLocalesOf(locale).length &&\n    onError\n  ) {\n    onError(\n      new MissingDataError(\n        `Missing locale data for locale: \"${locale}\" in Intl.DateTimeFormat. Using default locale: \"${defaultLocale}\" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details`\n      )\n    )\n  }\n\n  verifyConfigMessages(resolvedConfig)\n  return {\n    ...resolvedConfig,\n    formatters,\n    formatNumber: formatNumber.bind(\n      null,\n      resolvedConfig,\n      formatters.getNumberFormat\n    ),\n    formatNumberToParts: formatNumberToParts.bind(\n      null,\n      resolvedConfig,\n      formatters.getNumberFormat\n    ),\n    formatRelativeTime: formatRelativeTime.bind(\n      null,\n      resolvedConfig,\n      formatters.getRelativeTimeFormat\n    ),\n    formatDate: formatDate.bind(\n      null,\n      resolvedConfig,\n      formatters.getDateTimeFormat\n    ),\n    formatDateToParts: formatDateToParts.bind(\n      null,\n      resolvedConfig,\n      formatters.getDateTimeFormat\n    ),\n    formatTime: formatTime.bind(\n      null,\n      resolvedConfig,\n      formatters.getDateTimeFormat\n    ),\n    formatDateTimeRange: formatDateTimeRange.bind(\n      null,\n      resolvedConfig,\n      formatters.getDateTimeFormat\n    ),\n    formatTimeToParts: formatTimeToParts.bind(\n      null,\n      resolvedConfig,\n      formatters.getDateTimeFormat\n    ),\n    formatPlural: formatPlural.bind(\n      null,\n      resolvedConfig,\n      formatters.getPluralRules\n    ),\n    formatMessage: formatMessage.bind(null, resolvedConfig, formatters),\n    $t: formatMessage.bind(null, resolvedConfig, formatters),\n    formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat),\n    formatListToParts: formatListToParts.bind(\n      null,\n      resolvedConfig,\n      formatters.getListFormat\n    ),\n    formatDisplayName: formatDisplayName.bind(\n      null,\n      resolvedConfig,\n      formatters.getDisplayNames\n    ),\n  }\n}\n","import type { IntlShape } from '@formatjs/intl';\n\nexport type FormatDateParameters = Parameters<IntlShape<string>['formatDate']>;\n\nexport function formatDate(\n  intlShape: IntlShape,\n  ...[value, formatOptions]: FormatDateParameters\n): string {\n  return intlShape.formatDate(value, formatOptions);\n}\n","import type { IntlShape } from '@formatjs/intl';\n\nexport type FormatDateRangeParameters = Parameters<\n  IntlShape<string>['formatDateTimeRange']\n>;\n\nexport function formatDateRange(\n  intlShape: IntlShape,\n  ...[from, to, formatOptions]: FormatDateRangeParameters\n): string {\n  return intlShape.formatDateTimeRange(from, to, formatOptions);\n}\n","import type { IntlShape } from '@formatjs/intl';\n\ntype FormatjsParameters = Parameters<IntlShape<string>['formatDisplayName']>;\n\nexport type FormatDisplayNameParameters = [\n  FormatjsParameters[0],\n  (\n    | {\n        fallback?: FormatjsParameters[1]['fallback'];\n        languageDisplay?: FormatjsParameters[1]['languageDisplay'];\n        locale?: string;\n        style?: FormatjsParameters[1]['style'];\n        type: 'language';\n      }\n    | {\n        fallback?: FormatjsParameters[1]['fallback'];\n        locale?: string;\n        style?: FormatjsParameters[1]['style'];\n        type: Exclude<FormatjsParameters[1]['type'], 'language'>;\n      }\n  ),\n];\n\nexport function formatDisplayName(\n  intlShape: IntlShape,\n  ...[value, formatOptions]: FormatDisplayNameParameters\n): string {\n  return intlShape.formatDisplayName(value, formatOptions) ?? '';\n}\n","import type { IntlShape } from '@formatjs/intl';\n\nexport type FormatListParameters = Parameters<IntlShape<string>['formatList']>;\n\nexport function formatList(\n  intlShape: IntlShape,\n  ...[value, formatOptions]: FormatListParameters\n): string {\n  return intlShape.formatList(value, formatOptions);\n}\n","import type { IntlShape } from '@formatjs/intl';\n\nexport type FormatNumberParameters = Parameters<\n  IntlShape<string>['formatNumber']\n>;\n\nexport function formatNumber(\n  intlShape: IntlShape,\n  ...[value, formatOptions]: FormatNumberParameters\n): string {\n  return intlShape.formatNumber(value, formatOptions);\n}\n","import type { IntlShape } from '@formatjs/intl';\n\nexport type FormatRelativeTimeParameters = Parameters<\n  IntlShape<string>['formatRelativeTime']\n>;\n\nexport function formatRelativeTime(\n  intlShape: IntlShape,\n  ...[value, unit, formatOptions]: FormatRelativeTimeParameters\n): string {\n  return intlShape.formatRelativeTime(value, unit, formatOptions);\n}\n","import type { IntlShape } from '@formatjs/intl';\n\nexport type FormatTimeParameters = Parameters<IntlShape<string>['formatTime']>;\n\nexport function formatTime(\n  intlShape: IntlShape,\n  ...[value, formatOptions]: FormatTimeParameters\n): string {\n  return intlShape.formatTime(value, formatOptions);\n}\n","import { getOwner } from '@ember/owner';\n\ntype SimpleDocument = {\n  documentElement: HTMLHtmlElement;\n};\n\n/**\n * @private\n */\nexport function getHtmlElement(context: object): HTMLHtmlElement | undefined {\n  const owner = getOwner(context);\n\n  if (owner === undefined) {\n    return undefined;\n  }\n\n  const documentService = owner.lookup('service:-document') as\n    SimpleDocument | undefined;\n\n  return documentService?.documentElement;\n}\n","import { capabilities } from '@ember/modifier';\nimport { destroy } from '@ember/destroyable';\nimport type Owner from '@ember/owner';\n\nimport type ClassBasedModifier from './modifier';\nimport type { ArgsFor, ElementFor } from '../signature';\n\n/**\n * The state bucket used throughout the life-cycle of the modifier. Basically a\n * state *machine*, where the framework calls us with the version we hand back\n * to it at each phase. The two states are the two `extends` versions of this\n * below.\n *\n * @internal\n */\ninterface State<S> {\n  instance: ClassBasedModifier<S>;\n}\n\n/**\n * The `State` after calling `createModifier`, and therefore the state available\n * at the start of `InstallModifier`.\n * @internal\n */\ninterface CreatedState<S> extends State<S> {\n  element: null;\n}\n\n/**\n * The `State` after calling `installModifier`, and therefore the state\n * available in all `updateModifier` calls and in `destroyModifier`.\n * @internal\n */\ninterface InstalledState<S> extends State<S> {\n  element: ElementFor<S>;\n}\n\n// Wraps the unsafe (b/c it mutates, rather than creating new state) code that\n// TS does not yet understand.\nfunction installElement<S>(\n  state: CreatedState<S>,\n  element: ElementFor<S>,\n): InstalledState<S> {\n  // SAFETY: this cast represents how we are actually handling the state machine\n  // transition: from this point forward in the lifecycle of the modifier, it\n  // always behaves as `InstalledState<S>`. It is safe because, and *only*\n  // because, we immediately initialize `element`. (We cannot create a new state\n  // from the old one because the modifier manager API expects mutation of a\n  // single state bucket rather than updating it at hook calls.)\n  const installedState = state as State<S> as InstalledState<S>;\n  installedState.element = element;\n  return installedState;\n}\n\nexport default class ClassBasedModifierManager<S> {\n  capabilities = capabilities('3.22');\n\n  constructor(private owner: Owner) {}\n\n  createModifier(\n    modifierClass: typeof ClassBasedModifier,\n    args: ArgsFor<S>,\n  ): CreatedState<S> {\n    const instance = new modifierClass(this.owner, args);\n    return { instance, element: null };\n  }\n\n  installModifier(\n    createdState: CreatedState<S>,\n    element: ElementFor<S>,\n    args: ArgsFor<S>,\n  ): void {\n    const state = installElement(createdState, element);\n    state.instance.modify(element, args.positional, args.named);\n  }\n\n  updateModifier(state: InstalledState<S>, args: ArgsFor<S>): void {\n    state.instance.modify(state.element, args.positional, args.named);\n  }\n\n  destroyModifier({ instance }: InstalledState<S>): void {\n    destroy(instance);\n  }\n}\n","import { setOwner } from '@ember/application';\nimport { setModifierManager } from '@ember/modifier';\nimport type Owner from '@ember/owner';\nimport Manager from './modifier-manager.ts';\nimport type {\n  ElementFor,\n  ArgsFor,\n  DefaultSignature,\n  PositionalArgs,\n  NamedArgs,\n} from '../signature';\nimport type Opaque from '../opaque';\n\n// Preserve the signature on a class-based modifier, so it can be plucked off\n// later (by e.g. Glint), using interface merging with an opaque item to\n// preserve it in the type system. The fact that it's an empty interface is\n// actually the point: it *only* hooks the type parameter into the opaque\n// (nominal) type. Note that this is distinct from the function-based modifier\n// type intentionally, because it is actually the static class side of a\n// class-based modifier which corresponds to the result of calling `modifier()`\n// with a callback defining a function-based modifier.\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport default interface ClassBasedModifier<S = DefaultSignature>\n  extends Opaque<S> {}\n\n/**\n * A base class for modifiers which need more capabilities than function-based\n * modifiers. Useful if, for example:\n *\n * 1. You need to inject services and access them\n * 2. You need fine-grained control of updates, either for performance or\n *    convenience reasons, and don't want to teardown the state of your modifier\n *    every time only to set it up again.\n * 3. You need to store some local state within your modifier.\n *\n * The lifecycle hooks of class modifiers are tracked. When they run, they any\n * values they access will be added to the modifier, and the modifier will\n * update if any of those values change.\n */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\nexport default class ClassBasedModifier<S = DefaultSignature> {\n  // `args` is passed here for the sake of subclasses to have access to args in\n  // their constructors while having constructors which are properly asssignable\n  // for the superclass.\n  /**\n   *\n   * @param owner An instance of an Owner (for service injection etc.).\n   * @param args The positional and named arguments passed to the modifier.\n   */\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  constructor(owner: Owner, args: ArgsFor<S>) {\n    setOwner(this, owner);\n  }\n\n  /**\n   * Called when the modifier is installed and any time any tracked state used\n   * in the modifier changes.\n   *\n   * If you need to do first-time-only setup, create a class field representing\n   * the initialization state and check it when running the hook. That is also\n   * where and when you should use `registerDestructor` for any teardown you\n   * need to do. For example:\n   *\n   * ```js\n   * function disconnect(instance) {\n   *  instance.observer?.disconnect();\n   * }\n   *\n   * class IntersectionObserver extends Modifier {\n   *   observer;\n   *\n   *   constructor(owner, args) {\n   *     super(owner, args);\n   *     registerDestructor(this, disconnect);\n   *   }\n   *\n   *   modify(element, callback, options) {\n   *     disconnect(this);\n   *\n   *     this.observer = new IntersectionObserver(callback, options);\n   *     this.observer.observe(element);\n   *   }\n   * }\n   * ```\n   *\n   * @param element The element to which the modifier is applied.\n   * @param positional The positional arguments to the modifier.\n   * @param named The named arguments to the modifier.\n   */\n  modify(\n    /* eslint-disable @typescript-eslint/no-unused-vars */\n    element: ElementFor<S>,\n    positional: PositionalArgs<S>,\n    named: NamedArgs<S>,\n    /* eslint-enable @typescript-eslint/no-unused-vars */\n  ): void {\n    /* no op, for subclassing */\n  }\n}\n\nsetModifierManager((owner) => new Manager(owner), ClassBasedModifier);\n","import { setModifierManager } from '@ember/modifier';\nimport type {\n  ElementFor,\n  EmptyObject,\n  NamedArgs,\n  PositionalArgs,\n} from '../signature';\nimport type Modifier from '../class-based/modifier';\nimport FunctionBasedModifierManager from './modifier-manager.ts';\n\n// Provide a singleton manager.\nconst MANAGER = new FunctionBasedModifierManager();\n\n// This type exists to provide a non-user-constructible, non-subclassable\n// type representing the conceptual \"instance type\" of a function modifier.\n// The abstract field of type `never` prevents subclassing in userspace of\n// the value returned from `modifier()`. By extending `Modifier<S>`, any\n// augmentations of the `Modifier` type performed by tools like Glint will\n// also apply to function-based modifiers as well.\nexport declare abstract class FunctionBasedModifierInstance<\n  S,\n> extends Modifier<S> {\n  protected abstract __concrete__: never;\n}\n\n// This provides a type whose only purpose here is to represent the runtime\n// type of a function-based modifier: a virtually opaque item. The fact that it's\n// a bare constructor type allows `modifier()` to preserve type parameters from\n// a generic function it's passed, and by making it abstract and impossible to\n// subclass (see above) we prevent users from attempting to instantiate the return\n// value from a `modifier()` call.\nexport type FunctionBasedModifier<S> =\n  abstract new () => FunctionBasedModifierInstance<S>;\n\n/**\n * The (optional) return type for a modifier which needs to perform some kind of\n * cleanup or teardown -- for example, removing an event listener from an\n * element besides the one passed into the modifier.\n */\nexport type Teardown = () => unknown;\n\n/**\n * An API for writing simple modifiers.\n *\n * This function runs the first time when the element the modifier was applied\n * to is inserted into the DOM, and it *autotracks* while running. Any values\n * that it accesses will be tracked, including any of its arguments that it\n * accesses, and if any of them changes, the function will run again.\n *\n * **Note:** this will *not* automatically rerun because an argument changes. It\n * will only rerun if it is *using* that argument (the same as with auto-tracked\n * state in general).\n *\n * The modifier can also optionally return a *destructor*. The destructor\n * function will be run just before the next update, and when the element is\n * being removed entirely. It should generally clean up the changes that the\n * modifier made in the first place.\n *\n * @param fn The function which defines the modifier.\n */\n// This overload allows users to write types directly on the callback passed to\n// the `modifier` function and infer the resulting type correctly.\nexport default function modifier<\n  E extends Element,\n  P extends unknown[],\n  N = EmptyObject,\n>(\n  fn: (element: E, positional: P, named: N) => void | Teardown,\n): FunctionBasedModifier<{\n  Args: {\n    Positional: P;\n    Named: N;\n  };\n  Element: E;\n}>;\n\n/**\n * An API for writing simple modifiers.\n *\n * This function runs the first time when the element the modifier was applied\n * to is inserted into the DOM, and it *autotracks* while running. Any values\n * that it accesses will be tracked, including any of its arguments that it\n * accesses, and if any of them changes, the function will run again.\n *\n * **Note:** this will *not* automatically rerun because an argument changes. It\n * will only rerun if it is *using* that argument (the same as with auto-tracked\n * state in general).\n *\n * The modifier can also optionally return a *destructor*. The destructor\n * function will be run just before the next update, and when the element is\n * being removed entirely. It should generally clean up the changes that the\n * modifier made in the first place.\n *\n * @param fn The function which defines the modifier.\n */\n// This overload allows users to provide a `Signature` type explicitly at the\n// modifier definition site, e.g. `modifier<Sig>((el, pos, named) => {...})`.\n// **Note:** this overload must appear second, since TS' inference engine will\n// not correctly infer the type of `S` here from the types on the supplied\n// callback.\nexport default function modifier<S>(\n  fn: (\n    element: ElementFor<S>,\n    positional: PositionalArgs<S>,\n    named: NamedArgs<S>,\n  ) => void | Teardown,\n): FunctionBasedModifier<{\n  Element: ElementFor<S>;\n  Args: {\n    Named: NamedArgs<S>;\n    Positional: PositionalArgs<S>;\n  };\n}>;\n\n// This is the runtime signature; it performs no inference whatsover and just\n// uses the simplest version of the invocation possible since, for the case of\n// setting it on the modifier manager, we don't *need* any of that info, and\n// the two previous overloads capture all invocations from a type perspective.\nexport default function modifier(\n  fn: (\n    element: Element,\n    positional: unknown[],\n    named: object,\n  ) => void | Teardown,\n  options?: {\n    name: string;\n  },\n): FunctionBasedModifier<{\n  Element: Element;\n  Args: {\n    Named: object;\n    Positional: unknown[];\n  };\n}> {\n  fn.toString = () => options?.name || fn.name;\n  // SAFETY: the cast here is a *lie*, but it is a useful one. The actual return\n  // type of `setModifierManager` today is `void`; we pretend it actually\n  // returns an opaque `Modifier` type so that we can provide a result from this\n  // type which is useful to TS-aware tooling (e.g. Glint).\n  return setModifierManager(\n    () => MANAGER,\n    fn,\n  ) as unknown as FunctionBasedModifier<{\n    Element: Element;\n    Args: {\n      Named: object;\n      Positional: unknown[];\n    };\n  }>;\n}\n\n/**\n * @internal\n */\nexport type FunctionBasedModifierDefinition<S> = (\n  element: ElementFor<S>,\n  positional: PositionalArgs<S>,\n  named: NamedArgs<S>,\n) => void | Teardown;\n","import { capabilities } from '@ember/modifier';\nimport type { FunctionBasedModifierDefinition, Teardown } from './modifier';\nimport type { ArgsFor, ElementFor } from '../signature';\n\ninterface State<S> {\n  instance: FunctionBasedModifierDefinition<S>;\n}\n\ninterface CreatedState<S> extends State<S> {\n  element: null;\n}\n\ninterface InstalledState<S> extends State<S> {\n  element: ElementFor<S>;\n  teardown?: Teardown;\n}\n\n// Wraps the unsafe (b/c it mutates, rather than creating new state) code that\n// TS does not yet understand.\nfunction installElement<S>(\n  state: CreatedState<S>,\n  element: ElementFor<S>,\n): InstalledState<S> {\n  // SAFETY: this cast represents how we are actually handling the state machine\n  // transition: from this point forward in the lifecycle of the modifier, it\n  // always behaves as `InstalledState<S>`. It is safe because, and *only*\n  // because, we immediately initialize `element`. (We cannot create a new state\n  // from the old one because the modifier manager API expects mutation of a\n  // single state bucket rather than updating it at hook calls.)\n  const installedState = state as State<S> as InstalledState<S>;\n  installedState.element = element;\n  return installedState;\n}\n\nexport default class FunctionBasedModifierManager<S> {\n  capabilities = capabilities('3.22');\n\n  createModifier(\n    instance: FunctionBasedModifierDefinition<S>,\n  ): CreatedState<S> {\n    return { element: null, instance };\n  }\n\n  installModifier(\n    createdState: CreatedState<S>,\n    element: ElementFor<S>,\n    args: ArgsFor<S>,\n  ): void {\n    const state = installElement(createdState, element);\n\n    const { positional, named } = args;\n    const teardown = createdState.instance(element, positional, named);\n    if (typeof teardown === 'function') {\n      state.teardown = teardown;\n    }\n  }\n\n  updateModifier(state: InstalledState<S>, args: ArgsFor<S>): void {\n    if (typeof state.teardown === 'function') {\n      state.teardown();\n    }\n\n    const teardown = state.instance(state.element, args.positional, args.named);\n    if (typeof teardown === 'function') {\n      state.teardown = teardown;\n    }\n  }\n\n  destroyModifier(state: InstalledState<S>): void {\n    if (typeof state.teardown === 'function') {\n      state.teardown();\n    }\n  }\n\n  getDebugName(state: InstalledState<S>): string {\n    return state.instance.toString();\n  }\n\n  getDebugInstance(state: InstalledState<S>): InstalledState<S> {\n    return state;\n  }\n}\n","import { isBlank } from '@ember/utils';\n\nexport default function (cb) {\n  return function (params, hash) {\n    if (!params || (params && params.length === 0)) {\n      throw new TypeError(\n        'ember-moment: Invalid Number of arguments, expected at least 1',\n      );\n    }\n\n    const datetime = params[0];\n\n    let allowEmpty = hash.allowEmpty || hash['allow-empty'];\n\n    if (allowEmpty === undefined || allowEmpty === null) {\n      allowEmpty = this.globalAllowEmpty;\n    }\n\n    if (isBlank(datetime)) {\n      if (allowEmpty) {\n        return;\n      }\n\n      /* eslint-disable no-console */\n      console.warn(\n        `ember-moment: an empty value (null, undefined, or \"\") was passed to ember-moment helper`,\n      );\n    }\n\n    return cb.apply(this, arguments);\n  };\n}\n","import { run } from '@ember/runloop';\nimport Helper from '@ember/component/helper';\nimport { observer } from '@ember/object';\nimport { inject as service } from '@ember/service';\n\n// eslint-disable-next-line ember/no-classic-classes\nexport default Helper.extend({\n  moment: service(),\n  disableInterval: false,\n  get globalAllowEmpty() {\n    return this.moment.__config__.allowEmpty;\n  },\n  supportsGlobalAllowEmpty: true,\n  // eslint-disable-next-line ember/no-observers\n  localeOrTimeZoneChanged: observer(\n    'moment.locale',\n    'moment.timeZone',\n    function () {\n      this.recompute();\n    },\n  ),\n\n  compute(value, { interval }) {\n    if (this.disableInterval) {\n      return;\n    }\n\n    this.clearTimer();\n\n    if (interval) {\n      /*\n       * NOTE: intentionally a setTimeout so tests do not block on it\n       * as the run loop queue is never clear so tests will stay locked waiting\n       * for queue to clear.\n       */\n      this.intervalTimer = setTimeout(\n        () => {\n          run(() => this.recompute());\n        },\n        parseInt(interval, 10),\n      );\n    }\n  },\n\n  morphMoment(time, { locale, timeZone }) {\n    const momentService = this.moment;\n\n    locale = locale || momentService.locale;\n    timeZone = timeZone || momentService.timeZone;\n\n    if (locale && time.locale) {\n      time = time.locale(locale);\n    }\n\n    if (timeZone && time.tz) {\n      time = time.tz(timeZone);\n    }\n\n    return time;\n  },\n\n  clearTimer() {\n    clearTimeout(this.intervalTimer);\n  },\n\n  destroy() {\n    this.clearTimer();\n    this._super(...arguments);\n  },\n});\n","import BaseHelper from './-base.js';\nimport computeFn from '../utils/helper-compute.js';\n\nexport default BaseHelper.extend({\n  compute: computeFn(function (params, { precision, locale, timeZone }) {\n    this._super(...arguments);\n\n    const moment = this.moment;\n    const { length } = params;\n    const args = [];\n    const comparisonArgs = [];\n\n    if (length === 1) {\n      comparisonArgs.push(params[0]);\n    } else if (length === 2) {\n      args.push(params[0]);\n      comparisonArgs.push(params[1]);\n    }\n\n    return this.morphMoment(moment.moment(...args), {\n      locale,\n      timeZone,\n    }).isAfter(...comparisonArgs, precision);\n  }),\n});\n","import computeFn from '../utils/helper-compute.js';\nimport BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  compute: computeFn(function (params, { precision, locale, timeZone }) {\n    this._super(...arguments);\n\n    const moment = this.moment;\n    const { length } = params;\n    const args = [];\n    const comparisonArgs = [];\n\n    if (length === 1) {\n      comparisonArgs.push(params[0]);\n    } else if (length === 2) {\n      args.push(params[0]);\n      comparisonArgs.push(params[1]);\n    }\n\n    return this.morphMoment(moment.moment(...args), {\n      locale,\n      timeZone,\n    }).isBefore(...comparisonArgs, precision);\n  }),\n});\n","import computeFn from '../utils/helper-compute.js';\nimport BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  compute: computeFn(function (\n    params,\n    { precision, inclusivity, locale, timeZone },\n  ) {\n    this._super(...arguments);\n\n    const moment = this.moment;\n    const _params = [].concat(params);\n    const { length } = params;\n\n    if (length < 2 || length > 3) {\n      throw new TypeError(\n        'ember-moment: Invalid Number of arguments, expected 2 or 3',\n      );\n    }\n\n    const args = [];\n\n    if (length > 2) {\n      args.push(_params.shift());\n    }\n\n    return this.morphMoment(moment.moment(...args), {\n      locale,\n      timeZone,\n    }).isBetween(..._params, precision, inclusivity);\n  }),\n});\n","import computeFn from '../utils/helper-compute.js';\nimport BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  compute: computeFn(function (params, { precision, locale, timeZone }) {\n    this._super(...arguments);\n\n    const moment = this.moment;\n    const { length } = params;\n    const args = [];\n    const comparisonArgs = [];\n\n    if (length === 1) {\n      comparisonArgs.push(params[0]);\n    } else if (length === 2) {\n      args.push(params[0]);\n      comparisonArgs.push(params[1]);\n    }\n\n    return this.morphMoment(moment.moment(...args), {\n      locale,\n      timeZone,\n    }).isSameOrAfter(...comparisonArgs, precision);\n  }),\n});\n","import computeFn from '../utils/helper-compute.js';\nimport BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  compute: computeFn(function (params, { precision, locale, timeZone }) {\n    this._super(...arguments);\n\n    const moment = this.moment;\n    const { length } = params;\n    const args = [];\n    const comparisonArgs = [];\n\n    if (length === 1) {\n      comparisonArgs.push(params[0]);\n    } else if (length === 2) {\n      args.push(params[0]);\n      comparisonArgs.push(params[1]);\n    }\n\n    return this.morphMoment(moment.moment(...args), {\n      locale,\n      timeZone,\n    }).isSameOrBefore(...comparisonArgs, precision);\n  }),\n});\n","import computeFn from '../utils/helper-compute.js';\nimport BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  compute: computeFn(function (params, { precision, locale, timeZone }) {\n    this._super(...arguments);\n\n    const moment = this.moment;\n    const { length } = params;\n    const args = [];\n    const comparisonArgs = [];\n\n    if (length === 1) {\n      comparisonArgs.push(params[0]);\n    } else if (length === 2) {\n      args.push(params[0]);\n      comparisonArgs.push(params[1]);\n    }\n\n    return this.morphMoment(moment.moment(...args), {\n      locale,\n      timeZone,\n    }).isSame(...comparisonArgs, precision);\n  }),\n});\n","import { typeOf } from '@ember/utils';\n\nimport computeFn from '../utils/helper-compute.js';\nimport BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  compute: computeFn(function (params, { precision, locale, timeZone }) {\n    this._super(...arguments);\n\n    const moment = this.moment;\n    const { length } = params;\n    const args = [];\n    const additionArgs = [];\n\n    if (length === 1) {\n      additionArgs.push(params[0]);\n    } else if (\n      length === 2 &&\n      typeOf(params[0]) === 'number' &&\n      typeOf(params[1]) === 'string'\n    ) {\n      additionArgs.push(...params);\n    } else {\n      args.push(params[0]);\n      additionArgs.push(...params.slice(1));\n    }\n\n    return this.morphMoment(moment.moment(...args), { locale, timeZone }).add(\n      ...additionArgs,\n      precision,\n    );\n  }),\n});\n","import computeFn from '../utils/helper-compute.js';\nimport BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  compute: computeFn(function (params, formatHash = {}) {\n    this._super(...arguments);\n\n    if (!params || (params && params.length > 3)) {\n      throw new TypeError(\n        'ember-moment: Invalid Number of arguments, at most 3',\n      );\n    }\n\n    const moment = this.moment;\n    const { locale, timeZone } = formatHash;\n    const [date, referenceTime, formats] = params;\n    const mergedFormats = {\n      ...formatHash,\n      locale: null,\n      timeZone: null,\n      ...formats,\n    };\n\n    return this.morphMoment(moment.moment(date), { locale, timeZone }).calendar(\n      referenceTime,\n      mergedFormats,\n    );\n  }),\n});\n","import computeFn from '../utils/helper-compute.js';\nimport BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  compute: computeFn(function (params, { precision, float, locale, timeZone }) {\n    this._super(...arguments);\n\n    if (!params || (params && params.length !== 2)) {\n      throw new TypeError(\n        'ember-moment: Invalid Number of arguments, must be 2',\n      );\n    }\n\n    const moment = this.moment;\n    const [dateA, dateB] = params;\n\n    return this.morphMoment(moment.moment(dateB), { locale, timeZone }).diff(\n      dateA,\n      precision,\n      float,\n    );\n  }),\n});\n","import BaseHelper from './-base.js';\nimport { momentOrMomentTimezone as moment } from '../index.js';\n\nexport default BaseHelper.extend({\n  compute(params, { locale, timeZone }) {\n    this._super(...arguments);\n    const momentService = this.moment;\n\n    if (!params || (params && params.length > 2)) {\n      throw new TypeError(\n        'ember-moment: Invalid Number of arguments, at most 2',\n      );\n    }\n\n    const result = momentService.moment(moment.duration(...params));\n\n    return this.morphMoment(result._i, { locale, timeZone }).humanize();\n  },\n});\n","import { isEmpty } from '@ember/utils';\nimport { get, observer } from '@ember/object';\n\nimport computeFn from '../utils/helper-compute.js';\nimport BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  // eslint-disable-next-line ember/no-observers\n  defaultFormatDidChange: observer('moment.defaultFormat', function () {\n    this.recompute();\n  }),\n\n  compute: computeFn(function (params, { locale, timeZone }) {\n    this._super(...arguments);\n    const moment = this.moment;\n    const { length } = params;\n\n    if (length > 3) {\n      throw new TypeError(\n        'ember-moment: Invalid number of arguments, expected at most 3',\n      );\n    }\n\n    const args = [];\n    const formatArgs = [];\n    // eslint-disable-next-line ember/no-get\n    const defaultFormat = get(this, 'moment.defaultFormat');\n\n    args.push(params[0]);\n\n    if (length === 1 && !isEmpty(defaultFormat)) {\n      formatArgs.push(defaultFormat);\n    } else if (length === 2) {\n      formatArgs.push(params[1]);\n    } else if (length > 2) {\n      args.push(params[2]);\n      formatArgs.push(params[1]);\n    }\n\n    return this.morphMoment(moment.moment(...args), {\n      locale,\n      timeZone,\n    }).format(...formatArgs);\n  }),\n});\n","import computeFn from '../utils/helper-compute.js';\nimport BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  compute: computeFn(function (params, { hideAffix, locale, timeZone }) {\n    this._super(...arguments);\n\n    const moment = this.moment;\n    return this.morphMoment(moment.moment(...params), {\n      locale,\n      timeZone,\n    }).fromNow(hideAffix);\n  }),\n});\n","import computeFn from '../utils/helper-compute.js';\nimport BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  compute: computeFn(function (\n    [datetime, ...params],\n    { hideAffix, locale, timeZone },\n  ) {\n    this._super(...arguments);\n\n    const moment = this.moment;\n\n    return this.morphMoment(moment.moment(datetime), { locale, timeZone }).from(\n      ...params,\n      hideAffix,\n    );\n  }),\n});\n","import { typeOf } from '@ember/utils';\n\nimport computeFn from '../utils/helper-compute.js';\nimport BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  compute: computeFn(function (params, { precision, locale, timeZone }) {\n    this._super(...arguments);\n\n    const moment = this.moment;\n    const { length } = params;\n    const args = [];\n    const subtractionArgs = [];\n\n    if (length === 1) {\n      subtractionArgs.push(params[0]);\n    } else if (\n      length === 2 &&\n      typeOf(params[0]) === 'number' &&\n      typeOf(params[1]) === 'string'\n    ) {\n      subtractionArgs.push(...params);\n    } else {\n      args.push(params[0]);\n      subtractionArgs.push(...params.slice(1));\n    }\n\n    return this.morphMoment(moment.moment(...args), {\n      locale,\n      timeZone,\n    }).subtract(...subtractionArgs, precision);\n  }),\n});\n","import computeFn from '../utils/helper-compute.js';\nimport BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  compute: computeFn(function (params, { hidePrefix, locale, timeZone }) {\n    this._super(...arguments);\n\n    const moment = this.moment;\n\n    return this.morphMoment(moment.moment(), { locale, timeZone }).to(\n      ...params,\n      hidePrefix,\n    );\n  }),\n});\n","import computeFn from '../utils/helper-compute.js';\nimport BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  compute: computeFn(function (params, { hideAffix, locale, timeZone }) {\n    this._super(...arguments);\n\n    const moment = this.moment;\n    const hide = hideAffix;\n    return this.morphMoment(moment.moment(...params), {\n      locale,\n      timeZone,\n    }).toNow(hide);\n  }),\n});\n","import computeFn from '../utils/helper-compute.js';\nimport BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  compute: computeFn(function (\n    [datetime, ...params],\n    { hideAffix, locale, timeZone },\n  ) {\n    this._super(...arguments);\n\n    const moment = this.moment;\n\n    return this.morphMoment(moment.moment(datetime), { locale, timeZone }).to(\n      ...params,\n      hideAffix,\n    );\n  }),\n});\n","import BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  compute(params, { locale, timeZone }) {\n    this._super(...arguments);\n\n    const moment = this.moment;\n\n    return this.morphMoment(moment.moment(...params), { locale, timeZone });\n  },\n});\n","import { momentOrMomentTimezone as moment } from '../index.js';\nimport BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  compute() {\n    this._super(...arguments);\n\n    const momentService = this.moment;\n\n    return momentService.moment(moment.now());\n  },\n});\n","import { momentOrMomentTimezone as moment } from '../index.js';\nimport BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  compute([unixTimeStamp]) {\n    this._super(...arguments);\n\n    return this.moment.moment(moment.unix(unixTimeStamp));\n  },\n});\n","import { momentOrMomentTimezone as moment } from '../index.js';\nimport BaseHelper from './-base.js';\n\nexport default BaseHelper.extend({\n  compute([utcTime, format]) {\n    this._super(...arguments);\n\n    return this.moment.utc(moment.utc(utcTime, format));\n  },\n});\n","import Service from '@ember/service';\nimport Evented from '@ember/object/evented';\nimport { getOwner } from '@ember/application';\nimport { momentOrMomentTimezone as moment } from '../index.js';\nimport { computed, set, setProperties } from '@ember/object';\n\n// eslint-disable-next-line ember/no-classic-classes\nexport default Service.extend(Evented, {\n  _timeZone: null,\n\n  locale: null,\n  localeOptions: null,\n  defaultFormat: null,\n\n  init() {\n    this._super();\n    this.defaultFormat = this.__config__.outputFormat;\n  },\n\n  __config__: computed(function () {\n    let config = getOwner(this).factoryFor('config:environment').class || {};\n\n    return config['ember-moment'] || {};\n  }).readOnly(),\n\n  timeZone: computed('_timeZone', {\n    get() {\n      return this._timeZone;\n    },\n\n    set(propertyKey, timeZone) {\n      if (!moment.tz) {\n        /* eslint-disable no-console */\n        console.warn(\n          '[ember-moment] attempted to set timezone, but moment-timezone is not setup.',\n        );\n        return;\n      }\n\n      set(this, '_timeZone', timeZone);\n\n      return timeZone;\n    },\n  }),\n\n  setLocale(locale) {\n    this.changeLocale(locale);\n  },\n\n  updateLocale(locale, localeOptions = {}) {\n    this.changeLocale(locale, localeOptions);\n  },\n\n  changeLocale(locale, localeOptions = {}) {\n    setProperties(this, {\n      locale,\n      localeOptions,\n    });\n    moment.updateLocale(locale, localeOptions);\n    this.trigger('localeChanged', locale);\n  },\n\n  setTimeZone(timeZone) {\n    this.changeTimeZone(timeZone);\n  },\n\n  changeTimeZone(timeZone) {\n    set(this, 'timeZone', timeZone);\n    this.trigger('timeZoneChanged', timeZone);\n  },\n\n  isMoment(obj) {\n    return moment.isMoment(obj);\n  },\n\n  moment() {\n    let momentObj = moment(...arguments);\n    let { locale, timeZone } = this;\n\n    if (locale && momentObj.locale) {\n      momentObj = momentObj.locale(locale);\n    }\n\n    if (timeZone && momentObj.tz) {\n      momentObj = momentObj.tz(timeZone);\n    }\n\n    return momentObj;\n  },\n\n  utc() {\n    let momentObj = moment.utc(...arguments);\n\n    let { locale } = this;\n\n    if (locale && momentObj.locale) {\n      momentObj = momentObj.locale(locale);\n    }\n\n    return momentObj;\n  },\n});\n","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { isEqual } from '@ember/utils';\nimport type {\n  PowerSelectArgs,\n  PowerSelectSignature,\n  Select,\n} from './power-select';\nimport { deprecate } from '@ember/debug';\nimport type Owner from '@ember/owner';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\ninterface PowerSelectMultipleSignature extends PowerSelectSignature {\n  // any extra property for multiple selects?\n}\n\nexport default class PowerSelectMultipleComponent extends Component<PowerSelectMultipleSignature> {\n  constructor(owner: Owner, args: PowerSelectArgs) {\n    super(owner, args);\n    deprecate(\n      'You are using the `<PowerSelectMultiple>` component. Replace all usages with `<PowerSelect>` and pass `@multiple={{true}}` as a parameter to achieve the same behavior. If you have used the ID `#ember-power-select-trigger-multiple-input-{uniqueId}` to access the search field, update your `querySelector` to use `#ember-power-select-trigger-input-{uniqueId}` instead. If you have a custom multiple trigger or input component, you also need to move them to `<PowerSelect::Trigger>` / `<PowerSelect::Input>`.',\n      false,\n      {\n        for: 'ember-power-select',\n        id: 'ember-power-select.deprecate-power-select-multiple',\n        since: {\n          enabled: '8.11',\n          available: '8.11',\n        },\n        until: '9.0.0',\n      },\n    );\n  }\n\n  get computedTabIndex() {\n    if (this.args.triggerComponent === undefined && this.args.searchEnabled) {\n      return '-1';\n    } else {\n      return this.args.tabindex || '0';\n    }\n  }\n\n  // Actions\n  @action\n  handleOpen(select: Select, e: Event): false | void {\n    if (this.args.onOpen && this.args.onOpen(select, e) === false) {\n      return false;\n    }\n    this.focusInput(select);\n  }\n\n  @action\n  handleFocus(select: Select, e: FocusEvent): void {\n    if (this.args.onFocus) {\n      this.args.onFocus(select, e);\n    }\n    this.focusInput(select);\n  }\n\n  @action\n  handleKeydown(select: Select, e: KeyboardEvent): false | void {\n    if (this.args.onKeydown && this.args.onKeydown(select, e) === false) {\n      e.stopPropagation();\n      return false;\n    }\n    if (e.keyCode === 13 && select.isOpen) {\n      e.stopPropagation();\n      if (select.highlighted !== undefined) {\n        if (\n          !select.selected ||\n          select.selected.indexOf(select.highlighted) === -1\n        ) {\n          select.actions.choose(select.highlighted, e);\n          return false;\n        } else {\n          select.actions.close(e);\n          return false;\n        }\n      } else {\n        select.actions.close(e);\n        return false;\n      }\n    }\n  }\n\n  defaultBuildSelection(option: any, select: Select) {\n    const newSelection = Array.isArray(select.selected)\n      ? select.selected.slice(0)\n      : [];\n    let idx = -1;\n    for (let i = 0; i < newSelection.length; i++) {\n      if (isEqual(newSelection[i], option)) {\n        idx = i;\n        break;\n      }\n    }\n    if (idx > -1) {\n      newSelection.splice(idx, 1);\n    } else {\n      newSelection.push(option);\n    }\n    return newSelection;\n  }\n\n  focusInput(select: Select) {\n    if (select) {\n      const triggerElement = select.actions.getTriggerElement();\n      let root: Document | HTMLElement;\n\n      if (\n        triggerElement &&\n        triggerElement.getRootNode() instanceof ShadowRoot\n      ) {\n        root = triggerElement.getRootNode() as HTMLElement;\n      } else {\n        root = document;\n      }\n\n      const input = root.querySelector(\n        `#ember-power-select-trigger-multiple-input-${select.uniqueId}`,\n      ) as HTMLElement;\n\n      if (input) {\n        input.focus();\n      }\n    }\n  }\n}\n","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { get } from '@ember/object';\nimport { assert, deprecate } from '@ember/debug';\nimport { isBlank } from '@ember/utils';\nimport type { Select } from '../power-select';\nimport type Owner from '@ember/owner';\n\ninterface PowerSelectMultipleInputSignature {\n  Element: HTMLElement;\n  Args: {\n    select: Select;\n    placeholder?: string;\n    searchField: string;\n    tabindex?: string;\n    listboxId?: string;\n    ariaLabel?: string;\n    ariaActiveDescendant?: string;\n    ariaLabelledBy?: string;\n    ariaDescribedBy?: string;\n    role?: string;\n    placeholderComponent?: string;\n    isDefaultPlaceholder?: boolean;\n    onInput?: (e: InputEvent) => boolean;\n    onKeydown?: (e: KeyboardEvent) => boolean;\n    onFocus: (e: FocusEvent) => void;\n    onBlur: (e: FocusEvent) => void;\n    buildSelection: (lastSelection: any, select: Select) => any[];\n  };\n}\n\nexport default class PowerSelectMultipleInputComponent extends Component<PowerSelectMultipleInputSignature> {\n  constructor(owner: Owner, args: PowerSelectMultipleInputSignature['Args']) {\n    super(owner, args);\n    deprecate(\n      'You are using the `<PowerSelectMultiple::Input>` component. Replace all usages with the `<PowerSelect::Input>` component.',\n      false,\n      {\n        for: 'ember-power-select',\n        id: 'ember-power-select.deprecate-power-select-multiple-input',\n        since: {\n          enabled: '8.11',\n          available: '8.11',\n        },\n        until: '9.0.0',\n      },\n    );\n  }\n\n  get maybePlaceholder() {\n    if (!this.args.isDefaultPlaceholder) {\n      return undefined;\n    }\n    return !this.args.select.selected || this.args.select.selected.length === 0\n      ? this.args.placeholder || ''\n      : '';\n  }\n\n  @action\n  handleInput(event: Event): void {\n    const e = event as InputEvent;\n    if (this.args.onInput && this.args.onInput(e) === false) {\n      return;\n    }\n    this.args.select.actions.open(e);\n  }\n\n  @action\n  handleKeydown(event: Event): false | void {\n    const e = event as KeyboardEvent;\n    if (e.target === null) return;\n    if (this.args.onKeydown && this.args.onKeydown(e) === false) {\n      e.stopPropagation();\n      return false;\n    }\n    if (e.keyCode === 8) {\n      e.stopPropagation();\n      if (isBlank((e.target as HTMLInputElement).value)) {\n        const lastSelection =\n          this.args.select.selected &&\n          this.args.select.selected[this.args.select.selected.length - 1];\n        if (lastSelection) {\n          this.args.select.actions.select(\n            this.args.buildSelection(lastSelection, this.args.select),\n            e,\n          );\n          if (typeof lastSelection === 'string') {\n            this.args.select.actions.search(lastSelection);\n          } else {\n            assert(\n              '`<PowerSelectMultiple>` requires a `@searchField` when the options are not strings to remove options using backspace',\n              this.args.searchField,\n            );\n            this.args.select.actions.search(\n              get(lastSelection, this.args.searchField) || '',\n            );\n          }\n          this.args.select.actions.open(e);\n        }\n      }\n    } else if ((e.keyCode >= 48 && e.keyCode <= 90) || e.keyCode === 32) {\n      // Keys 0-9, a-z or SPACE\n      e.stopPropagation();\n    }\n  }\n}\n","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { get } from '@ember/object';\nimport type { Select, TSearchFieldPosition } from '../power-select';\nimport type { ComponentLike } from '@glint/template';\nimport { modifier } from 'ember-modifier';\nimport { deprecate } from '@ember/debug';\nimport type Owner from '@ember/owner';\n\ninterface PowerSelectMultipleTriggerSignature {\n  Element: HTMLElement;\n  Args: {\n    select: Select;\n    searchEnabled: boolean;\n    placeholder?: string;\n    searchField: string;\n    searchFieldPosition?: TSearchFieldPosition;\n    listboxId?: string;\n    tabindex?: string;\n    ariaLabel?: string;\n    ariaLabelledBy?: string;\n    ariaDescribedBy?: string;\n    role?: string;\n    ariaActiveDescendant: string;\n    extra?: any;\n    placeholderComponent?: string | ComponentLike<any>;\n    selectedItemComponent?: string | ComponentLike<any>;\n    onInput?: (e: InputEvent) => boolean;\n    onKeydown?: (e: KeyboardEvent) => boolean;\n    onFocus?: (e: FocusEvent) => void;\n    onBlur?: (e: FocusEvent) => void;\n    buildSelection: (lastSelection: any, select: Select) => any[];\n  };\n  Blocks: {\n    default: [opt: any, select: Select];\n  };\n}\n\ninterface IndexAccesible<T> {\n  objectAt(index: number): T;\n}\nconst isIndexAccesible = <T>(target: any): target is IndexAccesible<T> => {\n  return typeof target.objectAt === 'function';\n};\n\nexport default class TriggerComponent extends Component<PowerSelectMultipleTriggerSignature> {\n  private _lastIsOpen: boolean = this.args.select.isOpen;\n\n  constructor(owner: Owner, args: PowerSelectMultipleTriggerSignature['Args']) {\n    super(owner, args);\n    deprecate(\n      'You are using the `<PowerSelectMultiple::Trigger>` component. Replace all usages with the `<PowerSelect::Trigger>` component.',\n      false,\n      {\n        for: 'ember-power-select',\n        id: 'ember-power-select.deprecate-power-select-multiple-trigger',\n        since: {\n          enabled: '8.11',\n          available: '8.11',\n        },\n        until: '9.0.0',\n      },\n    );\n  }\n\n  // Actions\n  @action\n  openChanged(element: Element, [isOpen]: [boolean]) {\n    deprecate(\n      'You are using a power-select-multiple trigger with ember/render-modifier. Replace {{did-update this.openChanged @select.isOpen}} with {{this.openChange @select.isOpen}}.',\n      false,\n      {\n        for: 'ember-power-select',\n        id: 'ember-power-select.no-at-ember-render-modifiers',\n        since: {\n          enabled: '8.1',\n          available: '8.1',\n        },\n        until: '9.0.0',\n      },\n    );\n\n    this._openChanged(element, [isOpen]);\n  }\n\n  @action\n  chooseOption(e: Event) {\n    if (e.target === null) return;\n    const selectedIndex = (e.target as Element).getAttribute(\n      'data-selected-index',\n    );\n    if (selectedIndex) {\n      const numericIndex = parseInt(selectedIndex, 10);\n      e.stopPropagation();\n      e.preventDefault();\n      const object = this.selectedObject(\n        this.args.select.selected,\n        numericIndex,\n      );\n      this.args.select.actions.choose(object);\n    }\n  }\n\n  openChange = modifier((element: Element, [isOpen]: [boolean]) => {\n    this._openChanged(element, [isOpen]);\n  });\n\n  private _openChanged(_el: Element, [isOpen]: [boolean]) {\n    if (isOpen === false && this._lastIsOpen === true) {\n      Promise.resolve().then(() => {\n        this.args.select.actions?.search('');\n      });\n    }\n    this._lastIsOpen = isOpen;\n  }\n\n  selectedObject<T>(list: IndexAccesible<T> | T[], index: number): T {\n    if (isIndexAccesible(list)) {\n      return list.objectAt(index);\n    } else {\n      return get(list, index) as T;\n    }\n  }\n}\n","import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action, get } from '@ember/object';\nimport { guidFor } from '@ember/object/internals';\nimport { addObserver, removeObserver } from '@ember/object/observers';\nimport { isEqual, isNone } from '@ember/utils';\nimport { assert, deprecate } from '@ember/debug';\nimport {\n  indexOfOption,\n  filterOptions,\n  findOptionWithOffset,\n  countOptions,\n  defaultHighlighted,\n  advanceSelectableOption,\n  defaultMatcher,\n  defaultTypeAheadMatcher,\n  pathForOption,\n  type MatcherFn,\n} from '../utils/group-utils.ts';\nimport { restartableTask, timeout } from 'ember-concurrency';\nimport { modifier } from 'ember-modifier';\nimport type {\n  Dropdown,\n  DropdownActions,\n  TRootEventType,\n} from 'ember-basic-dropdown/components/basic-dropdown';\nimport type Owner from '@ember/owner';\nimport type { CalculatePosition } from 'ember-basic-dropdown/utils/calculate-position';\nimport { isArray } from '@ember/array';\nimport type { ComponentLike } from '@glint/template';\n\ninterface SelectActions extends DropdownActions {\n  search: (term: string) => void;\n  highlight: (option: any) => void;\n  select: (selected: any, e?: Event) => void;\n  choose: (selected: any, e?: Event) => void;\n  scrollTo: (option: any) => void;\n  labelClick: (e: MouseEvent) => void;\n}\nexport interface Select extends Dropdown {\n  selected: any;\n  multiple: boolean;\n  highlighted: any;\n  options: readonly any[];\n  results: readonly any[];\n  resultsCount: number;\n  loading: boolean;\n  isActive: boolean;\n  searchText: string;\n  lastSearchedText: string;\n  actions: SelectActions;\n}\ninterface PromiseProxy<T> extends Promise<T> {\n  content: any;\n}\ninterface CancellablePromise<T> extends Promise<T> {\n  cancel: () => void;\n}\ninterface Sliceable<T> {\n  slice(): T[];\n}\n// Some args are not listed here because they are only accessed from the template. Should I list them?\nexport interface PowerSelectArgs {\n  highlightOnHover?: boolean;\n  placeholderComponent?: string | ComponentLike<any>;\n  searchMessage?: string;\n  searchMessageComponent?: string | ComponentLike<any>;\n  noMatchesMessage?: string;\n  noMatchesMessageComponent?: string | ComponentLike<any>;\n  matchTriggerWidth?: boolean;\n  resultCountMessage?: (resultCount: number) => string;\n  options?: readonly any[] | Promise<readonly any[]>;\n  selected?: any | PromiseProxy<any>;\n  multiple?: boolean;\n  legacyMultiple?: boolean; // Don't use this inside app, internal usage!\n  destination?: string;\n  destinationElement?: HTMLElement;\n  closeOnSelect?: boolean;\n  renderInPlace?: boolean;\n  preventScroll?: boolean;\n  defaultHighlighted?: any;\n  searchField?: string;\n  labelClass?: string;\n  labelText?: string;\n  labelTag?: keyof HTMLElementTagNameMap;\n  labelClickAction?: TLabelClickAction;\n  ariaLabel?: string;\n  ariaLabelledBy?: string;\n  loadingMessage?: string;\n  placeholder?: string;\n  dropdownClass?: string;\n  allowClear?: boolean;\n  searchEnabled?: boolean;\n  animationEnabled?: boolean;\n  tabindex?: number | string;\n  searchPlaceholder?: string;\n  searchFieldPosition?: TSearchFieldPosition;\n  verticalPosition?: string;\n  horizontalPosition?: string;\n  triggerId?: string;\n  disabled?: boolean;\n  title?: string;\n  triggerRole?: string;\n  required?: string;\n  triggerClass?: string;\n  ariaInvalid?: string;\n  eventType?: string;\n  rootEventType?: TRootEventType;\n  ariaDescribedBy?: string;\n  calculatePosition?: CalculatePosition;\n  ebdTriggerComponent?: string | ComponentLike<any>;\n  ebdContentComponent?: string | ComponentLike<any>;\n  labelComponent?: string | ComponentLike<any>;\n  triggerComponent?: string | ComponentLike<any>;\n  selectedItemComponent?: string | ComponentLike<any>;\n  beforeOptionsComponent?: string | ComponentLike<any>;\n  optionsComponent?: string | ComponentLike<any>;\n  groupComponent?: string | ComponentLike<any>;\n  afterOptionsComponent?: string | ComponentLike<any>;\n  extra?: any;\n  matcher?: MatcherFn;\n  initiallyOpened?: boolean;\n  typeAheadOptionMatcher?: MatcherFn;\n  buildSelection?: (selected: any, select: Select) => any;\n  onChange: (selection: any, select: Select, event?: Event) => void;\n  search?: (\n    term: string,\n    select: Select,\n  ) => readonly any[] | Promise<readonly any[]>;\n  onOpen?: (select: Select, e: Event) => boolean | void | undefined;\n  onClose?: (select: Select, e: Event) => boolean | void | undefined;\n  onInput?: (term: string, select: Select, e: Event) => string | boolean | void;\n  onKeydown?: (select: Select, e: KeyboardEvent) => boolean | void | undefined;\n  onFocus?: (select: Select, event: FocusEvent) => void;\n  onBlur?: (select: Select, event: FocusEvent) => void;\n  scrollTo?: (option: any, select: Select) => void;\n  registerAPI?: (select: Select) => void;\n}\n\nexport type TLabelClickAction = 'focus' | 'open';\nexport type TSearchFieldPosition = 'before-options' | 'trigger';\n\nexport interface PowerSelectSignature {\n  Element: HTMLElement;\n  Args: PowerSelectArgs;\n  Blocks: {\n    default: [option: any, select: Select];\n  };\n}\n\nconst isSliceable = <T>(coll: any): coll is Sliceable<T> => {\n  return isArray(coll);\n};\n\nconst isPromiseLike = <T>(thing: any): thing is Promise<T> => {\n  return typeof thing.then === 'function';\n};\n\nconst isPromiseProxyLike = <T>(thing: any): thing is PromiseProxy<T> => {\n  return isPromiseLike(thing) && Object.hasOwnProperty.call(thing, 'content');\n};\n\nconst isCancellablePromise = <T>(\n  thing: any,\n): thing is CancellablePromise<T> => {\n  return typeof thing.cancel === 'function';\n};\n\nexport default class PowerSelectComponent extends Component<PowerSelectSignature> {\n  // Untracked properties\n  _publicAPIActions = {\n    search: this._search,\n    highlight: this._highlight,\n    select: this._select,\n    choose: this._choose,\n    scrollTo: this._scrollTo,\n    labelClick: this._labelClick,\n  };\n\n  // Tracked properties\n  @tracked private _resolvedOptions?: readonly any[];\n  @tracked private _resolvedSelected?: any;\n  @tracked private _repeatingChar = '';\n  @tracked private _expirableSearchText = '';\n  @tracked private _searchResult?: readonly any[];\n  @tracked isActive = false;\n  @tracked loading = false;\n  @tracked searchText = '';\n  @tracked lastSearchedText = '';\n  @tracked highlighted?: any;\n  storedAPI!: Select;\n\n  private _uid = guidFor(this);\n  private _lastOptionsPromise?: Promise<readonly any[]>;\n  private _lastSelectedPromise?: PromiseProxy<any>;\n  private _lastSearchPromise?:\n    | Promise<readonly any[]>\n    | CancellablePromise<readonly any[]>;\n  private _filterResultsCache: {\n    results: any[];\n    options: any[];\n    searchText: string;\n  } = { results: [], options: [], searchText: this.searchText };\n\n  // Lifecycle hooks\n  constructor(owner: Owner, args: PowerSelectArgs) {\n    super(owner, args);\n    assert(\n      '<PowerSelect> requires an `@onChange` function',\n      this.args.onChange && typeof this.args.onChange === 'function',\n    );\n  }\n\n  willDestroy() {\n    if (\n      this._lastSelectedPromise &&\n      isPromiseProxyLike(this._lastSelectedPromise)\n    ) {\n      try {\n        removeObserver(\n          this._lastSelectedPromise,\n          'content',\n          this,\n          this._selectedObserverCallback,\n        );\n        // eslint-disable-next-line no-empty\n      } catch {}\n      this._lastSelectedPromise = undefined;\n    }\n    super.willDestroy();\n  }\n\n  // Getters\n  get highlightOnHover(): boolean {\n    return this.args.highlightOnHover === undefined\n      ? true\n      : this.args.highlightOnHover;\n  }\n\n  get labelClickAction(): TLabelClickAction {\n    return this.args.labelClickAction === undefined\n      ? 'focus'\n      : this.args.labelClickAction;\n  }\n\n  get highlightedIndex(): string {\n    const results = this.results;\n    const highlighted = this.highlighted;\n    return pathForOption(results, highlighted);\n  }\n\n  get searchMessage(): string {\n    return this.args.searchMessage === undefined\n      ? 'Type to search'\n      : this.args.searchMessage;\n  }\n\n  get noMatchesMessage(): string {\n    return this.args.noMatchesMessage === undefined\n      ? 'No results found'\n      : this.args.noMatchesMessage;\n  }\n\n  get resultCountMessage(): string {\n    if (typeof this.args.resultCountMessage === 'function') {\n      return this.args.resultCountMessage(this.resultsCount);\n    }\n\n    if (this.resultsCount === 1) {\n      return `${this.resultsCount} result`;\n    }\n\n    return `${this.resultsCount} results`;\n  }\n\n  get matchTriggerWidth() {\n    return this.args.matchTriggerWidth === undefined\n      ? true\n      : this.args.matchTriggerWidth;\n  }\n\n  get mustShowSearchMessage(): boolean {\n    return (\n      !this.loading &&\n      this.searchText.length === 0 &&\n      !!this.args.search &&\n      !!this.searchMessage &&\n      this.resultsCount === 0\n    );\n  }\n\n  get mustShowNoMessages(): boolean {\n    return (\n      !this.loading &&\n      this.resultsCount === 0 &&\n      (!this.args.search || this.lastSearchedText.length > 0)\n    );\n  }\n\n  get results(): any[] {\n    if (this.searchText.length > 0) {\n      if (this.args.search) {\n        return toPlainArray(this._searchResult || this.options);\n      } else {\n        if (\n          this._filterResultsCache.options === this.options &&\n          this._filterResultsCache.searchText === this.searchText\n        ) {\n          // This is an optimization to avoid filtering several times, which may be a bit expensive\n          // if there are many options, if neither the options nor the searchtext have changed\n          return this._filterResultsCache.results;\n        }\n        const results = this._filter(this.options, this.searchText);\n        // eslint-disable-next-line ember/no-side-effects\n        this._filterResultsCache = {\n          results,\n          options: this.options,\n          searchText: this.searchText,\n        };\n        return results;\n      }\n    } else {\n      return this.options;\n    }\n  }\n\n  get options(): any[] {\n    if (this._resolvedOptions) return toPlainArray(this._resolvedOptions);\n    if (this.args.options) {\n      return toPlainArray(this.args.options as any[]);\n    } else {\n      return [];\n    }\n  }\n\n  get resultsCount(): number {\n    return countOptions(this.results);\n  }\n\n  get selected(): any {\n    if (this._resolvedSelected) {\n      return toPlainArray(this._resolvedSelected);\n    } else if (\n      !isNone(this.args.selected) &&\n      typeof this.args.selected.then !== 'function'\n    ) {\n      return toPlainArray(this.args.selected);\n    }\n    return undefined;\n  }\n\n  get ariaMultiSelectable(): boolean {\n    return isArray(this.args.selected);\n  }\n\n  get triggerId(): string {\n    return this.args.triggerId || `${this._uid}-trigger`;\n  }\n\n  get labelId(): string {\n    return `${this._uid}-label`;\n  }\n\n  get ariaLabelledBy(): string | undefined {\n    if (this.args.ariaLabelledBy) {\n      return this.args.ariaLabelledBy;\n    }\n\n    if (this.args.labelText || this.args.labelComponent) {\n      return this.labelId;\n    }\n  }\n\n  get searchFieldPosition(): TSearchFieldPosition {\n    if (this.args.searchFieldPosition !== undefined) {\n      return this.args.searchFieldPosition;\n    }\n\n    if (this.args.multiple) {\n      return 'trigger';\n    }\n\n    return 'before-options';\n  }\n\n  get tabindex(): string | number {\n    if (this.args.multiple) {\n      if (this.args.triggerComponent === undefined && this.args.searchEnabled) {\n        return '-1';\n      } else {\n        return this.args.tabindex || '0';\n      }\n    }\n\n    if (\n      this.args.searchEnabled &&\n      this.args.tabindex === undefined &&\n      this.searchFieldPosition === 'trigger'\n    ) {\n      return '-1';\n    }\n\n    return this.args.tabindex || '0';\n  }\n\n  get buildSelection(): ((selected: any, select: Select) => any) | undefined {\n    if (this.args.buildSelection) {\n      return this.args.buildSelection;\n    }\n\n    if (this.args.multiple) {\n      return this._defaultMultipleBuildSelection;\n    }\n  }\n\n  // Actions\n  @action\n  handleOpen(_select: Select, e: Event): boolean | void {\n    if (this.args.onOpen && this.args.onOpen(this.storedAPI, e) === false) {\n      return false;\n    }\n\n    this.focusInput(this.storedAPI);\n\n    if (e) {\n      if (\n        e instanceof KeyboardEvent &&\n        e.type === 'keydown' &&\n        (e.keyCode === 38 || e.keyCode === 40)\n      ) {\n        e.preventDefault();\n      }\n    }\n    this._resetHighlighted();\n  }\n\n  @action\n  handleClose(_select: Select, e: Event): boolean | void {\n    if (this.args.onClose && this.args.onClose(this.storedAPI, e) === false) {\n      return false;\n    }\n    this._highlight(undefined);\n  }\n\n  @action\n  handleInput(e: InputEvent): void {\n    if (e.target === null) return;\n    const term = (e.target as HTMLInputElement).value;\n    let correctedTerm;\n    if (this.args.onInput) {\n      correctedTerm = this.args.onInput(term, this.storedAPI, e);\n      if (correctedTerm === false) {\n        return;\n      }\n    }\n    this._publicAPIActions.search(\n      typeof correctedTerm === 'string' ? correctedTerm : term,\n    );\n  }\n\n  @action\n  handleKeydown(e: KeyboardEvent) {\n    if (\n      this.args.onKeydown &&\n      this.args.onKeydown(this.storedAPI, e) === false\n    ) {\n      return false;\n    }\n\n    if (this.args.multiple && e.keyCode === 13 && this.storedAPI.isOpen) {\n      e.stopPropagation();\n      if (this.storedAPI.highlighted !== undefined) {\n        if (\n          !this.storedAPI.selected ||\n          this.storedAPI.selected.indexOf(this.storedAPI.highlighted) === -1\n        ) {\n          this.storedAPI.actions.choose(this.storedAPI.highlighted, e);\n          return false;\n        } else {\n          this.storedAPI.actions.close(e);\n          return false;\n        }\n      } else {\n        this.storedAPI.actions.close(e);\n        return false;\n      }\n    }\n\n    if (\n      this.searchFieldPosition === 'trigger' &&\n      !this.storedAPI.isOpen &&\n      e.keyCode !== 9 && // TAB\n      e.keyCode !== 13 && // ENTER\n      e.keyCode !== 27 // ESC\n    ) {\n      this.storedAPI.actions.open(e);\n    }\n    return this._routeKeydown(this.storedAPI, e);\n  }\n\n  @action\n  handleTriggerKeydown(e: KeyboardEvent) {\n    if (\n      this.args.onKeydown &&\n      this.args.onKeydown(this.storedAPI, e) === false\n    ) {\n      e.stopImmediatePropagation();\n      return;\n    }\n    if (e.ctrlKey || e.metaKey) {\n      e.stopImmediatePropagation();\n      return;\n    }\n    if ((e.keyCode >= 48 && e.keyCode <= 90) || isNumpadKeyEvent(e)) {\n      // Keys 0-9, a-z or numpad keys\n      this.triggerTypingTask.perform(e);\n    } else if (e.keyCode === 32) {\n      // Space\n      this._handleKeySpace(this.storedAPI, e);\n    } else {\n      return this._routeKeydown(this.storedAPI, e);\n    }\n  }\n\n  @action\n  _labelClick(event: MouseEvent) {\n    if (!this.storedAPI) {\n      return;\n    }\n\n    // Double-click, do nothing\n    if (event.detail > 1) {\n      return;\n    }\n\n    if (this.labelClickAction === 'open') {\n      this.storedAPI.actions.open();\n      return;\n    } else if (this.labelClickAction === 'focus') {\n      const trigger = this.storedAPI.actions.getTriggerElement();\n\n      if (!trigger) {\n        return;\n      }\n\n      trigger.focus();\n    }\n\n    return true;\n  }\n\n  @action\n  handleFocus(event: FocusEvent): void {\n    if (!this.isDestroying) {\n      Promise.resolve().then(() => {\n        this._updateIsActive(true);\n      });\n    }\n    if (this.searchFieldPosition === 'trigger') {\n      if (event.target) {\n        const target = event.target as HTMLElement;\n        const input = target.querySelector(\n          'input[type=\"search\"]',\n        ) as HTMLInputElement | null;\n        input?.focus();\n      }\n    }\n    if (this.args.onFocus) {\n      this.args.onFocus(this.storedAPI, event);\n    }\n  }\n\n  @action\n  handleBlur(event: FocusEvent): void {\n    if (!this.isDestroying) {\n      Promise.resolve().then(() => {\n        this._updateIsActive(false);\n      });\n    }\n    if (this.args.onBlur) {\n      this.args.onBlur(this.storedAPI, event);\n    }\n  }\n\n  // Methods\n  @action\n  _search(term: string): void {\n    if (this.searchText === term) return;\n    this.searchText = term;\n    if (!this.args.search) {\n      this.lastSearchedText = term;\n      this._resetHighlighted();\n    }\n  }\n\n  @action\n  _updateOptions(): void {\n    deprecate(\n      'You are using power-select with ember/render-modifier. Replace {{did-insert this._updateOptions @options}} and {{did-update this._updateOptions @options}} with {{this.updateOptions @options}}.',\n      false,\n      {\n        for: 'ember-power-select',\n        id: 'ember-power-select.no-at-ember-render-modifiers',\n        since: {\n          enabled: '8.1',\n          available: '8.1',\n        },\n        until: '9.0.0',\n      },\n    );\n\n    this.__updateOptions();\n  }\n\n  @action\n  _updateHighlighted(): void {\n    if (this.storedAPI.isOpen) {\n      this._resetHighlighted();\n    }\n  }\n\n  @action\n  _updateSelected(): void {\n    deprecate(\n      'You are using power-select with ember/render-modifier. Replace {{did-insert this._updateSelected @selected}} and {{did-update this._updateSelected @selected}} with {{this.updateSelected @selected}}.',\n      false,\n      {\n        for: 'ember-power-select',\n        id: 'ember-power-select.no-at-ember-render-modifiers',\n        since: {\n          enabled: '8.1',\n          available: '8.1',\n        },\n        until: '9.0.0',\n      },\n    );\n\n    this.__updateSelected();\n  }\n\n  _selectedObserverCallback(): void {\n    this._resolvedSelected = this._lastSelectedPromise;\n    this._highlight(this._resolvedSelected);\n  }\n\n  @action\n  _highlight(opt: any): void {\n    if (!isNone(opt) && opt.disabled) {\n      return;\n    }\n    this.highlighted = opt;\n  }\n\n  @action\n  _select(selected: any, e?: Event): void {\n    if (!isEqual(this.storedAPI.selected, selected)) {\n      this.args.onChange(selected, this.storedAPI, e);\n    }\n  }\n\n  @action\n  _choose(selected: any, e?: Event): void {\n    const buildSelection = this.buildSelection;\n    const selection = buildSelection\n      ? buildSelection(selected, this.storedAPI)\n      : selected;\n    this.storedAPI.actions.select(selection, e);\n    if (this.args.closeOnSelect !== false) {\n      this.storedAPI.actions.close(e);\n      if (this.searchFieldPosition === 'trigger') {\n        this.searchText = '';\n      }\n      // return false;\n    }\n  }\n\n  @action\n  _scrollTo(option: any): void {\n    const select = this.storedAPI;\n    if (!document || !option) {\n      return;\n    }\n    if (this.args.scrollTo) {\n      return this.args.scrollTo(option, select);\n    }\n\n    let root: Document | HTMLElement;\n\n    const triggerElement = select.actions.getTriggerElement();\n    if (triggerElement && triggerElement.getRootNode() instanceof ShadowRoot) {\n      root = triggerElement.getRootNode() as HTMLElement;\n    } else {\n      root = document;\n    }\n\n    const optionsList = root.querySelector(\n      `#ember-power-select-options-${select.uniqueId}`,\n    ) as HTMLElement;\n    if (!optionsList) {\n      return;\n    }\n    const index = indexOfOption(select.results, option);\n    if (index === -1) {\n      return;\n    }\n    const optionElement = optionsList.querySelector(\n      `[data-option-index='${index}']`,\n    ) as HTMLElement;\n    if (!optionElement) {\n      return;\n    }\n    const optionTopScroll = optionElement.offsetTop - optionsList.offsetTop;\n    const optionBottomScroll = optionTopScroll + optionElement.offsetHeight;\n    if (optionBottomScroll > optionsList.offsetHeight + optionsList.scrollTop) {\n      optionsList.scrollTop = optionBottomScroll - optionsList.offsetHeight;\n    } else if (optionTopScroll < optionsList.scrollTop) {\n      optionsList.scrollTop = optionTopScroll;\n    }\n  }\n\n  @action\n  _registerAPI(triggerElement: Element, [publicAPI]: [Select]): void {\n    deprecate(\n      'You are using power-select with ember/render-modifier. Replace {{did-insert this._registerAPI publicAPI}} and {{did-update this._registerAPI publicAPI}} with {{this.updateRegisterAPI publicAPI}}.',\n      false,\n      {\n        for: 'ember-power-select',\n        id: 'ember-power-select.no-at-ember-render-modifiers',\n        since: {\n          enabled: '8.1',\n          available: '8.1',\n        },\n        until: '9.0.0',\n      },\n    );\n\n    this.__registerAPI(triggerElement, [publicAPI]);\n  }\n\n  @action\n  _performSearch(triggerElement: Element, [term]: [string]): void {\n    deprecate(\n      'You are using power-select with ember/render-modifier. Replace {{did-update this._performSearch this.searchText}} with {{this.updatePerformSearch this.searchText}}.',\n      false,\n      {\n        for: 'ember-power-select',\n        id: 'ember-power-select.no-at-ember-render-modifiers',\n        since: {\n          enabled: '8.1',\n          available: '8.1',\n        },\n        until: '9.0.0',\n      },\n    );\n\n    this.__performSearch(triggerElement, [term]);\n  }\n\n  updateOptions = modifier(\n    () => {\n      this.__updateOptions();\n    },\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore\n    { eager: false },\n  );\n\n  updateSelected = modifier(\n    () => {\n      this.__updateSelected();\n    },\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore\n    { eager: false },\n  );\n\n  updateRegisterAPI = modifier(\n    (triggerElement: Element, [publicAPI]: [Select]) => {\n      this.__registerAPI(triggerElement, [publicAPI]);\n    },\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore\n    { eager: false },\n  );\n\n  updatePerformSearch = modifier(\n    (triggerElement: Element, [term]: [string]) => {\n      this.__performSearch(triggerElement, [term]);\n    },\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore\n    { eager: false },\n  );\n\n  private __updateOptions() {\n    if (!this.args.options) return;\n    if (isPromiseLike(this.args.options)) {\n      if (this._lastOptionsPromise === this.args.options) return; // promise is still the same\n      const currentOptionsPromise = this.args.options;\n      this._lastOptionsPromise = currentOptionsPromise;\n      this.loading = true;\n      this._lastOptionsPromise\n        .then((resolvedOptions) => {\n          if (this._lastOptionsPromise === currentOptionsPromise) {\n            this.loading = false;\n            this._resolvedOptions = resolvedOptions;\n            this._resetHighlighted();\n          }\n        })\n        .catch(() => {\n          if (this._lastOptionsPromise === currentOptionsPromise) {\n            this.loading = false;\n          }\n        });\n    } else {\n      Promise.resolve().then(() => {\n        this._resetHighlighted();\n      });\n    }\n  }\n\n  private __updateSelected(): void {\n    if (isNone(this.args.selected)) return;\n    if (typeof this.args.selected.then === 'function') {\n      if (this._lastSelectedPromise === this.args.selected) return; // promise is still the same\n      if (\n        this._lastSelectedPromise &&\n        isPromiseProxyLike(this._lastSelectedPromise)\n      ) {\n        removeObserver(\n          this._lastSelectedPromise,\n          'content',\n          this,\n          this._selectedObserverCallback,\n        );\n      }\n\n      const currentSelectedPromise: PromiseProxy<any> = this.args.selected;\n      currentSelectedPromise.then(() => {\n        if (this.isDestroyed || this.isDestroying) return;\n        if (isPromiseProxyLike(currentSelectedPromise)) {\n          // eslint-disable-next-line ember/no-observers\n          addObserver(\n            currentSelectedPromise,\n            'content',\n            this,\n            this._selectedObserverCallback,\n          );\n        }\n      });\n\n      this._lastSelectedPromise = currentSelectedPromise;\n      this._lastSelectedPromise.then((resolvedSelected) => {\n        if (this._lastSelectedPromise === currentSelectedPromise) {\n          this._resolvedSelected = resolvedSelected;\n          this._highlight(resolvedSelected);\n        }\n      });\n    } else {\n      this._resolvedSelected = undefined;\n      // Don't highlight args.selected array on multi-select\n      if (!Array.isArray(this.args.selected)) {\n        this._highlight(this.args.selected);\n      }\n    }\n  }\n\n  private __registerAPI(_: Element, [publicAPI]: [Select]): void {\n    this.storedAPI = publicAPI;\n    if (this.args.registerAPI) {\n      Promise.resolve().then(() => {\n        if (this.args.registerAPI) {\n          this.args.registerAPI(publicAPI);\n        }\n      });\n    }\n  }\n\n  private __performSearch(_: Element, [term]: [string]): void {\n    if (!this.args.search) return;\n    if (term === '') {\n      this.loading = false;\n      this.lastSearchedText = term;\n      if (this._lastSearchPromise !== undefined) {\n        if (isCancellablePromise(this._lastSearchPromise)) {\n          this._lastSearchPromise.cancel(); // Cancel ember-concurrency tasks\n        }\n        this._lastSearchPromise = undefined;\n      }\n      return;\n    }\n    const searchResult = this.args.search(term, this.storedAPI);\n    if (searchResult && isPromiseLike(searchResult)) {\n      this.loading = true;\n      if (\n        this._lastSearchPromise !== undefined &&\n        isCancellablePromise(this._lastSearchPromise)\n      ) {\n        this._lastSearchPromise.cancel(); // Cancel ember-concurrency tasks\n      }\n      this._lastSearchPromise = searchResult;\n      searchResult\n        .then((results) => {\n          if (this._lastSearchPromise === searchResult) {\n            this._searchResult = results;\n            this.loading = false;\n            this.lastSearchedText = term;\n            Promise.resolve().then(() => {\n              this._resetHighlighted();\n            });\n          }\n        })\n        .catch(() => {\n          if (this._lastSearchPromise === searchResult) {\n            this.loading = false;\n            this.lastSearchedText = term;\n          }\n        });\n    } else {\n      this.lastSearchedText = term;\n      this._searchResult = searchResult;\n      Promise.resolve().then(() => {\n        this._resetHighlighted();\n      });\n    }\n  }\n\n  _defaultBuildSelection(option: any): any {\n    return option;\n  }\n\n  @action\n  private _defaultMultipleBuildSelection(option: any, select: Select): any[] {\n    if (!this.args.multiple) {\n      throw new Error(\n        'The _defaultMultipleBuildSelection is only allowed for multiple',\n      );\n    }\n\n    const newSelection = Array.isArray(select.selected)\n      ? select.selected.slice(0)\n      : [];\n    let idx = -1;\n    for (let i = 0; i < newSelection.length; i++) {\n      if (isEqual(newSelection[i], option)) {\n        idx = i;\n        break;\n      }\n    }\n    if (idx > -1) {\n      newSelection.splice(idx, 1);\n    } else {\n      newSelection.push(option);\n    }\n    return newSelection;\n  }\n\n  focusInput(select: Select) {\n    if (select) {\n      const triggerElement = select.actions.getTriggerElement();\n      let root: Document | HTMLElement;\n\n      if (\n        triggerElement &&\n        triggerElement.getRootNode() instanceof ShadowRoot\n      ) {\n        root = triggerElement.getRootNode() as HTMLElement;\n      } else {\n        root = document;\n      }\n\n      const input = root.querySelector(\n        `#ember-power-select-trigger-input-${select.uniqueId}`,\n      ) as HTMLElement;\n\n      if (input) {\n        input.focus();\n      }\n    }\n  }\n\n  _routeKeydown(select: Select, e: KeyboardEvent): boolean | void {\n    if (e.keyCode === 38 || e.keyCode === 40) {\n      // Up & Down\n      return this._handleKeyUpDown(select, e);\n    } else if (e.keyCode === 13) {\n      // ENTER\n      return this._handleKeyEnter(select, e);\n    } else if (e.keyCode === 9) {\n      // Tab\n      return this._handleKeyTab(select, e);\n    } else if (e.keyCode === 27) {\n      // ESC\n      return this._handleKeyESC(select, e);\n    }\n  }\n\n  _handleKeyTab(select: Select, e: KeyboardEvent): void {\n    select.actions.close(e);\n  }\n\n  _handleKeyESC(select: Select, e: KeyboardEvent): void {\n    select.actions.close(e);\n  }\n\n  _handleKeyEnter(select: Select, e: KeyboardEvent): boolean | void {\n    if (select.isOpen && select.highlighted !== undefined) {\n      select.actions.choose(select.highlighted, e);\n      e.stopImmediatePropagation();\n      return false;\n    }\n  }\n\n  _handleKeySpace(select: Select, e: KeyboardEvent): void {\n    if (\n      e.target !== null &&\n      ['TEXTAREA', 'INPUT'].includes((e.target as Element).nodeName)\n    ) {\n      e.stopImmediatePropagation();\n    } else if (select.isOpen && select.highlighted !== undefined) {\n      e.stopImmediatePropagation();\n      e.preventDefault(); // Prevents scrolling of the page.\n      select.actions.choose(select.highlighted, e);\n    }\n  }\n\n  _handleKeyUpDown(select: Select, e: KeyboardEvent): void {\n    if (select.isOpen) {\n      e.preventDefault();\n      e.stopPropagation();\n      const step: 1 | -1 = e.keyCode === 40 ? 1 : -1;\n      const newHighlighted = advanceSelectableOption(\n        select.results,\n        select.highlighted,\n        step,\n      );\n      select.actions.highlight(newHighlighted);\n      select.actions.scrollTo(newHighlighted);\n    } else {\n      select.actions.open(e);\n    }\n  }\n\n  _resetHighlighted(): void {\n    let highlighted;\n    const defHighlighted = this.args.defaultHighlighted || defaultHighlighted;\n    if (typeof defHighlighted === 'function') {\n      highlighted = defHighlighted({\n        results: this.results,\n        highlighted: this.highlighted,\n        selected: this.selected,\n      });\n    } else {\n      highlighted = defHighlighted;\n    }\n    this._highlight(highlighted);\n  }\n\n  _filter(options: any[], term: string, skipDisabled = false): any[] {\n    const matcher = this.args.matcher || defaultMatcher;\n    const optionMatcher = getOptionMatcher(\n      matcher,\n      defaultMatcher,\n      this.args.searchField,\n    );\n    return filterOptions(options || [], term, optionMatcher, skipDisabled);\n  }\n\n  _updateIsActive(value: boolean) {\n    this.isActive = value;\n  }\n\n  findWithOffset(\n    options: readonly any[],\n    term: string,\n    offset: number,\n    skipDisabled = false,\n  ): any {\n    const typeAheadOptionMatcher = getOptionMatcher(\n      this.args.typeAheadOptionMatcher || defaultTypeAheadMatcher,\n      defaultTypeAheadMatcher,\n      this.args.searchField,\n    );\n    return findOptionWithOffset(\n      options || [],\n      term,\n      typeAheadOptionMatcher,\n      offset,\n      skipDisabled,\n    );\n  }\n\n  // Tasks\n  triggerTypingTask = restartableTask(async (e: KeyboardEvent) => {\n    // In general, a user doing this interaction means to have a different result.\n    let searchStartOffset = 1;\n    let repeatingChar = this._repeatingChar;\n    let charCode = e.keyCode;\n    if (isNumpadKeyEvent(e)) {\n      charCode -= 48; // Adjust char code offset for Numpad key codes. Check here for numapd key code behavior: https://goo.gl/Qwc9u4\n    }\n    let term;\n\n    // Check if user intends to cycle through results. _repeatingChar can only be the first character.\n    const c = String.fromCharCode(charCode);\n    if (c === this._repeatingChar) {\n      term = c;\n    } else {\n      term = this._expirableSearchText + c;\n    }\n\n    if (term.length > 1) {\n      // If the term is longer than one char, the user is in the middle of a non-cycling interaction\n      // so the offset is just zero (the current selection is a valid match).\n      searchStartOffset = 0;\n      repeatingChar = '';\n    } else {\n      repeatingChar = c;\n    }\n\n    // When the select is open, the \"selection\" is just highlighted.\n    if (this.storedAPI.isOpen && this.storedAPI.highlighted) {\n      searchStartOffset += indexOfOption(\n        this.storedAPI.options,\n        this.storedAPI.highlighted,\n      );\n    } else if (!this.storedAPI.isOpen && !isNone(this.selected)) {\n      searchStartOffset += indexOfOption(this.storedAPI.options, this.selected);\n    } else {\n      searchStartOffset = 0;\n    }\n\n    // The char is always appended. That way, searching for words like \"Aaron\" will work even\n    // if \"Aa\" would cycle through the results.\n    this._expirableSearchText = this._expirableSearchText + c;\n    this._repeatingChar = repeatingChar;\n    let match = this.findWithOffset(\n      this.storedAPI.options,\n      term,\n      searchStartOffset,\n      true,\n    );\n    if (match !== undefined) {\n      if (this.storedAPI.isOpen) {\n        this.storedAPI.actions.highlight(match);\n        this.storedAPI.actions.scrollTo(match);\n      } else {\n        if (this.args.multiple || this.args.legacyMultiple) {\n          match = [match];\n        }\n        this.storedAPI.actions.select(match, e);\n      }\n    }\n    await timeout(1000);\n    this._expirableSearchText = '';\n    this._repeatingChar = '';\n  });\n}\n\nfunction getOptionMatcher(\n  matcher: MatcherFn,\n  defaultMatcher: MatcherFn,\n  searchField: string | undefined,\n): MatcherFn {\n  if (searchField && matcher === defaultMatcher) {\n    return (option: any, text: string) =>\n      matcher(get(option, searchField), text);\n  } else {\n    return (option: any, text: string) => {\n      assert(\n        '<PowerSelect> If you want the default filtering to work on options that are not plain strings, you need to provide `@searchField`',\n        matcher !== defaultMatcher || typeof option === 'string',\n      );\n      return matcher(option, text);\n    };\n  }\n}\n\nfunction isNumpadKeyEvent(e: KeyboardEvent): boolean {\n  return e.keyCode >= 96 && e.keyCode <= 105;\n}\n\nconst toPlainArray = <T>(collection: T[] | Sliceable<T>): T[] => {\n  if (isSliceable<T>(collection)) {\n    return collection.slice();\n  } else {\n    return collection;\n  }\n};\n","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { modifier } from 'ember-modifier';\nimport type { Select, TSearchFieldPosition } from '../power-select';\nimport { deprecate } from '@ember/debug';\nimport { task, timeout } from 'ember-concurrency';\n\ninterface PowerSelectBeforeOptionsSignature {\n  Element: HTMLElement;\n  Args: {\n    select: Select;\n    searchEnabled: boolean;\n    ariaLabel?: string;\n    ariaLabelledBy?: string;\n    ariaDescribedBy?: string;\n    role?: string;\n    searchPlaceholder?: string;\n    searchFieldPosition?: TSearchFieldPosition;\n    ariaActiveDescendant?: string;\n    listboxId?: string;\n    onKeydown: (e: KeyboardEvent) => false | void;\n    onBlur: (e: FocusEvent) => void;\n    onFocus: (e: FocusEvent) => void;\n    onInput: (e: InputEvent) => boolean;\n    autofocus?: boolean;\n  };\n}\n\nexport default class PowerSelectBeforeOptionsComponent extends Component<PowerSelectBeforeOptionsSignature> {\n  didSetup: boolean = false;\n\n  @action\n  clearSearch(): void {\n    deprecate(\n      'You are using power-select before-option component with ember/render-modifier. Replace {{will-destroy this.clearSearch}} with {{this.setupInput}}.',\n      false,\n      {\n        for: 'ember-power-select',\n        id: 'ember-power-select.no-at-ember-render-modifiers',\n        since: {\n          enabled: '8.1',\n          available: '8.1',\n        },\n        until: '9.0.0',\n      },\n    );\n\n    this.args.select.actions?.search('');\n  }\n\n  @action\n  handleKeydown(e: KeyboardEvent): false | void {\n    if (this.args.onKeydown(e) === false) {\n      return false;\n    }\n    if (e.keyCode === 13) {\n      this.args.select.actions.close(e);\n    }\n  }\n\n  @action\n  handleInput(event: Event): false | void {\n    const e = event as InputEvent;\n    if (this.args.onInput(e) === false) {\n      return false;\n    }\n  }\n\n  @action\n  focusInput(el: HTMLElement) {\n    deprecate(\n      'You are using power-select before-option component with ember/render-modifier. Replace {{did-insert this.focusInput}} with {{this.setupInput}}.',\n      false,\n      {\n        for: 'ember-power-select',\n        id: 'ember-power-select.no-at-ember-render-modifiers',\n        since: {\n          enabled: '8.1',\n          available: '8.1',\n        },\n        until: '9.0.0',\n      },\n    );\n\n    this._focusInput(el);\n  }\n\n  setupInput = modifier(\n    (el: HTMLElement) => {\n      if (this.didSetup) {\n        return;\n      }\n\n      this.didSetup = true;\n\n      this._focusInput(el);\n\n      return () => {\n        this.args.select.actions?.search('');\n      };\n    },\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore\n    { eager: false },\n  );\n\n  private _focusInput(el: HTMLElement) {\n    this.focusLaterTask.perform(el);\n  }\n\n  private focusLaterTask = task(async (el: HTMLElement) => {\n    await timeout(0);\n    if (this.args.autofocus !== false) {\n      el.focus();\n    }\n  });\n}\n","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { modifier } from 'ember-modifier';\nimport { assert, deprecate } from '@ember/debug';\nimport { isBlank } from '@ember/utils';\nimport { get } from '@ember/object';\nimport type { Select, TSearchFieldPosition } from '../power-select';\nimport { task, timeout } from 'ember-concurrency';\nimport type { ComponentLike } from '@glint/template';\n\nexport interface PowerSelectInputSignature {\n  Element: HTMLElement;\n  Args: {\n    select: Select;\n    ariaLabel?: string;\n    ariaLabelledBy?: string;\n    ariaDescribedBy?: string;\n    role?: string;\n    searchField?: string;\n    searchPlaceholder?: string;\n    placeholder?: string;\n    searchFieldPosition?: TSearchFieldPosition;\n    ariaActiveDescendant?: string;\n    isDefaultPlaceholder?: boolean;\n    listboxId?: string;\n    autofocus?: boolean;\n    tabindex?: number | string;\n    placeholderComponent?: string | ComponentLike<any>;\n    onKeydown?: (e: KeyboardEvent) => boolean | void;\n    onBlur?: (e: FocusEvent) => void;\n    onFocus?: (e: FocusEvent) => void;\n    onInput?: (e: InputEvent) => void | boolean;\n    buildSelection: (lastSelection: any, select: Select) => any[];\n  };\n}\n\nexport default class PowerSelectInput extends Component<PowerSelectInputSignature> {\n  didSetup: boolean = false;\n\n  private _lastIsOpen: boolean = this.args.select.isOpen;\n\n  get placeholder() {\n    if (this.args.placeholder !== undefined) {\n      deprecate(\n        'You are using `power-select/input-field` with parameter @placeholder. Replace @placeholder with @searchPlaceholder',\n        false,\n        {\n          for: 'ember-power-select',\n          id: 'ember-power-select.deprecate-input-field-placeholder-argument',\n          since: {\n            enabled: '8.11',\n            available: '8.11',\n          },\n          until: '9.0.0',\n        },\n      );\n    }\n\n    if (!this.args.isDefaultPlaceholder) {\n      return undefined;\n    }\n\n    if (this.args.select.multiple) {\n      return !this.args.select.selected ||\n        (Array.isArray(this.args.select.selected) &&\n          this.args.select.selected.length === 0)\n        ? this.args.placeholder || this.args.searchPlaceholder || ''\n        : '';\n    }\n\n    return this.args.placeholder || this.args.searchPlaceholder;\n  }\n\n  @action\n  handleKeydown(e: KeyboardEvent): false | void {\n    if (e.target === null) return;\n    if (this.args.onKeydown && this.args.onKeydown(e) === false) {\n      e.stopPropagation();\n      return false;\n    }\n    if (this.args.select.multiple) {\n      if (e.keyCode === 8) {\n        e.stopPropagation();\n        if (\n          isBlank((e.target as HTMLInputElement).value) &&\n          this.args.buildSelection\n        ) {\n          const lastSelection =\n            Array.isArray(this.args.select.selected) &&\n            this.args.select.selected[this.args.select.selected.length - 1];\n          if (lastSelection) {\n            this.args.select.actions.select(\n              this.args.buildSelection(lastSelection, this.args.select),\n              e,\n            );\n            if (typeof lastSelection === 'string') {\n              this.args.select.actions.search(lastSelection);\n            } else {\n              assert(\n                '`<PowerSelect>` requires a `@searchField` when the options are not strings to remove options using backspace',\n                this.args.searchField,\n              );\n              this.args.select.actions.search(\n                (get(lastSelection, this.args.searchField) || '') as string,\n              );\n            }\n            this.args.select.actions.open(e);\n          }\n        }\n      } else if ((e.keyCode >= 48 && e.keyCode <= 90) || e.keyCode === 32) {\n        // Keys 0-9, a-z or SPACE\n        e.stopPropagation();\n      }\n    } else if (e.keyCode === 13) {\n      this.args.select.actions.close(e);\n    }\n  }\n\n  @action\n  handleInput(event: Event): false | void {\n    const e = event as InputEvent;\n    if (this.args.onInput && this.args.onInput(e) === false) {\n      return false;\n    }\n\n    this.args.select.actions.open(e);\n  }\n\n  @action\n  handleBlur(event: Event) {\n    if (!this._lastIsOpen && this.args.searchFieldPosition === 'trigger') {\n      this.args.select.actions?.search('');\n    }\n\n    if (this.args.onBlur) {\n      this.args.onBlur(event as FocusEvent);\n    }\n  }\n\n  @action\n  handleFocus(event: Event) {\n    if (this.args.onFocus) {\n      this.args.onFocus(event as FocusEvent);\n    }\n  }\n\n  setupInput = modifier(\n    (el: HTMLElement) => {\n      if (this.didSetup) {\n        return;\n      }\n\n      this.didSetup = true;\n\n      if (\n        this.args.searchFieldPosition === undefined ||\n        this.args.searchFieldPosition === 'before-options'\n      ) {\n        this._focusInput(el);\n      }\n\n      return () => {\n        // We don't need to reset search value, when searchFieldPosition is trigger, because complete power select will be destroyed\n        if (this.args.searchFieldPosition === 'trigger') {\n          return;\n        }\n\n        this.args.select.actions?.search('');\n      };\n    },\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore\n    { eager: false },\n  );\n\n  openChange = modifier((element: HTMLElement, [isOpen]: [boolean]) => {\n    this._openChanged(element, [isOpen]);\n  });\n\n  private _openChanged(element: HTMLElement, [isOpen]: [boolean]) {\n    if (\n      isOpen === false &&\n      this._lastIsOpen === true &&\n      document.activeElement !== element\n    ) {\n      Promise.resolve().then(() => {\n        this.args.select.actions?.search('');\n      });\n    }\n    this._lastIsOpen = isOpen;\n  }\n\n  private _focusInput(el: HTMLElement) {\n    this.focusLaterTask.perform(el);\n  }\n\n  private focusLaterTask = task(async (el: HTMLElement) => {\n    await timeout(0);\n    if (this.args.autofocus !== false) {\n      el.focus();\n    }\n  });\n}\n","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport type { Select } from '../power-select';\n\nexport interface PowerSelectLabelSignature {\n  Element: HTMLElement;\n  Args: {\n    select: Select;\n    labelText?: string;\n    labelId: string;\n    triggerId: string;\n    labelTag?: keyof HTMLElementTagNameMap;\n    extra: any;\n  };\n}\n\nexport default class PowerSelectLabelComponent extends Component<PowerSelectLabelSignature> {\n  @action\n  onLabelClick(e: MouseEvent): void {\n    if (!this.args.select) {\n      return;\n    }\n\n    this.args.select.actions.labelClick(e);\n  }\n}\n","import templateOnly from '@ember/component/template-only';\n\ninterface PowerSelectNoMatchesMessageSignature {\n  Element: HTMLElement;\n  Args: {\n    noMatchesMessage: any;\n  };\n}\n\nexport default templateOnly<PowerSelectNoMatchesMessageSignature>();\n","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { modifier } from 'ember-modifier';\nimport type { Select } from '../power-select';\nimport type { ComponentLike } from '@glint/template';\nimport { deprecate } from '@ember/debug';\ndeclare const FastBoot: any;\n\ninterface PowerSelectOptionsSignature {\n  Element: HTMLElement;\n  Args: PowerSelectOptionsArgs;\n  Blocks: {\n    default: [opt: PowerSelectOptionsArgs, select: Select];\n  };\n}\n\ninterface PowerSelectOptionsArgs {\n  select: Select;\n  highlightOnHover?: boolean;\n  listboxId: string;\n  groupIndex: string;\n  loadingMessage: string;\n  options: any[];\n  extra: any;\n  groupComponent?: string | ComponentLike<any>;\n  optionsComponent?: string | ComponentLike<any>;\n}\n\nconst isTouchDevice = !!window && 'ontouchstart' in window;\nif (typeof FastBoot === 'undefined') {\n  (function (ElementProto) {\n    if (typeof ElementProto.matches !== 'function') {\n      ElementProto.matches =\n        (ElementProto as any).msMatchesSelector ||\n        (ElementProto as any).mozMatchesSelector ||\n        ElementProto.webkitMatchesSelector;\n    }\n\n    if (typeof ElementProto.closest !== 'function') {\n      ElementProto.closest = function closest(selector: string) {\n        // eslint-disable-next-line @typescript-eslint/no-this-alias\n        let element: Element | null = this;\n        while (element !== null && element.nodeType === 1) {\n          if (element.matches(selector)) {\n            return element;\n          }\n          element = element.parentNode as Element;\n        }\n        return null;\n      };\n    }\n  })(window.Element.prototype);\n}\n\nexport default class PowerSelectOptionsComponent extends Component<PowerSelectOptionsSignature> {\n  private isTouchDevice = this.args.extra?._isTouchDevice || isTouchDevice;\n  private touchMoveEvent?: TouchEvent;\n  private mouseOverHandler: EventListener = ((\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    _: MouseEvent,\n  ): void => {}) as EventListener;\n  private mouseUpHandler: EventListener = ((\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    _: MouseEvent,\n  ): void => {}) as EventListener;\n  private touchEndHandler: EventListener = ((\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    _: TouchEvent,\n  ): void => {}) as EventListener;\n  private touchMoveHandler: EventListener = ((\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    _: TouchEvent,\n  ): void => {}) as EventListener;\n  private touchStartHandler: EventListener = ((\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    _: TouchEvent,\n  ): void => {}) as EventListener;\n\n  private _listElement: Element | null = null;\n  private _didHandlerSetup: boolean = false;\n\n  willDestroy(): void {\n    super.willDestroy();\n    if (this._listElement) {\n      this._removeHandlers(this._listElement);\n    }\n  }\n\n  @action\n  addHandlers(element: Element) {\n    deprecate(\n      'You are using power-select options component with ember/render-modifier. Replace {{did-insert this.addHandlers}} with {{this.setupHandlers}}.',\n      false,\n      {\n        for: 'ember-power-select',\n        id: 'ember-power-select.no-at-ember-render-modifiers',\n        since: {\n          enabled: '8.1',\n          available: '8.1',\n        },\n        until: '9.0.0',\n      },\n    );\n\n    this._addHandlers(element);\n  }\n\n  @action\n  removeHandlers(element: Element) {\n    deprecate(\n      'You are using power-select options component with ember/render-modifier. Replace {{will-destroy this.removeHandlers}} with {{this.setupHandlers}}.',\n      false,\n      {\n        for: 'ember-power-select',\n        id: 'ember-power-select.no-at-ember-render-modifiers',\n        since: {\n          enabled: '8.1',\n          available: '8.1',\n        },\n        until: '9.0.0',\n      },\n    );\n\n    this._removeHandlers(element);\n  }\n\n  setupHandlers = modifier((element: Element) => {\n    if (this._didHandlerSetup) {\n      return;\n    }\n    this._didHandlerSetup = true;\n    this._listElement = element;\n    this._addHandlers(element);\n  });\n\n  _optionFromIndex(index: string) {\n    const parts = index.split('.');\n    let option = this.args.options[parseInt(parts[0] ?? '', 10)];\n    for (let i = 1; i < parts.length; i++) {\n      option = option.options[parseInt(parts[i] ?? '', 10)];\n    }\n    return option;\n  }\n\n  _hasMoved(endEvent: TouchEvent): boolean {\n    const moveEvent = this.touchMoveEvent;\n    if (!moveEvent) {\n      return false;\n    }\n\n    if (!moveEvent.changedTouches) {\n      return false;\n    }\n\n    if (\n      !endEvent.changedTouches?.[0] ||\n      (moveEvent.changedTouches[0] as any).touchType !== 'stylus'\n    ) {\n      return true;\n    }\n\n    const changedTouch = moveEvent.changedTouches[0];\n\n    // Distinguish stylus scroll and tap: if touch \"distance\" < 5px, we consider it a tap\n    const horizontalDistance = Math.abs(\n      (changedTouch?.pageX ?? 0) - endEvent.changedTouches[0].pageX,\n    );\n    const verticalDistance = Math.abs(\n      (changedTouch?.pageY ?? 0) - endEvent.changedTouches[0].pageY,\n    );\n    return horizontalDistance >= 5 || verticalDistance >= 5;\n  }\n\n  private _addHandlers(element: Element) {\n    const isGroup = element.getAttribute('data-optgroup') === 'true';\n    if (isGroup) {\n      return;\n    }\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n    const findOptionAndPerform = (action: Function, e: MouseEvent): void => {\n      if (e.target === null) return;\n      const optionItem = (e.target as Element).closest('[data-option-index]');\n      if (!optionItem) {\n        return;\n      }\n      if (optionItem.closest('[aria-disabled=true]')) {\n        return; // Abort if the item or an ancestor is disabled\n      }\n      const optionIndex = optionItem.getAttribute('data-option-index');\n      if (optionIndex === null) return;\n      action(this._optionFromIndex(optionIndex), e);\n    };\n    this.mouseUpHandler = ((e: MouseEvent): void =>\n      findOptionAndPerform(\n        this.args.select.actions.choose,\n        e,\n      )) as EventListener;\n    element.addEventListener('mouseup', this.mouseUpHandler);\n    if (this.args.highlightOnHover) {\n      this.mouseOverHandler = ((e: MouseEvent): void =>\n        findOptionAndPerform(\n          this.args.select.actions.highlight,\n          e,\n        )) as EventListener;\n      element.addEventListener('mouseover', this.mouseOverHandler);\n    }\n    if (this.isTouchDevice) {\n      this.touchMoveHandler = ((e: TouchEvent): void => {\n        this.touchMoveEvent = e;\n        if (element) {\n          element.removeEventListener('touchmove', this.touchMoveHandler);\n        }\n      }) as EventListener;\n      // Add touch event handlers to detect taps\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      this.touchStartHandler = ((_: TouchEvent): void => {\n        element.addEventListener('touchmove', this.touchMoveHandler);\n      }) as EventListener;\n      this.touchEndHandler = ((e: TouchEvent): void => {\n        if (e.target === null) return;\n        const optionItem = (e.target as Element).closest('[data-option-index]');\n        if (optionItem === null) return;\n        e.preventDefault();\n        if (this._hasMoved(e)) {\n          this.touchMoveEvent = undefined;\n          return;\n        }\n\n        if (optionItem.closest('[aria-disabled=true]')) {\n          return; // Abort if the item or an ancestor is disabled\n        }\n\n        const optionIndex = optionItem.getAttribute('data-option-index');\n        if (optionIndex === null) return;\n        this.args.select.actions.choose(this._optionFromIndex(optionIndex), e);\n      }) as EventListener;\n      element.addEventListener('touchstart', this.touchStartHandler);\n      element.addEventListener('touchend', this.touchEndHandler);\n    }\n\n    this.args.select.actions.scrollTo(this.args.select.highlighted);\n  }\n\n  private _removeHandlers(element: Element) {\n    element.removeEventListener('mouseup', this.mouseUpHandler);\n    element.removeEventListener('mouseover', this.mouseOverHandler);\n    element.removeEventListener('touchstart', this.touchStartHandler);\n    element.removeEventListener('touchmove', this.touchMoveHandler);\n    element.removeEventListener('touchend', this.touchEndHandler);\n  }\n}\n","import templateOnly from '@ember/component/template-only';\n\ninterface PowerSelectPlaceholderSignature {\n  Element: HTMLElement;\n  Args: {\n    isMultipleWithSearch: boolean;\n    placeholder: any;\n    inputComponent?: any;\n  };\n}\n\nexport default templateOnly<PowerSelectPlaceholderSignature>();\n","import Component from '@glimmer/component';\nimport { guidFor } from '@ember/object/internals';\n\ninterface PowerSelectPowerSelectGroupSignature {\n  Element: HTMLElement;\n  Args: {\n    group: any;\n  };\n  Blocks: {\n    default: [];\n  };\n}\n\nexport default class PowerSelectGroupComponent extends Component<PowerSelectPowerSelectGroupSignature> {\n  uniqueId = guidFor(this);\n}\n","import templateOnly from '@ember/component/template-only';\n\ninterface PowerSelectSearchMessageSignature {\n  Element: HTMLElement;\n  Args: {\n    searchMessage: string;\n  };\n}\n\nexport default templateOnly<PowerSelectSearchMessageSignature>();\n","import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { get } from '@ember/object';\nimport { modifier } from 'ember-modifier';\nimport { deprecate } from '@ember/debug';\nimport type { Select, TSearchFieldPosition } from '../power-select';\nimport type { ComponentLike } from '@glint/template';\n\ninterface IndexAccesible<T> {\n  objectAt(index: number): T;\n}\n\nconst isIndexAccesible = <T>(target: any): target is IndexAccesible<T> => {\n  return typeof target.objectAt === 'function';\n};\n\ninterface PowerSelectTriggerSignature {\n  Element: HTMLElement;\n  Args: {\n    select: Select;\n    allowClear: boolean;\n    searchEnabled: boolean;\n    placeholder?: string;\n    searchPlaceholder?: string;\n    searchField: string;\n    searchFieldPosition?: TSearchFieldPosition;\n    listboxId?: string;\n    tabindex?: string;\n    ariaLabel?: string;\n    ariaLabelledBy?: string;\n    ariaDescribedBy?: string;\n    role?: string;\n    ariaActiveDescendant: string;\n    extra?: any;\n    placeholderComponent?: string | ComponentLike<any>;\n    selectedItemComponent?: string | ComponentLike<any>;\n    onInput?: (e: InputEvent) => boolean;\n    onKeydown?: (e: KeyboardEvent) => boolean;\n    onFocus?: (e: FocusEvent) => void;\n    onBlur?: (e: FocusEvent) => void;\n    buildSelection: (lastSelection: any, select: Select) => any[];\n  };\n  Blocks: {\n    default: [selected: any, select: Select];\n  };\n}\n\nexport default class PowerSelectTriggerComponent extends Component<PowerSelectTriggerSignature> {\n  private _lastIsOpen: boolean = this.args.select.isOpen;\n\n  @action\n  clear(e: Event): false | void {\n    e.stopPropagation();\n    this.args.select.actions.select(null);\n    if (e.type === 'touchstart') {\n      return false;\n    }\n  }\n\n  // Actions\n  @action\n  openChanged(element: Element, [isOpen]: [boolean]) {\n    deprecate(\n      'You are using a power-select-multiple trigger with ember/render-modifier. Replace {{did-update this.openChanged @select.isOpen}} with {{this.openChange @select.isOpen}}.',\n      false,\n      {\n        for: 'ember-power-select',\n        id: 'ember-power-select.no-at-ember-render-modifiers',\n        since: {\n          enabled: '8.1',\n          available: '8.1',\n        },\n        until: '9.0.0',\n      },\n    );\n\n    this._openChanged(element, [isOpen]);\n  }\n\n  @action\n  chooseOption(e: Event) {\n    if (e.target === null) return;\n    const selectedIndex = (e.target as Element).getAttribute(\n      'data-selected-index',\n    );\n    if (selectedIndex) {\n      const numericIndex = parseInt(selectedIndex, 10);\n      e.stopPropagation();\n      e.preventDefault();\n      const object = this.selectedObject(\n        this.args.select.selected,\n        numericIndex,\n      );\n      this.args.select.actions.choose(object);\n    }\n  }\n\n  openChange = modifier((element: Element, [isOpen]: [boolean]) => {\n    this._openChanged(element, [isOpen]);\n  });\n\n  private _openChanged(_el: Element, [isOpen]: [boolean]) {\n    if (isOpen === false && this._lastIsOpen === true) {\n      Promise.resolve().then(() => {\n        this.args.select.actions?.search('');\n      });\n    }\n    this._lastIsOpen = isOpen;\n  }\n\n  selectedObject<T>(list: IndexAccesible<T> | T[], index: number): T {\n    if (isIndexAccesible(list)) {\n      return list.objectAt(index);\n    } else {\n      return get(list, index) as T;\n    }\n  }\n}\n","import { helper } from '@ember/component/helper';\nimport { isArray as isEmberArray } from '@ember/array';\nimport { isEqual } from '@ember/utils';\n\nexport function emberPowerSelectIsEqual(\n  [option, selected]: [any, any] /* , hash*/,\n): boolean {\n  if (selected === undefined || selected === null) {\n    return false;\n  }\n  if (isEmberArray(selected)) {\n    for (let i = 0; i < selected.length; i++) {\n      // @ts-expect-error Element implicitly has an 'any' type because expression of type 'number' can't be used to index type 'ArrayLike<unknown> | EmberArray<unknown>'.\n      if (isEqual(selected[i], option)) {\n        return true;\n      }\n    }\n    return false;\n  } else {\n    return isEqual(option, selected);\n  }\n}\n\nexport default helper(emberPowerSelectIsEqual);\n","import { helper } from '@ember/component/helper';\nimport { isGroup } from '../utils/group-utils.ts';\n\nexport function emberPowerSelectIsGroup([maybeGroup]: [any]): boolean {\n  return isGroup(maybeGroup);\n}\n\nexport default helper(emberPowerSelectIsGroup);\n","import { helper } from '@ember/component/helper';\nimport { isNone } from '@ember/utils';\n\nexport function emberPowerSelectIsSelectedPresent([value]: [any]): boolean {\n  return !isNone(value);\n}\n\nexport default helper(emberPowerSelectIsSelectedPresent);\n","import { isEqual } from '@ember/utils';\n\nexport type MatcherFn = (option: any, text: string) => number;\nexport function isGroup(entry: any): boolean {\n  return !!entry && !!entry.groupName && !!entry.options;\n}\n\nexport function countOptions(collection: any): number {\n  let counter = 0;\n  (function walk(collection): void {\n    if (!collection) {\n      return;\n    }\n    for (let i = 0; i < collection.length; i++) {\n      const entry = collection.objectAt\n        ? collection.objectAt(i)\n        : collection[i];\n      if (isGroup(entry)) {\n        walk(entry.options);\n      } else {\n        counter++;\n      }\n    }\n  })(collection);\n  return counter;\n}\n\nexport function indexOfOption(collection: any, option: any): number {\n  let index = 0;\n  return (function walk(collection): number {\n    if (!collection) {\n      return -1;\n    }\n    for (let i = 0; i < collection.length; i++) {\n      const entry = collection.objectAt\n        ? collection.objectAt(i)\n        : collection[i];\n      if (isGroup(entry)) {\n        const result = walk(entry.options);\n        if (result > -1) {\n          return result;\n        }\n      } else if (isEqual(entry, option)) {\n        return index;\n      } else {\n        index++;\n      }\n    }\n    return -1;\n  })(collection);\n}\n\nexport function pathForOption(collection: any, option: any): string {\n  return (function walk(collection): string {\n    if (!collection) {\n      return '';\n    }\n    for (let i = 0; i < collection.length; i++) {\n      const entry = collection.objectAt\n        ? collection.objectAt(i)\n        : collection[i];\n      if (isGroup(entry)) {\n        const result = walk(entry.options);\n        if (result.length > 0) {\n          return i + '.' + result;\n        }\n      } else if (isEqual(entry, option)) {\n        return i + '';\n      }\n    }\n    return '';\n  })(collection);\n}\n\nexport function optionAtIndex(\n  originalCollection: any,\n  index: number,\n): { disabled: boolean; option: any } {\n  let counter = 0;\n  return (\n    (function walk(\n      collection,\n      ancestorIsDisabled,\n    ): { disabled: boolean; option: any } | void {\n      if (!collection || index < 0) {\n        return { disabled: false, option: undefined };\n      }\n      let localCounter = 0;\n      const length = collection.length;\n      while (counter <= index && localCounter < length) {\n        const entry = collection.objectAt\n          ? collection.objectAt(localCounter)\n          : collection[localCounter];\n        if (isGroup(entry)) {\n          const found = walk(\n            entry.options,\n            ancestorIsDisabled || !!entry.disabled,\n          );\n          if (found) {\n            return found;\n          }\n        } else if (counter === index) {\n          return {\n            disabled: ancestorIsDisabled || !!entry.disabled,\n            option: entry,\n          };\n        } else {\n          counter++;\n        }\n        localCounter++;\n      }\n    })(originalCollection, false) || { disabled: false, option: undefined }\n  );\n}\n\nexport interface Group {\n  groupName: string;\n  options: any[];\n  disabled?: boolean;\n  [key: string]: unknown;\n}\nfunction copyGroup(group: Group, suboptions: any[]): Group {\n  const groupCopy: Group = { ...group, options: suboptions };\n  if (Object.prototype.hasOwnProperty.call(group, 'disabled')) {\n    groupCopy.disabled = group.disabled;\n  }\n  return groupCopy;\n}\n\nexport function findOptionWithOffset(\n  options: any,\n  text: string,\n  matcher: MatcherFn,\n  offset: number,\n  skipDisabled = false,\n): any {\n  let counter = 0;\n  let foundBeforeOffset;\n  let foundAfterOffset = false;\n  const canStop = () => !!foundAfterOffset;\n\n  (function walk(options: any, ancestorIsDisabled: boolean): any {\n    const length = options.length;\n\n    for (let i = 0; i < length; i++) {\n      const entry = options.objectAt ? options.objectAt(i) : options[i];\n      const entryIsDisabled = !!entry.disabled;\n      if (!skipDisabled || !entryIsDisabled) {\n        if (isGroup(entry)) {\n          walk(entry.options, ancestorIsDisabled || entryIsDisabled);\n          if (canStop()) {\n            return;\n          }\n        } else if (matcher(entry, text) >= 0) {\n          if (counter < offset) {\n            if (!foundBeforeOffset) {\n              foundBeforeOffset = entry;\n            }\n          } else {\n            foundAfterOffset = entry;\n          }\n          counter++;\n        } else {\n          counter++;\n        }\n\n        if (canStop()) {\n          return;\n        }\n      }\n    }\n  })(options, false);\n\n  return foundAfterOffset ? foundAfterOffset : foundBeforeOffset;\n}\n\nexport function filterOptions(\n  options: any,\n  text: string,\n  matcher: MatcherFn,\n  skipDisabled = false,\n): any[] {\n  const opts = [];\n  const length = options.length;\n  for (let i = 0; i < length; i++) {\n    const entry = options.objectAt ? options.objectAt(i) : options[i];\n    if (!skipDisabled || !entry.disabled) {\n      if (isGroup(entry)) {\n        const suboptions = filterOptions(\n          entry.options,\n          text,\n          matcher,\n          skipDisabled,\n        );\n        if (suboptions.length > 0) {\n          opts.push(copyGroup(entry, suboptions));\n        }\n      } else if (matcher(entry, text) >= 0) {\n        opts.push(entry);\n      }\n    }\n  }\n  return opts;\n}\n\nexport function defaultHighlighted<T>({\n  results,\n  highlighted,\n  selected,\n}: {\n  results: T[];\n  highlighted: T | undefined;\n  selected: T | undefined;\n}): T {\n  const option = highlighted || selected;\n  if (option === undefined || indexOfOption(results, option) === -1) {\n    return advanceSelectableOption(results, option, 1);\n  }\n  return option;\n}\n\nexport function advanceSelectableOption(\n  options: any,\n  currentOption: any,\n  step: 1 | -1,\n) {\n  const resultsLength = countOptions(options);\n  let startIndex = Math.min(\n    Math.max(indexOfOption(options, currentOption) + step, 0),\n    resultsLength - 1,\n  );\n  let { disabled, option } = optionAtIndex(options, startIndex);\n  while (option && disabled) {\n    const next = optionAtIndex(options, (startIndex += step));\n    disabled = next.disabled;\n    option = next.option;\n  }\n  return option;\n}\n\nconst DIACRITICS: Record<string, string> = {\n  'Ⓐ': 'A',\n  Ａ: 'A',\n  À: 'A',\n  Á: 'A',\n  Â: 'A',\n  Ầ: 'A',\n  Ấ: 'A',\n  Ẫ: 'A',\n  Ẩ: 'A',\n  Ã: 'A',\n  Ā: 'A',\n  Ă: 'A',\n  Ằ: 'A',\n  Ắ: 'A',\n  Ẵ: 'A',\n  Ẳ: 'A',\n  Ȧ: 'A',\n  Ǡ: 'A',\n  Ä: 'A',\n  Ǟ: 'A',\n  Ả: 'A',\n  Å: 'A',\n  Ǻ: 'A',\n  Ǎ: 'A',\n  Ȁ: 'A',\n  Ȃ: 'A',\n  Ạ: 'A',\n  Ậ: 'A',\n  Ặ: 'A',\n  Ḁ: 'A',\n  Ą: 'A',\n  Ⱥ: 'A',\n  Ɐ: 'A',\n  Ꜳ: 'AA',\n  Æ: 'AE',\n  Ǽ: 'AE',\n  Ǣ: 'AE',\n  Ꜵ: 'AO',\n  Ꜷ: 'AU',\n  Ꜹ: 'AV',\n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'r',\n  ɽ: 'r',\n  ꝛ: 'r',\n  ꞧ: 'r',\n  ꞃ: 'r',\n  'ⓢ': 's',\n  ｓ: 's',\n  ß: 's',\n  ś: 's',\n  ṥ: 's',\n  ŝ: 's',\n  ṡ: 's',\n  š: 's',\n  ṧ: 's',\n  ṣ: 's',\n  ṩ: 's',\n  ș: 's',\n  ş: 's',\n  ȿ: 's',\n  ꞩ: 's',\n  ꞅ: 's',\n  ẛ: 's',\n  'ⓣ': 't',\n  ｔ: 't',\n  ṫ: 't',\n  ẗ: 't',\n  ť: 't',\n  ṭ: 't',\n  ț: 't',\n  ţ: 't',\n  ṱ: 't',\n  ṯ: 't',\n  ŧ: 't',\n  ƭ: 't',\n  ʈ: 't',\n  ⱦ: 't',\n  ꞇ: 't',\n  ꜩ: 'tz',\n  'ⓤ': 'u',\n  ｕ: 'u',\n  ù: 'u',\n  ú: 'u',\n  û: 'u',\n  ũ: 'u',\n  ṹ: 'u',\n  ū: 'u',\n  ṻ: 'u',\n  ŭ: 'u',\n  ü: 'u',\n  ǜ: 'u',\n  ǘ: 'u',\n  ǖ: 'u',\n  ǚ: 'u',\n  ủ: 'u',\n  ů: 'u',\n  ű: 'u',\n  ǔ: 'u',\n  ȕ: 'u',\n  ȗ: 'u',\n  ư: 'u',\n  ừ: 'u',\n  ứ: 'u',\n  ữ: 'u',\n  ử: 'u',\n  ự: 'u',\n  ụ: 'u',\n  ṳ: 'u',\n  ų: 'u',\n  ṷ: 'u',\n  ṵ: 'u',\n  ʉ: 'u',\n  'ⓥ': 'v',\n  ｖ: 'v',\n  ṽ: 'v',\n  ṿ: 'v',\n  ʋ: 'v',\n  ꝟ: 'v',\n  ʌ: 'v',\n  ꝡ: 'vy',\n  'ⓦ': 'w',\n  ｗ: 'w',\n  ẁ: 'w',\n  ẃ: 'w',\n  ŵ: 'w',\n  ẇ: 'w',\n  ẅ: 'w',\n  ẘ: 'w',\n  ẉ: 'w',\n  ⱳ: 'w',\n  'ⓧ': 'x',\n  ｘ: 'x',\n  ẋ: 'x',\n  ẍ: 'x',\n  'ⓨ': 'y',\n  ｙ: 'y',\n  ỳ: 'y',\n  ý: 'y',\n  ŷ: 'y',\n  ỹ: 'y',\n  ȳ: 'y',\n  ẏ: 'y',\n  ÿ: 'y',\n  ỷ: 'y',\n  ẙ: 'y',\n  ỵ: 'y',\n  ƴ: 'y',\n  ɏ: 'y',\n  ỿ: 'y',\n  'ⓩ': 'z',\n  ｚ: 'z',\n  ź: 'z',\n  ẑ: 'z',\n  ż: 'z',\n  ž: 'z',\n  ẓ: 'z',\n  ẕ: 'z',\n  ƶ: 'z',\n  ȥ: 'z',\n  ɀ: 'z',\n  ⱬ: 'z',\n  ꝣ: 'z',\n  Ά: 'Α',\n  Έ: 'Ε',\n  Ή: 'Η',\n  Ί: 'Ι',\n  Ϊ: 'Ι',\n  Ό: 'Ο',\n  Ύ: 'Υ',\n  Ϋ: 'Υ',\n  Ώ: 'Ω',\n  ά: 'α',\n  έ: 'ε',\n  ή: 'η',\n  ί: 'ι',\n  ϊ: 'ι',\n  ΐ: 'ι',\n  ό: 'ο',\n  ύ: 'υ',\n  ϋ: 'υ',\n  ΰ: 'υ',\n  ω: 'ω',\n  ς: 'σ',\n};\n\n// Copied from Select2\nexport function stripDiacritics(text: string | number) {\n  // Used 'uni range + named function' from http://jsperf.com/diacritics/18\n  function match(a: string) {\n    return DIACRITICS[a] || a;\n  }\n\n  return `${text}`.replace(/[^\\u0000-\\u007E]/g, match); // eslint-disable-line\n}\n\nexport function defaultMatcher(value: string, text: string) {\n  return stripDiacritics(value)\n    .toUpperCase()\n    .indexOf(stripDiacritics(text).toUpperCase());\n}\n\nexport function defaultTypeAheadMatcher(value: string, text: string) {\n  return stripDiacritics(value)\n    .toUpperCase()\n    .startsWith(stripDiacritics(text).toUpperCase())\n    ? 1\n    : -1;\n}\n","export default class Cache {\n  constructor(limit, func, store) {\n    this.limit = limit;\n    this.func = func;\n    this.store = store;\n    this.size = 0;\n    this.misses = 0;\n    this.hits = 0;\n    this.store = store || new Map();\n  }\n  get(key) {\n    let value = this.store.get(key);\n    if (this.store.has(key)) {\n      this.hits++;\n      return this.store.get(key);\n    } else {\n      this.misses++;\n      value = this.set(key, this.func(key));\n    }\n    return value;\n  }\n  set(key, value) {\n    if (this.limit > this.size) {\n      this.size++;\n      this.store.set(key, value);\n    }\n    return value;\n  }\n  purge() {\n    this.store.clear();\n    this.size = 0;\n    this.hits = 0;\n    this.misses = 0;\n  }\n}\n","/* eslint-disable no-useless-escape */\nimport Cache from './cache';\nlet STRINGS = {};\nexport function setStrings(strings) {\n  STRINGS = strings;\n}\nexport function getStrings() {\n  return STRINGS;\n}\nexport function getString(name) {\n  return STRINGS[name];\n}\nconst STRING_DASHERIZE_REGEXP = /[ _]/g;\nconst STRING_DASHERIZE_CACHE = new Cache(1000, (key) =>\n  decamelize(key).replace(STRING_DASHERIZE_REGEXP, '-')\n);\nconst STRING_CLASSIFY_REGEXP_1 = /^(\\-|_)+(.)?/;\nconst STRING_CLASSIFY_REGEXP_2 = /(.)(\\-|\\_|\\.|\\s)+(.)?/g;\nconst STRING_CLASSIFY_REGEXP_3 = /(^|\\/|\\.)([a-z])/g;\nconst CLASSIFY_CACHE = new Cache(1000, (str) => {\n  const replace1 = (_match, _separator, chr) =>\n    chr ? `_${chr.toUpperCase()}` : '';\n  const replace2 = (_match, initialChar, _separator, chr) =>\n    initialChar + (chr ? chr.toUpperCase() : '');\n  const parts = str.split('/');\n  for (let i = 0; i < parts.length; i++) {\n    parts[i] = parts[i]\n      .replace(STRING_CLASSIFY_REGEXP_1, replace1)\n      .replace(STRING_CLASSIFY_REGEXP_2, replace2);\n  }\n  return parts\n    .join('/')\n    .replace(STRING_CLASSIFY_REGEXP_3, (match /*, separator, chr */) =>\n      match.toUpperCase()\n    );\n});\nconst STRING_UNDERSCORE_REGEXP_1 = /([a-z\\d])([A-Z]+)/g;\nconst STRING_UNDERSCORE_REGEXP_2 = /\\-|\\s+/g;\nconst UNDERSCORE_CACHE = new Cache(1000, (str) =>\n  str\n    .replace(STRING_UNDERSCORE_REGEXP_1, '$1_$2')\n    .replace(STRING_UNDERSCORE_REGEXP_2, '_')\n    .toLowerCase()\n);\nconst STRING_DECAMELIZE_REGEXP = /([a-z\\d])([A-Z])/g;\nconst DECAMELIZE_CACHE = new Cache(1000, (str) =>\n  str.replace(STRING_DECAMELIZE_REGEXP, '$1_$2').toLowerCase()\n);\n/**\n  Converts a camelized string into all lower case separated by underscores.\n\n  ```javascript\n  import { decamelize } from '@ember/string';\n\n  decamelize('innerHTML');          // 'inner_html'\n  decamelize('action_name');        // 'action_name'\n  decamelize('css-class-name');     // 'css-class-name'\n  decamelize('my favorite items');  // 'my favorite items'\n  ```\n\n  @method decamelize\n  @param {String} str The string to decamelize.\n  @return {String} the decamelized string.\n  @public\n*/\nexport function decamelize(str) {\n  return DECAMELIZE_CACHE.get(str);\n}\n/**\n  Replaces underscores, spaces, or camelCase with dashes.\n\n  ```javascript\n  import { dasherize } from '@ember/string';\n\n  dasherize('innerHTML');                // 'inner-html'\n  dasherize('action_name');              // 'action-name'\n  dasherize('css-class-name');           // 'css-class-name'\n  dasherize('my favorite items');        // 'my-favorite-items'\n  dasherize('privateDocs/ownerInvoice';  // 'private-docs/owner-invoice'\n  ```\n\n  @method dasherize\n  @param {String} str The string to dasherize.\n  @return {String} the dasherized string.\n  @public\n*/\nexport function dasherize(str) {\n  return STRING_DASHERIZE_CACHE.get(str);\n}\n/**\n  Returns the UpperCamelCase form of a string.\n\n  ```javascript\n  import { classify } from '@ember/string';\n\n  classify('innerHTML');                   // 'InnerHTML'\n  classify('action_name');                 // 'ActionName'\n  classify('css-class-name');              // 'CssClassName'\n  classify('my favorite items');           // 'MyFavoriteItems'\n  classify('private-docs/owner-invoice');  // 'PrivateDocs/OwnerInvoice'\n  ```\n\n  @method classify\n  @param {String} str the string to classify\n  @return {String} the classified string\n  @public\n*/\nexport function classify(str) {\n  return CLASSIFY_CACHE.get(str);\n}\n/**\n  More general than decamelize. Returns the lower\\_case\\_and\\_underscored\n  form of a string.\n\n  ```javascript\n  import { underscore } from '@ember/string';\n\n  underscore('innerHTML');                 // 'inner_html'\n  underscore('action_name');               // 'action_name'\n  underscore('css-class-name');            // 'css_class_name'\n  underscore('my favorite items');         // 'my_favorite_items'\n  underscore('privateDocs/ownerInvoice');  // 'private_docs/owner_invoice'\n  ```\n\n  @method underscore\n  @param {String} str The string to underscore.\n  @return {String} the underscored string.\n  @public\n*/\nexport function underscore(str) {\n  return UNDERSCORE_CACHE.get(str);\n}\n","import { dasherize, classify, underscore } from './string';\nimport classFactory from './utils/class-factory';\n\nexport class ModuleRegistry {\n  constructor(entries) {\n    this._entries = entries || globalThis.requirejs.entries;\n  }\n  moduleNames() {\n    return Object.keys(this._entries);\n  }\n  has(moduleName) {\n    return moduleName in this._entries;\n  }\n  get(...args) {\n    return globalThis.require(...args);\n  }\n}\n\n/**\n * This module defines a subclass of Ember.DefaultResolver that adds two\n * important features:\n *\n *  1) The resolver makes the container aware of es6 modules via the AMD\n *     output. The loader's _moduleEntries is consulted so that classes can be\n *     resolved directly via the module loader, without needing a manual\n *     `import`.\n *  2) is able to provide injections to classes that implement `extend`\n *     (as is typical with Ember).\n */\nexport default class Resolver {\n  static moduleBasedResolver = true;\n  moduleBasedResolver = true;\n\n  _deprecatedPodModulePrefix = false;\n  _normalizeCache = Object.create(null);\n\n  static create(props) {\n    return new this(props);\n  }\n\n  /**\n   A listing of functions to test for moduleName's based on the provided\n   `parsedName`. This allows easy customization of additional module based\n   lookup patterns.\n\n   @property moduleNameLookupPatterns\n   @returns {Ember.Array}\n   */\n  moduleNameLookupPatterns = [\n    this.podBasedModuleName,\n    this.podBasedComponentsInSubdir,\n    this.mainModuleName,\n    this.defaultModuleName,\n    this.nestedColocationComponentModuleName,\n  ];\n\n  static withModules(explicitModules) {\n    return class extends this {\n      static explicitModules = explicitModules;\n    };\n  }\n\n  constructor(props) {\n    Object.assign(this, props);\n    if (!this._moduleRegistry) {\n      let explicitModules = this.constructor.explicitModules;\n      if (explicitModules) {\n        this._moduleRegistry = {\n          moduleNames() {\n            return Object.keys(explicitModules);\n          },\n          has(name) {\n            return Boolean(explicitModules[name]);\n          },\n          get(name) {\n            return explicitModules[name];\n          },\n          addModules(modules) {\n            explicitModules = Object.assign({}, explicitModules, modules);\n          },\n        };\n      } else {\n        if (typeof globalThis.requirejs.entries === 'undefined') {\n          globalThis.requirejs.entries = globalThis.requirejs._eak_seen;\n        }\n        this._moduleRegistry = new ModuleRegistry();\n      }\n    }\n\n    this.pluralizedTypes = this.pluralizedTypes || Object.create(null);\n\n    if (!this.pluralizedTypes.config) {\n      this.pluralizedTypes.config = 'config';\n    }\n  }\n\n  makeToString(factory, fullName) {\n    return '' + this.namespace.modulePrefix + '@' + fullName + ':';\n  }\n\n  shouldWrapInClassFactory(/* module, parsedName */) {\n    return false;\n  }\n\n  parseName(fullName) {\n    if (fullName.parsedName === true) {\n      return fullName;\n    }\n\n    let prefix, type, name;\n    let fullNameParts = fullName.split('@');\n\n    if (fullNameParts.length === 3) {\n      if (fullNameParts[0].length === 0) {\n        // leading scoped namespace: `@scope/pkg@type:name`\n        prefix = `@${fullNameParts[1]}`;\n        let prefixParts = fullNameParts[2].split(':');\n        type = prefixParts[0];\n        name = prefixParts[1];\n      } else {\n        // interweaved scoped namespace: `type:@scope/pkg@name`\n        prefix = `@${fullNameParts[1]}`;\n        type = fullNameParts[0].slice(0, -1);\n        name = fullNameParts[2];\n      }\n\n      if (type === 'template:components') {\n        name = `components/${name}`;\n        type = 'template';\n      }\n    } else if (fullNameParts.length === 2) {\n      let prefixParts = fullNameParts[0].split(':');\n\n      if (prefixParts.length === 2) {\n        if (prefixParts[1].length === 0) {\n          type = prefixParts[0];\n          name = `@${fullNameParts[1]}`;\n        } else {\n          prefix = prefixParts[1];\n          type = prefixParts[0];\n          name = fullNameParts[1];\n        }\n      } else {\n        let nameParts = fullNameParts[1].split(':');\n\n        prefix = fullNameParts[0];\n        type = nameParts[0];\n        name = nameParts[1];\n      }\n\n      if (type === 'template' && prefix.lastIndexOf('components/', 0) === 0) {\n        name = `components/${name}`;\n        prefix = prefix.slice(11);\n      }\n    } else {\n      fullNameParts = fullName.split(':');\n      type = fullNameParts[0];\n      name = fullNameParts[1];\n    }\n\n    let fullNameWithoutType = name;\n    let namespace = this.namespace;\n    let root = namespace;\n\n    return {\n      parsedName: true,\n      fullName: fullName,\n      prefix: prefix || this.prefix({ type: type }),\n      type: type,\n      fullNameWithoutType: fullNameWithoutType,\n      name: name,\n      root: root,\n      resolveMethodName: 'resolve' + classify(type),\n    };\n  }\n\n  resolveOther(parsedName) {\n    assert('`modulePrefix` must be defined', this.namespace.modulePrefix);\n\n    let normalizedModuleName = this.findModuleName(parsedName);\n\n    if (normalizedModuleName) {\n      let defaultExport = this._extractDefaultExport(\n        normalizedModuleName,\n        parsedName\n      );\n\n      if (defaultExport === undefined) {\n        throw new Error(\n          ` Expected to find: '${parsedName.fullName}' within '${normalizedModuleName}' but got 'undefined'. Did you forget to 'export default' within '${normalizedModuleName}'?`\n        );\n      }\n\n      if (this.shouldWrapInClassFactory(defaultExport, parsedName)) {\n        defaultExport = classFactory(defaultExport);\n      }\n\n      return defaultExport;\n    }\n  }\n\n  normalize(fullName) {\n    return (\n      this._normalizeCache[fullName] ||\n      (this._normalizeCache[fullName] = this._normalize(fullName))\n    );\n  }\n\n  resolve(fullName) {\n    if (fullName === 'resolver:current') {\n      return { create: () => this };\n    }\n    let parsedName = this.parseName(fullName);\n    let resolveMethodName = parsedName.resolveMethodName;\n    let resolved;\n\n    if (typeof this[resolveMethodName] === 'function') {\n      resolved = this[resolveMethodName](parsedName);\n    }\n\n    if (resolved == null) {\n      resolved = this.resolveOther(parsedName);\n    }\n\n    return resolved;\n  }\n\n  addModules(modules) {\n    if (!this._moduleRegistry.addModules) {\n      throw new Error(\n        `addModules is only supported when your Resolver has been configured to use static modules via Resolver.withModules()`\n      );\n    }\n    this._moduleRegistry.addModules(modules);\n  }\n\n  _normalize(fullName) {\n    // A) Convert underscores to dashes\n    // B) Convert camelCase to dash-case, except for components (their\n    //    templates) and helpers where we want to avoid shadowing camelCase\n    //    expressions\n    // C) replace `.` with `/` in order to make nested controllers work in the following cases\n    //      1. `needs: ['posts/post']`\n    //      2. `{{render \"posts/post\"}}`\n    //      3. `this.render('posts/post')` from Route\n\n    let split = fullName.split(':');\n    if (split.length > 1) {\n      let type = split[0];\n\n      if (\n        type === 'component' ||\n        type === 'helper' ||\n        type === 'modifier' ||\n        (type === 'template' && split[1].indexOf('components/') === 0)\n      ) {\n        return type + ':' + split[1].replace(/_/g, '-');\n      } else {\n        return type + ':' + dasherize(split[1].replace(/\\./g, '/'));\n      }\n    } else {\n      return fullName;\n    }\n  }\n\n  pluralize(type) {\n    return (\n      this.pluralizedTypes[type] || (this.pluralizedTypes[type] = type + 's')\n    );\n  }\n\n  podBasedLookupWithPrefix(podPrefix, parsedName) {\n    let fullNameWithoutType = parsedName.fullNameWithoutType;\n\n    if (parsedName.type === 'template') {\n      fullNameWithoutType = fullNameWithoutType.replace(/^components\\//, '');\n    }\n\n    return podPrefix + '/' + fullNameWithoutType + '/' + parsedName.type;\n  }\n\n  podBasedModuleName(parsedName) {\n    let podPrefix =\n      this.namespace.podModulePrefix || this.namespace.modulePrefix;\n\n    return this.podBasedLookupWithPrefix(podPrefix, parsedName);\n  }\n\n  podBasedComponentsInSubdir(parsedName) {\n    let podPrefix =\n      this.namespace.podModulePrefix || this.namespace.modulePrefix;\n    podPrefix = podPrefix + '/components';\n\n    if (\n      parsedName.type === 'component' ||\n      /^components/.test(parsedName.fullNameWithoutType)\n    ) {\n      return this.podBasedLookupWithPrefix(podPrefix, parsedName);\n    }\n  }\n\n  resolveEngine(parsedName) {\n    let engineName = parsedName.fullNameWithoutType;\n    let engineModule = engineName + '/engine';\n\n    if (this._moduleRegistry.has(engineModule)) {\n      return this._extractDefaultExport(engineModule);\n    }\n  }\n\n  resolveRouteMap(parsedName) {\n    let engineName = parsedName.fullNameWithoutType;\n    let engineRoutesModule = engineName + '/routes';\n\n    if (this._moduleRegistry.has(engineRoutesModule)) {\n      let routeMap = this._extractDefaultExport(engineRoutesModule);\n\n      assert(\n        `The route map for ${engineName} should be wrapped by 'buildRoutes' before exporting.`,\n        routeMap.isRouteMap\n      );\n\n      return routeMap;\n    }\n  }\n\n  resolveTemplate(parsedName) {\n    return this.resolveOther(parsedName);\n  }\n\n  mainModuleName(parsedName) {\n    if (parsedName.fullNameWithoutType === 'main') {\n      // if router:main or adapter:main look for a module with just the type first\n      return parsedName.prefix + '/' + parsedName.type;\n    }\n  }\n\n  defaultModuleName(parsedName) {\n    return (\n      parsedName.prefix +\n      '/' +\n      this.pluralize(parsedName.type) +\n      '/' +\n      parsedName.fullNameWithoutType\n    );\n  }\n\n  nestedColocationComponentModuleName(parsedName) {\n    if (parsedName.type === 'component') {\n      return (\n        parsedName.prefix +\n        '/' +\n        this.pluralize(parsedName.type) +\n        '/' +\n        parsedName.fullNameWithoutType +\n        '/index'\n      );\n    }\n  }\n\n  prefix(parsedName) {\n    let tmpPrefix = this.namespace.modulePrefix;\n\n    if (this.namespace[parsedName.type + 'Prefix']) {\n      tmpPrefix = this.namespace[parsedName.type + 'Prefix'];\n    }\n\n    return tmpPrefix;\n  }\n\n  findModuleName(parsedName) {\n    let moduleNameLookupPatterns = this.moduleNameLookupPatterns;\n    let moduleName;\n\n    for (\n      let index = 0, length = moduleNameLookupPatterns.length;\n      index < length;\n      index++\n    ) {\n      let item = moduleNameLookupPatterns[index];\n\n      let tmpModuleName = item.call(this, parsedName);\n\n      // allow treat all dashed and all underscored as the same thing\n      // supports components with dashes and other stuff with underscores.\n      if (tmpModuleName) {\n        tmpModuleName = this.chooseModuleName(tmpModuleName);\n      }\n\n      if (tmpModuleName && this._moduleRegistry.has(tmpModuleName)) {\n        moduleName = tmpModuleName;\n      }\n\n      if (moduleName) {\n        return moduleName;\n      }\n    }\n  }\n\n  chooseModuleName(moduleName) {\n    let underscoredModuleName = underscore(moduleName);\n\n    if (\n      moduleName !== underscoredModuleName &&\n      this._moduleRegistry.has(moduleName) &&\n      this._moduleRegistry.has(underscoredModuleName)\n    ) {\n      throw new TypeError(\n        `Ambiguous module names: '${moduleName}' and '${underscoredModuleName}'`\n      );\n    }\n\n    if (this._moduleRegistry.has(moduleName)) {\n      return moduleName;\n    } else if (this._moduleRegistry.has(underscoredModuleName)) {\n      return underscoredModuleName;\n    }\n  }\n\n  knownForType(type) {\n    let moduleKeys = this._moduleRegistry.moduleNames();\n\n    let items = Object.create(null);\n    for (let index = 0, length = moduleKeys.length; index < length; index++) {\n      let moduleName = moduleKeys[index];\n      let fullname = this.translateToContainerFullname(type, moduleName);\n\n      if (fullname) {\n        items[fullname] = true;\n      }\n    }\n\n    return items;\n  }\n\n  translateToContainerFullname(type, moduleName) {\n    let prefix = this.prefix({ type });\n\n    // Note: using string manipulation here rather than regexes for better performance.\n    // pod modules\n    // '^' + prefix + '/(.+)/' + type + '$'\n    let podPrefix = prefix + '/';\n    let podSuffix = '/' + type;\n    let start = moduleName.indexOf(podPrefix);\n    let end = moduleName.indexOf(podSuffix);\n\n    if (\n      start === 0 &&\n      end === moduleName.length - podSuffix.length &&\n      moduleName.length > podPrefix.length + podSuffix.length\n    ) {\n      return type + ':' + moduleName.slice(start + podPrefix.length, end);\n    }\n\n    // non-pod modules\n    // '^' + prefix + '/' + pluralizedType + '/(.+)$'\n    let pluralizedType = this.pluralize(type);\n    let nonPodPrefix = prefix + '/' + pluralizedType + '/';\n\n    if (\n      moduleName.indexOf(nonPodPrefix) === 0 &&\n      moduleName.length > nonPodPrefix.length\n    ) {\n      return type + ':' + moduleName.slice(nonPodPrefix.length);\n    }\n  }\n\n  _extractDefaultExport(normalizedModuleName) {\n    let module = this._moduleRegistry.get(\n      normalizedModuleName,\n      null,\n      null,\n      true /* force sync */\n    );\n\n    if (module && module['default']) {\n      module = module['default'];\n    }\n\n    return module;\n  }\n}\n\nfunction assert(message, check) {\n  if (!check) {\n    throw new Error(message);\n  }\n}\n","export default function classFactory(klass) {\n  return {\n    create(injections) {\n      if (typeof klass.extend === 'function') {\n        return klass.extend(injections);\n      } else {\n        return klass;\n      }\n    },\n  };\n}\n","/* global FastBoot */\n\nimport { get } from '@ember/object';\nimport { Promise, resolve } from 'rsvp';\nimport { isEmpty } from '@ember/utils';\nimport { cancel, later } from '@ember/runloop';\nimport TokenAuthenticator from './token.js';\n\nconst decode = str => {\n  if (typeof atob === 'function') {\n    return atob(str);\n  } else if (typeof FastBoot === 'object') {\n    try {\n      const buffer = FastBoot.require('buffer');\n      return buffer.Buffer.from(str, 'base64').toString('utf-8');\n    } catch (err) {\n      throw new Error('buffer must be available for decoding base64 strings in FastBoot. Make sure to add buffer to your fastbootDependencies.');\n    }\n  } else {\n    throw new Error('Neither atob nor the FastBoot global are avaialble. Unable to decode base64 strings.');\n  }\n};\n\n/**\n  JWT (JSON Web Token) Authenticator that supports automatic token refresh.\n\n  Inspired by [ember-simple-auth-oauth2](https://github.com/simplabs/ember-simple-auth/tree/master/packages/ember-simple-auth-oauth2)\n\n  The factory for this authenticator is registered as 'authenticator:jwt` in Ember's container.\n\n  @class JWT\n  @namespace SimpleAuth.Authenticators\n  @module ember-simple-auth-token/authenticators/jwt\n  @extends TokenAuthenticator\n*/\nexport default class JwtAuthenticator extends TokenAuthenticator {\n  /**\n    @method constructor\n  */\n  constructor() {\n    super(...arguments);\n    const ownerProperty = Reflect.ownKeys(this).find(prop => {\n      return String(prop) === 'Symbol(OWNER)';\n    });\n    const owner = this[ownerProperty];\n    const environment = owner ? owner.resolveRegistration('config:environment') || {} : {};\n    const config = environment['ember-simple-auth-token'] || {};\n    this.tokenDataPropertyName = config.tokenDataPropertyName || 'tokenData';\n    this.refreshAccessTokens = config.refreshAccessTokens === false ? false : true;\n    this.tokenExpirationInvalidateSession = config.tokenExpirationInvalidateSession === false ? false : true;\n    this.serverTokenRefreshEndpoint = config.serverTokenRefreshEndpoint || '/api/token-refresh/';\n    this.refreshTokenPropertyName = config.refreshTokenPropertyName || 'refresh_token';\n    this.tokenExpireName = config.tokenExpireName || 'exp';\n    this.refreshLeeway = config.refreshLeeway || 0;\n    this.tokenRefreshInvalidateSessionResponseCodes = config.tokenRefreshInvalidateSessionResponseCodes || [401, 403];\n    this.refreshAccessTokenRetryAttempts = config.refreshAccessTokenRetryAttempts || 0;\n    this.refreshAccessTokenRetryTimeout = config.refreshAccessTokenRetryTimeout || 1000;\n    this.tokenRefreshFailInvalidateSession = config.tokenRefreshFailInvalidateSession === true ? true : false;\n    this.disableScheduleAccessTokenExpiration = config.disableScheduleAccessTokenExpiration === true ? true : false;\n  }\n\n  /**\n    Restores the session from a set of session properties.\n\n    It will return a resolving promise if one of two conditions is met:\n\n    1) Both `data.token` and `data.expiresAt` are non-empty and `expiresAt` is greater than the calculated `now`.\n    2) If `data.token` is non-empty and the decoded token has a key for `tokenExpireName`.\n\n    If `refreshAccessTokens` is true, `scheduleAccessTokenRefresh` will be called and an automatic token refresh will be initiated.\n\n    @method restore\n    @param {Object} data Data to restore the session from\n    @return {Promise} Promise that when it resolves results in the session being authenticated\n  */\n  restore(data) {\n    const dataObject = {\n      ...data\n    };\n\n    return new Promise((resolve, reject) => {\n      const now = this.getCurrentTime();\n      const token = get(dataObject, this.tokenPropertyName);\n      const refreshToken = get(dataObject, this.refreshTokenPropertyName);\n      let expiresAt = get(dataObject, this.tokenExpireName);\n\n      if (isEmpty(token)) {\n        return reject(new Error('empty token'));\n      }\n      if (isEmpty(expiresAt)) {\n        // Fetch the expire time from the token data since `expiresAt` wasn't included in the data object that was passed in.\n        const tokenData = this.getTokenData(token);\n        expiresAt = tokenData[this.tokenExpireName];\n        if (isEmpty(expiresAt)) {\n          return resolve(data);\n        }\n      }\n      if (expiresAt > now) {\n        const wait = ((expiresAt - now - this.refreshLeeway) * 1000);\n\n        if (this.tokenExpirationInvalidateSession) {\n          this.scheduleAccessTokenExpiration(expiresAt);\n        }\n\n        if (wait > 0) {\n          if (this.refreshAccessTokens) {\n            this.scheduleAccessTokenRefresh(expiresAt, refreshToken);\n          }\n          return resolve(data);\n        } else if (this.refreshAccessTokens) {\n          return resolve(this.refreshAccessToken(refreshToken, 0));\n        } else {\n          return reject(new Error('unable to refresh token'));\n        }\n      } else {\n        // The refresh token might not be expired, we can't test this on the client so attempt to refresh the token. If the server rejects the token the user session will be invalidated\n        if (this.refreshAccessTokens) {\n          return resolve(this.refreshAccessToken(refreshToken, 0));\n        } else {\n          return reject(new Error('token is expired'));\n        }\n      }\n    });\n  }\n\n  /**\n    Authenticates the session with the specified `credentials`.\n\n    It will return a resolving promise if it successfully posts a request to the `JWT.serverTokenEndpoint` with the valid credentials.\n\n    An automatic token refresh will be scheduled with the new expiration date from the returned refresh token. That expiration will be merged with the response and the promise resolved.\n\n    @method authenticate\n    @param {Object} credentials Credentials to authenticate the session with\n    @param {Object} headers Headers to send with the authentication request\n    @return {Promise} Promise that resolves when an auth token is successfully acquired from the server and rejects otherwise\n  */\n  authenticate(credentials, headers) {\n    return this.makeRequest(this.serverTokenEndpoint, credentials, {...this.headers, ...headers}).then(response => {\n      return this.handleAuthResponse(response.json);\n    });\n  }\n\n  /**\n    Schedules a token refresh request to be sent to the backend after a calculated `wait` time has passed.\n\n    If both `token` and `expiresAt` are non-empty, and `expiresAt` minus the optional refres leeway is greater than the calculated `now`, the token refresh will be scheduled through later.\n\n    @method scheduleAccessTokenRefresh\n    @param {Integer} expiresAt Timestamp when the token expires\n    @param {String} refreshToken Refresh token\n  */\n  scheduleAccessTokenRefresh(expiresAt, refreshToken) {\n    if (this.refreshAccessTokens) {\n      const now = this.getCurrentTime();\n      const wait = (expiresAt - now - this.refreshLeeway) * 1000\n      if (!isEmpty(refreshToken) && !isEmpty(expiresAt)) {\n        if (wait > 0) {\n          cancel(this._refreshTokenTimeout);\n          delete this._refreshTokenTimeout;\n          this._refreshTokenTimeout = later(this, this.refreshAccessToken, refreshToken, 0, wait);\n        } else if (expiresAt > now) {\n          throw new Error('refreshLeeway is too large which is preventing token refresh.');\n        }\n      }\n    }\n  }\n\n  /**\n    Makes a refresh token request to grab a new authenticated JWT token from the server.\n\n    It will return a resolving promise if a successful POST is made to the `JWT.serverTokenRefreshEndpoint`.\n\n    After the new token is obtained it will schedule the next automatic token refresh based on the new `expiresAt` time.\n\n    The session will be updated via the trigger `sessionDataUpdated`.\n\n    @method refreshAccessToken\n    @param {String} refreshToken Refresh token\n    @param {Integer} attempts Number of attempts that have been made so far\n    @return {Promise} Promise that resolves when an auth token is successfully acquired from the server and rejects otherwise\n  */\n  refreshAccessToken(refreshToken, attempts) {\n    const data = this.makeRefreshData(refreshToken);\n    return this.makeRequest(this.serverTokenRefreshEndpoint, data, this.headers).then(response => {\n      const sessionData = this.handleAuthResponse(response.json);\n      this.trigger('sessionDataUpdated', sessionData);\n      return sessionData;\n    }).catch(error => {\n      this.handleTokenRefreshFail(error.status, refreshToken, attempts);\n      return Promise.reject(error);\n    });\n  }\n\n  /**\n    Returns a nested object with the token property name.\n    Example:  If `refreshTokenPropertyName` is \"data.user.refreshToken\", `makeRefreshData` will return {data: {user: {refreshToken: \"token goes here\"}}}\n\n    @method makeRefreshData\n    @param {String} refreshToken Refresh token\n    @return {object} Object with the nested property name.\n  */\n  makeRefreshData(refreshToken) {\n    const data = {};\n    const nestings = this.refreshTokenPropertyName.split('.');\n    const refreshTokenPropertyName = nestings.pop();\n    let lastObject = data;\n    nestings.forEach(nesting => {\n      lastObject[nesting] = {};\n      lastObject = lastObject[nesting];\n    });\n\n    lastObject[refreshTokenPropertyName] = refreshToken;\n    return data;\n  }\n\n  /**\n    Returns the decoded token with accessible returned values.\n\n    @method getTokenData\n    @param {String} token Token\n    @return {object} Object with properties for the session.\n  */\n  getTokenData(token) {\n    const payload = token.split('.')[1];\n    const decodedPayload = decode(payload.replace(/-/g, '+').replace(/_/g, '/'));\n    const tokenData = decodeURIComponent(window.escape(decodedPayload));\n\n    try {\n      return JSON.parse(tokenData);\n    } catch (error) {\n      return tokenData;\n    }\n  }\n\n  /**\n    Cancels any outstanding automatic token refreshes and returns a resolving promise.\n\n    @method invalidate\n    @return {Promise} Resolving promise\n  */\n  invalidate() {\n    cancel(this._refreshTokenTimeout);\n    delete this._refreshTokenTimeout;\n    cancel(this._tokenExpirationTimeout);\n    delete this._tokenExpirationTimeout;\n    return resolve();\n  }\n\n  /**\n    Returns the current time as a timestamp in seconds\n\n    @method getCurrentTime\n    @return {Integer} timestamp\n  */\n  getCurrentTime() {\n    return Math.floor((new Date()).getTime() / 1000);\n  }\n\n  /**\n    Handles authentication response from server, and returns session data\n\n    @method handleAuthResponse\n    @param {Object} response Response body\n  */\n  handleAuthResponse(response) {\n    const token = get(response, this.tokenPropertyName);\n    if (isEmpty(token)) {\n      throw new Error('Token is empty. Please check your backend response.');\n    }\n\n    const tokenData = this.getTokenData(token);\n    const expiresAt = tokenData[this.tokenExpireName];\n    const tokenExpireData = {};\n    tokenExpireData[this.tokenExpireName] = expiresAt;\n\n    if (this.tokenExpirationInvalidateSession) {\n      this.scheduleAccessTokenExpiration(expiresAt);\n    }\n\n    if (this.refreshAccessTokens) {\n      const refreshToken = get(response, this.refreshTokenPropertyName);\n\n      if (isEmpty(refreshToken)) {\n        throw new Error('Refresh token is empty. Please check your backend response.');\n      }\n\n      this.scheduleAccessTokenRefresh(expiresAt, refreshToken);\n    }\n\n    return {...response, ...tokenExpireData, [this.tokenDataPropertyName]: tokenData};\n  }\n\n  /**\n    Handles token refresh fail status. If the server response to a token refresh has a status of 401 or 403 then the token in the session will be invalidated and the sessionInvalidated provided by ember-simple-auth will be triggered.\n\n    @method handleTokenRefreshFail\n    @param {Integer} refreshStatusCode Status code received when attempting to refresh token\n    @param {String} refreshToken Refresh token\n    @param {Integer} attempts Number of attempts that have been made so far\n  */\n  handleTokenRefreshFail(refreshStatusCode, refreshToken, attempts) {\n    if (this.tokenRefreshInvalidateSessionResponseCodes.includes(refreshStatusCode)) {\n      return this.invalidate().then(() => {\n        this.trigger('sessionDataInvalidated');\n      });\n    } else if (attempts++ < this.refreshAccessTokenRetryAttempts) {\n      cancel(this._refreshTokenTimeout);\n      delete this._refreshTokenTimeout;\n      this._refreshTokenTimeout = later(this, this.refreshAccessToken, refreshToken, attempts, this.refreshAccessTokenRetryTimeout);\n    } else if (this.tokenRefreshFailInvalidateSession) {\n      return this.invalidate().then(() => {\n        this.trigger('sessionDataInvalidated');\n      });\n    }\n  }\n\n  /**\n    Schedules session invalidation at the time token expires.\n\n    @method scheduleAccessTokenExpiration\n    @param {Integer} expiresAt Timestamp when the token expires\n  */\n  scheduleAccessTokenExpiration(expiresAt) {\n    if (this.disableScheduleAccessTokenExpiration) {\n      return false;\n    }\n    const now = this.getCurrentTime();\n    const wait = Math.max((expiresAt - now) * 1000, 0);\n    if (!isEmpty(expiresAt)) {\n      cancel(this._tokenExpirationTimeout);\n      delete this._tokenExpirationTimeout;\n      this._tokenExpirationTimeout = later(this, this.handleAccessTokenExpiration, wait);\n    }\n  }\n\n  /**\n    Handles access token expiration\n\n    @method handleAccessTokenExpiration\n  */\n  handleAccessTokenExpiration() {\n    return this.invalidate().then(() => {\n      this.trigger('sessionDataInvalidated');\n    });\n  }\n\n  /**\n    For testing purposes; qunit tests will not resolve if any timers are running\n\n    @method cancelAllTimers\n  */\n  cancelAllTimers() {\n    cancel(this._tokenExpirationTimeout);\n    cancel(this._refreshTokenTimeout);\n    delete this._tokenExpirationTimeout;\n    delete this._refreshTokenTimeout;\n  }\n}\n","import { Promise, reject, resolve } from 'rsvp';\nimport { isEmpty } from '@ember/utils';\nimport Base from 'ember-simple-auth/authenticators/base';\n\n/**\n  Authenticator that works with token-based authentication like JWT.\n\n  _The factory for this authenticator is registered as `'authenticator:token'` in Ember's container._\n\n  @class Token\n  @namespace SimpleAuth.Authenticators\n  @module ember-simple-auth-token/authenticators/token\n  @extends Base\n*/\nexport default class Token extends Base {\n  /**\n    @method constructor\n  */\n  constructor() {\n    super(...arguments);\n    const ownerProperty = Reflect.ownKeys(this).find(prop => {\n      return String(prop) === 'Symbol(OWNER)';\n    });\n    const owner = this[ownerProperty];\n    const environment = owner ? owner.resolveRegistration('config:environment') || {} : {};\n    const config = environment['ember-simple-auth-token'] || {};\n    this.serverTokenEndpoint = config.serverTokenEndpoint || '/api/token-auth/';\n    this.tokenPropertyName = config.tokenPropertyName || 'token';\n    this.headers = config.headers || {};\n  }\n\n  /**\n    Restores the session from a set of session properties; __will return a resolving promise when there's a non-empty `token` in the `properties`__ and a rejecting promise otherwise.\n\n    @method restore\n    @param {Object} properties Properties to restore the session from\n    @return {Promise} Promise that when it resolves results in the session being authenticated\n  */\n  restore(properties) {\n    return new Promise((resolve, reject) => {\n      if (!isEmpty(properties[this.tokenPropertyName])) {\n        return resolve(properties);\n      } else {\n        return reject();\n      }\n    });\n  }\n\n  /**\n    Authenticates the session with the specified `credentials`; the credentials are `POST`ed to the [`Authenticators.Token#serverTokenEndpoint`](#SimpleAuth-Authenticators-Token-serverTokenEndpoint) and if they are valid the server returns an auth token in response. __If the credentials are valid and authentication succeeds, a promise that resolves with the server's response is returned__, otherwise a promise that rejects with the server error is returned.\n\n    @method authenticate\n    @param {Object} credentials Credentials to authenticate the session with\n    @param {Object} headers Headers to send with the authentication request\n    @return {Promise} Promise that resolves when an auth token is successfully acquired from the server and rejects otherwise\n  */\n  authenticate(credentials, headers) {\n    return this.makeRequest(this.serverTokenEndpoint, credentials, {...this.headers, ...headers}).then(response => {\n      return response.json;\n    });\n  }\n\n  /**\n    Does nothing\n\n    @method invalidate\n    @return {Promise} Resolving promise\n  */\n  invalidate() {\n    return resolve();\n  }\n\n  /**\n    @method makeRequest\n    @param {String} url Server endpoint\n    @param {Object} data Object that will be sent to server\n    @param {Object} headers Additional headers that will be sent to server\n    @return {Promise} Promise that resolves when the request is successfully and rejects otherwise\n  */\n  makeRequest(url, data, headers) {\n    let headerObject = null;\n    if (headers && Object.keys(headers).length) {\n      headerObject = {\n        'Accept': 'application/json',\n        'Content-Type': 'application/json',\n        ...headers\n      }\n    } else {\n      headerObject = {\n        'Accept': 'application/json',\n        'Content-Type': 'application/json'\n      }\n    }\n    return fetch(url, {\n      method: 'POST',\n      headers: headerObject,\n      body: JSON.stringify(data)\n    }).then(response => {\n      const res = {\n        statusText: response.statusText,\n        status: response.status,\n        headers: response.headers\n      };\n      return response.text().then(text => {\n        res.text = text;\n        try {\n          res.json = JSON.parse(text);\n        } catch (e) {\n          return reject(res);\n        }\n\n        if (response.ok) {\n          return res;\n        } else {\n          return reject(res);\n        }\n      }).catch(() => {\n        return reject(res);\n      });\n    });\n  }\n}\n","import EmberObject from '@ember/object';\nimport EsaEventTarget, { type EventListener } from '../-internals/event-target';\n\nexport interface AuthenticatorEvents {\n  sessionDataUpdated: CustomEvent<any>;\n  sessionDataInvalidated: CustomEvent;\n}\n\nclass AuthenticatorEventTarget extends EsaEventTarget<AuthenticatorEvents> {}\n\n/**\n  The base class for all authenticators. __This serves as a starting point for\n  implementing custom authenticators and must not be used directly.__\n\n  The authenticator authenticates the session. The actual mechanism used to do\n  this might, e.g., post a set of credentials to a server and in exchange\n  retrieve an access token, initiating authentication against an external\n  provider like Facebook, etc. The details depend on the specific authenticator.\n  Upon successful authentication, any data that the authenticator receives and\n  resolves via the promise returned from the\n  {@linkplain BaseAuthenticator.authenticate}\n  method is stored in the session's {@linkplain SessionService.data}.\n\n  The authenticator also decides whether a set of data that was restored from\n  the session store (see {@linkplain BaseStore.restore}) makes up an\n  authenticated session or not.\n\n  __Authenticators for an application are defined in the `app/authenticators`\n  directory__, e.g.:\n\n  ```js\n  // app/authenticators/oauth2.js\n  import OAuth2PasswordGrantAuthenticator from 'ember-simple-auth/authenticators/oauth2-password-grant';\n\n  export default class OAuth2Authenticator extends OAuth2PasswordGrantAuthenticator {\n    ...\n  }\n  ```\n\n  and can then be used via the name Ember CLI automatically registers for them\n  within the Ember container.\n\n  ```js\n  // app/components/login-form.js\n  import Component from '@ember/component';\n  import { service } from '@ember/service';\n  import { action } from '@ember/object';\n\n  export default class LoginFormComponent extends Component {\n    &#64;service session;\n\n    &#64;action\n    authenticate() {\n      this.session.authenticate('authenticator:oauth2');\n    }\n  }\n  ```\n\n  @class BaseAuthenticator\n  @extends Ember.Object\n  @public\n*/\nexport default class EsaBaseAuthenticator extends EmberObject {\n  authenticatorEvents = new AuthenticatorEventTarget();\n\n  /**\n    __Triggered when the authentication data is updated by the authenticator\n    due to an external or scheduled event__. This might happen, e.g., if the\n    authenticator refreshes an expired token or an event is triggered from an\n    external authentication provider that the authenticator uses. The session\n    handles that event, passes the updated data back to the authenticator's\n    {@linkplain BaseAuthenticator.restore}\n    method and handles the result of that invocation accordingly.\n\n    @memberof BaseAuthenticator\n    @event sessionDataUpdated\n    @param {Object} data The updated session data\n    @public\n  */\n\n  /**\n    __Triggered when the authentication data is invalidated by the authenticator\n    due to an external or scheduled event__. This might happen, e.g., if a token\n    expires or an event is triggered from an external authentication provider\n    that the authenticator uses. The session handles the event and will\n    invalidate itself when it is triggered.\n\n    @memberof BaseAuthenticator\n    @event sessionDataInvalidated\n    @public\n  */\n\n  /**\n    Restores the session from a session data object. __This method is invoked\n    by the session either on application startup if session data is restored\n    from the session store__ or when properties in the store change due to\n    external events (e.g. in another tab) and the new session data needs to be\n    validated for whether it constitutes an authenticated session.\n\n    __This method returns a promise. A resolving promise results in the session\n    becoming or remaining authenticated.__ Any data the promise resolves with\n    will be saved in and accessible via the session service's\n    `data.authenticated` property (see\n    {@linkplain SessionService.data}. A rejecting\n    promise indicates that `data` does not constitute a valid session and will\n    result in the session being invalidated or remaining unauthenticated.\n\n    The `BaseAuthenticator`'s implementation always returns a rejecting\n    promise. __This method must be overridden in subclasses.__\n\n    @memberof BaseAuthenticator\n    @method restore\n    @param {Object} data The data to restore the session from\n    @return {Promise} A promise that when it resolves results in the session becoming or remaining authenticated\n    @member\n    @public\n  */\n  restore(..._args: any[]): Promise<unknown> {\n    return Promise.reject();\n  }\n\n  /**\n    Authenticates the session with the specified `args`. These options vary\n    depending on the actual authentication mechanism the authenticator\n    implements (e.g. a set of credentials or a Facebook account id etc.). __The\n    session will invoke this method in order to authenticate itself__ (see\n    {@linkplain SessionService.authenticate}).\n\n    __This method returns a promise. A resolving promise will result in the\n    session becoming authenticated.__ Any data the promise resolves with will\n    be saved in and accessible via the session service's `data.authenticated`\n    property (see {@linkplain SessionService.data}).\n    A rejecting promise indicates that authentication failed and will result in\n    the session remaining unauthenticated.\n\n    The `BaseAuthenticator`'s implementation always returns a rejecting promise\n    and thus never authenticates the session. __This method must be overridden\n    in subclasses__.\n\n    @memberof BaseAuthenticator\n    @method authenticate\n    @param {Any} [...args] The arguments that the authenticator requires to authenticate the session\n    @return {Promise} A promise that when it resolves results in the session becoming authenticated\n    @member\n    @public\n  */\n  authenticate(..._args: any[]): Promise<unknown> {\n    return Promise.reject();\n  }\n\n  /**\n    This method is invoked as a callback when the session is invalidated. While\n    the session will invalidate itself and clear all authenticated session data,\n    it might be necessary for some authenticators to perform additional tasks\n    (e.g. invalidating an access token on the server side).\n    This method returns a promise. A resolving promise will result in the\n    session becoming unauthenticated.__ A rejecting promise will result in\n    invalidation being intercepted and the session remaining authenticated.\n    The `BaseAuthenticator`'s implementation always returns a resolving promise\n    and thus never intercepts session invalidation. __This method doesn't have\n    to be overridden in custom authenticators if no actions need to be\n    performed on session invalidation.\n\n    @memberof BaseAuthenticator\n    @method invalidate\n    @param {Object} data The current authenticated session data\n    @param {Array} ...args additional arguments as required by the authenticator\n    @return {Promise} A promise that when it resolves results in the session being invalidated\n    @member\n    @public\n  */\n  invalidate(..._args: any[]): Promise<unknown> {\n    return Promise.resolve();\n  }\n\n  on<Event extends keyof AuthenticatorEvents>(\n    event: Event,\n    cb: EventListener<AuthenticatorEvents, Event>\n  ) {\n    this.authenticatorEvents.addEventListener(event, cb as any);\n  }\n\n  off<Event extends keyof AuthenticatorEvents>(\n    event: Event,\n    cb: EventListener<AuthenticatorEvents, Event>\n  ) {\n    this.authenticatorEvents.removeEventListener(event, cb as any);\n  }\n\n  trigger<Event extends keyof AuthenticatorEvents>(\n    event: Event,\n    value: AuthenticatorEvents[Event]['detail']\n  ) {\n    this.authenticatorEvents.dispatchEvent(event, value);\n  }\n}\n","const DEFAULTS = {\n  rootURL: '',\n  routeAfterAuthentication: 'index',\n};\n\n/**\n  Ember Simple Auth's configuration object.\n\n  @class Configuration\n  @extends Object\n  @public\n*/\nexport default {\n  /**\n    The root URL of the application as configured in `config/environment.js`.\n    @memberof Configuration\n    @property rootURL\n    @readOnly\n    @static\n    @type String\n    @default ''\n    @public\n  */\n  rootURL: DEFAULTS.rootURL,\n\n  /**\n    The route to transition to after successful authentication.\n\n    @memberof Configuration\n    @property routeAfterAuthentication\n    @readOnly\n    @static\n    @type String\n    @default 'index'\n    @public\n  */\n  routeAfterAuthentication: DEFAULTS.routeAfterAuthentication,\n\n  load(config) {\n    this.rootURL = config.rootURL !== undefined ? config.rootURL : DEFAULTS.rootURL;\n    this.routeAfterAuthentication =\n      config.routeAfterAuthentication !== undefined\n        ? config.routeAfterAuthentication\n        : DEFAULTS.routeAfterAuthentication;\n  },\n};\n","import EmberObject from '@ember/object';\nimport Evented from '@ember/object/evented';\n\nexport type EventListener<Events, Event extends keyof Events> = (event: Events[Event]) => void;\n\ntype ValueIsEvent<T> = {\n  [key in keyof T]: CustomEvent;\n};\n\n/**\n * This module exists to act as a 'shim' between Native EventTarget API, which unfortunately can't be used due to Fastboot's node environment not providing it.\n *\n * It more-or-less implements the same API as an EventTarget would have but on top of Evented mixin instead.\n */\nexport default class EsaEventTarget<Events extends ValueIsEvent<Events>> extends EmberObject.extend(\n  Evented\n) {\n  addEventListener<Event extends keyof Events & string>(\n    event: Event,\n    cb: EventListener<Events, Event>\n  ) {\n    (this as any).on(event, cb);\n  }\n\n  removeEventListener<Event extends keyof Events & string>(\n    event: Event,\n    cb: EventListener<Events, Event>\n  ) {\n    (this as any).off(event, cb);\n  }\n\n  dispatchEvent<Event extends keyof Events & string>(event: Event, value: Events[Event]['detail']) {\n    // let customEvent: CustomEvent;\n    // if (value) {\n    //   customEvent = new CustomEvent(event, { detail: value });\n    // } else {\n    //   customEvent = new CustomEvent(event);\n    // }\n\n    (this as any).trigger(event, { detail: value });\n  }\n}\n","import BaseStore from './base';\n\n/**\n  Session store that __persists data in memory and thus is not actually\n  persistent__. It does also not synchronize the session's state across\n  multiple tabs or windows as those cannot share memory. __This store is mainly\n  useful for testing and will automatically be used when running tests.__\n\n  @class EphemeralStore\n  @extends BaseStore\n  @public\n*/\nexport default class EphemeralStore extends BaseStore {\n  _data = '{}';\n\n  constructor(owner: any) {\n    super(owner);\n\n    this.clear();\n  }\n\n  /**\n    Persists `data`. This replaces all currently stored data.\n\n    @memberof EpemeralStore\n    @method persist\n    @param {Object} data The data to persist\n    @return {Promise} A promise that resolves when the data has successfully been persisted and rejects otherwise.\n    @public\n  */\n  persist(data: Record<string, string>) {\n    this._data = JSON.stringify(data || {});\n\n    return Promise.resolve();\n  }\n\n  /**\n    Returns all data currently stored as a plain object.\n\n    @memberof EpemeralStore\n    @method restore\n    @return {Promise} A promise that resolves with the data currently persisted in the store when the data has been restored successfully and rejects otherwise.\n    @public\n  */\n  restore() {\n    const data = JSON.parse(this._data || '{}');\n\n    return Promise.resolve(data);\n  }\n\n  /**\n    Clears the store.\n\n    @memberof EpemeralStore\n    @method clear\n    @return {Promise} A promise that resolves when the store has been cleared successfully and rejects otherwise.\n    @public\n  */\n  clear() {\n    this._data = '{}';\n\n    return Promise.resolve();\n  }\n\n  setRedirectTarget() {\n    // noop\n  }\n  getRedirectTarget() {\n    return null;\n  }\n  clearRedirectTarget() {\n    return null;\n  }\n}\n","import { isEmpty, isNone } from '@ember/utils';\nimport ObjectProxy from '@ember/object/proxy';\nimport { action, set } from '@ember/object';\nimport { debug, assert } from '@ember/debug';\nimport { getOwner, setOwner } from '@ember/application';\nimport { isTesting } from '@embroider/macros';\nimport EsaEventTarget from './-internals/event-target';\n\nclass SessionEventTarget extends EsaEventTarget {}\n\n/**\n  __An internal implementation of Session. Communicates with stores and emits events.__\n\n  @class InternalSession\n  @extends ObjectProxy\n  @private\n*/\n\nexport default ObjectProxy.extend({\n  /**\n    Triggered whenever the session is successfully authenticated. This happens\n    when the session gets authenticated via\n    {@linkplain SessionService.authenticate} but also\n    when the session is authenticated in another tab or window of the same\n    application and the session state gets synchronized across tabs or windows\n    via the store (see\n    {@linkplain BaseStore.sessionDataUpdated}).\n\n    @memberof InternalSession\n    @event authenticationSucceeded\n    @private\n  */\n\n  /**\n    Triggered whenever the session is successfully invalidated. This happens\n    when the session gets invalidated via\n    {@linkplain SessionService.invalidate} but also\n    when the session is invalidated in another tab or window of the same\n    application and the session state gets synchronized across tabs or windows\n    via the store (see\n    {@linkplain BaseStore.sessionDataUpdated}.\n\n    @memberof InternalSession\n    @event invalidationSucceeded\n    @private\n  */\n  authenticator: null,\n  store: null,\n  isAuthenticated: false,\n  attemptedTransition: null,\n  sessionEvents: null,\n  redirectTarget: null,\n\n  init() {\n    this._super(...arguments);\n    this.set('content', { authenticated: {} });\n    let storeFactory = 'session-store:application';\n    if (isTesting()) {\n      storeFactory = 'session-store:test';\n    }\n\n    this.sessionEvents = new SessionEventTarget();\n    this.set('store', getOwner(this).lookup(storeFactory));\n    this._busy = false;\n    this._bindToStoreEvents();\n  },\n\n  authenticate(authenticatorFactory, ...args) {\n    this._busy = true;\n    assert(\n      `Session#authenticate requires the authenticator to be specified, was \"${authenticatorFactory}\"!`,\n      !isEmpty(authenticatorFactory)\n    );\n    const authenticator = this._lookupAuthenticator(authenticatorFactory);\n\n    return authenticator.authenticate(...args).then(\n      content => {\n        this._busy = false;\n        return this._setup(authenticatorFactory, content, true);\n      },\n      error => {\n        const rejectWithError = () => Promise.reject(error);\n\n        this._busy = false;\n        return this._clear().then(rejectWithError, rejectWithError);\n      }\n    );\n  },\n\n  invalidate() {\n    this._busy = true;\n    this.set('attemptedTransition', null);\n\n    if (!this.get('isAuthenticated')) {\n      this._busy = false;\n      return Promise.resolve();\n    }\n\n    let authenticator = this._lookupAuthenticator(this.authenticator);\n    return authenticator.invalidate(this.content.authenticated, ...arguments).then(\n      () => {\n        authenticator.off('sessionDataUpdated', this._onSessionDataUpdated);\n        this._busy = false;\n        return this._clear(true);\n      },\n      error => {\n        this.trigger('sessionInvalidationFailed', error);\n        this._busy = false;\n        return Promise.reject(error);\n      }\n    );\n  },\n\n  restore() {\n    this._busy = true;\n    const reject = () => Promise.reject();\n\n    return this.store.restore().then(\n      restoredContent => {\n        let { authenticator: authenticatorFactory } = restoredContent.authenticated || {};\n        if (authenticatorFactory) {\n          delete restoredContent.authenticated.authenticator;\n          const authenticator = this._lookupAuthenticator(authenticatorFactory);\n          return authenticator.restore(restoredContent.authenticated).then(\n            content => {\n              this.set('content', restoredContent);\n              this._busy = false;\n              return this._setup(authenticatorFactory, content);\n            },\n            err => {\n              debug(\n                `The authenticator \"${authenticatorFactory}\" rejected to restore the session - invalidating…`\n              );\n              if (err) {\n                debug(err);\n              }\n              this._busy = false;\n              return this._clearWithContent(restoredContent).then(reject, reject);\n            }\n          );\n        } else {\n          delete (restoredContent || {}).authenticated;\n          this._busy = false;\n          return this._clearWithContent(restoredContent).then(reject, reject);\n        }\n      },\n      () => {\n        this._busy = false;\n        return this._clear().then(reject, reject);\n      }\n    );\n  },\n\n  _setup(authenticator, authenticatedContent, trigger) {\n    trigger = Boolean(trigger) && !this.get('isAuthenticated');\n    this.setProperties({\n      isAuthenticated: true,\n      authenticator,\n      'content.authenticated': authenticatedContent,\n    });\n    this._bindToAuthenticatorEvents();\n\n    return this._updateStore().then(\n      () => {\n        if (trigger) {\n          this.trigger('authenticationSucceeded');\n        }\n      },\n      () => {\n        this.setProperties({\n          isAuthenticated: false,\n          authenticator: null,\n          'content.authenticated': {},\n        });\n      }\n    );\n  },\n\n  _clear(trigger) {\n    trigger = Boolean(trigger) && this.get('isAuthenticated');\n    this.setProperties({\n      isAuthenticated: false,\n      authenticator: null,\n      'content.authenticated': {},\n    });\n\n    return this._updateStore().then(() => {\n      if (trigger) {\n        this.trigger('invalidationSucceeded');\n      }\n    });\n  },\n\n  _clearWithContent(content, trigger) {\n    this.set('content', content);\n    return this._clear(trigger);\n  },\n\n  setUnknownProperty(key, value) {\n    assert('\"authenticated\" is a reserved key used by Ember Simple Auth!', key !== 'authenticated');\n    let result = this._super(key, value);\n    if (!/^_/.test(key)) {\n      this._updateStore();\n    }\n    return result;\n  },\n\n  _updateStore() {\n    let data = this.content;\n    if (!isEmpty(this.authenticator)) {\n      set(\n        data,\n        'authenticated',\n        Object.assign({ authenticator: this.authenticator }, data.authenticated || {})\n      );\n    }\n    return this.store.persist(data);\n  },\n\n  _bindToAuthenticatorEvents() {\n    const authenticator = this._lookupAuthenticator(this.authenticator);\n    authenticator.on('sessionDataUpdated', this._onSessionDataUpdated);\n    authenticator.on('sessionDataInvalidated', this._onSessionDataInvalidated);\n  },\n\n  _onSessionDataUpdated: action(function ({ detail: content }) {\n    this._setup(this.authenticator, content);\n  }),\n\n  _onSessionDataInvalidated: action(function () {\n    this._clear(true);\n  }),\n\n  _bindToStoreEvents() {\n    this.store.on('sessionDataUpdated', ({ detail: content }) => {\n      if (!this._busy) {\n        this._busy = true;\n        let { authenticator: authenticatorFactory } = content.authenticated || {};\n        if (authenticatorFactory) {\n          delete content.authenticated.authenticator;\n          const authenticator = this._lookupAuthenticator(authenticatorFactory);\n          authenticator.restore(content.authenticated).then(\n            authenticatedContent => {\n              this.set('content', content);\n              this._busy = false;\n              this._setup(authenticatorFactory, authenticatedContent, true);\n            },\n            err => {\n              debug(\n                `The authenticator \"${authenticatorFactory}\" rejected to restore the session - invalidating…`\n              );\n              if (err) {\n                debug(err);\n              }\n              this._busy = false;\n              this._clearWithContent(content, true);\n            }\n          );\n        } else {\n          this._busy = false;\n          this._clearWithContent(content, true);\n        }\n      }\n    });\n  },\n\n  _lookupAuthenticator(authenticatorName) {\n    let owner = getOwner(this);\n    let authenticator = owner.lookup(authenticatorName);\n    assert(\n      `No authenticator for factory \"${authenticatorName}\" could be found!`,\n      !isNone(authenticator)\n    );\n    setOwner(authenticator, owner);\n    return authenticator;\n  },\n\n  on(event, cb) {\n    this.sessionEvents.addEventListener(event, cb);\n  },\n\n  off(event, cb) {\n    this.sessionEvents.removeEventListener(event, cb);\n  },\n\n  trigger(event, value) {\n    this.sessionEvents.dispatchEvent(event, value);\n  },\n\n  setRedirectTarget(url) {\n    this.store.setRedirectTarget?.(url);\n  },\n\n  getRedirectTarget() {\n    return this.store.getRedirectTarget?.();\n  },\n\n  clearRedirectTarget() {\n    return this.store.clearRedirectTarget?.();\n  },\n});\n","import { computed } from '@ember/object';\nimport { service } from '@ember/service';\nimport { getOwner } from '@ember/application';\nimport Base from './base';\nimport type CookiesService from 'ember-cookies/services/cookies';\nimport type CookieStore from './cookie';\nimport type LocalStorageStore from './local-storage';\nimport { debug } from '@ember/debug';\n\nconst LOCAL_STORAGE_TEST_KEY = '_ember_simple_auth_test_key';\n\nconst proxyToInternalStore = function () {\n  return computed({\n    get(this: AdaptiveStore, key: string) {\n      return this.get(`_${key}`);\n    },\n    set(this: AdaptiveStore, key: string, value: any) {\n      this.set(`_${key}`, value);\n      let _store = this.get('_store');\n      if (_store) {\n        _store.set(key, value);\n      }\n      return value;\n    },\n  });\n};\n\n/**\n  Session store that persists data in the browser's `localStorage` (see\n  {@linkplain LocalStorageStore}) if that is available or in\n  a cookie (see {@linkplain CookieStore}) if it is not.\n\n  __This is the default store that Ember Simple Auth will use when the\n  application doesn't define a custom store.__\n\n  __This session store does not work with FastBoot. In order to use Ember\n  Simple Auth with FastBoot, configure the\n  {@linkplain CookieStore} as the application's session\n  store.__\n\n  @class AdaptiveStore\n  @extends BaseStore\n  @public\n*/\nexport default class AdaptiveStore extends Base {\n  /**\n    The `localStorage` key the store persists data in if `localStorage` is\n    available.\n\n    @memberof AdaptiveStore\n    @property localStorageKey\n    @type String\n    @default 'ember_simple_auth-session'\n    @public\n  */\n  localStorageKey = 'ember_simple_auth-session';\n\n  /**\n    The domain to use for the cookie if `localStorage` is not available, e.g.,\n    \"example.com\", \".example.com\" (which includes all subdomains) or\n    \"subdomain.example.com\". If not explicitly set, the cookie domain defaults\n    to the domain the session was authenticated on.\n\n    @memberof AdaptiveStore\n    @property cookieDomain\n    @type String\n    @default null\n    @public\n  */\n  _cookieDomain = null;\n  @proxyToInternalStore()\n  cookieDomain!: null | string;\n\n  /**\n    Allows servers to assert that a cookie ought not to be sent along with\n    cross-site requests, which provides some protection against cross-site\n    request forgery attacks (CSRF).\n\n    Available options:\n    - \"Strict\"\n    - \"Lax\"\n\n    @memberof AdaptiveStore\n    @property sameSite\n    @type String\n    @default null\n    @public\n  */\n  _sameSite = null;\n  @proxyToInternalStore()\n  sameSite!: null | 'Strict' | 'Lax' | 'None';\n\n  /**\n    Allows servers to assert that a cookie should opt in to partitioned storage,\n    i.e. use a separate cookie per top level site if the cookie is used in a\n    third party context\n\n    Available options:\n    - null\n    - true\n\n    @memberof AdaptiveStore\n    @property partitioned\n    @type Boolean\n    @default null\n    @public\n  */\n  _partitioned = null;\n  @proxyToInternalStore()\n  partitioned!: null | boolean;\n\n  /**\n    The name of the cookie to use if `localStorage` is not available.\n\n    @memberof AdaptiveStore\n    @property cookieName\n    @type String\n    @default ember_simple_auth-session\n    @public\n  */\n  _cookieName = 'ember_simple_auth-session';\n  @proxyToInternalStore()\n  cookieName!: string;\n\n  /**\n    The path to use for the cookie, e.g., \"/\", \"/something\".\n\n    @memberof AdaptiveStore\n    @property cookiePath\n    @type String\n    @default '/'\n    @public\n  */\n  _cookiePath = '/';\n  @proxyToInternalStore()\n  cookiePath!: string;\n\n  /**\n    The expiration time for the cookie in seconds if `localStorage` is not\n    available. A value of `null` will make the cookie a session cookie that\n    expires and gets deleted when the browser is closed.\n\n    @memberof AdaptiveStore\n    @property cookieExpirationTime\n    @default null\n    @type Integer\n    @public\n  */\n  _cookieExpirationTime = null;\n  @proxyToInternalStore()\n  cookieExpirationTime!: number | null;\n\n  @service('cookies') declare _cookies: CookiesService;\n  declare _fastboot: any;\n\n  declare _store: CookieStore | LocalStorageStore;\n\n  __isLocalStorageAvailable: boolean | null = null;\n  get _isLocalStorageAvailable() {\n    if (this.__isLocalStorageAvailable !== null) {\n      return this.__isLocalStorageAvailable;\n    } else {\n      return testLocalStorageAvailable();\n    }\n  }\n\n  init(emberOwner: any, __isLocalStorageAvailable?: boolean | null) {\n    super.init(emberOwner);\n\n    if (typeof __isLocalStorageAvailable == 'boolean') {\n      this.__isLocalStorageAvailable = __isLocalStorageAvailable;\n      debug(\n        `ember-simple-auth: session-store received __isLocalStorageAvailable: ${__isLocalStorageAvailable}`\n      );\n    }\n\n    let owner = getOwner(this) as any;\n    if (owner && !this.hasOwnProperty('_fastboot')) {\n      this._fastboot = owner.lookup('service:fastboot');\n    }\n\n    let store;\n    if (this.get('_isLocalStorageAvailable')) {\n      const localStorage = owner.lookup('session-store:local-storage');\n      const options = { key: this.get('localStorageKey'), _isFastBoot: false };\n\n      localStorage.setProperties(options);\n\n      store = localStorage;\n    } else {\n      const cookieStorage = owner.lookup('session-store:cookie');\n      const options = this.getProperties(\n        'cookieDomain',\n        'cookieName',\n        'cookieExpirationTime',\n        'cookiePath',\n        'sameSite',\n        'partitioned'\n      );\n\n      cookieStorage.setProperties(options);\n      this.set('cookieExpirationTime', cookieStorage.get('cookieExpirationTime'));\n\n      store = cookieStorage;\n    }\n\n    this.set('_store', store);\n    this._setupStoreEvents(store);\n  }\n\n  _setupStoreEvents(store: CookieStore | LocalStorageStore) {\n    store.on('sessionDataUpdated', ({ detail: data }) => {\n      this.trigger('sessionDataUpdated', data);\n    });\n    return store;\n  }\n\n  /**\n    Persists the `data` in the `localStorage` if it is available or in a cookie\n    if it is not.\n\n    @memberof AdaptiveStore\n    @method persist\n    @param {Object} data The data to persist\n    @return {Promise} A promise that resolves when the data has successfully been persisted and rejects otherwise.\n    @public\n  */\n  persist(data: Record<string, string>) {\n    return this.get('_store').persist(data);\n  }\n\n  /**\n    Returns all data currently stored in the `localStorage` if that is\n    available - or if it is not, in the cookie - as a plain object.\n\n    @memberof AdaptiveStore\n    @method restore\n    @return {Promise} A promise that resolves with the data currently persisted in the store when the data has been restored successfully and rejects otherwise.\n    @public\n  */\n  restore() {\n    return this.get('_store').restore();\n  }\n\n  /**\n    Clears the store by deleting the\n    {@linkplain LocalStorageStore.key} from\n    `localStorage` if that is available or by deleting the cookie if it is not.\n\n    @memberof AdaptiveStore\n    @method clear\n    @return {Promise} A promise that resolves when the store has been cleared successfully and rejects otherwise.\n    @public\n  */\n  clear() {\n    return this.get('_store').clear();\n  }\n\n  setRedirectTarget(url: string) {\n    this.get('_store').setRedirectTarget(url);\n  }\n\n  getRedirectTarget() {\n    return this.get('_store').getRedirectTarget();\n  }\n\n  clearRedirectTarget() {\n    return this.get('_store').clearRedirectTarget();\n  }\n}\n\nfunction testLocalStorageAvailable() {\n  try {\n    localStorage.setItem(LOCAL_STORAGE_TEST_KEY, 'true');\n    localStorage.removeItem(LOCAL_STORAGE_TEST_KEY);\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n","import { getOwner } from '@ember/application';\nimport BaseStore from './base';\nimport objectsAreEqual from '../utils/objects-are-equal';\nimport isFastBoot from '../utils/is-fastboot';\nimport { action } from '@ember/object';\n\n/**\n  Session store that persists data in the browser's `localStorage`.\n\n  __`localStorage` is not available in Safari when running in private mode. In\n  general it is better to use the\n  {@linkplain AdaptiveStore} that automatically falls back to\n  the {@linkplain CookieStore} when `localStorage` is not\n  available.__\n\n  __This session store does not work with FastBoot. In order to use Ember\n  Simple Auth with FastBoot, configure the\n  {@linkplain CookieStore} as the application's session\n  store.__\n\n  @class LocalStorageStore\n  @extends BaseStore\n  @public\n*/\nexport default class LocalStorageStore extends BaseStore {\n  /**\n    The `localStorage` key the store persists data in.\n\n    @memberof LocalStorageStore\n    @property key\n    @type String\n    @default 'ember_simple_auth-session'\n    @public\n  */\n  key = 'ember_simple_auth-session';\n\n  _isFastBoot: boolean = false;\n  _lastData: Record<string, string> | null = null;\n\n  constructor(owner: any) {\n    super(owner);\n\n    this._isFastBoot = isFastBoot(getOwner(this));\n    if (!this.get('_isFastBoot')) {\n      window.addEventListener('storage', this._handleStorageEvent);\n    }\n  }\n\n  willDestroy() {\n    if (!this.get('_isFastBoot')) {\n      window.removeEventListener('storage', this._handleStorageEvent);\n    }\n  }\n\n  /**\n    Persists the `data` in the `localStorage`.\n\n    @memberof LocalStorageStore\n    @method persist\n    @param {Object} data The data to persist\n    @return {Promise} A promise that resolves when the data has successfully been persisted and rejects otherwise.\n    @public\n  */\n  persist(data: Record<string, string>) {\n    this._lastData = data;\n    const stringifiedData = JSON.stringify(data || {});\n    localStorage.setItem(this.key, stringifiedData);\n\n    return Promise.resolve();\n  }\n\n  /**\n    Returns all data currently stored in the `localStorage` as a plain object.\n\n    @memberof LocalStorageStore\n    @method restore\n    @return {Promise} A promise that resolves with the data currently persisted in the store when the data has been restored successfully and rejects otherwise.\n    @public\n  */\n  restore() {\n    let data = localStorage.getItem(this.key);\n\n    return Promise.resolve(JSON.parse(data || '{}'));\n  }\n\n  /**\n    Clears the store by deleting the\n    {@linkplain LocalStorageStore.key} from\n    `localStorage`.\n\n    @memberof LocalStorageStore\n    @method clear\n    @return {Promise} A promise that resolves when the store has been cleared successfully and rejects otherwise.\n    @public\n  */\n  clear() {\n    localStorage.removeItem(this.key);\n    this._lastData = {};\n\n    return Promise.resolve();\n  }\n\n  @action\n  _handleStorageEvent(e: StorageEvent) {\n    if (e.key === this.get('key')) {\n      this.restore().then(data => {\n        if (!objectsAreEqual(data, this._lastData)) {\n          this._lastData = data;\n          this.trigger('sessionDataUpdated', data);\n        }\n      });\n    }\n  }\n\n  setRedirectTarget(url: string) {\n    localStorage.setItem(`${this.key}-redirectTarget`, url);\n  }\n\n  getRedirectTarget() {\n    return localStorage.getItem(`${this.key}-redirectTarget`);\n  }\n\n  clearRedirectTarget() {\n    return localStorage.removeItem(`${this.key}-redirectTarget`);\n  }\n}\n","import Configuration from '../configuration';\nimport setupSession from './setup-session';\nimport Adaptive from '../session-stores/adaptive';\nimport LocalStorage from '../session-stores/local-storage';\nimport Cookie from '../session-stores/cookie';\n\nexport default {\n  name: 'ember-simple-auth',\n\n  initialize(registry) {\n    const ENV = registry.resolveRegistration('config:environment');\n    const config = ENV['ember-simple-auth'] || {};\n    config.rootURL = ENV.rootURL || ENV.baseURL;\n    Configuration.load(config);\n\n    registry.register('session-store:adaptive', Adaptive);\n    registry.register('session-store:cookie', Cookie);\n    registry.register('session-store:local-storage', LocalStorage);\n\n    setupSession(registry);\n  },\n};\n","import InternalSession from '../internal-session';\nimport Ephemeral from '../session-stores/ephemeral';\nimport { isTesting } from '@embroider/macros';\n\nexport default function setupSession(registry) {\n  registry.register('session:main', InternalSession);\n\n  if (isTesting()) {\n    registry.register('session-store:test', Ephemeral);\n  }\n}\n","class LocationUtil {\n  location = window.location;\n\n  replace(...args) {\n    this.location.replace(...args);\n  }\n}\n\nconst location = new LocationUtil();\n\nexport default location;\n","import Service from '@ember/service';\nimport { getOwner } from '@ember/application';\nimport { assert } from '@ember/debug';\nimport Configuration from '../configuration';\n\nimport {\n  requireAuthentication,\n  triggerAuthentication,\n  prohibitAuthentication,\n  handleSessionAuthenticated,\n  handleSessionInvalidated,\n} from '../-internals/routing';\nimport type Transition from '@ember/routing/transition';\nimport { alias, readOnly } from '@ember/object/computed';\nimport type EsaBaseSessionStore from '../session-stores/base';\n\nconst SESSION_DATA_KEY_PREFIX = /^data\\./;\n\nfunction assertSetupHasBeenCalled(isSetupCalled: boolean) {\n  if (!isSetupCalled) {\n    assert(\n      \"Ember Simple Auth: session#setup wasn't called. Make sure to call session#setup in your application route's beforeModel hook.\",\n      false\n    );\n  }\n}\n\ntype RouteOrCallback = string | (() => void);\n\ntype InternalSessionMock<Data> = {\n  isAuthenticated: boolean;\n  content: Data;\n  store: unknown;\n  attemptedTransition: null;\n  on: (event: 'authenticationSucceeded' | 'invalidationSucceeded', cb: () => void) => void;\n  authenticate: (authenticator: string, ...args: any[]) => Promise<void>;\n  invalidate: (...args: any[]) => Promise<void>;\n  requireAuthentication: (transition: Transition, routeOrCallback: RouteOrCallback) => boolean;\n  prohibitAuthentication: (routeOrCallback: RouteOrCallback) => boolean;\n  restore: () => Promise<void>;\n  set(key: string, value: any): void;\n  setRedirectTarget: EsaBaseSessionStore['setRedirectTarget'];\n  getRedirectTarget: EsaBaseSessionStore['getRedirectTarget'];\n  clearRedirectTarget: EsaBaseSessionStore['clearRedirectTarget'];\n};\n\nexport type ExtraAuthenticationArgs = {\n  redirectTarget?: string;\n  [key: string]: unknown;\n};\n\nexport type DefaultDataShape = {\n  authenticated: {\n    authenticator: string;\n    [key: string]: string;\n  };\n};\n\n/**\n  __The session service provides access to the current session as well as\n  methods to authenticate it, invalidate it, etc.__ It is the main interface for\n  the application to Ember Simple Auth's functionality.\n\n  ```js\n  // app/components/login-form.js\n  import Component from '@ember/component';\n  import { service } from '@ember/service';\n\n  export default class LoginFormComponent extends Component {\n    &#64;service session;\n  }\n  ```\n\n  @class SessionService\n  @extends Service\n  @public\n*/\nexport default class SessionService<Data = DefaultDataShape> extends Service {\n  session: InternalSessionMock<Data>;\n\n  constructor(owner: any) {\n    super(owner);\n\n    this.session = owner.lookup('session:main');\n  }\n\n  /**\n   * Says whether the service was correctly initialized by the {#linkplain SessionService.setup}\n   */\n  _setupIsCalled = false;\n\n  /**\n    Returns whether the session is currently authenticated.\n\n    @memberof SessionService\n    @property isAuthenticated\n    @type Boolean\n    @readOnly\n    @default false\n    @public\n  */\n  @readOnly('session.isAuthenticated') declare isAuthenticated: boolean;\n\n  /**\n    The current session data as a plain object. The\n    `authenticated` key inside  {@linkplain SessionService.data} holds the session data that the authenticator resolved\n    with when the session was authenticated (see {@linkplain BaseAuthenticator.authenticate}) and\n    that will be cleared when the session is invalidated. This data cannot be\n    written. All other session data is writable and will not be cleared when\n    the session is invalidated.\n\n    @memberof SessionService\n    @property data\n    @type Object\n    @readOnly\n    @default { authenticated: {} }\n    @public\n  */\n  @readOnly('session.content') declare data: Data;\n\n  /**\n    The session store.\n\n    @memberof SessionService\n    @property store\n    @type BaseStore\n    @readOnly\n    @default null\n    @public\n  */\n  @readOnly('session.store') declare store: unknown;\n\n  /**\n    A previously attempted but intercepted transition (e.g. by the\n    {@linkplain SessionService.requireAuthentication}\n    If an attempted transition is present it will be retried.\n\n    This is an `in-memory` property, see {@linkplain SessionService.setRedirectTarget}, {@linkplain SessionService.getRedirectTarget} for a persistent redirect mechanism.\n    `attemptedTransition` is used _first_ if set.\n\n    @memberof SessionService\n    @property attemptedTransition\n    @type Transition\n    @default null\n    @public\n  */\n  @alias('session.attemptedTransition')\n  attemptedTransition: null | Transition = null;\n\n  get redirectTargetKey(): string | null {\n    const store = this.store as { key?: string; cookieName?: string };\n    const key = store.key || store.cookieName;\n    if (key) {\n      return `${key}-redirectTarget`;\n    }\n    return null;\n  }\n\n  set(key: any, value: any) {\n    const setsSessionData = SESSION_DATA_KEY_PREFIX.test(key);\n    if (setsSessionData) {\n      const sessionDataKey = `session.${key.replace(SESSION_DATA_KEY_PREFIX, '')}`;\n      return super.set(sessionDataKey, value);\n    } else {\n      return super.set(key, value);\n    }\n  }\n\n  _setupHandlers() {\n    this.session.on('authenticationSucceeded', () =>\n      this.handleAuthentication(Configuration.routeAfterAuthentication)\n    );\n    this.session.on('invalidationSucceeded', () => this.handleInvalidation(Configuration.rootURL));\n  }\n\n  /**\n    __Authenticates the session with an `authenticator`__ and appropriate\n    arguments. The authenticator implements the actual steps necessary to\n    authenticate the session (see\n    {@linkplain BaseAuthenticator.authenticate} and\n    returns a promise after doing so. The session handles the returned promise\n    and when it resolves becomes authenticated, otherwise remains\n    unauthenticated. All data the authenticator resolves with will be\n    accessible via the\n    {@Linkplain SessionService.data} session data's\n    `authenticated` property.\n\n    This method returns a promise. A resolving promise indicates that the\n    session was successfully authenticated while a rejecting promise\n    indicates that authentication failed and the session remains\n    unauthenticated. The promise does not resolve with a value; instead, the\n    data returned from the authenticator is available via the\n    {@linkplain SessionService.data} property.\n\n    When authentication succeeds this will trigger the\n    {@linkplain SessionService.authenticationSucceeded} event.\n\n    @memberof SessionService\n    @method authenticate\n    @param {String} authenticator The authenticator to use to authenticate the session\n    @param {Any} [...args] The arguments to pass to the authenticator; depending on the type of authenticator these might be a set of credentials, a Facebook OAuth Token, etc.\n    @return {Promise} A promise that resolves when the session was authenticated successfully and rejects otherwise\n    @public\n  */\n  authenticate(authenticator: string, ...args: any[]) {\n    return this.session.authenticate(authenticator, ...args);\n  }\n\n  /**\n    __Invalidates the session with the authenticator it is currently\n    authenticated with__ (see\n    {@linkplain SessionService.authenticate}). This\n    invokes the authenticator's\n    {@linkplain BaseAuthenticator.invalidate} method\n    and handles the returned promise accordingly.\n\n    This method returns a promise. A resolving promise indicates that the\n    session was successfully invalidated while a rejecting promise indicates\n    that invalidation failed and the session remains authenticated. Once the\n    session is successfully invalidated it clears all of its authenticated data\n    (see {@linkplain SessionService.data}).\n\n    When invalidation succeeds this will trigger the\n    {@linkplain SessionService.invalidationSucceeded}\n    event.\n\n    When calling the {@linkplain BaseAuthenticator.invalidate}\n    on an already unauthenticated session, the method will return a resolved Promise\n    immediately.\n\n    @memberof SessionService\n    @method invalidate\n    @param {Array} ...args arguments that will be passed to the authenticator\n    @return {Promise} A promise that resolves when the session was invalidated successfully and rejects otherwise\n    @public\n  */\n  invalidate(...args: any[]) {\n    return this.session.invalidate(...args);\n  }\n\n  /**\n    Checks whether the session is authenticated and if it is not, transitions\n    to the specified route or invokes the specified callback.\n\n    If a transition is in progress and is aborted, this method will save it in the\n    session service's\n    {@linkplain SessionService.attemptedTransition}\n    property so that  it can be retried after the session is authenticated. If\n    the transition is aborted in Fastboot mode, the transition's target URL\n    will be saved in a `ember_simple_auth-redirectTarget` cookie for use by the\n    browser after authentication is complete.\n\n    Accepts an optional object with `redirectTarget` property. Related to {@linkplain SessionService.setRedirectTarget}, {@linkplain SessionService.getRedirectTarget}\n\n    @example\n      // your-route.js\n      this.session.requireAuthentication(transition, 'login', { redirectTarget: '/alternative-to-transition.intent.url' })\n\n\n    @memberof SessionService\n    @method requireAuthentication\n    @param {Transition} transition A transition that triggered the authentication requirement or null if the requirement originated independently of a transition\n    @param {String|Function} routeOrCallback The route to transition to in case that the session is not authenticated or a callback function to invoke in that case\n    @return {Boolean} true when the session is authenticated, false otherwise\n    @public\n  */\n  requireAuthentication(\n    transition: Transition,\n    routeOrCallback: RouteOrCallback,\n    extraArgs: ExtraAuthenticationArgs = {}\n  ) {\n    assertSetupHasBeenCalled(this._setupIsCalled);\n    let isAuthenticated = requireAuthentication(getOwner(this), transition, extraArgs);\n    if (!isAuthenticated) {\n      if (typeof routeOrCallback === 'string') {\n        triggerAuthentication(getOwner(this), routeOrCallback);\n      } else if (typeof routeOrCallback === 'function') {\n        routeOrCallback();\n      } else {\n        assert(\n          `The second argument to requireAuthentication must be a String or Function, got \"${typeof routeOrCallback}\"!`,\n          false\n        );\n      }\n    }\n    return isAuthenticated;\n  }\n\n  /**\n    Checks whether the session is authenticated and if it is, transitions\n    to the specified route or invokes the specified callback.\n\n    @memberof SessionService\n    @method prohibitAuthentication\n    @param {String|Function} routeOrCallback The route to transition to in case that the session is authenticated or a callback function to invoke in that case\n    @return {Boolean} true when the session is not authenticated, false otherwise\n    @public\n  */\n  prohibitAuthentication(routeOrCallback: RouteOrCallback) {\n    assertSetupHasBeenCalled(this._setupIsCalled);\n    let isAuthenticated = this.get('isAuthenticated');\n    if (isAuthenticated) {\n      if (typeof routeOrCallback === 'string') {\n        prohibitAuthentication(getOwner(this), routeOrCallback);\n      } else if (typeof routeOrCallback === 'function') {\n        routeOrCallback();\n      } else {\n        assert(\n          `The first argument to prohibitAuthentication must be a String or Function, got \"${typeof routeOrCallback}\"!`,\n          false\n        );\n      }\n    }\n    return !isAuthenticated;\n  }\n\n  /**\n    This method is called whenever the session goes from being unauthenticated\n    to being authenticated. If there is a transition that was previously\n    intercepted by the\n    {@linkplain SessionService.requireAuthentication},\n    it will retry it. If there is no such transition, the\n    `ember_simple_auth-redirectTarget` cookie will be checked for a url that\n    represents an attemptedTransition that was aborted in Fastboot mode,\n    otherwise this action transitions to the specified\n    routeAfterAuthentication.\n\n    @memberof SessionService\n    @method handleAuthentication\n    @param {String} routeAfterAuthentication The route to transition to\n    @public\n  */\n  handleAuthentication(routeAfterAuthentication: string) {\n    handleSessionAuthenticated(getOwner(this), routeAfterAuthentication);\n  }\n\n  /**\n    This method is called whenever the session goes from being authenticated to\n    not being authenticated. __It reloads the Ember.js application__ by\n    redirecting the browser to the specified route so that all in-memory data\n    (such as Ember Data stores etc.) gets cleared.\n\n    If the Ember.js application will be used in an environment where the users\n    don't have direct access to any data stored on the client (e.g.\n    [cordova](http://cordova.apache.org)) this action can be overridden to e.g.\n    simply transition to the index route.\n\n    @memberof SessionService\n    @method handleInvalidation\n    @param {String} routeAfterInvalidation The route to transition to\n    @public\n  */\n  handleInvalidation(routeAfterInvalidation: string) {\n    handleSessionInvalidated(getOwner(this), routeAfterInvalidation);\n  }\n\n  /**\n    Sets up the session service.\n\n    This method must be called when the application starts up,\n    usually as the first thing in the `application` route's `beforeModel`\n    method.\n\n    @memberof SessionService\n    @method setup\n    @public\n  */\n  setup() {\n    this._setupIsCalled = true;\n    this._setupHandlers();\n\n    return this.session.restore().catch(() => {\n      // If it raises an error then it means that restore didn't find any restorable state.\n    });\n  }\n\n  /**\n    Stores the `redirectTarget` in both `globalThis.sessionStorage` and the configured `session-store`.\n    Key is computed based on the `session-store:application` `key` or `cookieName` property.\n\n    This method is internally called by {@linkplain SessionService.requireAuthentication}.\n\n    @memberof SessionService\n    @method setRedirectTarget\n    @public\n  */\n  setRedirectTarget(url: string) {\n    this.session.setRedirectTarget(url);\n    if (this.redirectTargetKey) {\n      globalThis.sessionStorage?.setItem(this.redirectTargetKey, url);\n    }\n  }\n\n  /**\n    Retrieves the `redirectTarget` from `globalThis.sessionStorage` first,\n    falls back to `session-store:application` when nothing's found.\n\n    This method is internally called by {@linkplain SessionService.handleAuthentication}.\n\n    @memberof SessionService\n    @method getRedirectTarget\n    @public\n  */\n  getRedirectTarget() {\n    let redirectTarget: string | null = this.session.getRedirectTarget();\n\n    if (this.redirectTargetKey) {\n      return globalThis.sessionStorage?.getItem(this.redirectTargetKey) || redirectTarget;\n    } else {\n      return redirectTarget;\n    }\n  }\n\n  /**\n    Clears the `redirectTarget` from `globalThis.sessionStorage` and the `session-store:application`.\n\n    This method is internally called by {@linkplain SessionService.handleAuthentication}.\n\n    @memberof SessionService\n    @method clearRedirectTarget\n    @public\n  */\n  clearRedirectTarget() {\n    this.session.clearRedirectTarget();\n    if (this.redirectTargetKey) {\n      globalThis.sessionStorage?.removeItem(this.redirectTargetKey);\n    }\n  }\n}\n","import isFastBoot from '../utils/is-fastboot';\nimport location from '../utils/location';\nimport { isTesting } from '@embroider/macros';\n\nexport function requireAuthentication(owner, transition, extraArgs) {\n  let sessionService = owner.lookup('service:session');\n  let isAuthenticated = sessionService.get('isAuthenticated');\n  if (!isAuthenticated) {\n    let redirectTarget = extraArgs?.redirectTarget;\n\n    if (transition) {\n      sessionService.set('attemptedTransition', transition);\n\n      if (!redirectTarget) {\n        redirectTarget = transition.intent.url;\n      }\n    }\n\n    if (redirectTarget) {\n      sessionService.setRedirectTarget(redirectTarget);\n    }\n  }\n  return isAuthenticated;\n}\n\nexport function triggerAuthentication(owner, authenticationRoute) {\n  let authRouter = owner.lookup('service:router') || owner.lookup('router:main');\n  authRouter.transitionTo(authenticationRoute);\n}\n\nexport function prohibitAuthentication(owner, routeIfAlreadyAuthenticated) {\n  let authRouter = owner.lookup('service:router') || owner.lookup('router:main');\n  authRouter.transitionTo(routeIfAlreadyAuthenticated);\n}\n\nexport function handleSessionAuthenticated(owner, routeAfterAuthentication) {\n  let sessionService = owner.lookup('service:session');\n  let attemptedTransition = sessionService.get('attemptedTransition');\n  const redirectTarget = sessionService.getRedirectTarget();\n\n  let routerService = owner.lookup('service:router');\n\n  if (attemptedTransition) {\n    attemptedTransition.retry();\n    sessionService.set('attemptedTransition', null);\n  } else if (redirectTarget) {\n    routerService.transitionTo(redirectTarget);\n    sessionService.clearRedirectTarget();\n  } else {\n    routerService.transitionTo(routeAfterAuthentication);\n  }\n}\n\nexport function handleSessionInvalidated(owner, routeAfterInvalidation) {\n  if (isFastBoot(owner)) {\n    let routerService = owner.lookup('service:router');\n    routerService.transitionTo(routeAfterInvalidation);\n  } else {\n    if (!isTesting()) {\n      location.replace(routeAfterInvalidation);\n    }\n  }\n}\n","import EmberObject from '@ember/object';\nimport EsaEventTarget, { type EventListener } from '../-internals/event-target';\n\nexport interface SessionEvents {\n  sessionDataUpdated: CustomEvent<any>;\n}\n\nclass SessionStoreEventTarget extends EsaEventTarget<SessionEvents> {}\n\n/**\n  The base class for all session stores. __This serves as a starting point for\n  implementing custom session stores and must not be used directly.__\n\n  Session Stores persist the session's state so that it survives a page reload\n  and is synchronized across multiple tabs or windows of the same application.\n\n  @class BaseStore\n  @extends Ember.Object\n  @public\n*/\nexport default abstract class EsaBaseSessionStore extends EmberObject {\n  sessionStoreEvents = new SessionStoreEventTarget();\n  /**\n    Triggered when the session store's data changes due to an external event,\n    e.g., from another tab or window of the same application. The session\n    handles that event, passes the updated data to its authenticator's\n    {@linkplain BaseAuthenticator.restore} method and\n    handles the result of that invocation accordingly.\n\n    @memberof BaseStore\n    @event sessionDataUpdated\n    @param {Object} data The updated session data\n    @public\n  */\n\n  /**\n    Persists the `data`. This replaces all currently stored data.\n\n    `BaseStores`'s implementation always returns a rejecting promise. __This\n    method must be overridden in subclasses__.\n\n    @memberof BaseStore\n    @method persist\n    @param {Object} data The data to persist\n    @return {Promise} A promise that resolves when the data has successfully been persisted and rejects otherwise.\n    @public\n  */\n  abstract persist(..._args: any[]): Promise<unknown>;\n\n  /**\n    Returns all data currently stored as a plain object.\n\n    `BaseStores`'s implementation always returns a rejecting promise. __This\n    method must be overridden in subclasses__.\n\n    @memberof BaseStore\n    @method restore\n    @return {Promise} A promise that resolves with the data currently persisted in the store when the data has been restored successfully and rejects otherwise.\n    @public\n  */\n  abstract restore(): Promise<unknown>;\n\n  /**\n    Clears the store.\n\n    `BaseStores`'s implementation always returns a rejecting promise. __This\n    method must be overridden in subclasses__.\n\n    @memberof BaseStore\n    @method clear\n    @return {Promise} A promise that resolves when the store has been cleared successfully and rejects otherwise.\n    @public\n  */\n  abstract clear(): Promise<unknown>;\n\n  /**\n    Called by {@linkplain SessionService.setRedirectTarget}.\n\n    This method is used to persist a `redirectTarget` which is an alternative to the non-persistent {@linkplain SessionService.attemptedTransition}.\n    `redirectTarget` is meant to replace {@linkplain SessionService.attemptedTransition} that is discarded the moment a browser tab is refreshed.\n\n    This method is meant to be always implemented but can be `undefined` for backwards compatibility.\n    Additionally can be assigned `null` to opt out of using this mechanism.\n\n    @example\n      setRedirectTarget = null;\n\n    @memberof BaseStore\n    @method setRedirectTarget\n    @public\n  */\n  abstract setRedirectTarget(urL: string): void;\n\n  /**\n    Called by {@linkplain SessionService.getRedirectTarget}.\n\n    This method is retrieve a persisted `redirectTarget` from a child class' store mechanism.\n    Additionally can be assigned `null` to opt out of using this mechanism.\n\n    @example\n      getRedirectTarget = null;\n\n    @memberof BaseStore\n    @method getRedirectTarget\n    @public\n  */\n  abstract getRedirectTarget(): string | null;\n\n  /**\n    Called by {@linkplain SessionService.clearRedirectTarget}.\n\n    This method clears a `redirectTarget` from a child class' store mechanism.\n    Additionally can be assigned `null` to opt out of using this mechanism.\n\n    @example\n      clearRedirectTarget = null;\n\n    @memberof BaseStore\n    @method clearRedirectTarget\n    @public\n  */\n  abstract clearRedirectTarget(): void;\n\n  on<Event extends keyof SessionEvents>(event: Event, cb: EventListener<SessionEvents, Event>) {\n    this.sessionStoreEvents.addEventListener(event, cb);\n  }\n\n  off<Event extends keyof SessionEvents>(event: Event, cb: EventListener<SessionEvents, Event>) {\n    this.sessionStoreEvents.removeEventListener(event, cb);\n  }\n\n  trigger<Event extends keyof SessionEvents>(event: Event, value: SessionEvents[Event]['detail']) {\n    this.sessionStoreEvents.dispatchEvent(event, value);\n  }\n}\n","import { computed } from '@ember/object';\nimport { service } from '@ember/service';\nimport { later, cancel, scheduleOnce, next, type Timer } from '@ember/runloop';\nimport { typeOf, isEmpty, isNone } from '@ember/utils';\nimport { A } from '@ember/array';\nimport { warn } from '@ember/debug';\nimport BaseStore from './base';\nimport objectsAreEqual from '../utils/objects-are-equal';\nimport { isTesting } from '@embroider/macros';\nimport type CookiesService from 'ember-cookies/services/cookies';\nimport type { WriteOptions } from 'ember-cookies/services/cookies';\nimport { getOwner } from '@ember/application';\n\nconst persistingProperty = function (beforeSet = function (_key: string, _value: any) {}) {\n  return computed({\n    get(key) {\n      return this.get(`_${key}`);\n    },\n    set(key, value) {\n      beforeSet.apply(this, [key, value]);\n      this.set(`_${key}`, value);\n      scheduleOnce('actions', this, this.rewriteCookie);\n      return value;\n    },\n  });\n};\n\n/**\n  Session store that persists data in a cookie.\n\n  By default the cookie session store uses a session cookie that expires and is\n  deleted when the browser is closed. The cookie expiration period can be\n  configured by setting the\n  {@linkplain CookieStore.cookieExpirationTime}\n  property. This can be used to implement \"remember me\" functionality that will\n  either store the session persistently or in a session cookie depending on\n  whether the user opted in or not:\n\n  ```js\n  // app/controllers/login.js\n  import Controller from '@ember/controller';\n  import { service } from '@ember/service';\n\n  export default class LoginController extends Controller {\n    &#64;service session;\n    _rememberMe = false;\n\n    get rememberMe() {\n      return this._rememberMe;\n    }\n\n    set rememberMe(value) {\n      let expirationTime = value ? (14 * 24 * 60 * 60) : null;\n      this.set('session.store.cookieExpirationTime', expirationTime);\n      this._rememberMe = value;\n    }\n  }\n  ```\n\n  __Applications that use FastBoot must use this session store by defining the\n  application session store like this:__\n\n  ```js\n  // app/session-stores/application.js\n  import CookieStore from 'ember-simple-auth/session-stores/cookie';\n\n  export default class ApplicationSessionStore extends CookieStore {}\n  ```\n\n  @class CookieStore\n  @extends BaseStore\n  @public\n*/\nexport default class CookieStore extends BaseStore {\n  _syncDataTimeout: Timer | null = null;\n  _renewExpirationTimeout: Timer | null = null;\n  /**\n    The domain to use for the cookie, e.g., \"example.com\", \".example.com\"\n    (which includes all subdomains) or \"subdomain.example.com\". If not\n    explicitly set, the cookie domain defaults to the domain the session was\n    authenticated on.\n\n    @memberof CookieStore\n    @property cookieDomain\n    @type String\n    @default null\n    @public\n  */\n  _cookieDomain = null;\n  @persistingProperty()\n  cookieDomain!: null | string;\n\n  /**\n    Allows servers to assert that a cookie ought not to be sent along with cross-site requests,\n    which provides some protection against cross-site request forgery attacks (CSRF).\n    Available options:\n    - \"Strict\"\n    - \"Lax\"\n    @memberof CookieStore\n    @property sameSite\n    @type String\n    @default null\n    @public\n  */\n  _sameSite = null;\n  @persistingProperty()\n  sameSite!: null | 'Strict' | 'Lax' | 'None';\n\n  /**\n    The name of the cookie.\n\n    @memberof CookieStore\n    @property cookieName\n    @type String\n    @default ember_simple_auth-session\n    @public\n  */\n  _cookieName = 'ember_simple_auth-session';\n\n  _oldCookieName: string | null = null;\n  @persistingProperty(function (this: CookieStore) {\n    this._oldCookieName = this._cookieName;\n  })\n  cookieName!: string;\n\n  /**\n    The path to use for the cookie, e.g., \"/\", \"/something\".\n\n    @memberof CookieStore\n    @property cookiePath\n    @type String\n    @default '/'\n    @public\n  */\n  _cookiePath = '/';\n  @persistingProperty()\n  cookiePath!: string;\n\n  /**\n    The expiration time for the cookie in seconds. A value of `null` will make\n    the cookie a session cookie that expires and gets deleted when the browser\n    is closed.\n\n    The recommended minimum value is 90 seconds. If your value is less than\n    that, the cookie may expire before its expiration time is extended\n    (expiration time is extended every 60 seconds).\n\n    @memberof CookieStore\n    @property cookieExpirationTime\n    @default null\n    @type Integer\n    @public\n  */\n  _cookieExpirationTime = null;\n  @persistingProperty(function (this: CookieStore, key, value) {\n    // When nulling expiry time on purpose, we need to clear the cached value.\n    // Otherwise, `_calculateExpirationTime` will reuse it.\n    if (isNone(value)) {\n      this.get('_cookies').clear(`${this.get('cookieName')}-expiration_time`);\n    } else if (value < 90) {\n      warn(\n        'The recommended minimum value for `cookieExpirationTime` is 90 seconds. If your value is less than that, the cookie may expire before its expiration time is extended (expiration time is extended every 60 seconds).',\n        false,\n        { id: 'ember-simple-auth.cookieExpirationTime' }\n      );\n    }\n  })\n  cookieExpirationTime!: number | null;\n\n  /**\n    Allows servers to assert that a cookie should opt in to partitioned storage,\n    i.e. use a separate cookie per top level site if the cookie is used in a\n    third party context\n\n    Available options:\n    - null\n    - true\n\n    @memberof CookieStore\n    @property partitioned\n    @type Boolean\n    @default null\n    @public\n  */\n  _partitioned = null;\n  @persistingProperty()\n  partitioned!: null | boolean;\n\n  @service('cookies') declare _cookies: CookiesService;\n\n  _fastboot: any;\n\n  _secureCookies(): boolean {\n    if (this.get('_fastboot.isFastBoot')) {\n      return this.get('_fastboot.request.protocol') === 'https:';\n    }\n\n    return window.location.protocol === 'https:';\n  }\n\n  _isPageVisible() {\n    if (this.get('_fastboot.isFastBoot')) {\n      return false;\n    } else {\n      const visibilityState =\n        typeof document !== 'undefined' ? document.visibilityState || 'visible' : false;\n      return visibilityState === 'visible';\n    }\n  }\n\n  _isFastBoot: boolean = false;\n  _lastData: Record<string, string> | null = null;\n\n  init(properties: any) {\n    super.init(properties);\n\n    this._fastboot = (getOwner(this) as any).lookup('service:fastboot');\n\n    const cachedExpirationTime = this._read(`${this.get('cookieName')}-expiration_time`);\n    const parsedExpirationTime = parseInt(cachedExpirationTime, 10);\n    if (parsedExpirationTime) {\n      this.set('cookieExpirationTime', parsedExpirationTime);\n    }\n\n    if (!this.get('_fastboot.isFastBoot')) {\n      next(() => {\n        this._syncData().then(() => {\n          this._renewExpiration();\n        });\n      });\n    } else {\n      this._renew();\n    }\n  }\n\n  /**\n    Persists the `data` in the cookie.\n\n    @memberof CookieStore\n    @method persist\n    @param {Object} data The data to persist\n    @return {Promise} A promise that resolves when the data has successfully been persisted and rejects otherwise.\n    @public\n  */\n  persist(data: Record<string, string>) {\n    this._lastData = data;\n    const stringifiedData = JSON.stringify(data || {});\n    let expiration = this._calculateExpirationTime();\n    this._write(stringifiedData, expiration);\n    return Promise.resolve();\n  }\n\n  /**\n    Returns all data currently stored in the cookie as a plain object.\n\n    @memberof CookieStore\n    @method restore\n    @return {Promise} A promise that resolves with the data currently persisted in the store when the data has been restored successfully and rejects otherwise.\n    @public\n  */\n  restore() {\n    let data = this._read(this.get('cookieName'));\n    return Promise.resolve(JSON.parse(data && typeof data === 'string' ? data : '{}'));\n  }\n\n  /**\n    Clears the store by deleting the cookie.\n\n    @memberof CookieStore\n    @method clear\n    @return {Promise} A promise that resolves when the store has been cleared successfully and rejects otherwise.\n    @public\n  */\n  clear() {\n    this._write('', 0);\n    this._lastData = {};\n    return Promise.resolve();\n  }\n\n  _read(name: string) {\n    return this.get('_cookies').read(name) || '';\n  }\n\n  _calculateExpirationTime(): number | undefined {\n    const cachedExpirationTimeCookie = this._read(`${this.get('cookieName')}-expiration_time`);\n\n    const cachedExpirationTime =\n      cachedExpirationTimeCookie && typeof cachedExpirationTimeCookie === 'number'\n        ? new Date().getTime() + cachedExpirationTimeCookie * 1000\n        : null;\n\n    const thisCookieExpirationTime = this.get('cookieExpirationTime');\n\n    return thisCookieExpirationTime\n      ? new Date().getTime() + thisCookieExpirationTime * 1000\n      : cachedExpirationTime || undefined;\n  }\n\n  _write(value: string, expiration: number | undefined) {\n    let cookieOptions = {\n      domain: this.get('cookieDomain'),\n      expires: !expiration ? null : new Date(expiration as number),\n      path: this.get('cookiePath'),\n      secure: this._secureCookies(),\n      sameSite: this.get('sameSite'),\n      partitioned: this.get('partitioned'),\n    } as WriteOptions;\n\n    if (this._oldCookieName) {\n      A([this._oldCookieName, `${this._oldCookieName}-expiration_time`]).forEach(oldCookie => {\n        this.get('_cookies').clear(oldCookie);\n      });\n      this._oldCookieName = null;\n    }\n    this.get('_cookies').write(this.get('cookieName'), value, cookieOptions);\n    if (!isEmpty(expiration)) {\n      let expirationCookieName = `${this.get('cookieName')}-expiration_time`;\n      let cachedExpirationTime = this.get('_cookies').read(expirationCookieName);\n      this.get('_cookies').write(\n        expirationCookieName,\n        this.get('cookieExpirationTime') || cachedExpirationTime,\n        cookieOptions\n      );\n    }\n  }\n\n  _syncData() {\n    return this.restore().then(data => {\n      if (!objectsAreEqual(data, this._lastData)) {\n        this._lastData = data;\n        this.trigger('sessionDataUpdated', data);\n      }\n      if (!isTesting()) {\n        this._syncDataTimeout && cancel(this._syncDataTimeout);\n        this._syncDataTimeout = later(this, this._syncData, 500);\n      }\n    });\n  }\n\n  _renew() {\n    return this.restore().then(data => {\n      if (!isEmpty(data) && !(data.constructor === Object && Object.keys(data).length === 0)) {\n        data = typeOf(data) === 'string' ? data : JSON.stringify(data || {});\n        let expiration = this._calculateExpirationTime();\n        this._write(data, expiration);\n      }\n    });\n  }\n\n  _renewExpiration() {\n    if (!isTesting()) {\n      this._renewExpirationTimeout && cancel(this._renewExpirationTimeout);\n      this._renewExpirationTimeout = later(this, this._renewExpiration, 60000);\n    }\n    if (this._isPageVisible()) {\n      return this._renew();\n    } else {\n      return Promise.resolve();\n    }\n  }\n\n  rewriteCookie() {\n    // if `cookieName` has not been renamed, `oldCookieName` will be nil\n    const cookieName = this._oldCookieName || this._cookieName;\n    const data = this._read(cookieName);\n    if (data && typeof data === 'string') {\n      const expiration = this._calculateExpirationTime();\n      this._write(data, expiration);\n    }\n  }\n\n  setRedirectTarget(url: string) {\n    let cookieOptions = {\n      domain: this.get('cookieDomain'),\n      path: this.get('cookiePath'),\n      secure: this._secureCookies(),\n      sameSite: this.get('sameSite'),\n      partitioned: this.get('partitioned'),\n    } as WriteOptions;\n    this.get('_cookies').write(`${this.cookieName}-redirectTarget`, url, cookieOptions);\n  }\n\n  getRedirectTarget() {\n    return this.get('_cookies').read(`${this.cookieName}-redirectTarget`) || null;\n  }\n\n  clearRedirectTarget() {\n    return this.get('_cookies').clear(`${this.cookieName}-redirectTarget`);\n  }\n}\n","import { assert } from '@ember/debug';\n\nexport default function isFastBoot(owner: any) {\n  assert('You must pass in an owner to isFastBoot!', owner && typeof owner.lookup === 'function');\n  const fastboot = owner.lookup('service:fastboot');\n  return fastboot ? fastboot.get('isFastBoot') : false;\n}\n","export default function objectsAreEqual(a, b) {\n  function compare(x, y) {\n    let property;\n    if (isNaN(x) && isNaN(y) && typeof x === 'number' && typeof y === 'number') {\n      return true;\n    }\n\n    if (x === y) {\n      return true;\n    }\n\n    if (!(x instanceof Object && y instanceof Object)) {\n      return false;\n    }\n\n    for (property in y) {\n      if (y.hasOwnProperty(property) !== x.hasOwnProperty(property)) {\n        return false;\n      } else if (typeof y[property] !== typeof x[property]) {\n        return false;\n      }\n    }\n\n    for (property in x) {\n      if (y.hasOwnProperty(property) !== x.hasOwnProperty(property)) {\n        return false;\n      } else if (typeof y[property] !== typeof x[property]) {\n        return false;\n      }\n\n      switch (typeof x[property]) {\n        case 'object':\n          if (!compare(x[property], y[property])) {\n            return false;\n          }\n          break;\n        default:\n          if (x[property] !== y[property]) {\n            return false;\n          }\n          break;\n      }\n    }\n\n    return true;\n  }\n\n  return compare(a, b);\n}\n","import { E as ENV } from '../../../shared-chunks/env-DEd6hPbj.js';\nimport Version from '../../../ember/version.js';\nimport { deprecate } from '../../debug/index.js';\nimport { dasherize } from '../string/index.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { assert } from '../../debug/lib/assert.js';\n\nfunction isEnabled(options) {\n  return Object.hasOwnProperty.call(options.since, 'enabled') || ENV._ALL_DEPRECATIONS_ENABLED;\n}\nlet numEmberVersion = parseFloat(ENV._OVERRIDE_DEPRECATION_VERSION ?? Version);\n\n/* until must only be a minor version or major version */\nfunction emberVersionGte(until, emberVersion = numEmberVersion) {\n  let significantUntil = until.replace(/(\\.0+)/g, '');\n  return emberVersion >= parseFloat(significantUntil);\n}\nfunction isRemoved(options) {\n  return emberVersionGte(options.until);\n}\nfunction deprecation(options) {\n  return {\n    options,\n    test: !isEnabled(options),\n    isEnabled: isEnabled(options) || isRemoved(options),\n    isRemoved: isRemoved(options)\n  };\n}\n\n/*\n  To add a deprecation, you must add a new entry to the `DEPRECATIONS` object.\n  The entry should be an object with the following properties:\n\n  * `id` (required): A string that uniquely identifies the deprecation. This\n    should be a short, descriptive name, typically dasherized.\n  * `for` (required): The string `ember-source` -- every deprecation from this\n    package is for `ember-source`.\n  * `since` (required): An object with `available` and `enabled`. `available` is\n    the first version of Ember that the deprecation is available in. `enabled` is\n    the version of Ember that the deprecation was first enabled. This is used as\n    a feature flag deprecations. For public APIs, the `enabled` value is added\n    only once the deprecation RFC is [Ready for Release](https://github.com/emberjs/rfcs#ready-for-release).\n  * `until` (required): The version of Ember that the deprecation will be removed\n  * `url` (required): A URL to the deprecation guide for the deprecation. This\n    URL can be constructed in advance of the deprecation being added to the\n    [deprecation app](https://github.com/ember-learn/deprecation-app) by\n    following this format: `https://deprecations.emberjs.com/deprecations/{{id}}`.\n\n  For example:\n  `deprecate` should then be called using the entry from the `DEPRECATIONS` object.\n\n  ```ts\n  import { DEPRECATIONS } from '@ember/-internals/deprecations';\n  //...\n\n  deprecateUntil(message, DEPRECATIONS.MY_DEPRECATION);\n  ```\n\n  `expectDeprecation` should also use the DEPRECATIONS object, but it should be noted\n  that it uses `isEnabled` instead of `test` because the expectations of `expectDeprecation`\n  are the opposite of `test`.\n\n  ```ts\n  expectDeprecation(\n    () => {\n        assert.equal(foo, bar(), 'foo is equal to bar'); // something that triggers the deprecation\n    },\n    /matchesMessage/,\n    DEPRECATIONS.MY_DEPRECATION.isEnabled\n  );\n  ```\n\n  Tests can be conditionally run based on whether a deprecation is enabled or not:\n\n  ```ts\n    [`${testUnless(DEPRECATIONS.MY_DEPRECATION.isRemoved)} specific deprecated feature tested only in this test`]\n  ```\n\n  This test will be skipped when the MY_DEPRECATION is removed.\n  When adding a deprecation, we need to guard all the code that will eventually be removed, including tests.\n  For tests that are not specifically testing the deprecated feature, we need to figure out how to\n  test the behavior without encountering the deprecated feature, just as users would.\n */\nconst DEPRECATIONS = {\n  DEPRECATE_IMPORT_EMBER(importName) {\n    return deprecation({\n      id: `deprecate-import-${dasherize(importName).toLowerCase()}-from-ember`,\n      for: 'ember-source',\n      since: {\n        available: '5.10.0',\n        enabled: '6.5.0'\n      },\n      until: '7.0.0',\n      url: `https://deprecations.emberjs.com/id/import-${dasherize(importName).toLowerCase()}-from-ember`\n    });\n  },\n  DEPRECATE_IMPORT_INJECT: deprecation({\n    for: 'ember-source',\n    id: 'importing-inject-from-ember-service',\n    since: {\n      available: '6.2.0',\n      enabled: '6.3.0'\n    },\n    until: '7.0.0',\n    url: 'https://deprecations.emberjs.com/id/importing-inject-from-ember-service'\n  }),\n  DEPRECATE_AMD_BUNDLES: deprecation({\n    for: 'ember-source',\n    id: 'using-amd-bundles',\n    since: {\n      available: '6.10.0',\n      enabled: '6.10.0'\n    },\n    until: '7.0.0',\n    url: 'https://deprecations.emberjs.com/id/using-amd-bundles'\n  })\n};\nfunction deprecateUntil(message, deprecation) {\n  const {\n    options\n  } = deprecation;\n  (isDevelopingApp() && !(Boolean(options.for === 'ember-source')) && assert('deprecateUntil must only be called for ember-source', Boolean(options.for === 'ember-source')));\n  if (deprecation.isRemoved) {\n    throw new Error(`The API deprecated by ${options.id} was removed in ember-source ${options.until}. The message was: ${message}. Please see ${options.url} for more details.`);\n  }\n  (isDevelopingApp() && !(deprecation.test) && deprecate(message, deprecation.test, options));\n}\n\nexport { DEPRECATIONS, deprecateUntil, emberVersionGte, isRemoved };\n","let onerror;\nconst onErrorTarget = {\n  get onerror() {\n    return onerror;\n  }\n};\n\n// Ember.onerror getter\nfunction getOnerror() {\n  return onerror;\n}\n// Ember.onerror setter\nfunction setOnerror(handler) {\n  onerror = handler;\n}\nlet dispatchOverride = null;\n\n// allows testing adapter to override dispatch\nfunction getDispatchOverride() {\n  return dispatchOverride;\n}\nfunction setDispatchOverride(handler) {\n  dispatchOverride = handler;\n}\n\nexport { getDispatchOverride, getOnerror, onErrorTarget, setDispatchOverride, setOnerror };\n","import { t as toString, s as symbol } from '../../../../shared-chunks/to-string-CqD7_vQ4.js';\nimport '../../../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport '../../../debug/index.js';\nimport { isDestroyed } from '../../../../@glimmer/destroyable/index.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { assert } from '../../../debug/lib/assert.js';\n\nconst objectPrototype = Object.prototype;\nlet counters;\nif (isDevelopingApp()) {\n  counters = {\n    peekCalls: 0,\n    peekPrototypeWalks: 0,\n    setCalls: 0,\n    deleteCalls: 0,\n    metaCalls: 0,\n    metaInstantiated: 0,\n    matchingListenersCalls: 0,\n    observerEventsCalls: 0,\n    addToListenersCalls: 0,\n    removeFromListenersCalls: 0,\n    removeAllListenersCalls: 0,\n    listenersInherited: 0,\n    listenersFlattened: 0,\n    parentListenersUsed: 0,\n    flattenedListenersCalls: 0,\n    reopensAfterFlatten: 0,\n    readableLazyChainsCalls: 0,\n    writableLazyChainsCalls: 0\n  };\n}\n\n/**\n@module ember\n*/\n\nconst UNDEFINED = symbol('undefined');\nvar ListenerKind = /*#__PURE__*/function (ListenerKind) {\n  ListenerKind[ListenerKind[\"ADD\"] = 0] = \"ADD\";\n  ListenerKind[ListenerKind[\"ONCE\"] = 1] = \"ONCE\";\n  ListenerKind[ListenerKind[\"REMOVE\"] = 2] = \"REMOVE\";\n  return ListenerKind;\n}(ListenerKind || {});\nlet currentListenerVersion = 1;\nclass Meta {\n  /** @internal */\n  _descriptors;\n  /** @internal */\n  _mixins;\n  /** @internal */\n  _isInit;\n  /** @internal */\n  _lazyChains;\n  /** @internal */\n  _values;\n  /** @internal */\n  _revisions;\n  /** @internal */\n  source;\n  /** @internal */\n  proto;\n  /** @internal */\n  _parent;\n\n  /** @internal */\n  _listeners;\n  /** @internal */\n  _listenersVersion = 1;\n  /** @internal */\n  _inheritedEnd = -1;\n  /** @internal */\n  _flattenedVersion = 0;\n\n  // DEBUG\n  /** @internal */\n  constructor(obj) {\n    if (isDevelopingApp()) {\n      counters.metaInstantiated++;\n    }\n    this._parent = undefined;\n    this._descriptors = undefined;\n    this._mixins = undefined;\n    this._lazyChains = undefined;\n    this._values = undefined;\n    this._revisions = undefined;\n\n    // initial value for all flags right now is false\n    // see FLAGS const for detailed list of flags used\n    this._isInit = false;\n\n    // used only internally\n    this.source = obj;\n    this.proto = obj.constructor === undefined ? undefined : obj.constructor.prototype;\n    this._listeners = undefined;\n  }\n\n  /** @internal */\n  get parent() {\n    let parent = this._parent;\n    if (parent === undefined) {\n      let proto = getPrototypeOf(this.source);\n      this._parent = parent = proto === null || proto === objectPrototype ? null : meta(proto);\n    }\n    return parent;\n  }\n  setInitializing() {\n    this._isInit = true;\n  }\n\n  /** @internal */\n  unsetInitializing() {\n    this._isInit = false;\n  }\n\n  /** @internal */\n  isInitializing() {\n    return this._isInit;\n  }\n\n  /** @internal */\n  isPrototypeMeta(obj) {\n    return this.proto === this.source && this.source === obj;\n  }\n\n  /** @internal */\n  _getOrCreateOwnMap(key) {\n    return this[key] || (this[key] = Object.create(null));\n  }\n\n  /** @internal */\n  _getOrCreateOwnSet(key) {\n    return this[key] || (this[key] = new Set());\n  }\n\n  /** @internal */\n  _findInheritedMap(key, subkey) {\n    let pointer = this;\n    while (pointer !== null) {\n      let map = pointer[key];\n      if (map !== undefined) {\n        let value = map.get(subkey);\n        if (value !== undefined) {\n          return value;\n        }\n      }\n      pointer = pointer.parent;\n    }\n  }\n\n  /** @internal */\n  _hasInInheritedSet(key, value) {\n    let pointer = this;\n    while (pointer !== null) {\n      let set = pointer[key];\n      if (set !== undefined && set.has(value)) {\n        return true;\n      }\n      pointer = pointer.parent;\n    }\n    return false;\n  }\n\n  /** @internal */\n  valueFor(key) {\n    let values = this._values;\n    return values !== undefined ? values[key] : undefined;\n  }\n\n  /** @internal */\n  setValueFor(key, value) {\n    let values = this._getOrCreateOwnMap('_values');\n    values[key] = value;\n  }\n\n  /** @internal */\n  revisionFor(key) {\n    let revisions = this._revisions;\n    return revisions !== undefined ? revisions[key] : undefined;\n  }\n\n  /** @internal */\n  setRevisionFor(key, revision) {\n    let revisions = this._getOrCreateOwnMap('_revisions');\n    revisions[key] = revision;\n  }\n\n  /** @internal */\n  writableLazyChainsFor(key) {\n    if (isDevelopingApp()) {\n      counters.writableLazyChainsCalls++;\n    }\n    let lazyChains = this._getOrCreateOwnMap('_lazyChains');\n    let chains = lazyChains[key];\n    if (chains === undefined) {\n      chains = lazyChains[key] = [];\n    }\n    return chains;\n  }\n\n  /** @internal */\n  readableLazyChainsFor(key) {\n    if (isDevelopingApp()) {\n      counters.readableLazyChainsCalls++;\n    }\n    let lazyChains = this._lazyChains;\n    if (lazyChains !== undefined) {\n      return lazyChains[key];\n    }\n    return undefined;\n  }\n\n  /** @internal */\n  addMixin(mixin) {\n    (isDevelopingApp() && !(!isDestroyed(this.source)) && assert(isDestroyed(this.source) ? `Cannot add mixins of \\`${toString(mixin)}\\` on \\`${toString(this.source)}\\` call addMixin after it has been destroyed.` : '', !isDestroyed(this.source)));\n    let set = this._getOrCreateOwnSet('_mixins');\n    set.add(mixin);\n  }\n\n  /** @internal */\n  hasMixin(mixin) {\n    return this._hasInInheritedSet('_mixins', mixin);\n  }\n\n  /** @internal */\n  forEachMixins(fn) {\n    let pointer = this;\n    let seen;\n    while (pointer !== null) {\n      let set = pointer._mixins;\n      if (set !== undefined) {\n        seen = seen === undefined ? new Set() : seen;\n        // TODO cleanup typing here\n        set.forEach(mixin => {\n          if (!seen.has(mixin)) {\n            seen.add(mixin);\n            fn(mixin);\n          }\n        });\n      }\n      pointer = pointer.parent;\n    }\n  }\n\n  /** @internal */\n  writeDescriptors(subkey, value) {\n    (isDevelopingApp() && !(!isDestroyed(this.source)) && assert(isDestroyed(this.source) ? `Cannot update descriptors for \\`${subkey}\\` on \\`${toString(this.source)}\\` after it has been destroyed.` : '', !isDestroyed(this.source)));\n    let map = this._descriptors || (this._descriptors = new Map());\n    map.set(subkey, value);\n  }\n\n  /** @internal */\n  peekDescriptors(subkey) {\n    let possibleDesc = this._findInheritedMap('_descriptors', subkey);\n    return possibleDesc === UNDEFINED ? undefined : possibleDesc;\n  }\n\n  /** @internal */\n  removeDescriptors(subkey) {\n    this.writeDescriptors(subkey, UNDEFINED);\n  }\n\n  /** @internal */\n  forEachDescriptors(fn) {\n    let pointer = this;\n    let seen;\n    while (pointer !== null) {\n      let map = pointer._descriptors;\n      if (map !== undefined) {\n        seen = seen === undefined ? new Set() : seen;\n        map.forEach((value, key) => {\n          if (!seen.has(key)) {\n            seen.add(key);\n            if (value !== UNDEFINED) {\n              fn(key, value);\n            }\n          }\n        });\n      }\n      pointer = pointer.parent;\n    }\n  }\n\n  /** @internal */\n  addToListeners(eventName, target, method, once, sync) {\n    if (isDevelopingApp()) {\n      counters.addToListenersCalls++;\n    }\n    this.pushListener(eventName, target, method, once ? ListenerKind.ONCE : ListenerKind.ADD, sync);\n  }\n\n  /** @internal */\n  removeFromListeners(eventName, target, method) {\n    if (isDevelopingApp()) {\n      counters.removeFromListenersCalls++;\n    }\n    this.pushListener(eventName, target, method, ListenerKind.REMOVE);\n  }\n  pushListener(event, target, method, kind, sync = false) {\n    let listeners = this.writableListeners();\n    let i = indexOfListener(listeners, event, target, method);\n\n    // remove if found listener was inherited\n    if (i !== -1 && i < this._inheritedEnd) {\n      listeners.splice(i, 1);\n      this._inheritedEnd--;\n      i = -1;\n    }\n\n    // if not found, push. Note that we must always push if a listener is not\n    // found, even in the case of a function listener remove, because we may be\n    // attempting to add or remove listeners _before_ flattening has occurred.\n    if (i === -1) {\n      (isDevelopingApp() && !(!(this.isPrototypeMeta(this.source) && typeof method === 'function')) && assert('You cannot add function listeners to prototypes. Convert the listener to a string listener, or add it to the instance instead.', !(this.isPrototypeMeta(this.source) && typeof method === 'function')));\n      (isDevelopingApp() && !(!(!this.isPrototypeMeta(this.source) && typeof method === 'function' && kind === ListenerKind.REMOVE)) && assert('You attempted to remove a function listener which did not exist on the instance, which means you may have attempted to remove it before it was added.', !(!this.isPrototypeMeta(this.source) && typeof method === 'function' && kind === ListenerKind.REMOVE)));\n      listeners.push({\n        event,\n        target,\n        method,\n        kind,\n        sync\n      });\n    } else {\n      let listener = listeners[i];\n      (isDevelopingApp() && !(listener) && assert('has listener', listener)); // If the listener is our own listener and we are trying to remove it, we\n      // want to splice it out entirely so we don't hold onto a reference.\n      if (kind === ListenerKind.REMOVE && listener.kind !== ListenerKind.REMOVE) {\n        listeners.splice(i, 1);\n      } else {\n        (isDevelopingApp() && !(!(listener.kind === ListenerKind.ADD && kind === ListenerKind.ADD && listener.sync !== sync)) && assert(`You attempted to add an observer for the same method on '${event.split(':')[0]}' twice to ${target} as both sync and async. Observers must be either sync or async, they cannot be both. This is likely a mistake, you should either remove the code that added the observer a second time, or update it to always be sync or async. The method was ${String(method)}.`, !(listener.kind === ListenerKind.ADD && kind === ListenerKind.ADD && listener.sync !== sync))); // update own listener\n        listener.kind = kind;\n        listener.sync = sync;\n      }\n    }\n  }\n  writableListeners() {\n    // Check if we need to invalidate and reflatten. We need to do this if we\n    // have already flattened (flattened version is the current version) and\n    // we are either writing to a prototype meta OR we have never inherited, and\n    // may have cached the parent's listeners.\n    if (this._flattenedVersion === currentListenerVersion && (this.source === this.proto || this._inheritedEnd === -1)) {\n      if (isDevelopingApp()) {\n        counters.reopensAfterFlatten++;\n      }\n      currentListenerVersion++;\n    }\n\n    // Inherited end has not been set, then we have never created our own\n    // listeners, but may have cached the parent's\n    if (this._inheritedEnd === -1) {\n      this._inheritedEnd = 0;\n      this._listeners = [];\n    }\n    return this._listeners;\n  }\n\n  /**\n    Flattening is based on a global revision counter. If the revision has\n    bumped it means that somewhere in a class inheritance chain something has\n    changed, so we need to reflatten everything. This can only happen if:\n     1. A meta has been flattened (listener has been called)\n    2. The meta is a prototype meta with children who have inherited its\n       listeners\n    3. A new listener is subsequently added to the meta (e.g. via `.reopen()`)\n     This is a very rare occurrence, so while the counter is global it shouldn't\n    be updated very often in practice.\n  */\n  flattenedListeners() {\n    if (isDevelopingApp()) {\n      counters.flattenedListenersCalls++;\n    }\n    if (this._flattenedVersion < currentListenerVersion) {\n      if (isDevelopingApp()) {\n        counters.listenersFlattened++;\n      }\n      let parent = this.parent;\n      if (parent !== null) {\n        // compute\n        let parentListeners = parent.flattenedListeners();\n        if (parentListeners !== undefined) {\n          if (this._listeners === undefined) {\n            // If this instance doesn't have any of its own listeners (writableListeners\n            // has never been called) then we don't need to do any flattening, return\n            // the parent's listeners instead.\n            if (isDevelopingApp()) {\n              counters.parentListenersUsed++;\n            }\n            this._listeners = parentListeners;\n          } else {\n            let listeners = this._listeners;\n            if (this._inheritedEnd > 0) {\n              listeners.splice(0, this._inheritedEnd);\n              this._inheritedEnd = 0;\n            }\n            for (let listener of parentListeners) {\n              let index = indexOfListener(listeners, listener.event, listener.target, listener.method);\n              if (index === -1) {\n                if (isDevelopingApp()) {\n                  counters.listenersInherited++;\n                }\n                listeners.unshift(listener);\n                this._inheritedEnd++;\n              }\n            }\n          }\n        }\n      }\n      this._flattenedVersion = currentListenerVersion;\n    }\n    return this._listeners;\n  }\n\n  /** @internal */\n  matchingListeners(eventName) {\n    let listeners = this.flattenedListeners();\n    let result;\n    if (isDevelopingApp()) {\n      counters.matchingListenersCalls++;\n    }\n    if (listeners !== undefined) {\n      for (let listener of listeners) {\n        // REMOVE listeners are placeholders that tell us not to\n        // inherit, so they never match. Only ADD and ONCE can match.\n        if (listener.event === eventName && (listener.kind === ListenerKind.ADD || listener.kind === ListenerKind.ONCE)) {\n          if (result === undefined) {\n            // we create this array only after we've found a listener that\n            // matches to avoid allocations when no matches are found.\n            result = [];\n          }\n          result.push(listener.target, listener.method, listener.kind === ListenerKind.ONCE);\n        }\n      }\n    }\n    return result;\n  }\n\n  /** @internal */\n  observerEvents() {\n    let listeners = this.flattenedListeners();\n    let result;\n    if (isDevelopingApp()) {\n      counters.observerEventsCalls++;\n    }\n    if (listeners !== undefined) {\n      for (let listener of listeners) {\n        // REMOVE listeners are placeholders that tell us not to\n        // inherit, so they never match. Only ADD and ONCE can match.\n        if ((listener.kind === ListenerKind.ADD || listener.kind === ListenerKind.ONCE) && listener.event.indexOf(':change') !== -1) {\n          if (result === undefined) {\n            // we create this array only after we've found a listener that\n            // matches to avoid allocations when no matches are found.\n            result = [];\n          }\n          result.push(listener);\n        }\n      }\n    }\n    return result;\n  }\n}\nconst getPrototypeOf = Object.getPrototypeOf;\nconst metaStore = new WeakMap();\nfunction setMeta(obj, meta) {\n  (isDevelopingApp() && !(obj !== null) && assert('Cannot call `setMeta` on null', obj !== null));\n  (isDevelopingApp() && !(obj !== undefined) && assert('Cannot call `setMeta` on undefined', obj !== undefined));\n  (isDevelopingApp() && !(typeof obj === 'object' || typeof obj === 'function') && assert(`Cannot call \\`setMeta\\` on ${typeof obj}`, typeof obj === 'object' || typeof obj === 'function'));\n  if (isDevelopingApp()) {\n    counters.setCalls++;\n  }\n  metaStore.set(obj, meta);\n}\nfunction peekMeta(obj) {\n  (isDevelopingApp() && !(obj !== null) && assert('Cannot call `peekMeta` on null', obj !== null));\n  (isDevelopingApp() && !(obj !== undefined) && assert('Cannot call `peekMeta` on undefined', obj !== undefined));\n  (isDevelopingApp() && !(typeof obj === 'object' || typeof obj === 'function') && assert(`Cannot call \\`peekMeta\\` on ${typeof obj}`, typeof obj === 'object' || typeof obj === 'function'));\n  if (isDevelopingApp()) {\n    counters.peekCalls++;\n  }\n  let meta = metaStore.get(obj);\n  if (meta !== undefined) {\n    return meta;\n  }\n  let pointer = getPrototypeOf(obj);\n  while (pointer !== null) {\n    if (isDevelopingApp()) {\n      counters.peekPrototypeWalks++;\n    }\n    meta = metaStore.get(pointer);\n    if (meta !== undefined) {\n      if (meta.proto !== pointer) {\n        // The meta was a prototype meta which was not marked as initializing.\n        // This can happen when a prototype chain was created manually via\n        // Object.create() and the source object does not have a constructor.\n        meta.proto = pointer;\n      }\n      return meta;\n    }\n    pointer = getPrototypeOf(pointer);\n  }\n  return null;\n}\n\n/**\n  Retrieves the meta hash for an object. If `writable` is true ensures the\n  hash is writable for this object as well.\n\n  The meta object contains information about computed property descriptors as\n  well as any watched properties and other information. You generally will\n  not access this information directly but instead work with higher level\n  methods that manipulate this hash indirectly.\n\n  @method meta\n  @for Ember\n  @private\n\n  @param {Object} obj The object to retrieve meta for\n  @param {Boolean} [writable=true] Pass `false` if you do not intend to modify\n    the meta hash, allowing the method to avoid making an unnecessary copy.\n  @return {Object} the meta hash for an object\n*/\nconst meta = function meta(obj) {\n  (isDevelopingApp() && !(obj !== null) && assert('Cannot call `meta` on null', obj !== null));\n  (isDevelopingApp() && !(obj !== undefined) && assert('Cannot call `meta` on undefined', obj !== undefined));\n  (isDevelopingApp() && !(typeof obj === 'object' || typeof obj === 'function') && assert(`Cannot call \\`meta\\` on ${typeof obj}`, typeof obj === 'object' || typeof obj === 'function'));\n  if (isDevelopingApp()) {\n    counters.metaCalls++;\n  }\n  let maybeMeta = peekMeta(obj);\n\n  // remove this code, in-favor of explicit parent\n  if (maybeMeta !== null && maybeMeta.source === obj) {\n    return maybeMeta;\n  }\n  let newMeta = new Meta(obj);\n  setMeta(obj, newMeta);\n  return newMeta;\n};\nif (isDevelopingApp()) {\n  meta._counters = counters;\n}\nfunction indexOfListener(listeners, event, target, method) {\n  for (let i = listeners.length - 1; i >= 0; i--) {\n    let listener = listeners[i];\n    (isDevelopingApp() && !(listener) && assert('has listener', listener));\n    if (listener.event === event && listener.target === target && listener.method === method) {\n      return i;\n    }\n  }\n  return -1;\n}\n\nexport { Meta, UNDEFINED, counters, meta, peekMeta, setMeta };\n","import { g as get } from '../../../shared-chunks/observers-DhgQ6ba5.js';\nexport { V as ASYNC_OBSERVERS, J as ComputedDescriptor, C as ComputedProperty, D as DEBUG_INJECTION_FUNCTIONS, W as Libraries, Q as PROPERTY_DID_CHANGE, P as PROXY_CONTENT, X as SYNC_OBSERVERS, Y as TrackedDescriptor, _ as _getPath, Z as _getProp, j as activateObserver, F as addListener, x as addObserver, R as autoComputed, l as beginPropertyChanges, T as changeProperties, c as computed, A as defineDecorator, d as defineProperty, z as defineValue, E as descriptorForDecorator, b as descriptorForProperty, m as endPropertyChanges, e as expandProperties, I as flushAsyncObservers, v as hasListeners, h as hasUnknownProperty, p as inject, f as isClassicDecorator, U as isComputed, i as isElementDescriptor, O as libraries, H as makeComputedDecorator, $ as markObjectAsDirty, y as nativeDescDecorator, n as notifyPropertyChange, o as objectAt, N as on, G as removeListener, w as removeObserver, B as revalidateObservers, k as sendEvent, s as setClassicDecorator, t as tagForObject, a as tagForProperty, S as tracked } from '../../../shared-chunks/observers-DhgQ6ba5.js';\nexport { g as getCachedValueFor } from '../../../shared-chunks/computed_cache-DmYKevAP.js';\nexport { a as alias } from '../../../shared-chunks/alias-BEMS3qgG.js';\nimport { deprecate } from '../../debug/index.js';\nimport { s as set } from '../../../shared-chunks/property_set-DrZnfGQ7.js';\nexport { _ as _setProp, t as trySet } from '../../../shared-chunks/property_set-DrZnfGQ7.js';\nimport { isDevelopingApp } from '@embroider/macros';\nexport { d as addArrayObserver, c as arrayContentDidChange, b as arrayContentWillChange, e as removeArrayObserver, a as replace, r as replaceInNativeArray } from '../../../shared-chunks/array-BqYCCatg.js';\nexport { g as getProperties, s as setProperties } from '../../../shared-chunks/set_properties-Dag9Xz6u.js';\nexport { cached } from '../../../@glimmer/tracking/index.js';\nexport { createCache, getValue, isConst } from '../../../@glimmer/validator/index.js';\nexport { N as NAMESPACES, a as NAMESPACES_BY_ID, b as addNamespace, f as findNamespace, c as findNamespaces, i as isNamespaceSearchDisabled, p as processAllNamespaces, d as processNamespace, r as removeNamespace, e as setNamespaceSearchDisabled, s as setUnprocessedMixins } from '../../../shared-chunks/namespace_search-ClQOZuFA.js';\n\n/**\n@module ember\n*/\n\nfunction deprecateProperty(object, deprecatedKey, newKey, options) {\n  function _deprecate() {\n    (isDevelopingApp() && true && deprecate(`Usage of \\`${deprecatedKey}\\` is deprecated, use \\`${newKey}\\` instead.`, false, options));\n  }\n  Object.defineProperty(object, deprecatedKey, {\n    configurable: true,\n    enumerable: false,\n    set(value) {\n      _deprecate();\n      set(this, newKey, value);\n    },\n    get() {\n      _deprecate();\n      return get(this, newKey);\n    }\n  });\n}\n\nconst EACH_PROXIES = new WeakMap();\nfunction eachProxyArrayWillChange(array, idx, removedCnt, addedCnt) {\n  let eachProxy = EACH_PROXIES.get(array);\n  if (eachProxy !== undefined) {\n    eachProxy.arrayWillChange(array, idx, removedCnt, addedCnt);\n  }\n}\nfunction eachProxyArrayDidChange(array, idx, removedCnt, addedCnt) {\n  let eachProxy = EACH_PROXIES.get(array);\n  if (eachProxy !== undefined) {\n    eachProxy.arrayDidChange(array, idx, removedCnt, addedCnt);\n  }\n}\n\nexport { deprecateProperty, eachProxyArrayDidChange, eachProxyArrayWillChange, get, set };\n","import { getOwner as getOwner$1, setOwner as setOwner$1 } from '../../../@glimmer/owner/index.js';\n\n/**\n  @module @ember/owner\n */\n\n/**\n  The name for a factory consists of a namespace and the name of a specific type\n  within that namespace, like `'service:session'`.\n\n  **Note:** `FullName` is *not* a class, just a contract for strings used in the\n  DI system. It is currently documented as a class only due to limits in our\n  documentation infrastructure.\n\n  @for @ember/owner\n  @class FullName\n  @public\n */\n\n/**\n  A type registry for the DI system, which other participants in the DI system\n  can register themselves into with declaration merging. The contract for this\n  type is that its keys are the `Type` from a `FullName`, and each value for a\n  `Type` is another registry whose keys are the `Name` from a `FullName`. The\n  mechanic for providing a registry is [declaration merging][handbook].\n\n  [handbook]: https://www.typescriptlang.org/docs/handbook/declaration-merging.html\n\n  For example, Ember's `@ember/service` module includes this set of definitions:\n\n  ```ts\n  export default class Service extends EmberObject {}\n\n  // For concrete singleton classes to be merged into.\n  interface Registry extends Record<string, Service> {}\n\n  declare module '@ember/owner' {\n    service: Registry;\n  }\n  ```\n\n  Declarations of services can then include the registry:\n\n  ```ts\n  import Service from '@ember/service';\n\n  export default class Session extends Service {\n    login(username: string, password: string) {\n      // ...\n    }\n  }\n\n  declare module '@ember/service' {\n    interface Registry {\n      session: Session;\n    }\n  }\n  ```\n\n  Then users of the `Owner` API will be able to do things like this with strong\n  type safety guarantees:\n\n  ```ts\n  getOwner(this)?.lookup('service:session').login(\"hello\", \"1234abcd\");\n  ```\n\n  @for @ember/owner\n  @private\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\n\n// Convenience utility for pulling a specific factory manager off `DIRegistry`\n// if one exists, or falling back to the default definition otherwise.\n/**\n  @private\n */\n\n/**\n  The common interface for the ability to `register()` an item, shared by the\n  `Owner` and `RegistryProxy` interfaces.\n\n  @for @ember/owner\n  @class BasicRegistry\n  @private\n */\n\n/**\n  The common interface for the ability to `lookup()` or get the `factoryFor` an\n  item, shared by the `Owner` and `ContainerProxy` interfaces.\n\n  @for @ember/owner\n  @class BasicContainer\n  @private\n */\n\n/**\n  Framework objects in an Ember application (components, services, routes,\n  etc.) are created via a factory and dependency injection system. Each of\n  these objects is the responsibility of an \"owner\", which handles its\n  instantiation and manages its lifetime.\n\n  An `Owner` is not a class you construct; it is one the framework constructs\n  for you. The normal way to get access to the relevant `Owner` is using the\n  `getOwner` function.\n\n  @for @ember/owner\n  @uses BasicRegistry\n  @uses BasicContainer\n  @class Owner\n  @since 4.10.0\n  @public\n */\n\n/**\n * Interface representing the options for registering an item as a factory.\n *\n * @for @ember/owner\n * @class RegisterOptions\n * @public\n */\n\n/**\n  Registered factories are instantiated by having create called on them.\n  Additionally they are singletons by default, so each time they are looked up\n  they return the same instance.\n\n  However, that behavior can be modified with the `instantiate` and `singleton`\n  options to the `Owner.register()` method.\n\n  @for @ember/owner\n  @class Factory\n  @since 4.10.0\n  @public\n */\n\n/**\n  The interface representing a manager which can be used for introspection of\n  the factory's class or for the creation of factory instances with initial\n  properties. The manager is an object with the following properties:\n\n  - `class` - The registered or resolved class.\n  - `create` - A function that will create an instance of the class with any\n  dependencies injected.\n\n  **Note:** `FactoryManager` is *not* user-constructible; the only legal way\n  to get a `FactoryManager` is via `Owner.factoryFor`.\n\n  @for @ember/owner\n  @class FactoryManager\n  @extends Factory\n  @public\n */\n\n/**\n * A record mapping all known items of a given type: if the item is known it\n * will be `true`; otherwise it will be `false` or `undefined`.\n */\n\n/**\n  A `Resolver` is the mechanism responsible for looking up code in your\n  application and converting its naming conventions into the actual classes,\n  functions, and templates that Ember needs to resolve its dependencies, for\n  example, what template to render for a given route. It is a system that helps\n  the app resolve the lookup of JavaScript modules agnostic of what kind of\n  module system is used, which can be AMD, CommonJS or just plain globals. It\n  is used to lookup routes, models, components, templates, or anything that is\n  used in your Ember app.\n\n  This interface is not a concrete class; instead, it represents the contract a\n  custom resolver must implement. Most apps never need to think about this: in\n  the default blueprint, this is supplied by the `ember-resolver` package.\n\n  @for @ember/owner\n  @class Resolver\n  @since 4.10.0\n  @public\n */\n\n/**\n  The internal representation of a `Factory`, for the extra detail available for\n  private use internally than we expose to consumers.\n\n  @for @ember/owner\n  @class InternalFactory\n  @private\n */\n\n/**\n  @private\n  @method isFactory\n  @param {Object} obj\n  @return {Boolean}\n  @static\n */\nfunction isFactory(obj) {\n  return obj != null && typeof obj.create === 'function';\n}\n\n// NOTE: For docs, see the definition at the public API site in `@ember/owner`;\n// we document it there for the sake of public API docs and for TS consumption,\n// while having the richer `InternalOwner` representation for Ember itself.\nfunction getOwner(object) {\n  // SAFETY: this is a convention. From the glimmer perspective, the owner really can be any object.\n  return getOwner$1(object);\n}\n\n/**\n  `setOwner` forces a new owner on a given object instance. This is primarily\n  useful in some testing cases.\n\n  @method setOwner\n  @static\n  @for @ember/owner\n  @param {Object} object An object instance.\n  @param {Owner} object The new owner object of the object instance.\n  @since 2.3.0\n  @public\n*/\nfunction setOwner(object, owner) {\n  setOwner$1(object, owner);\n}\n\n// Defines the type for the ContainerProxyMixin. When we rationalize our Owner\n// *not* to work via mixins, we will be able to delete this entirely, in favor\n// of just using the Owner class itself.\n/**\n * The interface for a container proxy, which is itself a private API used\n * by the private `ContainerProxyMixin` as part of the base definition of\n * `EngineInstance`.\n *\n * @class ContainerProxy\n * @for @ember/owner\n * @private\n * @extends BasicContainer\n */\n\n/**\n * @class RegistryProxy\n * @extends BasicRegistry\n * @private\n * @for @ember/owner\n */\n\n/**\n * @internal This is the same basic interface which is implemented (via the\n *   mixins) by `EngineInstance` and therefore `ApplicationInstance`, which are\n *   the normal interfaces to an `Owner` for end user applications now. However,\n *   going forward, we expect to progressively deprecate and remove the \"extra\"\n *   APIs which are not exposed on `Owner` itself.\n */\n\nexport { getOwner, isFactory, setOwner };\n","import { c as configure, o as on, R as RSVP } from '../../../../../shared-chunks/rsvp-CnCSY930.js';\nimport { _backburner, _rsvpErrorQueue } from '../../../../runloop/index.js';\nimport { getDispatchOverride } from '../../../error-handling/index.js';\nimport '../../../../debug/index.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { assert } from '../../../../debug/lib/assert.js';\n\nconfigure('async', (callback, promise) => {\n  _backburner.schedule('actions', null, callback, promise);\n});\nconfigure('after', cb => {\n  _backburner.schedule(_rsvpErrorQueue, null, cb);\n});\non('error', onerrorDefault);\nfunction onerrorDefault(reason) {\n  let error = errorFor(reason);\n  if (error) {\n    let overrideDispatch = getDispatchOverride();\n    if (overrideDispatch) {\n      overrideDispatch(error);\n    } else {\n      throw error;\n    }\n  }\n}\nfunction errorFor(reason) {\n  if (!reason) return;\n  let withErrorThrown = reason;\n  if (withErrorThrown.errorThrown) {\n    return unwrapErrorThrown(withErrorThrown);\n  }\n  let withName = reason;\n  if (withName.name === 'UnrecognizedURLError') {\n    (isDevelopingApp() && true && assert(`The URL '${withName.message}' did not match any routes in your application`, false)); // @ts-expect-error We'll hit this if the assert is stripped\n    return;\n  }\n  if (reason.name === 'TransitionAborted') {\n    return;\n  }\n  return reason;\n}\nfunction unwrapErrorThrown(reason) {\n  let error = reason.errorThrown;\n  if (typeof error === 'string') {\n    error = new Error(error);\n  }\n  Object.defineProperty(error, '__reason_with_error_thrown__', {\n    value: reason,\n    enumerable: false\n  });\n  return error;\n}\n\nexport { RSVP as default, onerrorDefault };\n","import { meta } from '../../../meta/lib/meta.js';\nimport Mixin from '../../../../object/mixin.js';\nimport { d as defineProperty, g as get, c as computed, t as tagForObject, a as tagForProperty } from '../../../../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../../../debug/index.js';\nimport { updateTag as UPDATE_TAG, tagMetaFor, tagFor, combine } from '../../../../../@glimmer/validator/index.js';\nimport { h as setupMandatorySetter, d as isObject } from '../../../../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { s as setProxy, i as isProxy } from '../../../../../shared-chunks/is_proxy-C2q5rUMp.js';\nimport { s as set } from '../../../../../shared-chunks/property_set-DrZnfGQ7.js';\nimport '../../../../../shared-chunks/env-DEd6hPbj.js';\nimport '../../../../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../../../../@glimmer/global-context/index.js';\nimport '../../../../../@glimmer/destroyable/index.js';\nimport '../../../../../shared-chunks/reference-B6HMX4y0.js';\nimport { s as setCustomTagFor } from '../../../../../shared-chunks/args-proxy-B91L3LRK.js';\nimport '../../../../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { assert } from '../../../../debug/lib/assert.js';\n\n/**\n@module ember\n*/\n\nfunction contentFor(proxy) {\n  let content = get(proxy, 'content');\n  // SAFETY: Ideally we'd assert instead of casting, but @glimmer/validator doesn't give us\n  // sufficient public types for this. Previously this code was .js and worked correctly so\n  // hopefully this is sufficiently reliable.\n  UPDATE_TAG(tagForObject(proxy), tagForObject(content));\n  return content;\n}\nfunction customTagForProxy(proxy, key, addMandatorySetter) {\n  (isDevelopingApp() && !(isProxy(proxy)) && assert('Expected a proxy', isProxy(proxy)));\n  let meta = tagMetaFor(proxy);\n  let tag = tagFor(proxy, key, meta);\n  if (isDevelopingApp()) {\n    // TODO: Replace this with something more first class for tracking tags in DEBUG\n    // SAFETY: This is not an officially supported property but setting shouldn't cause issues.\n    tag._propertyKey = key;\n  }\n  if (key in proxy) {\n    if (isDevelopingApp() && addMandatorySetter) {\n      (isDevelopingApp() && !(setupMandatorySetter) && assert('[BUG] setupMandatorySetter should be set when debugging', setupMandatorySetter));\n      setupMandatorySetter(tag, proxy, key);\n    }\n    return tag;\n  } else {\n    let tags = [tag, tagFor(proxy, 'content', meta)];\n    let content = contentFor(proxy);\n    if (isObject(content)) {\n      tags.push(tagForProperty(content, key, addMandatorySetter));\n    }\n    return combine(tags);\n  }\n}\n\n/**\n  `ProxyMixin` forwards all properties not defined by the proxy itself\n  to a proxied `content` object.  See ObjectProxy for more details.\n\n  @class ProxyMixin\n  @namespace Ember\n  @private\n*/\n\nconst ProxyMixin = Mixin.create({\n  /**\n    The object whose properties will be forwarded.\n     @property content\n    @type {unknown}\n    @default null\n    @public\n  */\n  content: null,\n  init() {\n    this._super(...arguments);\n    setProxy(this);\n    tagForObject(this);\n    setCustomTagFor(this, customTagForProxy);\n  },\n  willDestroy() {\n    this.set('content', null);\n    this._super(...arguments);\n  },\n  isTruthy: computed('content', function () {\n    return Boolean(get(this, 'content'));\n  }),\n  unknownProperty(key) {\n    let content = contentFor(this);\n    return content ? get(content, key) : undefined;\n  },\n  setUnknownProperty(key, value) {\n    let m = meta(this);\n    if (m.isInitializing() || m.isPrototypeMeta(this)) {\n      // if marked as prototype or object is initializing then just\n      // defineProperty rather than delegate\n      defineProperty(this, key, null, value);\n      return value;\n    }\n    let content = contentFor(this);\n    (isDevelopingApp() && !(content) && assert(`Cannot delegate set('${key}', ${value}) to the 'content' property of object proxy ${this}: its 'content' is undefined.`, content)); // SAFETY: We don't actually guarantee that this is an object, so this isn't necessarily safe :(\n    return set(content, key, value);\n  }\n});\n\nexport { contentFor, ProxyMixin as default };\n","import Mixin from '../../../../object/mixin.js';\nimport '../../../meta/lib/meta.js';\nimport '../../../../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../../../debug/index.js';\nimport '../../../../../@glimmer/destroyable/index.js';\nimport '../../../../../@glimmer/validator/index.js';\nimport '../../../../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../../../../@glimmer/global-context/index.js';\nimport '../../../../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../../../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { g as get } from '../../../../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../../../../shared-chunks/env-DEd6hPbj.js';\nimport { assert } from '../../../../debug/lib/assert.js';\n\n/**\n@module ember\n*/\n\nconst ActionHandler = Mixin.create({\n  mergedProperties: ['actions'],\n  /**\n    The collection of functions, keyed by name, available on this\n    `ActionHandler` as action targets.\n     These functions will be invoked when a matching `{{action}}` is triggered\n    from within a template and the application's current route is this route.\n     Actions can also be invoked from other parts of your application\n    via `ActionHandler#send`.\n     The `actions` hash will inherit action handlers from\n    the `actions` hash defined on extended parent classes\n    or mixins rather than just replace the entire hash, e.g.:\n     ```app/mixins/can-display-banner.js\n    import Mixin from '@ember/object/mixin';\n     export default Mixin.create({\n      actions: {\n        displayBanner(msg) {\n          // ...\n        }\n      }\n    });\n    ```\n     ```app/routes/welcome.js\n    import Route from '@ember/routing/route';\n    import CanDisplayBanner from '../mixins/can-display-banner';\n     export default Route.extend(CanDisplayBanner, {\n      actions: {\n        playMusic() {\n          // ...\n        }\n      }\n    });\n     // `WelcomeRoute`, when active, will be able to respond\n    // to both actions, since the actions hash is merged rather\n    // then replaced when extending mixins / parent classes.\n    this.send('displayBanner');\n    this.send('playMusic');\n    ```\n     Within a Controller, Route or Component's action handler,\n    the value of the `this` context is the Controller, Route or\n    Component object:\n     ```app/routes/song.js\n    import Route from '@ember/routing/route';\n     export default Route.extend({\n      actions: {\n        myAction() {\n          this.controllerFor(\"song\");\n          this.transitionTo(\"other.route\");\n          ...\n        }\n      }\n    });\n    ```\n     It is also possible to call `this._super(...arguments)` from within an\n    action handler if it overrides a handler defined on a parent\n    class or mixin:\n     Take for example the following routes:\n     ```app/mixins/debug-route.js\n    import Mixin from '@ember/object/mixin';\n     export default Mixin.create({\n      actions: {\n        debugRouteInformation() {\n          console.debug(\"It's a-me, console.debug!\");\n        }\n      }\n    });\n    ```\n     ```app/routes/annoying-debug.js\n    import Route from '@ember/routing/route';\n    import DebugRoute from '../mixins/debug-route';\n     export default Route.extend(DebugRoute, {\n      actions: {\n        debugRouteInformation() {\n          // also call the debugRouteInformation of mixed in DebugRoute\n          this._super(...arguments);\n           // show additional annoyance\n          window.alert(...);\n        }\n      }\n    });\n    ```\n     ## Bubbling\n     By default, an action will stop bubbling once a handler defined\n    on the `actions` hash handles it. To continue bubbling the action,\n    you must return `true` from the handler:\n     ```app/router.js\n    Router.map(function() {\n      this.route(\"album\", function() {\n        this.route(\"song\");\n      });\n    });\n    ```\n     ```app/routes/album.js\n    import Route from '@ember/routing/route';\n     export default Route.extend({\n      actions: {\n        startPlaying: function() {\n        }\n      }\n    });\n    ```\n     ```app/routes/album-song.js\n    import Route from '@ember/routing/route';\n     export default Route.extend({\n      actions: {\n        startPlaying() {\n          // ...\n           if (actionShouldAlsoBeTriggeredOnParentRoute) {\n            return true;\n          }\n        }\n      }\n    });\n    ```\n     @property actions\n    @type Object\n    @default null\n    @public\n  */\n\n  /**\n    Triggers a named action on the `ActionHandler`. Any parameters\n    supplied after the `actionName` string will be passed as arguments\n    to the action target function.\n     If the `ActionHandler` has its `target` property set, actions may\n    bubble to the `target`. Bubbling happens when an `actionName` can\n    not be found in the `ActionHandler`'s `actions` hash or if the\n    action target function returns `true`.\n     Example\n     ```app/routes/welcome.js\n    import Route from '@ember/routing/route';\n     export default Route.extend({\n      actions: {\n        playTheme() {\n          this.send('playMusic', 'theme.mp3');\n        },\n        playMusic(track) {\n          // ...\n        }\n      }\n    });\n    ```\n     @method send\n    @param {String} actionName The action to trigger\n    @param {*} context a context to send with the action\n    @public\n  */\n  send(actionName, ...args) {\n    (isDevelopingApp() && !(!this.isDestroying && !this.isDestroyed) && assert(`Attempted to call .send() with the action '${actionName}' on the destroyed object '${this}'.`, !this.isDestroying && !this.isDestroyed));\n    if (this.actions && this.actions[actionName]) {\n      let shouldBubble = this.actions[actionName].apply(this, args) === true;\n      if (!shouldBubble) {\n        return;\n      }\n    }\n    let target = get(this, 'target');\n    if (target) {\n      (isDevelopingApp() && !(typeof target.send === 'function') && assert(`The \\`target\\` for ${this} (${target}) does not have a \\`send\\` method`, typeof target.send === 'function'));\n      target.send(...arguments);\n    }\n  }\n});\n\nexport { ActionHandler as default };\n","import Mixin from '../../../../object/mixin.js';\n\n/**\n@module ember\n*/\n\n/**\n  Implements some standard methods for comparing objects. Add this mixin to\n  any class you create that can compare its instances.\n\n  You should implement the `compare()` method.\n\n  @class Comparable\n  @namespace Ember\n  @since Ember 0.9\n  @private\n*/\n\nconst Comparable = Mixin.create({\n  /**\n    __Required.__ You must implement this method to apply this mixin.\n     Override to return the result of the comparison of the two parameters. The\n    compare method should return:\n     - `-1` if `a < b`\n    - `0` if `a == b`\n    - `1` if `a > b`\n     Default implementation raises an exception.\n     @method compare\n    @param a {Object} the first object to compare\n    @param b {Object} the second object to compare\n    @return {Number} the result of the comparison\n    @private\n  */\n  compare: null\n});\n\nexport { Comparable as default };\n","import { join, schedule } from '../../../../runloop/index.js';\nimport Mixin from '../../../../object/mixin.js';\n\n// This is defined as a separate interface so that it can be used in the definition of\n// `Owner` without also including the `__container__` property.\n\n/**\n  ContainerProxyMixin is used to provide public access to specific\n  container functionality.\n\n  @class ContainerProxyMixin\n  @extends ContainerProxy\n  @private\n*/\n\nconst ContainerProxyMixin = Mixin.create({\n  /**\n   The container stores state.\n    @private\n   @property {Ember.Container} __container__\n   */\n  __container__: null,\n  ownerInjection() {\n    return this.__container__.ownerInjection();\n  },\n  lookup(fullName, options) {\n    return this.__container__.lookup(fullName, options);\n  },\n  destroy() {\n    let container = this.__container__;\n    if (container) {\n      join(() => {\n        container.destroy();\n        schedule('destroy', container, 'finalizeDestroy');\n      });\n    }\n    this._super();\n  },\n  factoryFor(fullName) {\n    return this.__container__.factoryFor(fullName);\n  }\n});\n\nexport { ContainerProxyMixin as default };\n","import '../../../../debug/index.js';\nimport Mixin from '../../../../object/mixin.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { assert } from '../../../../debug/lib/assert.js';\n\n/**\n@module ember\n*/\n\nconst RegistryProxyMixin = Mixin.create({\n  __registry__: null,\n  resolveRegistration(fullName) {\n    (isDevelopingApp() && !(this.__registry__.isValidFullName(fullName)) && assert('fullName must be a proper full name', this.__registry__.isValidFullName(fullName)));\n    return this.__registry__.resolve(fullName);\n  },\n  register: registryAlias('register'),\n  unregister: registryAlias('unregister'),\n  hasRegistration: registryAlias('has'),\n  registeredOption: registryAlias('getOption'),\n  registerOptions: registryAlias('options'),\n  registeredOptions: registryAlias('getOptions'),\n  registerOptionsForType: registryAlias('optionsForType'),\n  registeredOptionsForType: registryAlias('getOptionsForType')\n});\nfunction registryAlias(name) {\n  return function (...args) {\n    // We need this cast because `Parameters` is deferred so that it is not\n    // possible for TS to see it will always produce the right type. However,\n    // since `AnyFn` has a rest type, it is allowed. See discussion on [this\n    // issue](https://github.com/microsoft/TypeScript/issues/47615).\n    return this.__registry__[name](...args);\n  };\n}\n\nexport { RegistryProxyMixin as default };\n","import { c as context } from '../../../../../shared-chunks/env-DEd6hPbj.js';\nimport { g as get, c as computed } from '../../../../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../../meta/lib/meta.js';\nimport '../../../../debug/index.js';\nimport '../../../../../@glimmer/validator/index.js';\nimport '../../../../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../../../../@glimmer/destroyable/index.js';\nimport '../../../../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../../../../@glimmer/global-context/index.js';\nimport '../../../../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../../../../shared-chunks/capabilities-DHiXCCuB.js';\nimport Mixin from '../../../../object/mixin.js';\nimport { assert } from '../../../../debug/lib/assert.js';\n\n/**\n@module ember\n*/\n\nconst TargetActionSupport = Mixin.create({\n  target: null,\n  action: null,\n  actionContext: null,\n  actionContextObject: computed('actionContext', function () {\n    let actionContext = get(this, 'actionContext');\n    if (typeof actionContext === 'string') {\n      let value = get(this, actionContext);\n      if (value === undefined) {\n        value = get(context.lookup, actionContext);\n      }\n      return value;\n    } else {\n      return actionContext;\n    }\n  }),\n  /**\n  The following is private and vestigial.\n  Send an `action` with an `actionContext` to a `target`. The action, actionContext\n  and target will be retrieved from properties of the object. For example:\n   ```javascript\n  import { alias } from '@ember/object/computed';\n   App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {\n    target: alias('controller'),\n    action: 'save',\n    actionContext: alias('context'),\n    click() {\n      this.triggerAction(); // Sends the `save` action, along with the current context\n                            // to the current controller\n    }\n  });\n  ```\n   The `target`, `action`, and `actionContext` can be provided as properties of\n  an optional object argument to `triggerAction` as well.\n   ```javascript\n  App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {\n    click() {\n      this.triggerAction({\n        action: 'save',\n        target: this.get('controller'),\n        actionContext: this.get('context')\n      }); // Sends the `save` action, along with the current context\n          // to the current controller\n    }\n  });\n  ```\n   The `actionContext` defaults to the object you are mixing `TargetActionSupport` into.\n  But `target` and `action` must be specified either as properties or with the argument\n  to `triggerAction`, or a combination:\n   ```javascript\n  import { alias } from '@ember/object/computed';\n   App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {\n    target: alias('controller'),\n    click() {\n      this.triggerAction({\n        action: 'save'\n      }); // Sends the `save` action, along with a reference to `this`,\n          // to the current controller\n    }\n  });\n  ```\n   @method triggerAction\n  @param opts {Object} (optional, with the optional keys action, target and/or actionContext)\n  @return {Boolean} true if the action was sent successfully and did not return false\n  @private\n  */\n  triggerAction(opts = {}) {\n    let {\n      action,\n      target,\n      actionContext\n    } = opts;\n    action = action || get(this, 'action');\n    target = target || getTarget(this);\n    if (actionContext === undefined) {\n      actionContext = get(this, 'actionContextObject') || this;\n    }\n    let context = Array.isArray(actionContext) ? actionContext : [actionContext];\n    if (target && action) {\n      let ret;\n      if (isSendable(target)) {\n        ret = target.send(action, ...context);\n      } else {\n        (isDevelopingApp() && !(typeof target[action] === 'function') && assert(`The action '${action}' did not exist on ${target}`, typeof target[action] === 'function'));\n        ret = target[action](...context);\n      }\n      if (ret !== false) {\n        return true;\n      }\n    }\n    return false;\n  }\n});\nfunction isSendable(obj) {\n  return obj != null && typeof obj === 'object' && typeof obj.send === 'function';\n}\nfunction getTarget(instance) {\n  let target = get(instance, 'target');\n  if (target) {\n    if (typeof target === 'string') {\n      let value = get(instance, target);\n      if (value === undefined) {\n        value = get(context.lookup, target);\n      }\n      return value;\n    } else {\n      return target;\n    }\n  }\n  if (instance._target) {\n    return instance._target;\n  }\n  return null;\n}\nif (isDevelopingApp()) {\n  Object.seal(TargetActionSupport);\n}\n\nexport { TargetActionSupport as default };\n","import '../../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport '@embroider/macros';\nimport { C as Cache } from '../../../shared-chunks/cache-qDyqAcpg.js';\n\n/*\n  This module exists to separate the @ember/string methods used\n  internally in ember-source, from those public methods that are\n  now deprecated and to be removed.\n*/\n\nconst STRING_DASHERIZE_REGEXP = /[ _]/g;\nconst STRING_DASHERIZE_CACHE = new Cache(1000, key => decamelize(key).replace(STRING_DASHERIZE_REGEXP, '-'));\nconst STRING_CLASSIFY_REGEXP_1 = /^(-|_)+(.)?/;\nconst STRING_CLASSIFY_REGEXP_2 = /(.)(-|_|\\.|\\s)+(.)?/g;\nconst STRING_CLASSIFY_REGEXP_3 = /(^|\\/|\\.)([a-z])/g;\nconst CLASSIFY_CACHE = new Cache(1000, str => {\n  let replace1 = (_match, _separator, chr) => chr ? `_${chr.toUpperCase()}` : '';\n  let replace2 = (_match, initialChar, _separator, chr) => initialChar + (chr ? chr.toUpperCase() : '');\n  let parts = str.split('/');\n  for (let i = 0; i < parts.length; i++) {\n    parts[i] = parts[i].replace(STRING_CLASSIFY_REGEXP_1, replace1).replace(STRING_CLASSIFY_REGEXP_2, replace2);\n  }\n  return parts.join('/').replace(STRING_CLASSIFY_REGEXP_3, (match /*, separator, chr */) => match.toUpperCase());\n});\nconst STRING_DECAMELIZE_REGEXP = /([a-z\\d])([A-Z])/g;\nconst DECAMELIZE_CACHE = new Cache(1000, str => str.replace(STRING_DECAMELIZE_REGEXP, '$1_$2').toLowerCase());\n\n/**\n Defines string helper methods used internally in ember-source.\n\n @class String\n @private\n */\n\n/**\n Replaces underscores, spaces, or camelCase with dashes.\n\n ```javascript\n import { dasherize } from '@ember/-internals/string';\n\n dasherize('innerHTML');                // 'inner-html'\n dasherize('action_name');              // 'action-name'\n dasherize('css-class-name');           // 'css-class-name'\n dasherize('my favorite items');        // 'my-favorite-items'\n dasherize('privateDocs/ownerInvoice';  // 'private-docs/owner-invoice'\n ```\n\n @method dasherize\n @param {String} str The string to dasherize.\n @return {String} the dasherized string.\n @private\n */\nfunction dasherize(str) {\n  return STRING_DASHERIZE_CACHE.get(str);\n}\n\n/**\n Returns the UpperCamelCase form of a string.\n\n ```javascript\n import { classify } from '@ember/string';\n\n classify('innerHTML');                   // 'InnerHTML'\n classify('action_name');                 // 'ActionName'\n classify('css-class-name');              // 'CssClassName'\n classify('my favorite items');           // 'MyFavoriteItems'\n classify('private-docs/owner-invoice');  // 'PrivateDocs/OwnerInvoice'\n ```\n\n @method classify\n @param {String} str the string to classify\n @return {String} the classified string\n @private\n */\nfunction classify(str) {\n  return CLASSIFY_CACHE.get(str);\n}\n\n/**\n Converts a camelized string into all lower case separated by underscores.\n\n ```javascript\n decamelize('innerHTML');          // 'inner_html'\n decamelize('action_name');        // 'action_name'\n decamelize('css-class-name');     // 'css-class-name'\n decamelize('my favorite items');  // 'my favorite items'\n ```\n */\nfunction decamelize(str) {\n  return DECAMELIZE_CACHE.get(str);\n}\n\nexport { classify, dasherize };\n","// The formatting here is designed to help make this type actually be\n// comprehensible to mortals, including the mortals who came up with it.\n// prettier-ignore\n\n// A way of representing non-user-constructible types. You can conveniently use\n// this by doing `interface Type extends Opaque<'some-type-name'> { ... }` for\n// simple types, and/or you can type-parameterize it as makes sense for your use\n// case (see e.g. `@ember/component/helper`'s use with functional helpers).\n\nclass Opaque {}\n\nexport { Opaque };\n","const MUTABLE_CELL = Symbol('MUTABLE_CELL');\n\nexport { MUTABLE_CELL };\n","import EmberObject from '../../../object/index.js';\n\nclass ComponentLookup extends EmberObject {\n  componentFor(name, owner) {\n    let fullName = `component:${name}`;\n    return owner.factoryFor(fullName);\n  }\n  layoutFor(name, owner, options) {\n    let templateFullName = `template:components/${name}`;\n    return owner.lookup(templateFullName, options);\n  }\n}\n\nexport { ComponentLookup as default };\n","import '../../../meta/lib/meta.js';\nimport '../../../../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../../../debug/index.js';\nimport '../../../../../@glimmer/destroyable/index.js';\nimport '../../../../../@glimmer/validator/index.js';\nimport '../../../../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../../../../@glimmer/global-context/index.js';\nimport '../../../../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../../../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { g as get } from '../../../../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../../../../shared-chunks/env-DEd6hPbj.js';\nimport Mixin from '../../../../object/mixin.js';\nimport { assert } from '../../../../debug/lib/assert.js';\nimport inspect from '../../../../debug/lib/inspect.js';\n\n/**\n @module ember\n*/\nconst ActionSupport = Mixin.create({\n  send(actionName, ...args) {\n    (isDevelopingApp() && !(!this.isDestroying && !this.isDestroyed) && assert(`Attempted to call .send() with the action '${actionName}' on the destroyed object '${this}'.`, !this.isDestroying && !this.isDestroyed));\n    let action = this.actions && this.actions[actionName];\n    if (action) {\n      let shouldBubble = action.apply(this, args) === true;\n      if (!shouldBubble) {\n        return;\n      }\n    }\n    let target = get(this, 'target');\n    if (target) {\n      (isDevelopingApp() && !(typeof target.send === 'function') && assert(`The \\`target\\` for ${this} (${target}) does not have a \\`send\\` method`, typeof target.send === 'function'));\n      target.send(...arguments);\n    } else {\n      (isDevelopingApp() && !(action) && assert(`${inspect(this)} had no action handler for: ${actionName}`, action));\n    }\n  }\n});\n\nexport { ActionSupport as default };\n","import { getOwner } from '../../../owner/index.js';\nimport '../../../../debug/index.js';\nimport '../../../meta/lib/meta.js';\nimport '../../../../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../../../../@glimmer/destroyable/index.js';\nimport '../../../../../@glimmer/validator/index.js';\nimport '../../../../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../../../../@glimmer/global-context/index.js';\nimport '../../../../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../../../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { g as get } from '../../../../../shared-chunks/observers-DhgQ6ba5.js';\nimport { s as set } from '../../../../../shared-chunks/property_set-DrZnfGQ7.js';\nimport '../../../../../shared-chunks/env-DEd6hPbj.js';\nimport EmberObject from '../../../../object/index.js';\nimport { getElementView } from './utils.js';\nimport { assert } from '../../../../debug/lib/assert.js';\n\n/**\n@module ember\n*/\n\nconst ROOT_ELEMENT_CLASS = 'ember-application';\nconst ROOT_ELEMENT_SELECTOR = `.${ROOT_ELEMENT_CLASS}`;\n\n/**\n  `EventDispatcher` handles delegating browser events to their\n  corresponding `Ember.Views.` For example, when you click on a view,\n  `EventDispatcher` ensures that that view's `mouseDown` method gets\n  called.\n\n  @class EventDispatcher\n  @namespace Ember\n  @private\n  @extends EmberObject\n*/\nclass EventDispatcher extends EmberObject {\n  /**\n    The set of events names (and associated handler function names) to be setup\n    and dispatched by the `EventDispatcher`. Modifications to this list can be done\n    at setup time, generally via the `Application.customEvents` hash.\n     To add new events to be listened to:\n     ```javascript\n    import Application from '@ember/application';\n     let App = Application.create({\n      customEvents: {\n        paste: 'paste'\n      }\n    });\n    ```\n     To prevent default events from being listened to:\n     ```javascript\n    import Application from '@ember/application';\n     let App = Application.create({\n      customEvents: {\n        mouseenter: null,\n        mouseleave: null\n      }\n    });\n    ```\n    @property events\n    @type Object\n    @private\n  */\n  events = {\n    touchstart: 'touchStart',\n    touchmove: 'touchMove',\n    touchend: 'touchEnd',\n    touchcancel: 'touchCancel',\n    keydown: 'keyDown',\n    keyup: 'keyUp',\n    keypress: 'keyPress',\n    mousedown: 'mouseDown',\n    mouseup: 'mouseUp',\n    contextmenu: 'contextMenu',\n    click: 'click',\n    dblclick: 'doubleClick',\n    focusin: 'focusIn',\n    focusout: 'focusOut',\n    submit: 'submit',\n    input: 'input',\n    change: 'change',\n    dragstart: 'dragStart',\n    drag: 'drag',\n    dragenter: 'dragEnter',\n    dragleave: 'dragLeave',\n    dragover: 'dragOver',\n    drop: 'drop',\n    dragend: 'dragEnd'\n  };\n\n  /**\n    The root DOM element to which event listeners should be attached. Event\n    listeners will be attached to the document unless this is overridden.\n     Can be specified as a DOMElement or a selector string.\n     The default body is a string since this may be evaluated before document.body\n    exists in the DOM.\n     @private\n    @property rootElement\n    @type DOMElement\n    @default 'body'\n  */\n  rootElement = 'body';\n  _eventHandlers = Object.create(null);\n  _didSetup = false;\n  finalEventNameMapping = null;\n  _sanitizedRootElement = null;\n  lazyEvents = new Map();\n  _reverseEventNameMapping = null;\n\n  /**\n    Sets up event listeners for standard browser events.\n     This will be called after the browser sends a `DOMContentReady` event. By\n    default, it will set up all of the listeners on the document body. If you\n    would like to register the listeners on a different element, set the event\n    dispatcher's `root` property.\n     @private\n    @method setup\n    @param addedEvents {Object}\n  */\n  setup(addedEvents, _rootElement) {\n    (isDevelopingApp() && !((() => {\n      let owner = getOwner(this);\n      (isDevelopingApp() && !(owner) && assert('[BUG] Missing owner', owner)); // SAFETY: This is not guaranteed to be safe, but this is what we expect to be returned.\n      let environment = owner.lookup('-environment:main');\n      return environment.isInteractive;\n    })()) && assert('EventDispatcher should never be setup in fastboot mode. Please report this as an Ember bug.', (() => {\n      let owner = getOwner(this);\n      (isDevelopingApp() && !(owner) && assert('[BUG] Missing owner', owner));\n      let environment = owner.lookup('-environment:main');\n      return environment.isInteractive;\n    })()));\n    let events = this.finalEventNameMapping = {\n      ...get(this, 'events'),\n      ...addedEvents\n    };\n    this._reverseEventNameMapping = Object.keys(events).reduce((result, key) => {\n      let eventName = events[key];\n      return eventName ? {\n        ...result,\n        [eventName]: key\n      } : result;\n    }, {});\n    let lazyEvents = this.lazyEvents;\n    if (_rootElement !== undefined && _rootElement !== null) {\n      set(this, 'rootElement', _rootElement);\n    }\n    let specifiedRootElement = get(this, 'rootElement');\n    let rootElement = typeof specifiedRootElement !== 'string' ? specifiedRootElement : document.querySelector(specifiedRootElement);\n    (isDevelopingApp() && !(rootElement) && assert(`Could not find rootElement (${specifiedRootElement})`, rootElement));\n    (isDevelopingApp() && !(!rootElement.classList.contains(ROOT_ELEMENT_CLASS)) && assert(`You cannot use the same root element (${specifiedRootElement}) multiple times in an Ember.Application`, !rootElement.classList.contains(ROOT_ELEMENT_CLASS)));\n    (isDevelopingApp() && !((() => {\n      let target = rootElement.parentNode;\n      while (target instanceof Element) {\n        if (target.classList.contains(ROOT_ELEMENT_CLASS)) {\n          return false;\n        }\n        target = target.parentNode;\n      }\n      return true;\n    })()) && assert('You cannot make a new Ember.Application using a root element that is a descendent of an existing Ember.Application', (() => {\n      let target = rootElement.parentNode;\n      while (target instanceof Element) {\n        if (target.classList.contains(ROOT_ELEMENT_CLASS)) {\n          return false;\n        }\n        target = target.parentNode;\n      }\n      return true;\n    })()));\n    (isDevelopingApp() && !(!rootElement.querySelector(ROOT_ELEMENT_SELECTOR)) && assert('You cannot make a new Ember.Application using a root element that is an ancestor of an existing Ember.Application', !rootElement.querySelector(ROOT_ELEMENT_SELECTOR)));\n    rootElement.classList.add(ROOT_ELEMENT_CLASS);\n    (isDevelopingApp() && !(rootElement.classList.contains(ROOT_ELEMENT_CLASS)) && assert(`Unable to add '${ROOT_ELEMENT_CLASS}' class to root element (${get(this, 'rootElement') || rootElement.tagName}). Make sure you set rootElement to the body or an element in the body.`, rootElement.classList.contains(ROOT_ELEMENT_CLASS))); // save off the final sanitized root element (for usage in setupHandler)\n    this._sanitizedRootElement = rootElement;\n\n    // setup event listeners for the non-lazily setup events\n    for (let event in events) {\n      if (Object.prototype.hasOwnProperty.call(events, event)) {\n        lazyEvents.set(event, events[event] ?? null);\n      }\n    }\n    this._didSetup = true;\n  }\n\n  /**\n    Setup event listeners for the given browser event name\n     @private\n    @method setupHandlerForBrowserEvent\n    @param event the name of the event in the browser\n  */\n  setupHandlerForBrowserEvent(event) {\n    (isDevelopingApp() && !(this.finalEventNameMapping) && assert('[BUG] Expected finalEventNameMapping to be set', this.finalEventNameMapping));\n    (isDevelopingApp() && !(this._sanitizedRootElement) && assert('[BUG] Expected _santizedRootElement to be set', this._sanitizedRootElement));\n    this.setupHandler(this._sanitizedRootElement, event, this.finalEventNameMapping[event] ?? null);\n  }\n\n  /**\n    Setup event listeners for the given Ember event name (camel case)\n     @private\n    @method setupHandlerForEmberEvent\n    @param eventName\n  */\n  setupHandlerForEmberEvent(eventName) {\n    (isDevelopingApp() && !(this._sanitizedRootElement) && assert('[BUG] Expected _sanitizedRootElement to be set', this._sanitizedRootElement));\n    let event = this._reverseEventNameMapping?.[eventName];\n    if (event) {\n      this.setupHandler(this._sanitizedRootElement, event, eventName);\n    }\n  }\n\n  /**\n    Registers an event listener on the rootElement. If the given event is\n    triggered, the provided event handler will be triggered on the target view.\n     If the target view does not implement the event handler, or if the handler\n    returns `false`, the parent view will be called. The event will continue to\n    bubble to each successive parent view until it reaches the top.\n     @private\n    @method setupHandler\n    @param {Element} rootElement\n    @param {String} event the name of the event in the browser\n    @param {String} eventName the name of the method to call on the view\n  */\n  setupHandler(rootElement, event, eventName) {\n    if (eventName === null || !this.lazyEvents.has(event)) {\n      return; // nothing to do\n    }\n    let viewHandler = (target, event) => {\n      let view = getElementView(target);\n      let result = true;\n      if (view) {\n        // SAFETY: As currently written, this is not safe. Though it seems to always be true.\n        result = view.handleEvent(eventName, event);\n      }\n      return result;\n    };\n    let handleEvent = this._eventHandlers[event] = event => {\n      let target = event.target;\n      (isDevelopingApp() && !(target instanceof Element) && assert(`[BUG] Received event without an Element target: ${event.type}, ${target}`, target instanceof Element));\n      do {\n        if (getElementView(target)) {\n          if (viewHandler(target, event) === false) {\n            event.preventDefault();\n            event.stopPropagation();\n            break;\n          } else if (event.cancelBubble === true) {\n            break;\n          }\n        }\n        target = target.parentNode;\n      } while (target instanceof Element);\n    };\n    rootElement.addEventListener(event, handleEvent);\n    this.lazyEvents.delete(event);\n  }\n  destroy() {\n    if (this._didSetup === false) {\n      return;\n    }\n    let rootElement = this._sanitizedRootElement;\n    if (!rootElement) {\n      return;\n    }\n    for (let event in this._eventHandlers) {\n      rootElement.removeEventListener(event, this._eventHandlers[event]);\n    }\n    rootElement.classList.remove(ROOT_ELEMENT_CLASS);\n    return this._super(...arguments);\n  }\n  toString() {\n    return '(EventDispatcher)';\n  }\n}\n\nexport { EventDispatcher as default };\n","import { getOwner } from '../../../owner/index.js';\nimport { g as guidFor } from '../../../../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../../../debug/index.js';\nimport { assert } from '../../../../debug/lib/assert.js';\n\n/**\n@module ember\n*/\n\nfunction isSimpleClick(event) {\n  if (!(event instanceof MouseEvent)) {\n    return false;\n  }\n  let modifier = event.shiftKey || event.metaKey || event.altKey || event.ctrlKey;\n  let secondaryClick = event.which > 1; // IE9 may return undefined\n\n  return !modifier && !secondaryClick;\n}\nfunction constructStyleDeprecationMessage(affectedStyle) {\n  return '' + 'Binding style attributes may introduce cross-site scripting vulnerabilities; ' + 'please ensure that values being bound are properly escaped. For more information, ' + 'including how to disable this warning, see ' + 'https://deprecations.emberjs.com/v1.x/#toc_binding-style-attributes. ' + 'Style affected: \"' + affectedStyle + '\"';\n}\n\n/**\n  @private\n  @method getRootViews\n  @param {Object} owner\n*/\nfunction getRootViews(owner) {\n  let registry = owner.lookup('-view-registry:main');\n  let rootViews = [];\n  Object.keys(registry).forEach(id => {\n    let view = registry[id];\n    (isDevelopingApp() && !(view) && assert('expected view', view));\n    if (view.parentView === null) {\n      rootViews.push(view);\n    }\n  });\n  return rootViews;\n}\n\n/**\n  @private\n  @method getViewId\n  @param {Ember.View} view\n */\nfunction getViewId(view) {\n  if (view.tagName !== '' && view.elementId) {\n    return view.elementId;\n  } else {\n    return guidFor(view);\n  }\n}\nconst ELEMENT_VIEW = new WeakMap();\nconst VIEW_ELEMENT = new WeakMap();\nfunction getElementView(element) {\n  return ELEMENT_VIEW.get(element) || null;\n}\n\n/**\n  @private\n  @method getViewElement\n  @param {Ember.View} view\n */\nfunction getViewElement(view) {\n  return VIEW_ELEMENT.get(view) || null;\n}\nfunction setElementView(element, view) {\n  ELEMENT_VIEW.set(element, view);\n}\nfunction setViewElement(view, element) {\n  VIEW_ELEMENT.set(view, element);\n}\n\n// These are not needed for GC, but for correctness. We want to be able to\n// null-out these links while the objects are still live. Specifically, in\n// this case, we want to prevent access to the element (and vice verse) during\n// destruction.\n\nfunction clearElementView(element) {\n  ELEMENT_VIEW.delete(element);\n}\nfunction clearViewElement(view) {\n  VIEW_ELEMENT.delete(view);\n}\nconst CHILD_VIEW_IDS = new WeakMap();\n\n/**\n  @private\n  @method getChildViews\n  @param {Ember.View} view\n*/\nfunction getChildViews(view) {\n  let owner = getOwner(view);\n  (isDevelopingApp() && !(owner) && assert('View is unexpectedly missing an owner', owner));\n  let registry = owner.lookup('-view-registry:main');\n  return collectChildViews(view, registry);\n}\nfunction initChildViews(view) {\n  let childViews = new Set();\n  CHILD_VIEW_IDS.set(view, childViews);\n  return childViews;\n}\nfunction addChildView(parent, child) {\n  let childViews = CHILD_VIEW_IDS.get(parent);\n  if (childViews === undefined) {\n    childViews = initChildViews(parent);\n  }\n  childViews.add(getViewId(child));\n}\nfunction collectChildViews(view, registry) {\n  let views = [];\n  let childViews = CHILD_VIEW_IDS.get(view);\n  if (childViews !== undefined) {\n    childViews.forEach(id => {\n      let view = registry[id];\n      if (view && !view.isDestroying && !view.isDestroyed) {\n        views.push(view);\n      }\n    });\n  }\n  return views;\n}\n\n/**\n  @private\n  @method getViewBounds\n  @param {Ember.View} view\n*/\nfunction getViewBounds(view) {\n  return view.renderer.getBounds(view);\n}\n\n/**\n  @private\n  @method getViewRange\n  @param {Ember.View} view\n*/\nfunction getViewRange(view) {\n  let bounds = getViewBounds(view);\n  let range = document.createRange();\n  range.setStartBefore(bounds.firstNode);\n  range.setEndAfter(bounds.lastNode);\n  return range;\n}\n\n/**\n  `getViewClientRects` provides information about the position of the border\n  box edges of a view relative to the viewport.\n\n  It is only intended to be used by development tools like the Ember Inspector\n  and may not work on older browsers.\n\n  @private\n  @method getViewClientRects\n  @param {Ember.View} view\n*/\nfunction getViewClientRects(view) {\n  let range = getViewRange(view);\n  return range.getClientRects();\n}\n\n/**\n  `getViewBoundingClientRect` provides information about the position of the\n  bounding border box edges of a view relative to the viewport.\n\n  It is only intended to be used by development tools like the Ember Inspector\n  and may not work on older browsers.\n\n  @private\n  @method getViewBoundingClientRect\n  @param {Ember.View} view\n*/\nfunction getViewBoundingClientRect(view) {\n  let range = getViewRange(view);\n  return range.getBoundingClientRect();\n}\nfunction contains(a, b) {\n  if (a.contains !== undefined) {\n    return a.contains(b);\n  }\n  let current = b.parentNode;\n  while (current && (current = current.parentNode)) {\n    if (current === a) {\n      return true;\n    }\n  }\n  return false;\n}\n\nexport { addChildView, clearElementView, clearViewElement, collectChildViews, constructStyleDeprecationMessage, contains, getChildViews, getElementView, getRootViews, getViewBoundingClientRect, getViewBounds, getViewClientRects, getViewElement, getViewId, getViewRange, initChildViews, isSimpleClick, setElementView, setViewElement };\n","import '../../../meta/lib/meta.js';\nimport '../../../../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport '@embroider/macros';\nimport '../../../../debug/index.js';\nimport '../../../../../@glimmer/destroyable/index.js';\nimport '../../../../../@glimmer/validator/index.js';\nimport '../../../../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../../../../@glimmer/global-context/index.js';\nimport '../../../../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../../../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { p as inject } from '../../../../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../../../../shared-chunks/env-DEd6hPbj.js';\nimport '../../../runtime/lib/mixins/registry_proxy.js';\nimport '../../../runtime/lib/mixins/container_proxy.js';\nimport '../../../runtime/lib/mixins/comparable.js';\nimport ActionHandler from '../../../runtime/lib/mixins/action_handler.js';\nimport '../../../runtime/lib/mixins/-proxy.js';\nimport '../../../../enumerable/mutable.js';\nimport '../../../runtime/lib/mixins/target_action_support.js';\nimport '../../../runtime/lib/ext/rsvp.js';\nimport Evented from '../../../../object/evented.js';\nimport { FrameworkObject } from '../../../../object/-internals.js';\nimport states from './states.js';\nimport { d as decorateFieldV2, i as initializeDeferredDecorator } from '../../../../../shared-chunks/chunk-3SQBS3Y5-Cj4eryg1.js';\n\nclass CoreView extends FrameworkObject.extend(Evented, ActionHandler) {\n  isView = true;\n  _superTrigger;\n  _superHas;\n\n  /**\n    If the view is currently inserted into the DOM of a parent view, this\n    property will point to the parent of the view.\n     @property parentView\n    @type Ember.View\n    @default null\n    @private\n  */\n\n  init(properties) {\n    super.init(properties);\n\n    // Handle methods from Evented\n    // The native class inheritance will not work for mixins. To work around this,\n    // we copy the existing trigger and has methods provided by the mixin and swap in the\n    // new ones from our class.\n    this._superTrigger = this.trigger;\n    this.trigger = this._trigger;\n    this._superHas = this.has;\n    this.has = this._has;\n    this.parentView ??= null;\n    this._state = 'preRender';\n    this._currentState = this._states.preRender;\n  }\n  static {\n    decorateFieldV2(this.prototype, \"renderer\", [inject('renderer', '-dom')]);\n  }\n  #renderer = (initializeDeferredDecorator(this, \"renderer\"), void 0);\n  instrumentDetails(hash) {\n    hash['object'] = this.toString();\n    hash['containerKey'] = this._debugContainerKey;\n    hash['view'] = this;\n    return hash;\n  }\n\n  /**\n    Override the default event firing from `Evented` to\n    also call methods with the given name.\n     @method trigger\n    @param name {String}\n    @private\n  */\n  // Changed to `trigger` on init\n  _trigger(name, ...args) {\n    this._superTrigger(name, ...args);\n    let method = this[name];\n    if (typeof method === 'function') {\n      return method.apply(this, args);\n    }\n  }\n\n  // Changed to `has` on init\n  _has(name) {\n    return typeof this[name] === 'function' || this._superHas(name);\n  }\n  static isViewFactory = true;\n}\n\n// Declare on the prototype to have a single shared value.\nCoreView.prototype._states = states;\n\nexport { CoreView as default };\n","import { t as teardownMandatorySetter } from '../../../../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../../../debug/index.js';\nimport { flaggedInstrument } from '../../../../instrumentation/index.js';\nimport { join } from '../../../../runloop/index.js';\nimport { assert } from '../../../../debug/lib/assert.js';\n\nconst DEFAULT = Object.freeze({\n  // appendChild is only legal while rendering the buffer.\n  appendChild() {\n    throw new Error(\"You can't use appendChild outside of the rendering process\");\n  },\n  // Handle events from `Ember.EventDispatcher`\n  handleEvent() {\n    return true; // continue event propagation\n  },\n  rerender() {},\n  destroy() {}\n});\nconst PRE_RENDER = Object.freeze({\n  ...DEFAULT\n});\nconst HAS_ELEMENT = Object.freeze({\n  ...DEFAULT,\n  rerender(view) {\n    view.renderer.rerender();\n  },\n  destroy(view) {\n    view.renderer.remove(view);\n  },\n  // Handle events from `Ember.EventDispatcher`\n  handleEvent(view, eventName, event) {\n    if (view.has(eventName)) {\n      // Handler should be able to re-dispatch events, so we don't\n      // preventDefault or stopPropagation.\n      return flaggedInstrument(`interaction.${eventName}`, {\n        }, () => {\n        return join(view, view.trigger, eventName, event);\n      });\n    } else {\n      return true; // continue event propagation\n    }\n  }\n});\nconst IN_DOM = Object.freeze({\n  ...HAS_ELEMENT,\n  enter(view) {\n    // Register the view for event handling. This hash is used by\n    // Ember.EventDispatcher to dispatch incoming events.\n    view.renderer.register(view);\n    if (isDevelopingApp()) {\n      let elementId = view.elementId;\n      (isDevelopingApp() && !(teardownMandatorySetter) && assert('[BUG] Expected teardownMandatorySetter to be set in DEBUG mode', teardownMandatorySetter));\n      teardownMandatorySetter(view, 'elementId');\n      Object.defineProperty(view, 'elementId', {\n        configurable: true,\n        enumerable: true,\n        get() {\n          return elementId;\n        },\n        set(value) {\n          if (value !== elementId) {\n            throw new Error(\"Changing a view's elementId after creation is not allowed\");\n          }\n        }\n      });\n    }\n  }\n});\nconst DESTROYING = Object.freeze({\n  ...DEFAULT,\n  appendChild() {\n    throw new Error(\"You can't call appendChild on a view being destroyed\");\n  },\n  rerender() {\n    throw new Error(\"You can't call rerender on a view being destroyed\");\n  }\n});\n\n/*\n  Describe how the specified actions should behave in the various\n  states that a view can exist in. Possible states:\n\n  * preRender: when a view is first instantiated, and after its\n    element was destroyed, it is in the preRender state\n  * hasElement: the DOM representation of the view is created,\n    and is ready to be inserted\n  * inDOM: once a view has been inserted into the DOM it is in\n    the inDOM state. A view spends the vast majority of its\n    existence in this state.\n  * destroyed: once a view has been destroyed (using the destroy\n    method), it is in this state. No further actions can be invoked\n    on a destroyed view.\n*/\nconst states = Object.freeze({\n  preRender: PRE_RENDER,\n  inDOM: IN_DOM,\n  hasElement: HAS_ELEMENT,\n  destroying: DESTROYING\n});\n\nexport { states as default };\n","import { getOwner as getOwner$1 } from '../owner/index.js';\nimport '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { m as makeDictionary } from '../../shared-chunks/dictionary-gc5gpyOG.js';\nimport { E as ENV } from '../../shared-chunks/env-DEd6hPbj.js';\nimport { h as hasDOM } from '../../shared-chunks/index-BGP1rw3B.js';\nimport '../debug/index.js';\nimport { schedule, once, join, run } from '../runloop/index.js';\nimport '../-internals/meta/lib/meta.js';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { O as LIBRARIES } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport { runLoadHooks, _loaded } from './lib/lazy_load.js';\nexport { onLoad } from './lib/lazy_load.js';\nimport '../-internals/runtime/lib/mixins/registry_proxy.js';\nimport '../-internals/runtime/lib/mixins/container_proxy.js';\nimport '../-internals/runtime/lib/mixins/comparable.js';\nimport '../-internals/runtime/lib/mixins/action_handler.js';\nimport '../-internals/runtime/lib/mixins/-proxy.js';\nimport '../enumerable/mutable.js';\nimport '../-internals/runtime/lib/mixins/target_action_support.js';\nimport '../-internals/runtime/lib/ext/rsvp.js';\nimport { setOwner as setOwner$1 } from '../-internals/owner/index.js';\nimport EventDispatcher from '../-internals/views/lib/system/event_dispatcher.js';\nimport '../object/index.js';\nimport '../-internals/views/lib/views/core_view.js';\nimport '../-internals/views/lib/mixins/action_support.js';\nimport '../-internals/views/lib/views/states.js';\nimport Route from '../routing/route.js';\nimport EmberRouter from '../routing/router.js';\nimport HashLocation from '../routing/hash-location.js';\nimport HistoryLocation from '../routing/history-location.js';\nimport NoneLocation from '../routing/none-location.js';\nimport '../engine/instance.js';\nimport '../../route-recognizer/index.js';\nimport { R as RSVP } from '../../shared-chunks/rsvp-CnCSY930.js';\nimport '../../shared-chunks/unrecognized-url-error-BBMMZhBN.js';\nimport '../routing/lib/routing-service.js';\nimport '../controller/index.js';\nimport BucketCache from '../routing/lib/cache.js';\nimport ApplicationInstance from './instance.js';\nimport Engine, { buildInitializerMethod } from '../engine/index.js';\nimport { p as privatize } from '../../shared-chunks/registry-XY5cfmbH.js';\nimport '../../shared-chunks/index-CQkjwqTv.js';\nimport '../../shared-chunks/index-ByyoGpfz.js';\nimport { s as setupApplicationRegistry } from '../../shared-chunks/setup-registry-Bbj8WQen.js';\nimport '../../shared-chunks/dynamic-CuBsUXX8.js';\nimport '../../shared-chunks/constants-oDhF27qL.js';\nimport RouterService from '../routing/router-service.js';\nimport { assert } from '../debug/lib/assert.js';\n\n/**\n@module @ember/application\n*/\n\n/**\n * @deprecated Use `import { getOwner } from '@ember/owner';` instead.\n */\nconst getOwner = getOwner$1;\n\n/**\n * @deprecated Use `import { setOwner } from '@ember/owner';` instead.\n */\nconst setOwner = setOwner$1;\n\n/**\n  An instance of `Application` is the starting point for every Ember\n  application. It instantiates, initializes and coordinates the\n  objects that make up your app.\n\n  Each Ember app has one and only one `Application` object. Although\n  Ember CLI creates this object implicitly, the `Application` class\n  is defined in the `app/app.js`. You can define a `ready` method on the\n  `Application` class, which will be run by Ember when the application is\n  initialized.\n\n  ```app/app.js\n  export default class App extends Application {\n    ready() {\n      // your code here\n    }\n  }\n  ```\n\n  Because `Application` ultimately inherits from `Ember.Namespace`, any classes\n  you create will have useful string representations when calling `toString()`.\n  See the `Ember.Namespace` documentation for more information.\n\n  While you can think of your `Application` as a container that holds the\n  other classes in your application, there are several other responsibilities\n  going on under-the-hood that you may want to understand. It is also important\n  to understand that an `Application` is different from an `ApplicationInstance`.\n  Refer to the Guides to understand the difference between these.\n\n  ### Event Delegation\n\n  Ember uses a technique called _event delegation_. This allows the framework\n  to set up a global, shared event listener instead of requiring each view to\n  do it manually. For example, instead of each view registering its own\n  `mousedown` listener on its associated element, Ember sets up a `mousedown`\n  listener on the `body`.\n\n  If a `mousedown` event occurs, Ember will look at the target of the event and\n  start walking up the DOM node tree, finding corresponding views and invoking\n  their `mouseDown` method as it goes.\n\n  `Application` has a number of default events that it listens for, as\n  well as a mapping from lowercase events to camel-cased view method names. For\n  example, the `keypress` event causes the `keyPress` method on the view to be\n  called, the `dblclick` event causes `doubleClick` to be called, and so on.\n\n  If there is a bubbling browser event that Ember does not listen for by\n  default, you can specify custom events and their corresponding view method\n  names by setting the application's `customEvents` property:\n\n  ```app/app.js\n  import Application from '@ember/application';\n\n  export default class App extends Application {\n    customEvents = {\n      // add support for the paste event\n      paste: 'paste'\n    }\n  }\n  ```\n\n  To prevent Ember from setting up a listener for a default event,\n  specify the event name with a `null` value in the `customEvents`\n  property:\n\n  ```app/app.js\n  import Application from '@ember/application';\n\n  export default class App extends Application {\n    customEvents = {\n      // prevent listeners for mouseenter/mouseleave events\n      mouseenter: null,\n      mouseleave: null\n    }\n  }\n  ```\n\n  By default, the application sets up these event listeners on the document\n  body. However, in cases where you are embedding an Ember application inside\n  an existing page, you may want it to set up the listeners on an element\n  inside the body.\n\n  For example, if only events inside a DOM element with the ID of `ember-app`\n  should be delegated, set your application's `rootElement` property:\n\n  ```app/app.js\n  import Application from '@ember/application';\n\n  export default class App extends Application {\n    rootElement = '#ember-app'\n  }\n  ```\n\n  The `rootElement` can be either a DOM element or a CSS selector\n  string. Note that *views appended to the DOM outside the root element will\n  not receive events.* If you specify a custom root element, make sure you only\n  append views inside it!\n\n  To learn more about the events Ember components use, see\n\n  [components/handling-events](https://guides.emberjs.com/release/components/handling-events/#toc_event-names).\n\n  ### Initializers\n\n  To add behavior to the Application's boot process, you can define initializers in\n  the `app/initializers` directory, or with `ember generate initializer` using Ember CLI.\n  These files should export a named `initialize` function which will receive the created `application`\n  object as its first argument.\n\n  ```javascript\n  export function initialize(application) {\n    // application.inject('route', 'foo', 'service:foo');\n  }\n  ```\n\n  Application initializers can be used for a variety of reasons including:\n\n  - setting up external libraries\n  - injecting dependencies\n  - setting up event listeners in embedded apps\n  - deferring the boot process using the `deferReadiness` and `advanceReadiness` APIs.\n\n  ### Routing\n\n  In addition to creating your application's router, `Application` is\n  also responsible for telling the router when to start routing. Transitions\n  between routes can be logged with the `LOG_TRANSITIONS` flag, and more\n  detailed intra-transition logging can be logged with\n  the `LOG_TRANSITIONS_INTERNAL` flag:\n\n  ```javascript\n  import Application from '@ember/application';\n\n  let App = Application.create({\n    LOG_TRANSITIONS: true, // basic logging of successful transitions\n    LOG_TRANSITIONS_INTERNAL: true // detailed logging of all routing steps\n  });\n  ```\n\n  By default, the router will begin trying to translate the current URL into\n  application state once the browser emits the `DOMContentReady` event. If you\n  need to defer routing, you can call the application's `deferReadiness()`\n  method. Once routing can begin, call the `advanceReadiness()` method.\n\n  If there is any setup required before routing begins, you can implement a\n  `ready()` method on your app that will be invoked immediately before routing\n  begins.\n\n  @class Application\n  @extends Engine\n  @public\n*/\n\nclass Application extends Engine {\n  /**\n    This creates a registry with the default Ember naming conventions.\n     It also configures the registry:\n     * registered views are created every time they are looked up (they are\n      not singletons)\n    * registered templates are not factories; the registered value is\n      returned directly.\n    * the router receives the application as its `namespace` property\n    * all controllers receive the router as their `target` and `controllers`\n      properties\n    * all controllers receive the application as their `namespace` property\n    * the application view receives the application controller as its\n      `controller` property\n    * the application view receives the application template as its\n      `defaultTemplate` property\n     @method buildRegistry\n    @static\n    @param {Application} namespace the application for which to\n      build the registry\n    @return {Ember.Registry} the built registry\n    @private\n  */\n  static buildRegistry(namespace) {\n    let registry = super.buildRegistry(namespace);\n    commonSetupRegistry(registry);\n    setupApplicationRegistry(registry);\n    return registry;\n  }\n  static initializer = buildInitializerMethod('initializers', 'initializer');\n  static instanceInitializer = buildInitializerMethod('instanceInitializers', 'instance initializer');\n\n  /**\n    The root DOM element of the Application. This can be specified as an\n    element or a [selector string](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors#reference_table_of_selectors).\n     This is the element that will be passed to the Application's,\n    `eventDispatcher`, which sets up the listeners for event delegation. Every\n    view in your application should be a child of the element you specify here.\n     @property rootElement\n    @type DOMElement\n    @default 'body'\n    @public\n  */\n\n  /**\n     @property _document\n    @type Document | null\n    @default 'window.document'\n    @private\n  */\n\n  /**\n    The `EventDispatcher` responsible for delegating events to this\n    application's views.\n     The event dispatcher is created by the application at initialization time\n    and sets up event listeners on the DOM element described by the\n    application's `rootElement` property.\n     See the documentation for `EventDispatcher` for more information.\n     @property eventDispatcher\n    @type Ember.EventDispatcher\n    @default null\n    @public\n  */\n\n  /**\n    The DOM events for which the event dispatcher should listen.\n     By default, the application's `Ember.EventDispatcher` listens\n    for a set of standard DOM events, such as `mousedown` and\n    `keyup`, and delegates them to your application's `Ember.View`\n    instances.\n     If you would like additional bubbling events to be delegated to your\n    views, set your `Application`'s `customEvents` property\n    to a hash containing the DOM event name as the key and the\n    corresponding view method name as the value. Setting an event to\n    a value of `null` will prevent a default event listener from being\n    added for that event.\n     To add new events to be listened to:\n     ```app/app.js\n    import Application from '@ember/application';\n     let App = Application.extend({\n      customEvents: {\n        // add support for the paste event\n        paste: 'paste'\n      }\n    });\n    ```\n     To prevent default events from being listened to:\n     ```app/app.js\n    import Application from '@ember/application';\n     let App = Application.extend({\n      customEvents: {\n        // remove support for mouseenter / mouseleave events\n        mouseenter: null,\n        mouseleave: null\n      }\n    });\n    ```\n    @property customEvents\n    @type Object\n    @default null\n    @public\n  */\n\n  /**\n    Whether the application should automatically start routing and render\n    templates to the `rootElement` on DOM ready. While default by true,\n    other environments such as FastBoot or a testing harness can set this\n    property to `false` and control the precise timing and behavior of the boot\n    process.\n     @property autoboot\n    @type Boolean\n    @default true\n    @private\n  */\n\n  /**\n    Whether the application should be configured for the legacy \"globals mode\".\n    Under this mode, the Application object serves as a global namespace for all\n    classes.\n     ```javascript\n    import Application from '@ember/application';\n    import Component from '@ember/component';\n     let App = Application.create({\n      ...\n    });\n     App.Router.reopen({\n      location: 'none'\n    });\n     App.Router.map({\n      ...\n    });\n     App.MyComponent = Component.extend({\n      ...\n    });\n    ```\n     This flag also exposes other internal APIs that assumes the existence of\n    a special \"default instance\", like `App.__container__.lookup(...)`.\n     This option is currently not configurable, its value is derived from\n    the `autoboot` flag – disabling `autoboot` also implies opting-out of\n    globals mode support, although they are ultimately orthogonal concerns.\n     Some of the global modes features are already deprecated in 1.x. The\n    existence of this flag is to untangle the globals mode code paths from\n    the autoboot code paths, so that these legacy features can be reviewed\n    for deprecation/removal separately.\n     Forcing the (autoboot=true, _globalsMode=false) here and running the tests\n    would reveal all the places where we are still relying on these legacy\n    behavior internally (mostly just tests).\n     @property _globalsMode\n    @type Boolean\n    @default true\n    @private\n  */\n\n  /**\n    An array of application instances created by `buildInstance()`. Used\n    internally to ensure that all instances get destroyed.\n     @property _applicationInstances\n    @type Array\n    @private\n  */\n\n  init(properties) {\n    super.init(properties);\n    this.rootElement ??= 'body';\n    this._document ??= null;\n    this.eventDispatcher ??= null;\n    this.customEvents ??= null;\n    this.autoboot ??= true;\n    this._document ??= hasDOM ? window.document : null;\n    this._globalsMode ??= true;\n    if (isDevelopingApp()) {\n      if (ENV.LOG_VERSION) {\n        // we only need to see this once per Application#init\n        ENV.LOG_VERSION = false;\n        LIBRARIES.logVersions?.();\n      }\n    }\n\n    // Start off the number of deferrals at 1. This will be decremented by\n    // the Application's own `boot` method.\n    this._readinessDeferrals = 1;\n    this._booted = false;\n    this._applicationInstances = new Set();\n    this.autoboot = this._globalsMode = Boolean(this.autoboot);\n    if (this._globalsMode) {\n      this._prepareForGlobalsMode();\n    }\n    if (this.autoboot) {\n      this.waitForDOMReady();\n    }\n  }\n\n  /**\n    Create an ApplicationInstance for this application.\n     @public\n    @method buildInstance\n    @return {ApplicationInstance} the application instance\n  */\n  buildInstance(options = {}) {\n    (isDevelopingApp() && !(!this.isDestroyed) && assert('You cannot build new instances of this application since it has already been destroyed', !this.isDestroyed));\n    (isDevelopingApp() && !(!this.isDestroying) && assert('You cannot build new instances of this application since it is being destroyed', !this.isDestroying));\n    return ApplicationInstance.create({\n      ...options,\n      base: this,\n      application: this\n    });\n  }\n\n  /**\n    Start tracking an ApplicationInstance for this application.\n    Used when the ApplicationInstance is created.\n     @private\n    @method _watchInstance\n  */\n  _watchInstance(instance) {\n    this._applicationInstances.add(instance);\n  }\n\n  /**\n    Stop tracking an ApplicationInstance for this application.\n    Used when the ApplicationInstance is about to be destroyed.\n     @private\n    @method _unwatchInstance\n  */\n  _unwatchInstance(instance) {\n    return this._applicationInstances.delete(instance);\n  }\n  Router;\n\n  /**\n    Enable the legacy globals mode by allowing this application to act\n    as a global namespace. See the docs on the `_globalsMode` property\n    for details.\n     Most of these features are already deprecated in 1.x, so we can\n    stop using them internally and try to remove them.\n     @private\n    @method _prepareForGlobalsMode\n  */\n  _prepareForGlobalsMode() {\n    // Create subclass of Router for this Application instance.\n    // This is to ensure that someone reopening `App.Router` does not\n    // tamper with the default `Router`.\n    this.Router = (this.Router || EmberRouter).extend();\n    this._buildDeprecatedInstance();\n  }\n  __deprecatedInstance__;\n  __container__;\n\n  /*\n    Build the deprecated instance for legacy globals mode support.\n    Called when creating and resetting the application.\n     This is orthogonal to autoboot: the deprecated instance needs to\n    be created at Application construction (not boot) time to expose\n    App.__container__. If autoboot sees that this instance exists,\n    it will continue booting it to avoid doing unncessary work (as\n    opposed to building a new instance at boot time), but they are\n    otherwise unrelated.\n     @private\n    @method _buildDeprecatedInstance\n  */\n  _buildDeprecatedInstance() {\n    // Build a default instance\n    let instance = this.buildInstance();\n\n    // Legacy support for App.__container__ and other global methods\n    // on App that rely on a single, default instance.\n    this.__deprecatedInstance__ = instance;\n    this.__container__ = instance.__container__;\n  }\n\n  /**\n    Automatically kick-off the boot process for the application once the\n    DOM has become ready.\n     The initialization itself is scheduled on the actions queue which\n    ensures that code-loading finishes before booting.\n     If you are asynchronously loading code, you should call `deferReadiness()`\n    to defer booting, and then call `advanceReadiness()` once all of your code\n    has finished loading.\n     @private\n    @method waitForDOMReady\n  */\n  waitForDOMReady() {\n    const document = this._document;\n\n    // SAFETY: Casting as Document should be safe since we're just reading a property.\n    // If it's not actually a Document then it will evaluate false which is fine for our\n    // purposes.\n    if (document === null || document.readyState !== 'loading') {\n      schedule('actions', this, this.domReady);\n    } else {\n      // Ideally we'd just check `document instanceof Document` but currently some tests pass a fake document.\n      (isDevelopingApp() && !(function (d) {\n        return typeof d.removeEventListener === 'function';\n      }(document)) && assert('[BUG] Called waitForDOMReady with an invalid document', function (d) {\n        return typeof d.removeEventListener === 'function';\n      }(document)));\n      let callback = () => {\n        document.removeEventListener('DOMContentLoaded', callback);\n        run(this, this.domReady);\n      };\n      document.addEventListener('DOMContentLoaded', callback);\n    }\n  }\n\n  /**\n    This is the autoboot flow:\n     1. Boot the app by calling `this.boot()`\n    2. Create an instance (or use the `__deprecatedInstance__` in globals mode)\n    3. Boot the instance by calling `instance.boot()`\n    4. Invoke the `App.ready()` callback\n    5. Kick-off routing on the instance\n     Ideally, this is all we would need to do:\n     ```javascript\n    _autoBoot() {\n      this.boot().then(() => {\n        let instance = (this._globalsMode) ? this.__deprecatedInstance__ : this.buildInstance();\n        return instance.boot();\n      }).then((instance) => {\n        App.ready();\n        instance.startRouting();\n      });\n    }\n    ```\n     Unfortunately, we cannot actually write this because we need to participate\n    in the \"synchronous\" boot process. While the code above would work fine on\n    the initial boot (i.e. DOM ready), when `App.reset()` is called, we need to\n    boot a new instance synchronously (see the documentation on `_bootSync()`\n    for details).\n     Because of this restriction, the actual logic of this method is located\n    inside `didBecomeReady()`.\n     @private\n    @method domReady\n  */\n  domReady() {\n    if (this.isDestroying || this.isDestroyed) {\n      return;\n    }\n    this._bootSync();\n\n    // Continues to `didBecomeReady`\n  }\n\n  /**\n    Use this to defer readiness until some condition is true.\n     Example:\n     ```javascript\n    import Application from '@ember/application';\n     let App = Application.create();\n     App.deferReadiness();\n     fetch('/auth-token')\n    .then(response => response.json())\n    .then(data => {\n      App.token = data.token;\n      App.advanceReadiness();\n    });\n    ```\n     This allows you to perform asynchronous setup logic and defer\n    booting your application until the setup has finished.\n     However, if the setup requires a loading UI, it might be better\n    to use the router for this purpose.\n     @method deferReadiness\n    @public\n  */\n  deferReadiness() {\n    (isDevelopingApp() && !(this instanceof Application) && assert('You must call deferReadiness on an instance of Application', this instanceof Application));\n    (isDevelopingApp() && !(!this.isDestroyed) && assert('You cannot defer readiness since application has already destroyed', !this.isDestroyed));\n    (isDevelopingApp() && !(!this.isDestroying) && assert('You cannot defer readiness since the application is being destroyed', !this.isDestroying));\n    (isDevelopingApp() && !(this._readinessDeferrals > 0) && assert('You cannot defer readiness since the `ready()` hook has already been called', this._readinessDeferrals > 0));\n    this._readinessDeferrals++;\n  }\n\n  /**\n    Call `advanceReadiness` after any asynchronous setup logic has completed.\n    Each call to `deferReadiness` must be matched by a call to `advanceReadiness`\n    or the application will never become ready and routing will not begin.\n     @method advanceReadiness\n    @see {Application#deferReadiness}\n    @public\n  */\n  advanceReadiness() {\n    (isDevelopingApp() && !(this instanceof Application) && assert('You must call advanceReadiness on an instance of Application', this instanceof Application));\n    (isDevelopingApp() && !(!this.isDestroyed) && assert('You cannot advance readiness since application has already destroyed', !this.isDestroyed));\n    (isDevelopingApp() && !(!this.isDestroying) && assert('You cannot advance readiness since the application is being destroyed', !this.isDestroying));\n    (isDevelopingApp() && !(this._readinessDeferrals > 0) && assert('You cannot advance readiness since the `ready()` hook has already been called', this._readinessDeferrals > 0));\n    this._readinessDeferrals--;\n    if (this._readinessDeferrals === 0) {\n      once(this, this.didBecomeReady);\n    }\n  }\n  _bootPromise = null;\n\n  /**\n    Initialize the application and return a promise that resolves with the `Application`\n    object when the boot process is complete.\n     Run any application initializers and run the application load hook. These hooks may\n    choose to defer readiness. For example, an authentication hook might want to defer\n    readiness until the auth token has been retrieved.\n     By default, this method is called automatically on \"DOM ready\"; however, if autoboot\n    is disabled, this is automatically called when the first application instance is\n    created via `visit`.\n     @public\n    @method boot\n    @return {Promise<Application,Error>}\n  */\n  boot() {\n    (isDevelopingApp() && !(!this.isDestroyed) && assert('You cannot boot this application since it has already been destroyed', !this.isDestroyed));\n    (isDevelopingApp() && !(!this.isDestroying) && assert('You cannot boot this application since it is being destroyed', !this.isDestroying));\n    if (this._bootPromise) {\n      return this._bootPromise;\n    }\n    try {\n      this._bootSync();\n    } catch (_) {\n      // Ignore the error: in the asynchronous boot path, the error is already reflected\n      // in the promise rejection\n    }\n    (isDevelopingApp() && !(this._bootPromise) && assert('has boot promise', this._bootPromise));\n    return this._bootPromise;\n  }\n  _bootResolver = null;\n\n  /**\n    Unfortunately, a lot of existing code assumes the booting process is\n    \"synchronous\". Specifically, a lot of tests assumes the last call to\n    `app.advanceReadiness()` or `app.reset()` will result in the app being\n    fully-booted when the current runloop completes.\n     We would like new code (like the `visit` API) to stop making this assumption,\n    so we created the asynchronous version above that returns a promise. But until\n    we have migrated all the code, we would have to expose this method for use\n    *internally* in places where we need to boot an app \"synchronously\".\n     @private\n  */\n  _bootSync() {\n    if (this._booted || this.isDestroying || this.isDestroyed) {\n      return;\n    }\n\n    // Even though this returns synchronously, we still need to make sure the\n    // boot promise exists for book-keeping purposes: if anything went wrong in\n    // the boot process, we need to store the error as a rejection on the boot\n    // promise so that a future caller of `boot()` can tell what failed.\n    let defer = this._bootResolver = RSVP.defer();\n    this._bootPromise = defer.promise;\n    try {\n      this.runInitializers();\n      runLoadHooks('application', this);\n      this.advanceReadiness();\n      // Continues to `didBecomeReady`\n    } catch (error) {\n      // For the asynchronous boot path\n      defer.reject(error);\n\n      // For the synchronous boot path\n      throw error;\n    }\n  }\n\n  /**\n    Reset the application. This is typically used only in tests. It cleans up\n    the application in the following order:\n     1. Deactivate existing routes\n    2. Destroy all objects in the container\n    3. Create a new application container\n    4. Re-route to the existing url\n     Typical Example:\n     ```javascript\n    import Application from '@ember/application';\n    let App;\n     run(function() {\n      App = Application.create();\n    });\n     module('acceptance test', {\n      setup: function() {\n        App.reset();\n      }\n    });\n     test('first test', function() {\n      // App is freshly reset\n    });\n     test('second test', function() {\n      // App is again freshly reset\n    });\n    ```\n     Advanced Example:\n     Occasionally you may want to prevent the app from initializing during\n    setup. This could enable extra configuration, or enable asserting prior\n    to the app becoming ready.\n     ```javascript\n    import Application from '@ember/application';\n    let App;\n     run(function() {\n      App = Application.create();\n    });\n     module('acceptance test', {\n      setup: function() {\n        run(function() {\n          App.reset();\n          App.deferReadiness();\n        });\n      }\n    });\n     test('first test', function() {\n      ok(true, 'something before app is initialized');\n       run(function() {\n        App.advanceReadiness();\n      });\n       ok(true, 'something after app is initialized');\n    });\n    ```\n     @method reset\n    @public\n  */\n  reset() {\n    (isDevelopingApp() && !(!this.isDestroyed) && assert('You cannot reset this application since it has already been destroyed', !this.isDestroyed));\n    (isDevelopingApp() && !(!this.isDestroying) && assert('You cannot reset this application since it is being destroyed', !this.isDestroying));\n    (isDevelopingApp() && !(this._globalsMode && this.autoboot) && assert(`Calling reset() on instances of \\`Application\\` is not\n            supported when globals mode is disabled; call \\`visit()\\` to\n            create new \\`ApplicationInstance\\`s and dispose them\n            via their \\`destroy()\\` method instead.`, this._globalsMode && this.autoboot));\n    let instance = this.__deprecatedInstance__;\n    this._readinessDeferrals = 1;\n    this._bootPromise = null;\n    this._bootResolver = null;\n    this._booted = false;\n    function handleReset() {\n      (isDevelopingApp() && !(instance) && assert('expected instance', instance));\n      run(instance, 'destroy');\n      this._buildDeprecatedInstance();\n      schedule('actions', this, '_bootSync');\n    }\n    join(this, handleReset);\n  }\n\n  /**\n    @private\n    @method didBecomeReady\n  */\n  didBecomeReady() {\n    if (this.isDestroying || this.isDestroyed) {\n      return;\n    }\n    (isDevelopingApp() && !(this._bootResolver) && assert('expected _bootResolver', this._bootResolver));\n    try {\n      // TODO: Is this still needed for _globalsMode = false?\n\n      // See documentation on `_autoboot()` for details\n      if (this.autoboot) {\n        let instance;\n        if (this._globalsMode) {\n          // If we already have the __deprecatedInstance__ lying around, boot it to\n          // avoid unnecessary work\n          instance = this.__deprecatedInstance__;\n          (isDevelopingApp() && !(instance) && assert('expected instance', instance));\n        } else {\n          // Otherwise, build an instance and boot it. This is currently unreachable,\n          // because we forced _globalsMode to === autoboot; but having this branch\n          // allows us to locally toggle that flag for weeding out legacy globals mode\n          // dependencies independently\n          instance = this.buildInstance();\n        }\n        instance._bootSync();\n\n        // TODO: App.ready() is not called when autoboot is disabled, is this correct?\n        this.ready();\n        instance.startRouting();\n      }\n\n      // For the asynchronous boot path\n      this._bootResolver.resolve(this);\n\n      // For the synchronous boot path\n      this._booted = true;\n    } catch (error) {\n      // For the asynchronous boot path\n      this._bootResolver.reject(error);\n\n      // For the synchronous boot path\n      throw error;\n    }\n  }\n\n  /**\n    Called when the Application has become ready, immediately before routing\n    begins. The call will be delayed until the DOM has become ready.\n     @event ready\n    @public\n  */\n  ready() {\n    return this;\n  }\n\n  // This method must be moved to the application instance object\n  willDestroy() {\n    super.willDestroy();\n    if (_loaded['application'] === this) {\n      _loaded['application'] = undefined;\n    }\n    if (this._applicationInstances.size) {\n      this._applicationInstances.forEach(i => i.destroy());\n      this._applicationInstances.clear();\n    }\n  }\n\n  /**\n    Boot a new instance of `ApplicationInstance` for the current\n    application and navigate it to the given `url`. Returns a `Promise` that\n    resolves with the instance when the initial routing and rendering is\n    complete, or rejects with any error that occurred during the boot process.\n     When `autoboot` is disabled, calling `visit` would first cause the\n    application to boot, which runs the application initializers.\n     This method also takes a hash of boot-time configuration options for\n    customizing the instance's behavior. See the documentation on\n    `ApplicationInstance.BootOptions` for details.\n     `ApplicationInstance.BootOptions` is an interface class that exists\n    purely to document the available options; you do not need to construct it\n    manually. Simply pass a regular JavaScript object containing of the\n    desired options:\n     ```javascript\n    MyApp.visit(\"/\", { location: \"none\", rootElement: \"#container\" });\n    ```\n     ### Supported Scenarios\n     While the `BootOptions` class exposes a large number of knobs, not all\n    combinations of them are valid; certain incompatible combinations might\n    result in unexpected behavior.\n     For example, booting the instance in the full browser environment\n    while specifying a foreign `document` object (e.g. `{ isBrowser: true,\n    document: iframe.contentDocument }`) does not work correctly today,\n    largely due to Ember's jQuery dependency.\n     Currently, there are three officially supported scenarios/configurations.\n    Usages outside of these scenarios are not guaranteed to work, but please\n    feel free to file bug reports documenting your experience and any issues\n    you encountered to help expand support.\n     #### Browser Applications (Manual Boot)\n     The setup is largely similar to how Ember works out-of-the-box. Normally,\n    Ember will boot a default instance for your Application on \"DOM ready\".\n    However, you can customize this behavior by disabling `autoboot`.\n     For example, this allows you to render a miniture demo of your application\n    into a specific area on your marketing website:\n     ```javascript\n    import MyApp from 'my-app';\n     $(function() {\n      let App = MyApp.create({ autoboot: false });\n       let options = {\n        // Override the router's location adapter to prevent it from updating\n        // the URL in the address bar\n        location: 'none',\n         // Override the default `rootElement` on the app to render into a\n        // specific `div` on the page\n        rootElement: '#demo'\n      };\n       // Start the app at the special demo URL\n      App.visit('/demo', options);\n    });\n    ```\n     Or perhaps you might want to boot two instances of your app on the same\n    page for a split-screen multiplayer experience:\n     ```javascript\n    import MyApp from 'my-app';\n     $(function() {\n      let App = MyApp.create({ autoboot: false });\n       let sessionId = MyApp.generateSessionID();\n       let player1 = App.visit(`/matches/join?name=Player+1&session=${sessionId}`, { rootElement: '#left', location: 'none' });\n      let player2 = App.visit(`/matches/join?name=Player+2&session=${sessionId}`, { rootElement: '#right', location: 'none' });\n       Promise.all([player1, player2]).then(() => {\n        // Both apps have completed the initial render\n        $('#loading').fadeOut();\n      });\n    });\n    ```\n     Do note that each app instance maintains their own registry/container, so\n    they will run in complete isolation by default.\n     #### Server-Side Rendering (also known as FastBoot)\n     This setup allows you to run your Ember app in a server environment using\n    Node.js and render its content into static HTML for SEO purposes.\n     ```javascript\n    const HTMLSerializer = new SimpleDOM.HTMLSerializer(SimpleDOM.voidMap);\n     function renderURL(url) {\n      let dom = new SimpleDOM.Document();\n      let rootElement = dom.body;\n      let options = { isBrowser: false, document: dom, rootElement: rootElement };\n       return MyApp.visit(options).then(instance => {\n        try {\n          return HTMLSerializer.serialize(rootElement.firstChild);\n        } finally {\n          instance.destroy();\n        }\n      });\n    }\n    ```\n     In this scenario, because Ember does not have access to a global `document`\n    object in the Node.js environment, you must provide one explicitly. In practice,\n    in the non-browser environment, the stand-in `document` object only needs to\n    implement a limited subset of the full DOM API. The `SimpleDOM` library is known\n    to work.\n     Since there is no DOM access in the non-browser environment, you must also\n    specify a DOM `Element` object in the same `document` for the `rootElement` option\n    (as opposed to a selector string like `\"body\"`).\n     See the documentation on the `isBrowser`, `document` and `rootElement` properties\n    on `ApplicationInstance.BootOptions` for details.\n     #### Server-Side Resource Discovery\n     This setup allows you to run the routing layer of your Ember app in a server\n    environment using Node.js and completely disable rendering. This allows you\n    to simulate and discover the resources (i.e. AJAX requests) needed to fulfill\n    a given request and eagerly \"push\" these resources to the client.\n     ```app/initializers/network-service.js\n    import BrowserNetworkService from 'app/services/network/browser';\n    import NodeNetworkService from 'app/services/network/node';\n     // Inject a (hypothetical) service for abstracting all AJAX calls and use\n    // the appropriate implementation on the client/server. This also allows the\n    // server to log all the AJAX calls made during a particular request and use\n    // that for resource-discovery purpose.\n     export function initialize(application) {\n      if (window) { // browser\n        application.register('service:network', BrowserNetworkService);\n      } else { // node\n        application.register('service:network', NodeNetworkService);\n      }\n    };\n     export default {\n      name: 'network-service',\n      initialize: initialize\n    };\n    ```\n     ```app/routes/post.js\n    import Route from '@ember/routing/route';\n    import { service } from '@ember/service';\n     // An example of how the (hypothetical) service is used in routes.\n     export default class IndexRoute extends Route {\n      @service network;\n       model(params) {\n        return this.network.fetch(`/api/posts/${params.post_id}.json`);\n      }\n       afterModel(post) {\n        if (post.isExternalContent) {\n          return this.network.fetch(`/api/external/?url=${post.externalURL}`);\n        } else {\n          return post;\n        }\n      }\n    }\n    ```\n     ```javascript\n    // Finally, put all the pieces together\n     function discoverResourcesFor(url) {\n      return MyApp.visit(url, { isBrowser: false, shouldRender: false }).then(instance => {\n        let networkService = instance.lookup('service:network');\n        return networkService.requests; // => { \"/api/posts/123.json\": \"...\" }\n      });\n    }\n    ```\n     @public\n    @method visit\n    @param url {String} The initial URL to navigate to\n    @param options {ApplicationInstance.BootOptions}\n    @return {Promise<ApplicationInstance, Error>}\n  */\n  visit(url, options) {\n    (isDevelopingApp() && !(!this.isDestroyed) && assert('You cannot visit this application since it has already been destroyed', !this.isDestroyed));\n    (isDevelopingApp() && !(!this.isDestroying) && assert('You cannot visit this application since it is being destroyed', !this.isDestroying));\n    return this.boot().then(() => {\n      let instance = this.buildInstance();\n      return instance.boot(options).then(() => instance.visit(url)).catch(error => {\n        run(instance, 'destroy');\n        throw error;\n      });\n    });\n  }\n}\nfunction commonSetupRegistry(registry) {\n  registry.register('router:main', EmberRouter);\n  registry.register('-view-registry:main', {\n    create() {\n      return makeDictionary(null);\n    }\n  });\n  registry.register('route:basic', Route);\n  registry.register('event_dispatcher:main', EventDispatcher);\n  registry.register('location:hash', HashLocation);\n  registry.register('location:history', HistoryLocation);\n  registry.register('location:none', NoneLocation);\n  registry.register(privatize`-bucket-cache:main`, {\n    create() {\n      return new BucketCache();\n    }\n  });\n  registry.register('service:router', RouterService);\n}\n\nexport { _loaded, Application as default, getOwner, runLoadHooks, setOwner };\n","import '../object/index.js';\nimport { h as hasDOM, e as environment } from '../../shared-chunks/index-BGP1rw3B.js';\nimport EngineInstance from '../engine/instance.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../@glimmer/global-context/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/index-CQkjwqTv.js';\nimport '../../@glimmer/destroyable/index.js';\nimport { e as renderSettled } from '../../shared-chunks/index-ByyoGpfz.js';\nimport '../../shared-chunks/registry-XY5cfmbH.js';\nimport '../debug/index.js';\nimport '../../shared-chunks/dynamic-CuBsUXX8.js';\nimport '../../shared-chunks/constants-oDhF27qL.js';\nimport '../runloop/index.js';\nimport EmberRouter from '../routing/router.js';\nimport '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport EventDispatcher from '../-internals/views/lib/system/event_dispatcher.js';\nimport '../-internals/views/lib/views/core_view.js';\nimport '../-internals/views/lib/mixins/action_support.js';\nimport '../-internals/views/lib/views/states.js';\nimport { s as set } from '../../shared-chunks/property_set-DrZnfGQ7.js';\nimport '../-internals/meta/lib/meta.js';\nimport { g as get } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\nimport { assert } from '../debug/lib/assert.js';\n\n/**\n@module @ember/application\n*/\n\n/**\n  The `ApplicationInstance` encapsulates all of the stateful aspects of a\n  running `Application`.\n\n  At a high-level, we break application boot into two distinct phases:\n\n  * Definition time, where all of the classes, templates, and other\n    dependencies are loaded (typically in the browser).\n  * Run time, where we begin executing the application once everything\n    has loaded.\n\n  Definition time can be expensive and only needs to happen once since it is\n  an idempotent operation. For example, between test runs and FastBoot\n  requests, the application stays the same. It is only the state that we want\n  to reset.\n\n  That state is what the `ApplicationInstance` manages: it is responsible for\n  creating the container that contains all application state, and disposing of\n  it once the particular test run or FastBoot request has finished.\n\n  @public\n  @class ApplicationInstance\n  @extends EngineInstance\n*/\n\nclass ApplicationInstance extends EngineInstance {\n  /**\n    The `Application` for which this is an instance.\n     @property {Application} application\n    @private\n  */\n\n  /**\n    The root DOM element of the Application as an element or a\n    CSS selector.\n     @private\n    @property {String|DOMElement} rootElement\n  */\n  rootElement = null;\n  init(properties) {\n    super.init(properties);\n    this.application._watchInstance(this);\n\n    // Register this instance in the per-instance registry.\n    //\n    // Why do we need to register the instance in the first place?\n    // Because we need a good way for the root route (a.k.a ApplicationRoute)\n    // to notify us when it has created the root-most view. That view is then\n    // appended to the rootElement, in the case of apps, to the fixture harness\n    // in tests, or rendered to a string in the case of FastBoot.\n    this.register('-application-instance:main', this, {\n      instantiate: false\n    });\n  }\n\n  /**\n    Overrides the base `EngineInstance._bootSync` method with concerns relevant\n    to booting application (instead of engine) instances.\n     This method should only contain synchronous boot concerns. Asynchronous\n    boot concerns should eventually be moved to the `boot` method, which\n    returns a promise.\n     Until all boot code has been made asynchronous, we need to continue to\n    expose this method for use *internally* in places where we need to boot an\n    instance synchronously.\n     @private\n  */\n  _bootSync(options) {\n    if (this._booted) {\n      return this;\n    }\n    options = new _BootOptions(options);\n    this.setupRegistry(options);\n    if (options.rootElement) {\n      this.rootElement = options.rootElement;\n    } else {\n      this.rootElement = this.application.rootElement;\n    }\n    if (options.location) {\n      set(this.router, 'location', options.location);\n    }\n    this.application.runInstanceInitializers(this);\n    if (options.isInteractive) {\n      this.setupEventDispatcher();\n    }\n    this._booted = true;\n    return this;\n  }\n  setupRegistry(options) {\n    this.constructor.setupRegistry(this.__registry__, options);\n  }\n  _router;\n  get router() {\n    if (!this._router) {\n      let router = this.lookup('router:main');\n      (isDevelopingApp() && !(router instanceof EmberRouter) && assert('expected an instance of Router', router instanceof EmberRouter));\n      this._router = router;\n    }\n    return this._router;\n  }\n\n  /**\n    This hook is called by the root-most Route (a.k.a. the ApplicationRoute)\n    when it has finished creating the root View. By default, we simply take the\n    view and append it to the `rootElement` specified on the Application.\n     In cases like FastBoot and testing, we can override this hook and implement\n    custom behavior, such as serializing to a string and sending over an HTTP\n    socket rather than appending to DOM.\n     @param view {Ember.View} the root-most view\n    @deprecated\n    @private\n  */\n  didCreateRootView(view) {\n    view.appendTo(this.rootElement);\n  }\n\n  /**\n    Tells the router to start routing. The router will ask the location for the\n    current URL of the page to determine the initial URL to start routing to.\n    To start the app at a specific URL, call `handleURL` instead.\n     @private\n  */\n  startRouting() {\n    this.router.startRouting();\n  }\n\n  /**\n    Sets up the router, initializing the child router and configuring the\n    location before routing begins.\n     Because setup should only occur once, multiple calls to `setupRouter`\n    beyond the first call have no effect.\n     This is commonly used in order to confirm things that rely on the router\n    are functioning properly from tests that are primarily rendering related.\n     For example, from within [ember-qunit](https://github.com/emberjs/ember-qunit)'s\n    `setupRenderingTest` calling `this.owner.setupRouter()` would allow that\n    rendering test to confirm that any `<LinkTo></LinkTo>`'s that are rendered\n    have the correct URL.\n     @public\n  */\n  setupRouter() {\n    this.router.setupRouter();\n  }\n\n  /**\n    Directs the router to route to a particular URL. This is useful in tests,\n    for example, to tell the app to start at a particular URL.\n     @param url {String} the URL the router should route to\n    @private\n  */\n  handleURL(url) {\n    this.setupRouter();\n    return this.router.handleURL(url);\n  }\n\n  /**\n    @private\n  */\n  setupEventDispatcher() {\n    let dispatcher = this.lookup('event_dispatcher:main');\n    (isDevelopingApp() && !(dispatcher instanceof EventDispatcher) && assert('expected EventDispatcher', dispatcher instanceof EventDispatcher));\n    let applicationCustomEvents = get(this.application, 'customEvents');\n    let instanceCustomEvents = get(this, 'customEvents');\n    let customEvents = Object.assign({}, applicationCustomEvents, instanceCustomEvents);\n    (isDevelopingApp() && !(this.rootElement === null || typeof this.rootElement === 'string' || this.rootElement instanceof Element) && assert('[BUG] Tried to set up dispatcher with an invalid root element', this.rootElement === null || typeof this.rootElement === 'string' || this.rootElement instanceof Element));\n    dispatcher.setup(customEvents, this.rootElement);\n    return dispatcher;\n  }\n\n  /**\n    Returns the current URL of the app instance. This is useful when your\n    app does not update the browsers URL bar (i.e. it uses the `'none'`\n    location adapter).\n     @public\n    @return {String} the current URL\n  */\n  getURL() {\n    return this.router.url;\n  }\n\n  // `instance.visit(url)` should eventually replace `instance.handleURL()`;\n  // the test helpers can probably be switched to use this implementation too\n\n  /**\n    Navigate the instance to a particular URL. This is useful in tests, for\n    example, or to tell the app to start at a particular URL. This method\n    returns a promise that resolves with the app instance when the transition\n    is complete, or rejects if the transition was aborted due to an error.\n     @public\n    @param url {String} the destination URL\n    @return {Promise<ApplicationInstance>}\n  */\n  visit(url) {\n    this.setupRouter();\n    let bootOptions = this.__container__.lookup('-environment:main');\n    let router = this.router;\n    let handleTransitionResolve = () => {\n      if (!bootOptions.options.shouldRender) {\n        // No rendering is needed, and routing has completed, simply return.\n        return this;\n      } else {\n        // Ensure that the visit promise resolves when all rendering has completed\n        return renderSettled().then(() => this);\n      }\n    };\n    let handleTransitionReject = error => {\n      if (error.error && error.error instanceof Error) {\n        throw error.error;\n      } else if (error.name === 'TransitionAborted') {\n        throw new Error(error.message);\n      } else {\n        throw error;\n      }\n    };\n    let location = get(router, 'location');\n    (isDevelopingApp() && !(typeof location !== 'string') && assert('location has been initialized', typeof location !== 'string')); // Keeps the location adapter's internal URL in-sync\n    location.setURL(url);\n\n    // getURL returns the set url with the rootURL stripped off\n    return router.handleURL(location.getURL()).followRedirects().then(handleTransitionResolve, handleTransitionReject);\n  }\n  willDestroy() {\n    super.willDestroy();\n    this.application._unwatchInstance(this);\n  }\n\n  /**\n   @private\n   @method setupRegistry\n   @param {Registry} registry\n   @param {BootOptions} options\n  */\n  static setupRegistry(registry, options = {}) {\n    let coptions = options instanceof _BootOptions ? options : new _BootOptions(options);\n    registry.register('-environment:main', coptions.toEnvironment(), {\n      instantiate: false\n    });\n    registry.register('service:-document', coptions.document, {\n      instantiate: false\n    });\n    super.setupRegistry(registry, coptions);\n  }\n}\n\n/**\n  A list of boot-time configuration options for customizing the behavior of\n  an `ApplicationInstance`.\n\n  This is an interface class that exists purely to document the available\n  options; you do not need to construct it manually. Simply pass a regular\n  JavaScript object containing the desired options into methods that require\n  one of these options object:\n\n  ```javascript\n  MyApp.visit(\"/\", { location: \"none\", rootElement: \"#container\" });\n  ```\n\n  Not all combinations of the supported options are valid. See the documentation\n  on `Application#visit` for the supported configurations.\n\n  Internal, experimental or otherwise unstable flags are marked as private.\n\n  @class BootOptions\n  @namespace ApplicationInstance\n  @public\n*/\nclass _BootOptions {\n  /**\n    Interactive mode: whether we need to set up event delegation and invoke\n    lifecycle callbacks on Components.\n     @property isInteractive\n    @type boolean\n    @default auto-detected\n    @private\n  */\n  isInteractive;\n\n  /**\n    @property _renderMode\n    @type string\n    @default undefined\n    @private\n  */\n  _renderMode;\n\n  /**\n    Run in a full browser environment.\n     When this flag is set to `false`, it will disable most browser-specific\n    and interactive features. Specifically:\n     * It does not use `jQuery` to append the root view; the `rootElement`\n      (either specified as a subsequent option or on the application itself)\n      must already be an `Element` in the given `document` (as opposed to a\n      string selector).\n     * It does not set up an `EventDispatcher`.\n     * It does not run any `Component` lifecycle hooks (such as `didInsertElement`).\n     * It sets the `location` option to `\"none\"`. (If you would like to use\n      the location adapter specified in the app's router instead, you can also\n      specify `{ location: null }` to specifically opt-out.)\n     @property isBrowser\n    @type boolean\n    @default auto-detected\n    @public\n  */\n  isBrowser;\n\n  /**\n    If present, overrides the router's `location` property with this\n    value. This is useful for environments where trying to modify the\n    URL would be inappropriate.\n     @property location\n    @type string\n    @default null\n    @public\n  */\n  location = null;\n\n  /**\n    Disable rendering completely.\n     When this flag is set to `false`, it will disable the entire rendering\n    pipeline. Essentially, this puts the app into \"routing-only\" mode. No\n    templates will be rendered, and no Components will be created.\n     @property shouldRender\n    @type boolean\n    @default true\n    @public\n  */\n  shouldRender;\n\n  /**\n    If present, render into the given `Document` object instead of the\n    global `window.document` object.\n     In practice, this is only useful in non-browser environment or in\n    non-interactive mode, because Ember's `jQuery` dependency is\n    implicitly bound to the current document, causing event delegation\n    to not work properly when the app is rendered into a foreign\n    document object (such as an iframe's `contentDocument`).\n     In non-browser mode, this could be a \"`Document`-like\" object as\n    Ember only interact with a small subset of the DOM API in non-\n    interactive mode. While the exact requirements have not yet been\n    formalized, the `SimpleDOM` library's implementation is known to\n    work.\n     @property document\n    @type Document\n    @default the global `document` object\n    @public\n  */\n  document;\n\n  /**\n    If present, overrides the application's `rootElement` property on\n    the instance. This is useful for testing environment, where you\n    might want to append the root view to a fixture area.\n     In non-browser mode, because Ember does not have access to jQuery,\n    this options must be specified as a DOM `Element` object instead of\n    a selector string.\n     See the documentation on `Application`'s `rootElement` for\n    details.\n     @property rootElement\n    @type String|Element\n    @default null\n    @public\n  */\n  rootElement;\n  constructor(options = {}) {\n    this.isInteractive = Boolean(hasDOM); // This default is overridable below\n    this._renderMode = options._renderMode;\n    if (options.isBrowser !== undefined) {\n      this.isBrowser = Boolean(options.isBrowser);\n    } else {\n      this.isBrowser = Boolean(hasDOM);\n    }\n    if (!this.isBrowser) {\n      this.isInteractive = false;\n      this.location = 'none';\n    }\n    if (options.shouldRender !== undefined) {\n      this.shouldRender = Boolean(options.shouldRender);\n    } else {\n      this.shouldRender = true;\n    }\n    if (!this.shouldRender) {\n      this.isInteractive = false;\n    }\n    if (options.document) {\n      this.document = options.document;\n    } else {\n      this.document = typeof document !== 'undefined' ? document : null;\n    }\n    if (options.rootElement) {\n      this.rootElement = options.rootElement;\n    }\n\n    // Set these options last to give the user a chance to override the\n    // defaults from the \"combo\" options like `isBrowser` (although in\n    // practice, the resulting combination is probably invalid)\n\n    if (options.location !== undefined) {\n      this.location = options.location;\n    }\n    if (options.isInteractive !== undefined) {\n      this.isInteractive = Boolean(options.isInteractive);\n    }\n  }\n  toEnvironment() {\n    // Do we really want to assign all of this!?\n    return {\n      ...environment,\n      // For compatibility with existing code\n      hasDOM: this.isBrowser,\n      isInteractive: this.isInteractive,\n      _renderMode: this._renderMode,\n      options: this\n    };\n  }\n}\n\nexport { ApplicationInstance as default };\n","import { E as ENV } from '../../../shared-chunks/env-DEd6hPbj.js';\nimport { w as window } from '../../../shared-chunks/index-BGP1rw3B.js';\n\n/*globals CustomEvent */\n\n\n/**\n  @module @ember/application\n*/\n\nconst loadHooks = ENV.EMBER_LOAD_HOOKS || {};\nconst loaded = {};\nlet _loaded = loaded;\n\n/**\n  Detects when a specific package of Ember (e.g. 'Application')\n  has fully loaded and is available for extension.\n\n  The provided `callback` will be called with the `name` passed\n  resolved from a string into the object:\n\n  ``` javascript\n  import { onLoad } from '@ember/application';\n\n  onLoad('Ember.Application' function(hbars) {\n    hbars.registerHelper(...);\n  });\n  ```\n\n  @method onLoad\n  @static\n  @for @ember/application\n  @param name {String} name of hook\n  @param callback {Function} callback to be called\n  @private\n*/\nfunction onLoad(name, callback) {\n  let object = loaded[name];\n  let hooks = loadHooks[name] ??= [];\n  hooks.push(callback);\n  if (object) {\n    callback(object);\n  }\n}\n\n/**\n  Called when an Ember.js package (e.g Application) has finished\n  loading. Triggers any callbacks registered for this event.\n\n  @method runLoadHooks\n  @static\n  @for @ember/application\n  @param name {String} name of hook\n  @param object {Object} object to pass to callbacks\n  @private\n*/\nfunction runLoadHooks(name, object) {\n  loaded[name] = object;\n  if (window && typeof CustomEvent === 'function') {\n    let event = new CustomEvent(name, {\n      detail: object\n    });\n    window.dispatchEvent(event);\n  }\n  loadHooks[name]?.forEach(callback => callback(object));\n}\n\nexport { _loaded, onLoad, runLoadHooks };\n","import '../-internals/meta/lib/meta.js';\nimport { g as guidFor } from '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { g as getName, s as setName } from '../../shared-chunks/name-DVtQREj6.js';\nimport '../debug/index.js';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { g as get } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport { N as NAMESPACES, a as NAMESPACES_BY_ID, p as processAllNamespaces, f as findNamespace, b as addNamespace, c as findNamespaces, d as processNamespace, r as removeNamespace } from '../../shared-chunks/namespace_search-ClQOZuFA.js';\nimport EmberObject from '../object/index.js';\nimport { assert } from '../debug/lib/assert.js';\n\n/**\n@module @ember/application/namespace\n*/\n\nclass Namespace extends EmberObject {\n  static NAMESPACES = NAMESPACES;\n  static NAMESPACES_BY_ID = NAMESPACES_BY_ID;\n  static processAll = processAllNamespaces;\n  static byName = findNamespace;\n  init(properties) {\n    super.init(properties);\n    addNamespace(this);\n  }\n  toString() {\n    let existing_name = get(this, 'name') || get(this, 'modulePrefix');\n    if (existing_name) {\n      (isDevelopingApp() && !(typeof existing_name === 'string') && assert(\"name wasn't a string\", typeof existing_name === 'string'));\n      return existing_name;\n    }\n    findNamespaces();\n    let name = getName(this);\n    if (name === undefined) {\n      name = guidFor(this);\n      setName(this, name);\n    }\n    return name;\n  }\n  nameClasses() {\n    processNamespace(this);\n  }\n  destroy() {\n    removeNamespace(this);\n    return super.destroy();\n  }\n}\n\n// Declare on the prototype to have a single shared value.\nNamespace.prototype.isNamespace = true;\n\nexport { Namespace as default };\n","const EMBER_ARRAYS = new WeakSet();\nfunction setEmberArray(obj) {\n  EMBER_ARRAYS.add(obj);\n}\nfunction isEmberArray(obj) {\n  return EMBER_ARRAYS.has(obj);\n}\n\nexport { isEmberArray, setEmberArray };\n","import { g as get, o as objectAt, l as beginPropertyChanges, m as endPropertyChanges, c as computed, P as PROXY_CONTENT } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../-internals/meta/lib/meta.js';\nimport '../debug/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { s as set } from '../../shared-chunks/property_set-DrZnfGQ7.js';\nimport { r as replaceInNativeArray, a as replace } from '../../shared-chunks/array-BqYCCatg.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\nimport '../object/index.js';\nimport Mixin from '../object/mixin.js';\nimport Enumerable from '../enumerable/index.js';\nimport MutableEnumerable from '../enumerable/mutable.js';\nimport typeOf from '../utils/lib/type-of.js';\nimport compare from '../utils/lib/compare.js';\nimport Observable from '../object/observable.js';\nimport { setEmberArray, isEmberArray } from './-internals.js';\nexport { default as makeArray } from './lib/make-array.js';\nimport { assert } from '../debug/lib/assert.js';\n\n/**\n@module @ember/array\n*/\n\nconst EMPTY_ARRAY = Object.freeze([]);\nconst identityFunction = item => item;\nfunction uniqBy(array, keyOrFunc = identityFunction) {\n  (isDevelopingApp() && !(isArray(array)) && assert(`first argument passed to \\`uniqBy\\` should be array`, isArray(array)));\n  let ret = A();\n  let seen = new Set();\n  let getter = typeof keyOrFunc === 'function' ? keyOrFunc : item => get(item, keyOrFunc);\n  array.forEach(item => {\n    let val = getter(item);\n    if (!seen.has(val)) {\n      seen.add(val);\n      ret.push(item);\n    }\n  });\n  return ret;\n}\nfunction iter(...args) {\n  let valueProvided = args.length === 2;\n  let [key, value] = args;\n  return valueProvided ? item => value === get(item, key) : item => Boolean(get(item, key));\n}\nfunction findIndex(array, predicate, startAt) {\n  let len = array.length;\n  for (let index = startAt; index < len; index++) {\n    // SAFETY: Because we're checking the index this value should always be set.\n    let item = objectAt(array, index);\n    if (predicate(item, index, array)) {\n      return index;\n    }\n  }\n  return -1;\n}\nfunction find(array, callback, target = null) {\n  let predicate = callback.bind(target);\n  let index = findIndex(array, predicate, 0);\n  return index === -1 ? undefined : objectAt(array, index);\n}\nfunction any(array, callback, target = null) {\n  let predicate = callback.bind(target);\n  return findIndex(array, predicate, 0) !== -1;\n}\nfunction every(array, callback, target = null) {\n  let cb = callback.bind(target);\n  let predicate = (item, index, array) => !cb(item, index, array);\n  return findIndex(array, predicate, 0) === -1;\n}\nfunction indexOf(array, val, startAt = 0, withNaNCheck) {\n  let len = array.length;\n  if (startAt < 0) {\n    startAt += len;\n  }\n\n  // SameValueZero comparison (NaN !== NaN)\n  let predicate = withNaNCheck && val !== val ? item => item !== item : item => item === val;\n  return findIndex(array, predicate, startAt);\n}\nfunction removeAt(array, index, len) {\n  (isDevelopingApp() && !(index > -1 && index < array.length) && assert(`\\`removeAt\\` index provided is out of range`, index > -1 && index < array.length));\n  replace(array, index, len ?? 1, EMPTY_ARRAY);\n  return array;\n}\nfunction insertAt(array, index, item) {\n  (isDevelopingApp() && !(index > -1 && index <= array.length) && assert(`\\`insertAt\\` index provided is out of range`, index > -1 && index <= array.length));\n  replace(array, index, 0, [item]);\n  return item;\n}\n\n/**\n  Returns true if the passed object is an array or Array-like.\n\n  Objects are considered Array-like if any of the following are true:\n\n    - the object is a native Array\n    - the object has an objectAt property\n    - the object is an Object, and has a length property\n\n  Unlike `typeOf` this method returns true even if the passed object is\n  not formally an array but appears to be array-like (i.e. implements `Array`)\n\n  ```javascript\n  import { isArray } from '@ember/array';\n  import ArrayProxy from '@ember/array/proxy';\n\n  isArray();                                      // false\n  isArray([]);                                    // true\n  isArray(ArrayProxy.create({ content: [] }));    // true\n  ```\n\n  @method isArray\n  @static\n  @for @ember/array\n  @param {Object} obj The object to test\n  @return {Boolean} true if the passed object is an array or Array-like\n  @public\n*/\nfunction isArray(obj) {\n  if (isDevelopingApp() && typeof obj === 'object' && obj !== null) {\n    // SAFETY: Property read checks are safe if it's an object\n    let possibleProxyContent = obj[PROXY_CONTENT];\n    if (possibleProxyContent !== undefined) {\n      obj = possibleProxyContent;\n    }\n  }\n\n  // SAFETY: Property read checks are safe if it's an object\n  if (!obj || obj.setInterval) {\n    return false;\n  }\n  if (Array.isArray(obj) || EmberArray.detect(obj)) {\n    return true;\n  }\n  let type = typeOf(obj);\n  if ('array' === type) {\n    return true;\n  }\n\n  // SAFETY: Property read checks are safe if it's an object\n  let length = obj.length;\n  if (typeof length === 'number' && length === length && 'object' === type) {\n    return true;\n  }\n  return false;\n}\n\n/*\n  This allows us to define computed properties that are not enumerable.\n*/\nfunction nonEnumerableComputed(callback) {\n  let property = computed(callback);\n  property.enumerable = false;\n  return property;\n}\nfunction mapBy(key) {\n  return this.map(next => get(next, key));\n}\n\n// ..........................................................\n// ARRAY\n//\n/**\n  This mixin implements Observer-friendly Array-like behavior. It is not a\n  concrete implementation, but it can be used up by other classes that want\n  to appear like arrays.\n\n  For example, ArrayProxy is a concrete class that can be instantiated to\n  implement array-like behavior. This class uses the Array Mixin by way of\n  the MutableArray mixin, which allows observable changes to be made to the\n  underlying array.\n\n  This mixin defines methods specifically for collections that provide\n  index-ordered access to their contents. When you are designing code that\n  needs to accept any kind of Array-like object, you should use these methods\n  instead of Array primitives because these will properly notify observers of\n  changes to the array.\n\n  Although these methods are efficient, they do add a layer of indirection to\n  your application so it is a good idea to use them only when you need the\n  flexibility of using both true JavaScript arrays and \"virtual\" arrays such\n  as controllers and collections.\n\n  You can use the methods defined in this module to access and modify array\n  contents in an observable-friendly way. You can also be notified whenever\n  the membership of an array changes by using `.observes('myArray.[]')`.\n\n  To support `EmberArray` in your own class, you must override two\n  primitives to use it: `length()` and `objectAt()`.\n\n  @class EmberArray\n  @uses Enumerable\n  @since Ember 0.9.0\n  @public\n*/\n\nconst EmberArray = Mixin.create(Enumerable, {\n  init() {\n    this._super(...arguments);\n    setEmberArray(this);\n  },\n  objectsAt(indexes) {\n    return indexes.map(idx => objectAt(this, idx));\n  },\n  '[]': nonEnumerableComputed({\n    get() {\n      return this;\n    },\n    set(_key, value) {\n      this.replace(0, this.length, value);\n      return this;\n    }\n  }),\n  firstObject: nonEnumerableComputed(function () {\n    return objectAt(this, 0);\n  }).readOnly(),\n  lastObject: nonEnumerableComputed(function () {\n    return objectAt(this, this.length - 1);\n  }).readOnly(),\n  // Add any extra methods to EmberArray that are native to the built-in Array.\n  slice(beginIndex = 0, endIndex) {\n    let ret = A();\n    let length = this.length;\n    if (beginIndex < 0) {\n      beginIndex = length + beginIndex;\n    }\n    let validatedEndIndex;\n    if (endIndex === undefined || endIndex > length) {\n      validatedEndIndex = length;\n    } else if (endIndex < 0) {\n      validatedEndIndex = length + endIndex;\n    } else {\n      validatedEndIndex = endIndex;\n    }\n    while (beginIndex < validatedEndIndex) {\n      ret[ret.length] = objectAt(this, beginIndex++);\n    }\n    return ret;\n  },\n  indexOf(object, startAt) {\n    return indexOf(this, object, startAt, false);\n  },\n  lastIndexOf(object, startAt) {\n    let len = this.length;\n    if (startAt === undefined || startAt >= len) {\n      startAt = len - 1;\n    }\n    if (startAt < 0) {\n      startAt += len;\n    }\n    for (let idx = startAt; idx >= 0; idx--) {\n      if (objectAt(this, idx) === object) {\n        return idx;\n      }\n    }\n    return -1;\n  },\n  forEach(callback, target = null) {\n    (isDevelopingApp() && !(typeof callback === 'function') && assert('`forEach` expects a function as first argument.', typeof callback === 'function'));\n    let length = this.length;\n    for (let index = 0; index < length; index++) {\n      let item = this.objectAt(index);\n      callback.call(target, item, index, this);\n    }\n    return this;\n  },\n  getEach: mapBy,\n  setEach(key, value) {\n    return this.forEach(item => set(item, key, value));\n  },\n  map(callback, target = null) {\n    (isDevelopingApp() && !(typeof callback === 'function') && assert('`map` expects a function as first argument.', typeof callback === 'function'));\n    let ret = A();\n    this.forEach((x, idx, i) => ret[idx] = callback.call(target, x, idx, i));\n    return ret;\n  },\n  mapBy,\n  filter(callback, target = null) {\n    (isDevelopingApp() && !(typeof callback === 'function') && assert('`filter` expects a function as first argument.', typeof callback === 'function'));\n    let ret = A();\n    this.forEach((x, idx, i) => {\n      if (callback.call(target, x, idx, i)) {\n        ret.push(x);\n      }\n    });\n    return ret;\n  },\n  reject(callback, target = null) {\n    (isDevelopingApp() && !(typeof callback === 'function') && assert('`reject` expects a function as first argument.', typeof callback === 'function'));\n    return this.filter(function () {\n      // @ts-expect-error TS doesn't like us using arguments like this\n      return !callback.apply(target, arguments);\n    });\n  },\n  filterBy() {\n    // @ts-expect-error TS doesn't like the ...arguments spread here.\n    return this.filter(iter(...arguments));\n  },\n  rejectBy() {\n    // @ts-expect-error TS doesn't like the ...arguments spread here.\n    return this.reject(iter(...arguments));\n  },\n  find(callback, target = null) {\n    (isDevelopingApp() && !(typeof callback === 'function') && assert('`find` expects a function as first argument.', typeof callback === 'function'));\n    return find(this, callback, target);\n  },\n  findBy() {\n    // @ts-expect-error TS doesn't like the ...arguments spread here.\n    let callback = iter(...arguments);\n    return find(this, callback);\n  },\n  every(callback, target = null) {\n    (isDevelopingApp() && !(typeof callback === 'function') && assert('`every` expects a function as first argument.', typeof callback === 'function'));\n    return every(this, callback, target);\n  },\n  isEvery() {\n    // @ts-expect-error TS doesn't like the ...arguments spread here.\n    let callback = iter(...arguments);\n    return every(this, callback);\n  },\n  any(callback, target = null) {\n    (isDevelopingApp() && !(typeof callback === 'function') && assert('`any` expects a function as first argument.', typeof callback === 'function'));\n    return any(this, callback, target);\n  },\n  isAny() {\n    // @ts-expect-error TS doesn't like us using arguments like this\n    let callback = iter(...arguments);\n    return any(this, callback);\n  },\n  // FIXME: When called without initialValue, behavior does not match native behavior\n  reduce(callback, initialValue) {\n    (isDevelopingApp() && !(typeof callback === 'function') && assert('`reduce` expects a function as first argument.', typeof callback === 'function'));\n    let ret = initialValue;\n    this.forEach(function (item, i) {\n      ret = callback(ret, item, i, this);\n    }, this);\n    return ret;\n  },\n  invoke(methodName, ...args) {\n    let ret = A();\n\n    // SAFETY: This is not entirely safe and the code will not work with Ember proxies\n    this.forEach(item => ret.push(item[methodName]?.(...args)));\n    return ret;\n  },\n  toArray() {\n    return this.map(item => item);\n  },\n  compact() {\n    return this.filter(value => value != null);\n  },\n  includes(object, startAt) {\n    return indexOf(this, object, startAt, true) !== -1;\n  },\n  sortBy() {\n    let sortKeys = arguments;\n    return this.toArray().sort((a, b) => {\n      for (let i = 0; i < sortKeys.length; i++) {\n        let key = sortKeys[i];\n        let propA = get(a, key);\n        let propB = get(b, key);\n        // return 1 or -1 else continue to the next sortKey\n        let compareValue = compare(propA, propB);\n        if (compareValue) {\n          return compareValue;\n        }\n      }\n      return 0;\n    });\n  },\n  uniq() {\n    return uniqBy(this);\n  },\n  uniqBy(key) {\n    return uniqBy(this, key);\n  },\n  without(value) {\n    if (!this.includes(value)) {\n      return this; // nothing to do\n    }\n\n    // SameValueZero comparison (NaN !== NaN)\n    let predicate = value === value ? item => item !== value : item => item === item;\n    return this.filter(predicate);\n  }\n});\n\n/**\n  This mixin defines the API for modifying array-like objects. These methods\n  can be applied only to a collection that keeps its items in an ordered set.\n  It builds upon the Array mixin and adds methods to modify the array.\n  One concrete implementations of this class include ArrayProxy.\n\n  It is important to use the methods in this class to modify arrays so that\n  changes are observable. This allows the binding system in Ember to function\n  correctly.\n\n\n  Note that an Array can change even if it does not implement this mixin.\n  For example, one might implement a SparseArray that cannot be directly\n  modified, but if its underlying enumerable changes, it will change also.\n\n  @class MutableArray\n  @uses EmberArray\n  @uses MutableEnumerable\n  @public\n*/\n\nconst MutableArray = Mixin.create(EmberArray, MutableEnumerable, {\n  clear() {\n    let len = this.length;\n    if (len === 0) {\n      return this;\n    }\n    this.replace(0, len, EMPTY_ARRAY);\n    return this;\n  },\n  insertAt(idx, object) {\n    insertAt(this, idx, object);\n    return this;\n  },\n  removeAt(start, len) {\n    return removeAt(this, start, len);\n  },\n  pushObject(obj) {\n    return insertAt(this, this.length, obj);\n  },\n  pushObjects(objects) {\n    this.replace(this.length, 0, objects);\n    return this;\n  },\n  popObject() {\n    let len = this.length;\n    if (len === 0) {\n      return null;\n    }\n    let ret = objectAt(this, len - 1);\n    this.removeAt(len - 1, 1);\n    return ret;\n  },\n  shiftObject() {\n    if (this.length === 0) {\n      return null;\n    }\n    let ret = objectAt(this, 0);\n    this.removeAt(0);\n    return ret;\n  },\n  unshiftObject(obj) {\n    return insertAt(this, 0, obj);\n  },\n  unshiftObjects(objects) {\n    this.replace(0, 0, objects);\n    return this;\n  },\n  reverseObjects() {\n    let len = this.length;\n    if (len === 0) {\n      return this;\n    }\n    let objects = this.toArray().reverse();\n    this.replace(0, len, objects);\n    return this;\n  },\n  setObjects(objects) {\n    if (objects.length === 0) {\n      return this.clear();\n    }\n    let len = this.length;\n    this.replace(0, len, objects);\n    return this;\n  },\n  removeObject(obj) {\n    let loc = this.length || 0;\n    while (--loc >= 0) {\n      let curObject = objectAt(this, loc);\n      if (curObject === obj) {\n        this.removeAt(loc);\n      }\n    }\n    return this;\n  },\n  removeObjects(objects) {\n    beginPropertyChanges();\n    for (let i = objects.length - 1; i >= 0; i--) {\n      // SAFETY: Due to the loop structure we know this will always exist.\n      this.removeObject(objects[i]);\n    }\n    endPropertyChanges();\n    return this;\n  },\n  addObject(obj) {\n    let included = this.includes(obj);\n    if (!included) {\n      this.pushObject(obj);\n    }\n    return this;\n  },\n  addObjects(objects) {\n    beginPropertyChanges();\n    objects.forEach(obj => this.addObject(obj));\n    endPropertyChanges();\n    return this;\n  }\n});\n\n/**\n  Creates an `NativeArray` from an Array-like object.\n  Does not modify the original object's contents.\n\n  Example\n\n  ```app/components/my-component.js\n  import Component from '@ember/component';\n  import { A } from '@ember/array';\n\n  export default Component.extend({\n    tagName: 'ul',\n    classNames: ['pagination'],\n\n    init() {\n      this._super(...arguments);\n\n      if (!this.get('content')) {\n        this.set('content', A());\n        this.set('otherContent', A([1,2,3]));\n      }\n    }\n  });\n  ```\n\n  @method A\n  @static\n  @for @ember/array\n  @return {Ember.NativeArray}\n  @public\n*/\n\n// Add Ember.Array to Array.prototype. Remove methods with native\n// implementations and supply some more optimized versions of generic methods\n// because they are so common.\n/**\n@module ember\n*/\n\n/**\n * The final definition of NativeArray removes all native methods. This is the list of removed methods\n * when run in Chrome 106.\n */\n\n/**\n * These additional items must be redefined since `Omit` causes methods that return `this` to return the\n * type at the time of the Omit.\n */\n\n// This is the same as MutableArray, but removes the actual native methods that exist on Array.prototype.\n\n/**\n  The NativeArray mixin contains the properties needed to make the native\n  Array support MutableArray and all of its dependent APIs.\n\n  @class Ember.NativeArray\n  @uses MutableArray\n  @uses Observable\n  @public\n*/\n\nlet NativeArray = Mixin.create(MutableArray, Observable, {\n  objectAt(idx) {\n    return this[idx];\n  },\n  // primitive for array support.\n  replace(start, deleteCount, items = EMPTY_ARRAY) {\n    (isDevelopingApp() && !(Array.isArray(items)) && assert('The third argument to replace needs to be an array.', Array.isArray(items)));\n    replaceInNativeArray(this, start, deleteCount, items);\n    return this;\n  }\n});\n\n// Remove any methods implemented natively so we don't override them\nconst ignore = ['length'];\nNativeArray.keys().forEach(methodName => {\n  // SAFETY: It's safe to read unknown properties from an object\n  if (Array.prototype[methodName]) {\n    ignore.push(methodName);\n  }\n});\nNativeArray = NativeArray.without(...ignore);\nlet A;\nA = function (arr) {\n  (isDevelopingApp() && !(!(this instanceof A)) && assert('You cannot create an Ember Array with `new A()`, please update to calling A as a function: `A()`', !(this instanceof A)));\n  if (isEmberArray(arr)) {\n    // SAFETY: If it's a true native array and it is also an EmberArray then it should be an Ember NativeArray\n    return arr;\n  } else {\n    // SAFETY: This will return an NativeArray but TS can't infer that.\n    return NativeArray.apply(arr ?? []);\n  }\n};\n\nexport { A, MutableArray, NativeArray, EmberArray as default, isArray, removeAt, uniqBy };\n","const {\n  isArray\n} = Array;\n/**\n @module @ember/array\n*/\n/**\n Forces the passed object to be part of an array. If the object is already\n an array, it will return the object. Otherwise, it will add the object to\n an array. If object is `null` or `undefined`, it will return an empty array.\n\n ```javascript\n import { makeArray } from '@ember/array';\n import ArrayProxy from '@ember/array/proxy';\n\n makeArray();            // []\n makeArray(null);        // []\n makeArray(undefined);   // []\n makeArray('lindsay');   // ['lindsay']\n makeArray([1, 2, 42]);  // [1, 2, 42]\n\n let proxy = ArrayProxy.create({ content: [] });\n\n makeArray(proxy) === proxy;  // false\n ```\n\n @method makeArray\n @static\n @for @ember/array\n @param {Object} obj the object\n @return {Array}\n @private\n */\n\nfunction makeArray(obj) {\n  if (obj === null || obj === undefined) {\n    return [];\n  }\n  return isArray(obj) ? obj : [obj];\n}\n\nexport { makeArray as default };\n","import '../-internals/meta/lib/meta.js';\nimport { d as isObject } from '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../debug/index.js';\nimport '../../@glimmer/destroyable/index.js';\nimport { consumeTag, validateTag, tagFor, valueForTag, combine } from '../../@glimmer/validator/index.js';\nimport { Q as PROPERTY_DID_CHANGE, g as get, o as objectAt, a as tagForProperty } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport { a as alias } from '../../shared-chunks/alias-BEMS3qgG.js';\nimport { a as replace, b as arrayContentWillChange, c as arrayContentDidChange, d as addArrayObserver, e as removeArrayObserver } from '../../shared-chunks/array-BqYCCatg.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\nimport EmberObject from '../object/index.js';\nimport EmberArray, { MutableArray } from './index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport { s as setCustomTagFor } from '../../shared-chunks/args-proxy-B91L3LRK.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { assert } from '../debug/lib/assert.js';\n\n/**\n@module @ember/array/proxy\n*/\n\nfunction isMutable(obj) {\n  return Array.isArray(obj) || typeof obj.replace === 'function';\n}\nconst ARRAY_OBSERVER_MAPPING = {\n  willChange: '_arrangedContentArrayWillChange',\n  didChange: '_arrangedContentArrayDidChange'\n};\nfunction customTagForArrayProxy(proxy, key) {\n  (isDevelopingApp() && !(proxy instanceof ArrayProxy) && assert('[BUG] Expected a proxy', proxy instanceof ArrayProxy));\n  if (key === '[]') {\n    proxy._revalidate();\n    return proxy._arrTag;\n  } else if (key === 'length') {\n    proxy._revalidate();\n    return proxy._lengthTag;\n  }\n  return tagFor(proxy, key);\n}\n\n/**\n  An ArrayProxy wraps any other object that implements `Array` and/or\n  `MutableArray,` forwarding all requests. This makes it very useful for\n  a number of binding use cases or other cases where being able to swap\n  out the underlying array is useful.\n\n  A simple example of usage:\n\n  ```javascript\n  import { A } from '@ember/array';\n  import ArrayProxy from '@ember/array/proxy';\n\n  let pets = ['dog', 'cat', 'fish'];\n  let ap = ArrayProxy.create({ content: A(pets) });\n\n  ap.get('firstObject');                        // 'dog'\n  ap.set('content', ['amoeba', 'paramecium']);\n  ap.get('firstObject');                        // 'amoeba'\n  ```\n\n  This class can also be useful as a layer to transform the contents of\n  an array, as they are accessed. This can be done by overriding\n  `objectAtContent`:\n\n  ```javascript\n  import { A } from '@ember/array';\n  import ArrayProxy from '@ember/array/proxy';\n\n  let pets = ['dog', 'cat', 'fish'];\n  let ap = ArrayProxy.create({\n      content: A(pets),\n      objectAtContent: function(idx) {\n          return this.get('content').objectAt(idx).toUpperCase();\n      }\n  });\n\n  ap.get('firstObject'); // . 'DOG'\n  ```\n\n  When overriding this class, it is important to place the call to\n  `_super` *after* setting `content` so the internal observers have\n  a chance to fire properly:\n\n  ```javascript\n  import { A } from '@ember/array';\n  import ArrayProxy from '@ember/array/proxy';\n\n  export default ArrayProxy.extend({\n    init() {\n      this.set('content', A(['dog', 'cat', 'fish']));\n      this._super(...arguments);\n    }\n  });\n  ```\n\n  @class ArrayProxy\n  @extends EmberObject\n  @uses MutableArray\n  @public\n*/\n\nclass ArrayProxy extends EmberObject {\n  /*\n    `this._objectsDirtyIndex` determines which indexes in the `this._objects`\n    cache are dirty.\n     If `this._objectsDirtyIndex === -1` then no indexes are dirty.\n    Otherwise, an index `i` is dirty if `i >= this._objectsDirtyIndex`.\n     Calling `objectAt` with a dirty index will cause the `this._objects`\n    cache to be recomputed.\n  */\n  /** @internal */\n  _objectsDirtyIndex = 0;\n  /** @internal */\n  _objects = null;\n\n  /** @internal */\n  _lengthDirty = true;\n  /** @internal */\n  _length = 0;\n\n  /** @internal */\n  _arrangedContent = null;\n  /** @internal */\n  _arrangedContentIsUpdating = false;\n  /** @internal */\n  _arrangedContentTag = null;\n  /** @internal */\n  _arrangedContentRevision = null;\n  /** @internal */\n  _lengthTag = null;\n  /** @internal */\n  _arrTag = null;\n  init(props) {\n    super.init(props);\n    setCustomTagFor(this, customTagForArrayProxy);\n  }\n  [PROPERTY_DID_CHANGE]() {\n    this._revalidate();\n  }\n  willDestroy() {\n    this._removeArrangedContentArrayObserver();\n  }\n  objectAtContent(idx) {\n    let arrangedContent = get(this, 'arrangedContent');\n    (isDevelopingApp() && !(arrangedContent) && assert('[BUG] Called objectAtContent without content', arrangedContent));\n    return objectAt(arrangedContent, idx);\n  }\n\n  // See additional docs for `replace` from `MutableArray`:\n  // https://api.emberjs.com/ember/release/classes/MutableArray/methods/replace?anchor=replace\n  replace(idx, amt, objects) {\n    (isDevelopingApp() && !(get(this, 'arrangedContent') === get(this, 'content')) && assert('Mutating an arranged ArrayProxy is not allowed', get(this, 'arrangedContent') === get(this, 'content')));\n    this.replaceContent(idx, amt, objects);\n  }\n  replaceContent(idx, amt, objects) {\n    let content = get(this, 'content');\n    (isDevelopingApp() && !(content) && assert('[BUG] Called replaceContent without content', content));\n    (isDevelopingApp() && !(isMutable(content)) && assert('Mutating a non-mutable array is not allowed', isMutable(content)));\n    replace(content, idx, amt, objects);\n  }\n\n  // Overriding objectAt is not supported.\n  objectAt(idx) {\n    this._revalidate();\n    if (this._objects === null) {\n      this._objects = [];\n    }\n    if (this._objectsDirtyIndex !== -1 && idx >= this._objectsDirtyIndex) {\n      let arrangedContent = get(this, 'arrangedContent');\n      if (arrangedContent) {\n        let length = this._objects.length = get(arrangedContent, 'length');\n        for (let i = this._objectsDirtyIndex; i < length; i++) {\n          // SAFETY: This is expected to only ever return an instance of T. In other words, there should\n          // be no gaps in the array. Unfortunately, we can't actually assert for it since T could include\n          // any types, including null or undefined.\n          this._objects[i] = this.objectAtContent(i);\n        }\n      } else {\n        this._objects.length = 0;\n      }\n      this._objectsDirtyIndex = -1;\n    }\n    return this._objects[idx];\n  }\n\n  // Overriding length is not supported.\n  get length() {\n    this._revalidate();\n    if (this._lengthDirty) {\n      let arrangedContent = get(this, 'arrangedContent');\n      this._length = arrangedContent ? get(arrangedContent, 'length') : 0;\n      this._lengthDirty = false;\n    }\n    (isDevelopingApp() && !(this._lengthTag) && assert('[BUG] _lengthTag is not set', this._lengthTag));\n    consumeTag(this._lengthTag);\n    return this._length;\n  }\n  set length(value) {\n    let length = this.length;\n    let removedCount = length - value;\n    let added;\n    if (removedCount === 0) {\n      return;\n    } else if (removedCount < 0) {\n      added = new Array(-removedCount);\n      removedCount = 0;\n    }\n    let content = get(this, 'content');\n    if (content) {\n      (isDevelopingApp() && !(isMutable(content)) && assert('Mutating a non-mutable array is not allowed', isMutable(content)));\n      replace(content, value, removedCount, added);\n      this._invalidate();\n    }\n  }\n  _updateArrangedContentArray(arrangedContent) {\n    let oldLength = this._objects === null ? 0 : this._objects.length;\n    let newLength = arrangedContent ? get(arrangedContent, 'length') : 0;\n    this._removeArrangedContentArrayObserver();\n    arrayContentWillChange(this, 0, oldLength, newLength);\n    this._invalidate();\n    arrayContentDidChange(this, 0, oldLength, newLength, false);\n    this._addArrangedContentArrayObserver(arrangedContent);\n  }\n  _addArrangedContentArrayObserver(arrangedContent) {\n    if (arrangedContent && !arrangedContent.isDestroyed) {\n      (isDevelopingApp() && !(arrangedContent !== this) && assert(\"Can't set ArrayProxy's content to itself\", arrangedContent !== this));\n      (isDevelopingApp() && !(function (arr) {\n        return Array.isArray(arr) || EmberArray.detect(arr);\n      }(arrangedContent)) && assert(`ArrayProxy expects a native Array, EmberArray, or ArrayProxy, but you passed ${typeof arrangedContent}`, function (arr) {\n        return Array.isArray(arr) || EmberArray.detect(arr);\n      }(arrangedContent)));\n      (isDevelopingApp() && !(!arrangedContent.isDestroyed) && assert('ArrayProxy expected its contents to not be destroyed', !arrangedContent.isDestroyed));\n      addArrayObserver(arrangedContent, this, ARRAY_OBSERVER_MAPPING);\n      this._arrangedContent = arrangedContent;\n    }\n  }\n  _removeArrangedContentArrayObserver() {\n    if (this._arrangedContent) {\n      removeArrayObserver(this._arrangedContent, this, ARRAY_OBSERVER_MAPPING);\n    }\n  }\n  _arrangedContentArrayWillChange() {}\n  _arrangedContentArrayDidChange(_proxy, idx, removedCnt, addedCnt) {\n    arrayContentWillChange(this, idx, removedCnt, addedCnt);\n    let dirtyIndex = idx;\n    if (dirtyIndex < 0) {\n      let length = get(this._arrangedContent, 'length');\n      dirtyIndex += length + removedCnt - addedCnt;\n    }\n    if (this._objectsDirtyIndex === -1 || this._objectsDirtyIndex > dirtyIndex) {\n      this._objectsDirtyIndex = dirtyIndex;\n    }\n    this._lengthDirty = true;\n    arrayContentDidChange(this, idx, removedCnt, addedCnt, false);\n  }\n  _invalidate() {\n    this._objectsDirtyIndex = 0;\n    this._lengthDirty = true;\n  }\n  _revalidate() {\n    if (this._arrangedContentIsUpdating === true) return;\n    if (this._arrangedContentTag === null || !validateTag(this._arrangedContentTag, this._arrangedContentRevision)) {\n      let arrangedContent = this.get('arrangedContent');\n      if (this._arrangedContentTag === null) {\n        // This is the first time the proxy has been setup, only add the observer\n        // don't trigger any events\n        this._addArrangedContentArrayObserver(arrangedContent);\n      } else {\n        this._arrangedContentIsUpdating = true;\n        this._updateArrangedContentArray(arrangedContent);\n        this._arrangedContentIsUpdating = false;\n      }\n      let arrangedContentTag = this._arrangedContentTag = tagFor(this, 'arrangedContent');\n      this._arrangedContentRevision = valueForTag(this._arrangedContentTag);\n      if (isObject(arrangedContent)) {\n        this._lengthTag = combine([arrangedContentTag, tagForProperty(arrangedContent, 'length')]);\n        this._arrTag = combine([arrangedContentTag, tagForProperty(arrangedContent, '[]')]);\n      } else {\n        this._lengthTag = this._arrTag = arrangedContentTag;\n      }\n    }\n  }\n}\nArrayProxy.reopen(MutableArray, {\n  arrangedContent: alias('content')\n});\n\nexport { ArrayProxy as default };\n","import { E as ENV } from '../../shared-chunks/env-DEd6hPbj.js';\n\n/**\n  Set `EmberENV.FEATURES` in your application's `config/environment.js` file\n  to enable canary features in your application.\n\n  See the [feature flag guide](https://guides.emberjs.com/release/configuring-ember/feature-flags/)\n  for more details.\n\n  @module @ember/canary-features\n  @public\n*/\n\nconst DEFAULT_FEATURES = {\n  // FLAG_NAME: true/false\n};\n\n/**\n  The hash of enabled Canary features. Add to this, any canary features\n  before creating your application.\n\n  @class FEATURES\n  @static\n  @since 1.1.0\n  @public\n*/\nconst FEATURES = Object.assign(DEFAULT_FEATURES, ENV.FEATURES);\n\n/**\n  Determine whether the specified `feature` is enabled. Used by Ember's\n  build tools to exclude experimental features from beta/stable builds.\n\n  You can define the following configuration options:\n\n  * `EmberENV.ENABLE_OPTIONAL_FEATURES` - enable any features that have not been explicitly\n    enabled/disabled.\n\n  @method isEnabled\n  @param {String} feature The feature to check\n  @return {Boolean}\n  @since 1.1.0\n  @public\n*/\nfunction isEnabled(feature) {\n  let value = FEATURES[feature];\n  if (value === true || value === false) {\n    return value;\n  } else if (ENV.ENABLE_OPTIONAL_FEATURES) {\n    return true;\n  } else {\n    return false;\n  }\n}\n\n// Uncomment the below when features are present:\n\n// function featureValue(value: null | boolean) {\n//   if (ENV.ENABLE_OPTIONAL_FEATURES && value === null) {\n//     return true;\n//   }\n\n//   return value;\n// }\n//\n// export const FLAG_NAME = featureValue(FEATURES.FLAG_NAME);\n\nexport { DEFAULT_FEATURES, FEATURES, isEnabled };\n","import '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '@embroider/macros';\nimport '../../@glimmer/global-context/index.js';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { s as setComponentManager$1 } from '../../shared-chunks/api-1B_9SjFR.js';\nexport { c as capabilities } from '../../shared-chunks/api-1B_9SjFR.js';\nexport { g as getComponentTemplate, s as setComponentTemplate } from '../../shared-chunks/template-CMHIG4cn.js';\nimport '../../shared-chunks/index-CQkjwqTv.js';\nexport { I as Input, T as Textarea, C as default } from '../../shared-chunks/index-ByyoGpfz.js';\nimport '../../shared-chunks/registry-XY5cfmbH.js';\nimport '../debug/index.js';\nimport '../../shared-chunks/dynamic-CuBsUXX8.js';\nimport '../../shared-chunks/constants-oDhF27qL.js';\nimport '../runloop/index.js';\n\n/**\n   Associate a class with a component manager (an object that is responsible for\n   coordinating the lifecycle events that occurs when invoking, rendering and\n   re-rendering a component).\n\n   @method setComponentManager\n   @param {Function} factory a function to create the owner for an object\n   @param {Object} obj the object to associate with the componetn manager\n   @return {Object} the same object passed in\n   @public\n  */\nfunction setComponentManager(manager, obj) {\n  return setComponentManager$1(manager, obj);\n}\n\nexport { setComponentManager };\n","import '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '@embroider/macros';\nimport '../../@glimmer/global-context/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport { t as templateOnlyComponent } from '../../shared-chunks/dynamic-CuBsUXX8.js';\nimport '../../shared-chunks/constants-oDhF27qL.js';\nimport '../../@glimmer/destroyable/index.js';\n\n/**\n  @module @ember/component/template-only\n  @public\n*/\n\n\n/**\n * Template-only components have no backing class instance, so `this` in their\n * templates is null. This means that you can only reference passed in arguments\n * (e.g. `{{@arg}}`).\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\n\n/**\n * A convenience alias for {@link TemplateOnlyComponent}\n */\n\n// NOTES:\n//\n// 1. The generic here is for a *signature: a way to hang information for tools\n//    like Glint which can provide typey checking for component templates using\n//    information supplied via this generic. While it may appear useless on this\n//    class definition and extension, it is used by external tools and should\n//    not be removed.\n// 2. SAFETY: this cast is *throwing away* information that is not part of the\n//    public API and replacing it with something which has the same calling\n//    contract, but much less information (since we do not want to expose the\n//    internal APIs like `moduleName` etc.).\n// prettier-ignore\nconst templateOnly = templateOnlyComponent;\n\nexport { templateOnly as default };\n","import { getOwner } from '../-internals/owner/index.js';\nimport '../object/index.js';\nimport { FrameworkObject } from '../object/-internals.js';\nimport { g as get, c as computed, p as inject$1 } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../-internals/meta/lib/meta.js';\nimport '../debug/index.js';\nimport '../../@glimmer/validator/index.js';\nimport { s as symbol } from '../../shared-chunks/to-string-CqD7_vQ4.js';\nimport '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '@embroider/macros';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\nimport Mixin from '../object/mixin.js';\nimport '../-internals/runtime/lib/mixins/registry_proxy.js';\nimport '../-internals/runtime/lib/mixins/container_proxy.js';\nimport '../-internals/runtime/lib/mixins/comparable.js';\nimport ActionHandler from '../-internals/runtime/lib/mixins/action_handler.js';\nimport '../-internals/runtime/lib/mixins/-proxy.js';\nimport '../enumerable/mutable.js';\nimport '../-internals/runtime/lib/mixins/target_action_support.js';\nimport '../-internals/runtime/lib/ext/rsvp.js';\n\nconst MODEL = symbol('MODEL');\n\n/**\n@module @ember/controller\n*/\n\n/**\n  @class ControllerMixin\n  @namespace Ember\n  @uses Ember.ActionHandler\n  @private\n*/\n\nconst ControllerMixin = Mixin.create(ActionHandler, {\n  /* ducktype as a controller */\n  isController: true,\n  concatenatedProperties: ['queryParams'],\n  target: null,\n  store: null,\n  init() {\n    this._super(...arguments);\n    let owner = getOwner(this);\n    if (owner) {\n      this.namespace = owner.lookup('application:main');\n      this.target = owner.lookup('router:main');\n    }\n  },\n  model: computed({\n    get() {\n      return this[MODEL];\n    },\n    set(_key, value) {\n      return this[MODEL] = value;\n    }\n  }),\n  queryParams: null,\n  /**\n   This property is updated to various different callback functions depending on\n   the current \"state\" of the backing route. It is used by\n   `Controller.prototype._qpChanged`.\n    The methods backing each state can be found in the `Route.prototype._qp` computed\n   property return value (the `.states` property). The current values are listed here for\n   the sanity of future travelers:\n    * `inactive` - This state is used when this controller instance is not part of the active\n     route hierarchy. Set in `Route.prototype._reset` (a `router.js` microlib hook) and\n     `Route.prototype.actions.finalizeQueryParamChange`.\n   * `active` - This state is used when this controller instance is part of the active\n     route hierarchy. Set in `Route.prototype.actions.finalizeQueryParamChange`.\n   * `allowOverrides` - This state is used in `Route.prototype.setup` (`route.js` microlib hook).\n     @method _qpDelegate\n    @private\n  */\n  _qpDelegate: null,\n  // set by route\n\n  /**\n   During `Route#setup` observers are created to invoke this method\n   when any of the query params declared in `Controller#queryParams` property\n   are changed.\n    When invoked this method uses the currently active query param update delegate\n   (see `Controller.prototype._qpDelegate` for details) and invokes it with\n   the QP key/value being changed.\n     @method _qpChanged\n    @private\n  */\n  _qpChanged(controller, _prop) {\n    let dotIndex = _prop.indexOf('.[]');\n    let prop = dotIndex === -1 ? _prop : _prop.slice(0, dotIndex);\n    let delegate = controller._qpDelegate;\n    let value = get(controller, prop);\n    delegate(prop, value);\n  }\n});\n\n// NOTE: This doesn't actually extend EmberObject.\n/**\n  @class Controller\n  @extends EmberObject\n  @uses Ember.ControllerMixin\n  @public\n*/\n\nclass Controller extends FrameworkObject.extend(ControllerMixin) {}\n\n/**\n  Creates a property that lazily looks up another controller in the container.\n  Can only be used when defining another controller.\n\n  Example:\n\n  ```app/controllers/post.js\n  import Controller, {\n    inject as controller\n  } from '@ember/controller';\n\n  export default class PostController extends Controller {\n    @controller posts;\n  }\n  ```\n\n  Classic Class Example:\n\n  ```app/controllers/post.js\n  import Controller, {\n    inject as controller\n  } from '@ember/controller';\n\n  export default Controller.extend({\n    posts: controller()\n  });\n  ```\n\n  This example will create a `posts` property on the `post` controller that\n  looks up the `posts` controller in the container, making it easy to reference\n  other controllers.\n\n  @method inject\n  @static\n  @for @ember/controller\n  @since 1.10.0\n  @param {String} name (optional) name of the controller to inject, defaults to\n         the property's name\n  @return {ComputedDecorator} injection decorator instance\n  @public\n*/\n\nfunction inject(...args) {\n  return inject$1('controller', ...args);\n}\n\n/**\n  A type registry for Ember `Controller`s. Meant to be declaration-merged so string\n  lookups resolve to the correct type.\n\n  Blueprints should include such a declaration merge for TypeScript:\n\n  ```ts\n  import Controller from '@ember/controller';\n\n  export default class ExampleController extends Controller {\n  // ...\n  }\n\n  declare module '@ember/controller' {\n    export interface Registry {\n      example: ExampleController;\n    }\n  }\n  ```\n\n  Then `@inject` can check that the service is registered correctly, and APIs\n  like `owner.lookup('controller:example')` can return `ExampleController`.\n*/\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\n\nexport { ControllerMixin, Controller as default, inject };\n","import { classify, dasherize } from '../-internals/string/index.js';\nimport EmberObject from '../object/index.js';\nimport '../-internals/meta/lib/meta.js';\nimport '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport '@embroider/macros';\nimport './index.js';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport '../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\nimport typeOf from '../utils/lib/type-of.js';\nimport '../-internals/runtime/lib/mixins/registry_proxy.js';\nimport '../-internals/runtime/lib/mixins/container_proxy.js';\nimport '../-internals/runtime/lib/mixins/comparable.js';\nimport '../-internals/runtime/lib/mixins/action_handler.js';\nimport '../-internals/runtime/lib/mixins/-proxy.js';\nimport '../enumerable/mutable.js';\nimport '../-internals/runtime/lib/mixins/target_action_support.js';\nimport '../-internals/runtime/lib/ext/rsvp.js';\nimport { getOwner } from '../-internals/owner/index.js';\nimport Namespace from '../application/namespace.js';\n\n/**\n@module @ember/debug/container-debug-adapter\n*/\n\n/**\n  The `ContainerDebugAdapter` helps the container and resolver interface\n  with tools that debug Ember such as the\n  [Ember Inspector](https://github.com/emberjs/ember-inspector)\n  for Chrome and Firefox.\n\n  This class can be extended by a custom resolver implementer\n  to override some of the methods with library-specific code.\n\n  The methods likely to be overridden are:\n\n  * `canCatalogEntriesByType`\n  * `catalogEntriesByType`\n\n  The adapter will need to be registered\n  in the application's container as `container-debug-adapter:main`.\n\n  Example:\n\n  ```javascript\n  Application.initializer({\n    name: \"containerDebugAdapter\",\n\n    initialize(application) {\n      application.register('container-debug-adapter:main', require('app/container-debug-adapter'));\n    }\n  });\n  ```\n\n  @class ContainerDebugAdapter\n  @extends EmberObject\n  @since 1.5.0\n  @public\n*/\nclass ContainerDebugAdapter extends EmberObject {\n  constructor(owner) {\n    super(owner);\n    this.resolver = getOwner(this).lookup('resolver-for-debugging:main');\n  }\n\n  /**\n    The resolver instance of the application\n    being debugged. This property will be injected\n    on creation.\n     @property resolver\n    @public\n  */\n  resolver;\n\n  /**\n    Returns true if it is possible to catalog a list of available\n    classes in the resolver for a given type.\n     @method canCatalogEntriesByType\n    @param {String} type The type. e.g. \"model\", \"controller\", \"route\".\n    @return {boolean} whether a list is available for this type.\n    @public\n  */\n  canCatalogEntriesByType(type) {\n    if (type === 'model' || type === 'template') {\n      return false;\n    }\n    return true;\n  }\n\n  /**\n    Returns the available classes a given type.\n     @method catalogEntriesByType\n    @param {String} type The type. e.g. \"model\", \"controller\", \"route\".\n    @return {Array} An array of strings.\n    @public\n  */\n  catalogEntriesByType(type) {\n    let namespaces = Namespace.NAMESPACES;\n    let types = [];\n    let typeSuffixRegex = new RegExp(`${classify(type)}$`);\n    namespaces.forEach(namespace => {\n      for (let key in namespace) {\n        if (!Object.prototype.hasOwnProperty.call(namespace, key)) {\n          continue;\n        }\n        if (typeSuffixRegex.test(key)) {\n          let klass = namespace[key];\n          if (typeOf(klass) === 'class') {\n            types.push(dasherize(key.replace(typeSuffixRegex, '')));\n          }\n        }\n      }\n    });\n    return types;\n  }\n}\n\nexport { ContainerDebugAdapter as default };\n","import { getOwner } from '../-internals/owner/index.js';\nimport { _backburner, next } from '../runloop/index.js';\nimport EmberObject from '../object/index.js';\nimport { dasherize } from '../-internals/string/index.js';\nimport Namespace from '../application/namespace.js';\nimport { A } from '../array/index.js';\nimport { createCache, consumeTag, tagFor, untrack, getValue } from '../../@glimmer/validator/index.js';\nimport './index.js';\nimport { g as get } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../-internals/meta/lib/meta.js';\nimport '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport '@embroider/macros';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\nimport { assert } from './lib/assert.js';\n\n/**\n@module @ember/debug/data-adapter\n*/\n\n// Represents the base contract for iterables as understood in the GLimmer VM\n// historically. This is *not* the public API for it, because there *is* no\n// public API for it. Recent versions of Glimmer simply use `Symbol.iterator`,\n// but some older consumers still use this basic shape.\n\nfunction iterate(arr, fn) {\n  if (Symbol.iterator in arr) {\n    for (let item of arr) {\n      fn(item);\n    }\n  } else {\n    // SAFETY: this cast required to work this way to interop between TS 4.8\n    // and 4.9. When we drop support for 4.8, it will narrow correctly via the\n    // use of the `in` operator above. (Preferably we will solve this by just\n    // switching to require `Symbol.iterator` instead.)\n    assert('', typeof arr.forEach === 'function');\n    arr.forEach(fn);\n  }\n}\nclass RecordsWatcher {\n  recordCaches = new Map();\n  added = [];\n  updated = [];\n  removed = [];\n  getCacheForItem(record) {\n    let recordCache = this.recordCaches.get(record);\n    if (!recordCache) {\n      let hasBeenAdded = false;\n      recordCache = createCache(() => {\n        if (!hasBeenAdded) {\n          this.added.push(this.wrapRecord(record));\n          hasBeenAdded = true;\n        } else {\n          this.updated.push(this.wrapRecord(record));\n        }\n      });\n      this.recordCaches.set(record, recordCache);\n    }\n    return recordCache;\n  }\n  constructor(records, recordsAdded, recordsUpdated, recordsRemoved, wrapRecord, release) {\n    this.wrapRecord = wrapRecord;\n    this.release = release;\n    this.recordArrayCache = createCache(() => {\n      let seen = new Set();\n\n      // Track `[]` for legacy support\n      consumeTag(tagFor(records, '[]'));\n      iterate(records, record => {\n        getValue(this.getCacheForItem(record));\n        seen.add(record);\n      });\n\n      // Untrack this operation because these records are being removed, they\n      // should not be polled again in the future\n      untrack(() => {\n        this.recordCaches.forEach((_cache, record) => {\n          if (!seen.has(record)) {\n            this.removed.push(wrapRecord(record));\n            this.recordCaches.delete(record);\n          }\n        });\n      });\n      if (this.added.length > 0) {\n        recordsAdded(this.added);\n        this.added = [];\n      }\n      if (this.updated.length > 0) {\n        recordsUpdated(this.updated);\n        this.updated = [];\n      }\n      if (this.removed.length > 0) {\n        recordsRemoved(this.removed);\n        this.removed = [];\n      }\n    });\n  }\n  revalidate() {\n    getValue(this.recordArrayCache);\n  }\n}\nclass TypeWatcher {\n  constructor(records, onChange, release) {\n    this.release = release;\n    let hasBeenAccessed = false;\n    this.cache = createCache(() => {\n      // Empty iteration, we're doing this just\n      // to track changes to the records array\n      iterate(records, () => {});\n\n      // Also track `[]` for legacy support\n      consumeTag(tagFor(records, '[]'));\n      if (hasBeenAccessed === true) {\n        next(onChange);\n      } else {\n        hasBeenAccessed = true;\n      }\n    });\n    this.release = release;\n  }\n  revalidate() {\n    getValue(this.cache);\n  }\n}\n\n/**\n  The `DataAdapter` helps a data persistence library\n  interface with tools that debug Ember such\n  as the [Ember Inspector](https://github.com/emberjs/ember-inspector)\n  for Chrome and Firefox.\n\n  This class will be extended by a persistence library\n  which will override some of the methods with\n  library-specific code.\n\n  The methods likely to be overridden are:\n\n  * `getFilters`\n  * `detect`\n  * `columnsForType`\n  * `getRecords`\n  * `getRecordColumnValues`\n  * `getRecordKeywords`\n  * `getRecordFilterValues`\n  * `getRecordColor`\n\n  The adapter will need to be registered\n  in the application's container as `dataAdapter:main`.\n\n  Example:\n\n  ```javascript\n  Application.initializer({\n    name: \"data-adapter\",\n\n    initialize: function(application) {\n      application.register('data-adapter:main', DS.DataAdapter);\n    }\n  });\n  ```\n\n  @class DataAdapter\n  @extends EmberObject\n  @public\n*/\nclass DataAdapter extends EmberObject {\n  releaseMethods = A();\n  recordsWatchers = new Map();\n  typeWatchers = new Map();\n  flushWatchers = null;\n\n  // TODO: Revisit this\n\n  constructor(owner) {\n    super(owner);\n    this.containerDebugAdapter = getOwner(this).lookup('container-debug-adapter:main');\n  }\n\n  /**\n    The container-debug-adapter which is used\n    to list all models.\n     @property containerDebugAdapter\n    @default undefined\n    @since 1.5.0\n    @public\n  **/\n\n  /**\n    The number of attributes to send\n    as columns. (Enough to make the record\n    identifiable).\n     @private\n    @property attributeLimit\n    @default 3\n    @since 1.3.0\n  */\n  attributeLimit = 3;\n\n  /**\n     Ember Data > v1.0.0-beta.18\n     requires string model names to be passed\n     around instead of the actual factories.\n      This is a stamp for the Ember Inspector\n     to differentiate between the versions\n     to be able to support older versions too.\n      @public\n     @property acceptsModelName\n   */\n  acceptsModelName = true;\n\n  /**\n     Map from records arrays to RecordsWatcher instances\n      @private\n     @property recordsWatchers\n     @since 3.26.0\n   */\n\n  /**\n    Map from records arrays to TypeWatcher instances\n     @private\n    @property typeWatchers\n    @since 3.26.0\n   */\n\n  /**\n    Callback that is currently scheduled on backburner end to flush and check\n    all active watchers.\n     @private\n    @property flushWatchers\n    @since 3.26.0\n    */\n\n  /**\n    Stores all methods that clear observers.\n    These methods will be called on destruction.\n     @private\n    @property releaseMethods\n    @since 1.3.0\n  */\n\n  /**\n    Specifies how records can be filtered.\n    Records returned will need to have a `filterValues`\n    property with a key for every name in the returned array.\n     @public\n    @method getFilters\n    @return {Array} List of objects defining filters.\n     The object should have a `name` and `desc` property.\n  */\n  getFilters() {\n    return A();\n  }\n\n  /**\n    Fetch the model types and observe them for changes.\n     @public\n    @method watchModelTypes\n     @param {Function} typesAdded Callback to call to add types.\n    Takes an array of objects containing wrapped types (returned from `wrapModelType`).\n     @param {Function} typesUpdated Callback to call when a type has changed.\n    Takes an array of objects containing wrapped types.\n     @return {Function} Method to call to remove all observers\n  */\n  watchModelTypes(typesAdded, typesUpdated) {\n    let modelTypes = this.getModelTypes();\n    let releaseMethods = A();\n    let typesToSend;\n    typesToSend = modelTypes.map(type => {\n      let klass = type.klass;\n      let wrapped = this.wrapModelType(klass, type.name);\n      releaseMethods.push(this.observeModelType(type.name, typesUpdated));\n      return wrapped;\n    });\n    typesAdded(typesToSend);\n    let release = () => {\n      releaseMethods.forEach(fn => fn());\n      this.releaseMethods.removeObject(release);\n    };\n    this.releaseMethods.pushObject(release);\n    return release;\n  }\n  _nameToClass(type) {\n    if (typeof type === 'string') {\n      let owner = getOwner(this);\n      let Factory = owner.factoryFor(`model:${type}`);\n      type = Factory && Factory.class;\n    }\n    return type;\n  }\n\n  /**\n    Fetch the records of a given type and observe them for changes.\n     @public\n    @method watchRecords\n     @param {String} modelName The model name.\n     @param {Function} recordsAdded Callback to call to add records.\n    Takes an array of objects containing wrapped records.\n    The object should have the following properties:\n      columnValues: {Object} The key and value of a table cell.\n      object: {Object} The actual record object.\n     @param {Function} recordsUpdated Callback to call when a record has changed.\n    Takes an array of objects containing wrapped records.\n     @param {Function} recordsRemoved Callback to call when a record has removed.\n    Takes an array of objects containing wrapped records.\n     @return {Function} Method to call to remove all observers.\n  */\n  watchRecords(modelName, recordsAdded, recordsUpdated, recordsRemoved) {\n    let klass = this._nameToClass(modelName);\n    let records = this.getRecords(klass, modelName);\n    let {\n      recordsWatchers\n    } = this;\n    let recordsWatcher = recordsWatchers.get(records);\n    if (!recordsWatcher) {\n      recordsWatcher = new RecordsWatcher(records, recordsAdded, recordsUpdated, recordsRemoved, record => this.wrapRecord(record), () => {\n        recordsWatchers.delete(records);\n        this.updateFlushWatchers();\n      });\n      recordsWatchers.set(records, recordsWatcher);\n      this.updateFlushWatchers();\n      recordsWatcher.revalidate();\n    }\n    return recordsWatcher.release;\n  }\n  updateFlushWatchers() {\n    if (this.flushWatchers === null) {\n      if (this.typeWatchers.size > 0 || this.recordsWatchers.size > 0) {\n        this.flushWatchers = () => {\n          this.typeWatchers.forEach(watcher => watcher.revalidate());\n          this.recordsWatchers.forEach(watcher => watcher.revalidate());\n        };\n        _backburner.on('end', this.flushWatchers);\n      }\n    } else if (this.typeWatchers.size === 0 && this.recordsWatchers.size === 0) {\n      _backburner.off('end', this.flushWatchers);\n      this.flushWatchers = null;\n    }\n  }\n\n  /**\n    Clear all observers before destruction\n    @private\n    @method willDestroy\n  */\n  willDestroy() {\n    this._super(...arguments);\n    this.typeWatchers.forEach(watcher => watcher.release());\n    this.recordsWatchers.forEach(watcher => watcher.release());\n    this.releaseMethods.forEach(fn => fn());\n    if (this.flushWatchers) {\n      _backburner.off('end', this.flushWatchers);\n    }\n  }\n\n  /**\n    Detect whether a class is a model.\n     Test that against the model class\n    of your persistence library.\n     @public\n    @method detect\n    @return boolean Whether the class is a model class or not.\n  */\n  detect(_klass) {\n    return false;\n  }\n\n  /**\n    Get the columns for a given model type.\n     @public\n    @method columnsForType\n    @return {Array} An array of columns of the following format:\n     name: {String} The name of the column.\n     desc: {String} Humanized description (what would show in a table column name).\n  */\n  columnsForType(_klass) {\n    return A();\n  }\n\n  /**\n    Adds observers to a model type class.\n     @private\n    @method observeModelType\n    @param {String} modelName The model type name.\n    @param {Function} typesUpdated Called when a type is modified.\n    @return {Function} The function to call to remove observers.\n  */\n\n  observeModelType(modelName, typesUpdated) {\n    let klass = this._nameToClass(modelName);\n    let records = this.getRecords(klass, modelName);\n    let onChange = () => {\n      typesUpdated([this.wrapModelType(klass, modelName)]);\n    };\n    let {\n      typeWatchers\n    } = this;\n    let typeWatcher = typeWatchers.get(records);\n    if (!typeWatcher) {\n      typeWatcher = new TypeWatcher(records, onChange, () => {\n        typeWatchers.delete(records);\n        this.updateFlushWatchers();\n      });\n      typeWatchers.set(records, typeWatcher);\n      this.updateFlushWatchers();\n      typeWatcher.revalidate();\n    }\n    return typeWatcher.release;\n  }\n\n  /**\n    Wraps a given model type and observes changes to it.\n     @private\n    @method wrapModelType\n    @param {Class} klass A model class.\n    @param {String} modelName Name of the class.\n    @return {Object} The wrapped type has the following format:\n      name: {String} The name of the type.\n      count: {Integer} The number of records available.\n      columns: {Columns} An array of columns to describe the record.\n      object: {Class} The actual Model type class.\n  */\n  wrapModelType(klass, name) {\n    let records = this.getRecords(klass, name);\n    return {\n      name,\n      count: get(records, 'length'),\n      columns: this.columnsForType(klass),\n      object: klass\n    };\n  }\n\n  /**\n    Fetches all models defined in the application.\n     @private\n    @method getModelTypes\n    @return {Array} Array of model types.\n  */\n  getModelTypes() {\n    let containerDebugAdapter = this.containerDebugAdapter;\n    let stringTypes = containerDebugAdapter.canCatalogEntriesByType('model') ? containerDebugAdapter.catalogEntriesByType('model') : this._getObjectsOnNamespaces();\n\n    // New adapters return strings instead of classes.\n    let klassTypes = stringTypes.map(name => {\n      return {\n        klass: this._nameToClass(name),\n        name\n      };\n    });\n    return klassTypes.filter(type => this.detect(type.klass));\n  }\n\n  /**\n    Loops over all namespaces and all objects\n    attached to them.\n     @private\n    @method _getObjectsOnNamespaces\n    @return {Array} Array of model type strings.\n  */\n  _getObjectsOnNamespaces() {\n    let namespaces = Namespace.NAMESPACES;\n    let types = [];\n    namespaces.forEach(namespace => {\n      for (let key in namespace) {\n        if (!Object.prototype.hasOwnProperty.call(namespace, key)) {\n          continue;\n        }\n        // Even though we will filter again in `getModelTypes`,\n        // we should not call `lookupFactory` on non-models\n        if (!this.detect(namespace[key])) {\n          continue;\n        }\n        let name = dasherize(key);\n        types.push(name);\n      }\n    });\n    return types;\n  }\n\n  /**\n    Fetches all loaded records for a given type.\n     @public\n    @method getRecords\n    @return {Array} An array of records.\n     This array will be observed for changes,\n     so it should update when new records are added/removed.\n  */\n  getRecords(_klass, _name) {\n    return A();\n  }\n\n  /**\n    Wraps a record and observers changes to it.\n     @private\n    @method wrapRecord\n    @param {Object} record The record instance.\n    @return {Object} The wrapped record. Format:\n    columnValues: {Array}\n    searchKeywords: {Array}\n  */\n  wrapRecord(record) {\n    return {\n      object: record,\n      columnValues: this.getRecordColumnValues(record),\n      searchKeywords: this.getRecordKeywords(record),\n      filterValues: this.getRecordFilterValues(record),\n      color: this.getRecordColor(record)\n    };\n  }\n\n  /**\n    Gets the values for each column.\n     @public\n    @method getRecordColumnValues\n    @return {Object} Keys should match column names defined\n    by the model type.\n  */\n  getRecordColumnValues(_record) {\n    return {};\n  }\n\n  /**\n    Returns keywords to match when searching records.\n     @public\n    @method getRecordKeywords\n    @return {Array} Relevant keywords for search.\n  */\n  getRecordKeywords(_record) {\n    return A();\n  }\n\n  /**\n    Returns the values of filters defined by `getFilters`.\n     @public\n    @method getRecordFilterValues\n    @param {Object} record The record instance.\n    @return {Object} The filter values.\n  */\n  getRecordFilterValues(_record) {\n    return {};\n  }\n\n  /**\n    Each record can have a color that represents its state.\n     @public\n    @method getRecordColor\n    @param {Object} record The record instance\n    @return {String} The records color.\n      Possible options: black, red, blue, green.\n  */\n  getRecordColor(_record) {\n    return null;\n  }\n}\n\nexport { DataAdapter as default };\n","import { i as isFirefox, a as isChrome } from '../../shared-chunks/index-BGP1rw3B.js';\nimport defaultDeprecate from './lib/deprecate.js';\nexport { registerHandler as registerDeprecationHandler } from './lib/deprecate.js';\nimport { isTesting } from './lib/testing.js';\nexport { setTesting } from './lib/testing.js';\nimport _warn from './lib/warn.js';\nexport { registerHandler as registerWarnHandler } from './lib/warn.js';\nimport { setAssert, assert } from './lib/assert.js';\nimport { isDevelopingApp } from '@embroider/macros';\nexport { default as inspect } from './lib/inspect.js';\nexport { default as captureRenderTree } from './lib/capture-render-tree.js';\n\n// These are the default production build versions:\nconst noop = () => {};\n\n// SAFETY: these casts are just straight-up lies, but the point is that they do\n// not do anything in production builds.\nlet info = noop;\nlet warn = noop;\nlet debug = noop;\nlet currentDeprecate;\nlet debugSeal = noop;\nlet debugFreeze = noop;\nlet runInDebug = noop;\nlet setDebugFunction = noop;\nlet getDebugFunction = noop;\nlet deprecateFunc = function () {\n  return arguments[arguments.length - 1];\n};\nfunction deprecate(...args) {\n  return (currentDeprecate ?? defaultDeprecate)(...args);\n}\nif (isDevelopingApp()) {\n  setDebugFunction = function (type, callback) {\n    switch (type) {\n      case 'assert':\n        return setAssert(callback);\n      case 'info':\n        return info = callback;\n      case 'warn':\n        return warn = callback;\n      case 'debug':\n        return debug = callback;\n      case 'deprecate':\n        if (callback === deprecate) {\n          currentDeprecate = undefined;\n          return deprecate;\n        } else {\n          return currentDeprecate = callback;\n        }\n      case 'debugSeal':\n        return debugSeal = callback;\n      case 'debugFreeze':\n        return debugFreeze = callback;\n      case 'runInDebug':\n        return runInDebug = callback;\n      case 'deprecateFunc':\n        return deprecateFunc = callback;\n    }\n  };\n  getDebugFunction = function (type) {\n    switch (type) {\n      case 'assert':\n        return assert;\n      case 'info':\n        return info;\n      case 'warn':\n        return warn;\n      case 'debug':\n        return debug;\n      case 'deprecate':\n        return deprecate;\n      case 'debugSeal':\n        return debugSeal;\n      case 'debugFreeze':\n        return debugFreeze;\n      case 'runInDebug':\n        return runInDebug;\n      case 'deprecateFunc':\n        return deprecateFunc;\n    }\n  };\n}\n\n/**\n@module @ember/debug\n*/\n\nif (isDevelopingApp()) {\n  /**\n    Display a debug notice.\n     Calls to this function are not invoked in production builds.\n     ```javascript\n    import { debug } from '@ember/debug';\n     debug('I\\'m a debug notice!');\n    ```\n     @method debug\n    @for @ember/debug\n    @static\n    @param {String} message A debug message to display.\n    @public\n  */\n  setDebugFunction('debug', function debug(message) {\n    console.debug(`DEBUG: ${message}`); /* eslint-disable-line no-console */\n  });\n\n  /**\n    Display an info notice.\n     Calls to this function are removed from production builds, so they can be\n    freely added for documentation and debugging purposes without worries of\n    incuring any performance penalty.\n     @method info\n    @private\n  */\n  setDebugFunction('info', function info() {\n    console.info(...arguments); /* eslint-disable-line no-console */\n  });\n\n  /**\n   @module @ember/debug\n   @public\n  */\n\n  /**\n    Alias an old, deprecated method with its new counterpart.\n     Display a deprecation warning with the provided message and a stack trace\n    (Chrome and Firefox only) when the assigned method is called.\n     Calls to this function are removed from production builds, so they can be\n    freely added for documentation and debugging purposes without worries of\n    incuring any performance penalty.\n     ```javascript\n    import { deprecateFunc } from '@ember/debug';\n     oldMethod = deprecateFunc('Please use the new, updated method', options, newMethod);\n    ```\n     @method deprecateFunc\n    @static\n    @for @ember/debug\n    @param {String} message A description of the deprecation.\n    @param {Object} [options] The options object for `deprecate`.\n    @param {Function} func The new function called to replace its deprecated counterpart.\n    @return {Function} A new function that wraps the original function with a deprecation warning\n    @private\n  */\n  setDebugFunction('deprecateFunc', function deprecateFunc(...args) {\n    if (args.length === 3) {\n      let [message, options, func] = args;\n      return function (...args) {\n        deprecate(message, false, options);\n        return func.apply(this, args);\n      };\n    } else {\n      let [message, func] = args;\n      return function () {\n        deprecate(message);\n        return func.apply(this, arguments);\n      };\n    }\n  });\n\n  /**\n   @module @ember/debug\n   @public\n  */\n  /**\n    Run a function meant for debugging.\n     Calls to this function are removed from production builds, so they can be\n    freely added for documentation and debugging purposes without worries of\n    incuring any performance penalty.\n     ```javascript\n    import Component from '@ember/component';\n    import { runInDebug } from '@ember/debug';\n     runInDebug(() => {\n      Component.reopen({\n        didInsertElement() {\n          console.log(\"I'm happy\");\n        }\n      });\n    });\n    ```\n     @method runInDebug\n    @for @ember/debug\n    @static\n    @param {Function} func The function to be executed.\n    @since 1.5.0\n    @public\n  */\n  setDebugFunction('runInDebug', function runInDebug(func) {\n    func();\n  });\n  setDebugFunction('debugSeal', function debugSeal(obj) {\n    Object.seal(obj);\n  });\n  setDebugFunction('debugFreeze', function debugFreeze(obj) {\n    // re-freezing an already frozen object introduces a significant\n    // performance penalty on Chrome (tested through 59).\n    //\n    // See: https://bugs.chromium.org/p/v8/issues/detail?id=6450\n    if (!Object.isFrozen(obj)) {\n      Object.freeze(obj);\n    }\n  });\n  setDebugFunction('warn', _warn);\n}\nlet _warnIfUsingStrippedFeatureFlags;\nif (isDevelopingApp() && !isTesting()) {\n  if (typeof window !== 'undefined' && (isFirefox || isChrome) && window.addEventListener) {\n    window.addEventListener('load', () => {\n      if (document.documentElement && document.documentElement.dataset && !document.documentElement.dataset['emberExtension']) {\n        let downloadURL;\n        if (isChrome) {\n          downloadURL = 'https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi';\n        } else if (isFirefox) {\n          downloadURL = 'https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/';\n        }\n        debug(`For more advanced debugging, install the Ember Inspector from ${downloadURL}`);\n      }\n    }, false);\n  }\n}\n\nexport { _warnIfUsingStrippedFeatureFlags, assert, debug, debugFreeze, debugSeal, deprecate, deprecateFunc, getDebugFunction, info, isTesting, runInDebug, setDebugFunction, warn };\n","import { isDevelopingApp } from '@embroider/macros';\n\nlet assert = () => {};\nfunction setAssert(implementation) {\n  assert = implementation;\n  return implementation;\n}\nif (isDevelopingApp()) {\n  /**\n    Verify that a certain expectation is met, or throw a exception otherwise.\n     This is useful for communicating assumptions in the code to other human\n    readers as well as catching bugs that accidentally violates these\n    expectations.\n     Assertions are removed from production builds, so they can be freely added\n    for documentation and debugging purposes without worries of incuring any\n    performance penalty. However, because of that, they should not be used for\n    checks that could reasonably fail during normal usage. Furthermore, care\n    should be taken to avoid accidentally relying on side-effects produced from\n    evaluating the condition itself, since the code will not run in production.\n     ```javascript\n    import { assert } from '@ember/debug';\n     // Test for truthiness\n    assert('Must pass a string', typeof str === 'string');\n     // Fail unconditionally\n    assert('This code path should never be run');\n    ```\n     @method assert\n    @static\n    @for @ember/debug\n    @param {String} description Describes the expectation. This will become the\n      text of the Error thrown if the assertion fails.\n    @param {any} condition Must be truthy for the assertion to pass. If\n      falsy, an exception will be thrown.\n    @public\n    @since 1.0.0\n  */\n\n  function assert(desc, test) {\n    if (!test) {\n      throw new Error(`Assertion Failed: ${desc}`);\n    }\n  }\n  setAssert(assert);\n}\n\nexport { assert, setAssert };\n","/**\n  @module @ember/debug\n*/\n/**\n  Ember Inspector calls this function to capture the current render tree.\n\n  In production mode, this requires turning on `ENV._DEBUG_RENDER_TREE`\n  before loading Ember.\n\n  @private\n  @static\n  @method captureRenderTree\n  @for @ember/debug\n  @param app {ApplicationInstance} An `ApplicationInstance`.\n  @since 3.14.0\n*/\nfunction captureRenderTree(app) {\n  let domRenderer = app.lookup('renderer:-dom');\n  if (!domRenderer) {\n    throw new Error(`BUG: owner is missing renderer`);\n  }\n  // SAFETY: Ideally we'd assert here but that causes awkward circular requires since this is also in @ember/debug.\n  // This is only for debug stuff so not very risky.\n  let renderer = domRenderer;\n  return renderer.debugRenderTree.capture();\n}\n\nexport { captureRenderTree as default };\n","import { E as ENV } from '../../../shared-chunks/env-DEd6hPbj.js';\nimport { assert } from './assert.js';\nimport { registerHandler as registerHandler$1, invoke } from './handlers.js';\nimport { isDevelopingApp } from '@embroider/macros';\n\n/**\n @module @ember/debug\n @public\n*/\n/**\n  Allows for runtime registration of handler functions that override the default deprecation behavior.\n  Deprecations are invoked by calls to [@ember/debug/deprecate](/ember/release/classes/@ember%2Fdebug/methods/deprecate?anchor=deprecate).\n  The following example demonstrates its usage by registering a handler that throws an error if the\n  message contains the word \"should\", otherwise defers to the default handler.\n\n  ```javascript\n  import { registerDeprecationHandler } from '@ember/debug';\n\n  registerDeprecationHandler((message, options, next) => {\n    if (message.indexOf('should') !== -1) {\n      throw new Error(`Deprecation message with should: ${message}`);\n    } else {\n      // defer to whatever handler was registered before this one\n      next(message, options);\n    }\n  });\n  ```\n\n  The handler function takes the following arguments:\n\n  <ul>\n    <li> <code>message</code> - The message received from the deprecation call.</li>\n    <li> <code>options</code> - An object passed in with the deprecation call containing additional information including:</li>\n      <ul>\n        <li> <code>id</code> - An id of the deprecation in the form of <code>package-name.specific-deprecation</code>.</li>\n        <li> <code>until</code> - The Ember version number the feature and deprecation will be removed in.</li>\n      </ul>\n    <li> <code>next</code> - A function that calls into the previously registered handler.</li>\n  </ul>\n\n  @public\n  @static\n  @method registerDeprecationHandler\n  @for @ember/debug\n  @param handler {Function} A function to handle deprecation calls.\n  @since 2.1.0\n*/\nlet registerHandler = () => {};\nlet missingOptionsDeprecation;\nlet missingOptionsIdDeprecation;\nlet missingOptionDeprecation = () => '';\nlet deprecate = () => {};\nif (isDevelopingApp()) {\n  registerHandler = function registerHandler(handler) {\n    registerHandler$1('deprecate', handler);\n  };\n  let formatMessage = function formatMessage(_message, options) {\n    let message = _message;\n    if (options?.id) {\n      message = message + ` [deprecation id: ${options.id}]`;\n    }\n    if (options?.until) {\n      message = message + ` This will be removed in ${options.for} ${options.until}.`;\n    }\n    if (options?.url) {\n      message += ` See ${options.url} for more details.`;\n    }\n    return message;\n  };\n  registerHandler(function logDeprecationToConsole(message, options) {\n    let updatedMessage = formatMessage(message, options);\n    console.warn(`DEPRECATION: ${updatedMessage}`); // eslint-disable-line no-console\n  });\n  let captureErrorForStack;\n  if (new Error().stack) {\n    captureErrorForStack = () => new Error();\n  } else {\n    captureErrorForStack = () => {\n      try {\n        __fail__.fail();\n        return;\n      } catch (e) {\n        return e;\n      }\n    };\n  }\n  registerHandler(function logDeprecationStackTrace(message, options, next) {\n    if (ENV.LOG_STACKTRACE_ON_DEPRECATION) {\n      let stackStr = '';\n      let error = captureErrorForStack();\n      let stack;\n      if (error instanceof Error) {\n        if (error.stack) {\n          if (error['arguments']) {\n            // Chrome\n            stack = error.stack.replace(/^\\s+at\\s+/gm, '').replace(/^([^(]+?)([\\n$])/gm, '{anonymous}($1)$2').replace(/^Object.<anonymous>\\s*\\(([^)]+)\\)/gm, '{anonymous}($1)').split('\\n');\n            stack.shift();\n          } else {\n            // Firefox\n            stack = error.stack.replace(/(?:\\n@:0)?\\s+$/m, '').replace(/^\\(/gm, '{anonymous}(').split('\\n');\n          }\n          stackStr = `\\n    ${stack.slice(2).join('\\n    ')}`;\n        }\n      }\n      let updatedMessage = formatMessage(message, options);\n      console.warn(`DEPRECATION: ${updatedMessage}${stackStr}`); // eslint-disable-line no-console\n    } else {\n      next(message, options);\n    }\n  });\n  registerHandler(function raiseOnDeprecation(message, options, next) {\n    if (ENV.RAISE_ON_DEPRECATION) {\n      let updatedMessage = formatMessage(message);\n      throw new Error(updatedMessage);\n    } else {\n      next(message, options);\n    }\n  });\n  missingOptionsDeprecation = 'When calling `deprecate` you ' + 'must provide an `options` hash as the third parameter.  ' + '`options` should include `id` and `until` properties.';\n  missingOptionsIdDeprecation = 'When calling `deprecate` you must provide `id` in options.';\n  missingOptionDeprecation = (id, missingOption) => {\n    return `When calling \\`deprecate\\` you must provide \\`${missingOption}\\` in options. Missing options.${missingOption} in \"${id}\" deprecation`;\n  };\n  /**\n   @module @ember/debug\n   @public\n   */\n  /**\n    Display a deprecation warning with the provided message and a stack trace\n    (Chrome and Firefox only).\n     Ember itself leverages [Semantic Versioning](https://semver.org) to aid\n    projects in keeping up with changes to the framework. Before any\n    functionality or API is removed, it first flows linearly through a\n    deprecation staging process. The staging process currently contains two\n    stages: available and enabled.\n     Deprecations are initially released into the 'available' stage.\n    Deprecations will stay in this stage until the replacement API has been\n    marked as a recommended practice via the RFC process and the addon\n    ecosystem has generally adopted the change.\n     Once a deprecation meets the above criteria, it will move into the\n    'enabled' stage where it will remain until the functionality or API is\n    eventually removed.\n     For application and addon developers, \"available\" deprecations are not\n    urgent and \"enabled\" deprecations require action.\n     * In a production build, this method is defined as an empty function (NOP).\n    Uses of this method in Ember itself are stripped from the ember.prod.js build.\n     ```javascript\n    import { deprecate } from '@ember/debug';\n     deprecate(\n      'Use of `assign` has been deprecated. Please use `Object.assign` or the spread operator instead.',\n      false,\n      {\n        id: 'ember-polyfills.deprecate-assign',\n        until: '5.0.0',\n        url: 'https://deprecations.emberjs.com/v4.x/#toc_ember-polyfills-deprecate-assign',\n        for: 'ember-source',\n        since: {\n          available: '4.0.0',\n          enabled: '4.0.0',\n        },\n      }\n    );\n    ```\n     @method deprecate\n    @for @ember/debug\n    @param {String} message A description of the deprecation.\n    @param {Boolean} test A boolean. If falsy, the deprecation will be displayed.\n    @param {Object} options\n    @param {String} options.id A unique id for this deprecation. The id can be\n      used by Ember debugging tools to change the behavior (raise, log or silence)\n      for that specific deprecation. The id should be namespaced by dots, e.g.\n      \"view.helper.select\".\n    @param {string} options.until The version of Ember when this deprecation\n      warning will be removed.\n    @param {String} options.for A namespace for the deprecation, usually the package name\n    @param {Object} options.since Describes when the deprecation became available and enabled.\n    @param {String} [options.url] An optional url to the transition guide on the\n          emberjs.com website.\n    @static\n    @public\n    @since 1.0.0\n  */\n  deprecate = function deprecate(message, test, options) {\n    assert(missingOptionsDeprecation, Boolean(options && (options.id || options.until)));\n    assert(missingOptionsIdDeprecation, Boolean(options.id));\n    assert(missingOptionDeprecation(options.id, 'until'), Boolean(options.until));\n    assert(missingOptionDeprecation(options.id, 'for'), Boolean(options.for));\n    assert(missingOptionDeprecation(options.id, 'since'), Boolean(options.since));\n    invoke('deprecate', message, test, options);\n  };\n}\nconst defaultDeprecate = deprecate;\n\nexport { defaultDeprecate as default, missingOptionDeprecation, missingOptionsDeprecation, missingOptionsIdDeprecation, registerHandler };\n","import { isDevelopingApp } from '@embroider/macros';\n\nlet HANDLERS = {};\nlet registerHandler = function registerHandler(_type, _callback) {};\nlet invoke = () => {};\nif (isDevelopingApp()) {\n  registerHandler = function registerHandler(type, callback) {\n    let nextHandler = HANDLERS[type] || (() => {});\n    HANDLERS[type] = (message, options) => {\n      callback(message, options, nextHandler);\n    };\n  };\n  invoke = function invoke(type, message, test, options) {\n    if (test) {\n      return;\n    }\n    let handlerForType = HANDLERS[type];\n    if (handlerForType) {\n      handlerForType(message, options);\n    }\n  };\n}\n\nexport { HANDLERS, invoke, registerHandler };\n","import { assert } from './assert.js';\n\nconst {\n  toString: objectToString\n} = Object.prototype;\nconst {\n  toString: functionToString\n} = Function.prototype;\nconst {\n  isArray\n} = Array;\nconst {\n  keys: objectKeys\n} = Object;\nconst {\n  stringify\n} = JSON;\nconst LIST_LIMIT = 100;\nconst DEPTH_LIMIT = 4;\nconst SAFE_KEY = /^[\\w$]+$/;\n\n/**\n @module @ember/debug\n*/\n/**\n  Convenience method to inspect an object. This method will attempt to\n  convert the object into a useful string description.\n\n  It is a pretty simple implementation. If you want something more robust,\n  use something like JSDump: https://github.com/NV/jsDump\n\n  @method inspect\n  @static\n  @param {Object} obj The object you want to inspect.\n  @return {String} A description of the object\n  @since 1.4.0\n  @private\n*/\nfunction inspect(obj) {\n  // detect Node util.inspect call inspect(depth: number, opts: object)\n  if (typeof obj === 'number' && arguments.length === 2) {\n    return this;\n  }\n  return inspectValue(obj, 0);\n}\nfunction inspectValue(value, depth, seen) {\n  let valueIsArray = false;\n  switch (typeof value) {\n    case 'undefined':\n      return 'undefined';\n    case 'object':\n      if (value === null) return 'null';\n      if (isArray(value)) {\n        valueIsArray = true;\n        break;\n      }\n      // is toString Object.prototype.toString or undefined then traverse\n      if (value.toString === objectToString || value.toString === undefined) {\n        break;\n      }\n      // custom toString\n      return value.toString();\n    case 'function':\n      return value.toString === functionToString ? value.name ? `[Function:${value.name}]` : `[Function]` : value.toString();\n    case 'string':\n      return stringify(value);\n    case 'symbol':\n    case 'boolean':\n    case 'number':\n    default:\n      return value.toString();\n  }\n  if (seen === undefined) {\n    seen = new WeakSet();\n  } else {\n    if (seen.has(value)) return `[Circular]`;\n  }\n  seen.add(value);\n  return valueIsArray ? inspectArray(value, depth + 1, seen) : inspectObject(value, depth + 1, seen);\n}\nfunction inspectKey(key) {\n  return SAFE_KEY.test(key) ? key : stringify(key);\n}\nfunction inspectObject(obj, depth, seen) {\n  if (depth > DEPTH_LIMIT) {\n    return '[Object]';\n  }\n  let s = '{';\n  let keys = objectKeys(obj);\n  for (let i = 0; i < keys.length; i++) {\n    s += i === 0 ? ' ' : ', ';\n    if (i >= LIST_LIMIT) {\n      s += `... ${keys.length - LIST_LIMIT} more keys`;\n      break;\n    }\n    let key = keys[i];\n    assert('has key', key); // Looping over array\n    s += `${inspectKey(String(key))}: ${inspectValue(obj[key], depth, seen)}`;\n  }\n  s += ' }';\n  return s;\n}\nfunction inspectArray(arr, depth, seen) {\n  if (depth > DEPTH_LIMIT) {\n    return '[Array]';\n  }\n  let s = '[';\n  for (let i = 0; i < arr.length; i++) {\n    s += i === 0 ? ' ' : ', ';\n    if (i >= LIST_LIMIT) {\n      s += `... ${arr.length - LIST_LIMIT} more items`;\n      break;\n    }\n    s += inspectValue(arr[i], depth, seen);\n  }\n  s += ' ]';\n  return s;\n}\n\nexport { inspect as default };\n","let testing = false;\nfunction isTesting() {\n  return testing;\n}\nfunction setTesting(value) {\n  testing = Boolean(value);\n}\n\nexport { isTesting, setTesting };\n","import { assert } from './assert.js';\nimport { registerHandler as registerHandler$1, invoke } from './handlers.js';\nimport { isDevelopingApp } from '@embroider/macros';\n\nlet registerHandler = () => {};\nlet warn = () => {};\nlet missingOptionsDeprecation;\nlet missingOptionsIdDeprecation;\n\n/**\n@module @ember/debug\n*/\n\nif (isDevelopingApp()) {\n  /**\n    Allows for runtime registration of handler functions that override the default warning behavior.\n    Warnings are invoked by calls made to [@ember/debug/warn](/ember/release/classes/@ember%2Fdebug/methods/warn?anchor=warn).\n    The following example demonstrates its usage by registering a handler that does nothing overriding Ember's\n    default warning behavior.\n     ```javascript\n    import { registerWarnHandler } from '@ember/debug';\n     // next is not called, so no warnings get the default behavior\n    registerWarnHandler(() => {});\n    ```\n     The handler function takes the following arguments:\n     <ul>\n      <li> <code>message</code> - The message received from the warn call. </li>\n      <li> <code>options</code> - An object passed in with the warn call containing additional information including:</li>\n        <ul>\n          <li> <code>id</code> - An id of the warning in the form of <code>package-name.specific-warning</code>.</li>\n        </ul>\n      <li> <code>next</code> - A function that calls into the previously registered handler.</li>\n    </ul>\n     @public\n    @static\n    @method registerWarnHandler\n    @for @ember/debug\n    @param handler {Function} A function to handle warnings.\n    @since 2.1.0\n  */\n  registerHandler = function registerHandler(handler) {\n    registerHandler$1('warn', handler);\n  };\n  registerHandler(function logWarning(message) {\n    /* eslint-disable no-console */\n    console.warn(`WARNING: ${message}`);\n    /* eslint-enable no-console */\n  });\n  missingOptionsDeprecation = 'When calling `warn` you ' + 'must provide an `options` hash as the third parameter.  ' + '`options` should include an `id` property.';\n  missingOptionsIdDeprecation = 'When calling `warn` you must provide `id` in options.';\n\n  /**\n    Display a warning with the provided message.\n     * In a production build, this method is defined as an empty function (NOP).\n    Uses of this method in Ember itself are stripped from the ember.prod.js build.\n     ```javascript\n    import { warn } from '@ember/debug';\n    import tomsterCount from './tomster-counter'; // a module in my project\n     // Log a warning if we have more than 3 tomsters\n    warn('Too many tomsters!', tomsterCount <= 3, {\n      id: 'ember-debug.too-many-tomsters'\n    });\n    ```\n     @method warn\n    @for @ember/debug\n    @static\n    @param {String} message A warning to display.\n    @param {Boolean|Object} test An optional boolean. If falsy, the warning\n      will be displayed. If `test` is an object, the `test` parameter can\n      be used as the `options` parameter and the warning is displayed.\n    @param {Object} options\n    @param {String} options.id The `id` can be used by Ember debugging tools\n      to change the behavior (raise, log, or silence) for that specific warning.\n      The `id` should be namespaced by dots, e.g. \"ember-debug.feature-flag-with-features-stripped\"\n    @public\n    @since 1.0.0\n  */\n  warn = function warn(message, test, options) {\n    if (arguments.length === 2 && typeof test === 'object') {\n      options = test;\n      test = false;\n    }\n    assert(missingOptionsDeprecation, Boolean(options));\n    assert(missingOptionsIdDeprecation, Boolean(options && options.id));\n\n    // SAFETY: we have explicitly assigned `false` if the user invoked the\n    // arity-2 version of the overload, so we know `test` is always either\n    // `undefined` or a `boolean` for type-safe callers.\n    invoke('warn', message, test, options);\n  };\n}\nconst _warn = warn;\n\nexport { _warn as default, missingOptionsDeprecation, missingOptionsIdDeprecation, registerHandler };\n","import { registerDestructor as registerDestructor$1, unregisterDestructor as unregisterDestructor$1 } from '../../@glimmer/destroyable/index.js';\nexport { assertDestroyablesDestroyed, associateDestroyableChild, destroy, enableDestroyableTracking, isDestroyed, isDestroying } from '../../@glimmer/destroyable/index.js';\n\n/**\n  Ember manages the lifecycles and lifetimes of many built in constructs, such\n  as components, and does so in a hierarchical way - when a parent component is\n  destroyed, all of its children are destroyed as well.\n\n  This destroyables API exposes the basic building blocks for destruction:\n\n  * registering a function to be ran when an object is destroyed\n  * checking if an object is in a destroying state\n  * associate an object as a child of another so that the child object will be destroyed\n    when the associated parent object is destroyed.\n\n  @module @ember/destroyable\n  @public\n*/\n\n/**\n  This function is used to associate a destroyable object with a parent. When the parent\n  is destroyed, all registered children will also be destroyed.\n\n  ```js\n  class CustomSelect extends Component {\n    constructor(...args) {\n      super(...args);\n\n      // obj is now a child of the component. When the component is destroyed,\n      // obj will also be destroyed, and have all of its destructors triggered.\n      this.obj = associateDestroyableChild(this, {});\n    }\n  }\n  ```\n\n  Returns the associated child for convenience.\n\n  @method associateDestroyableChild\n  @for @ember/destroyable\n  @param {Object|Function} parent the destroyable to entangle the child destroyables lifetime with\n  @param {Object|Function} child the destroyable to be entangled with the parents lifetime\n  @returns {Object|Function} the child argument\n  @static\n  @public\n*/\n\n/**\n Receives a destroyable, and returns true if the destroyable has begun destroying. Otherwise returns\n false.\n\n  ```js\n  let obj = {};\n  isDestroying(obj); // false\n  destroy(obj);\n  isDestroying(obj); // true\n  // ...sometime later, after scheduled destruction\n  isDestroyed(obj); // true\n  isDestroying(obj); // true\n  ```\n\n  @method isDestroying\n  @for @ember/destroyable\n  @param {Object|Function} destroyable the object to check\n  @returns {Boolean}\n  @static\n  @public\n*/\n\n/**\n  Receives a destroyable, and returns true if the destroyable has finished destroying. Otherwise\n  returns false.\n\n  ```js\n  let obj = {};\n\n  isDestroyed(obj); // false\n  destroy(obj);\n\n  // ...sometime later, after scheduled destruction\n\n  isDestroyed(obj); // true\n  ```\n\n  @method isDestroyed\n  @for @ember/destroyable\n  @param {Object|Function} destroyable the object to check\n  @returns {Boolean}\n  @static\n  @public\n*/\n\n/**\n  Initiates the destruction of a destroyable object. It runs all associated destructors, and then\n  destroys all children recursively.\n\n  ```js\n  let obj = {};\n\n  registerDestructor(obj, () => console.log('destroyed!'));\n\n  destroy(obj); // this will schedule the destructor to be called\n\n  // ...some time later, during scheduled destruction\n\n  // destroyed!\n  ```\n\n  Destruction via `destroy()` follows these steps:\n\n  1, Mark the destroyable such that `isDestroying(destroyable)` returns `true`\n  2, Call `destroy()` on each of the destroyable's associated children\n  3, Schedule calling the destroyable's destructors\n  4, Schedule setting destroyable such that `isDestroyed(destroyable)` returns `true`\n\n  This results in the entire tree of destroyables being first marked as destroying,\n  then having all of their destructors called, and finally all being marked as isDestroyed.\n  There won't be any in between states where some items are marked as `isDestroying` while\n  destroying, while others are not.\n\n  @method destroy\n  @for @ember/destroyable\n  @param {Object|Function} destroyable the object to destroy\n  @static\n  @public\n*/\n\n/**\n  This function asserts that all objects which have associated destructors or associated children\n  have been destroyed at the time it is called. It is meant to be a low level hook that testing\n  frameworks can use to hook into and validate that all destroyables have in fact been destroyed.\n\n  This function requires that `enableDestroyableTracking` was called previously, and is only\n  available in non-production builds.\n\n  @method assertDestroyablesDestroyed\n  @for @ember/destroyable\n  @static\n  @public\n*/\n\n/**\n  This function instructs the destroyable system to keep track of all destroyables (their\n  children, destructors, etc). This enables a future usage of `assertDestroyablesDestroyed`\n  to be used to ensure that all destroyable tasks (registered destructors and associated children)\n  have completed when `assertDestroyablesDestroyed` is called.\n\n  @method enableDestroyableTracking\n  @for @ember/destroyable\n  @static\n  @public\n*/\n\n/**\n  Receives a destroyable object and a destructor function, and associates the\n  function with it. When the destroyable is destroyed with destroy, or when its\n  parent is destroyed, the destructor function will be called.\n\n  ```js\n  import Component from '@glimmer/component';\n  import { registerDestructor } from '@ember/destroyable';\n\n  class Modal extends Component {\n    @service resize;\n\n    constructor(...args) {\n      super(...args);\n\n      this.resize.register(this, this.layout);\n\n      registerDestructor(this, () => this.resize.unregister(this));\n    }\n  }\n  ```\n\n  Multiple destructors can be associated with a given destroyable, and they can be\n  associated over time, allowing libraries to dynamically add destructors as needed.\n  `registerDestructor` also returns the associated destructor function, for convenience.\n\n  The destructor function is passed a single argument, which is the destroyable itself.\n  This allows the function to be reused multiple times for many destroyables, rather\n  than creating a closure function per destroyable.\n\n  ```js\n  import Component from '@glimmer/component';\n  import { registerDestructor } from '@ember/destroyable';\n\n  function unregisterResize(instance) {\n    instance.resize.unregister(instance);\n  }\n\n  class Modal extends Component {\n    @service resize;\n\n    constructor(...args) {\n      super(...args);\n\n      this.resize.register(this, this.layout);\n\n      registerDestructor(this, unregisterResize);\n    }\n  }\n  ```\n\n  @method registerDestructor\n  @for @ember/destroyable\n  @param {Object|Function} destroyable the destroyable to register the destructor function with\n  @param {Function} destructor the destructor to run when the destroyable object is destroyed\n  @static\n  @public\n*/\nfunction registerDestructor(destroyable, destructor) {\n  return registerDestructor$1(destroyable, destructor);\n}\n\n/**\n  Receives a destroyable and a destructor function, and de-associates the destructor\n  from the destroyable.\n\n  ```js\n  import Component from '@glimmer/component';\n  import { registerDestructor, unregisterDestructor } from '@ember/destroyable';\n\n  class Modal extends Component {\n    @service modals;\n\n    constructor(...args) {\n      super(...args);\n\n      this.modals.add(this);\n\n      this.modalDestructor = registerDestructor(this, () => this.modals.remove(this));\n    }\n\n    @action pinModal() {\n      unregisterDestructor(this, this.modalDestructor);\n    }\n  }\n  ```\n\n  @method unregisterDestructor\n  @for @ember/destroyable\n  @param {Object|Function} destroyable the destroyable to unregister the destructor function from\n  @param {Function} destructor the destructor to remove from the destroyable\n  @static\n  @public\n*/\nfunction unregisterDestructor(destroyable, destructor) {\n  return unregisterDestructor$1(destroyable, destructor);\n}\n\nexport { registerDestructor, unregisterDestructor };\n","export { getEngineParent, setEngineParent } from './lib/engine-parent.js';\nimport '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { c as canInvoke } from '../../shared-chunks/invoke-BjRgvK2V.js';\nimport Controller from '../controller/index.js';\nimport Namespace from '../application/namespace.js';\nimport { R as Registry } from '../../shared-chunks/registry-XY5cfmbH.js';\nimport DAG from '../../dag-map/index.js';\nimport '../debug/index.js';\nimport ContainerDebugAdapter from '../debug/container-debug-adapter.js';\nimport '../object/index.js';\nimport EngineInstance from './instance.js';\nimport '../-internals/meta/lib/meta.js';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { g as get } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport { s as set } from '../../shared-chunks/property_set-DrZnfGQ7.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\nimport '../../route-recognizer/index.js';\nimport '../../shared-chunks/rsvp-CnCSY930.js';\nimport '../../shared-chunks/unrecognized-url-error-BBMMZhBN.js';\nimport RoutingService from '../routing/lib/routing-service.js';\nimport ComponentLookup from '../-internals/views/lib/component_lookup.js';\nimport '../-internals/views/lib/views/core_view.js';\nimport '../-internals/views/lib/mixins/action_support.js';\nimport '../-internals/views/lib/views/states.js';\nimport '../../shared-chunks/index-CQkjwqTv.js';\nimport '../../shared-chunks/index-ByyoGpfz.js';\nimport { a as setupEngineRegistry } from '../../shared-chunks/setup-registry-Bbj8WQen.js';\nimport '../../shared-chunks/dynamic-CuBsUXX8.js';\nimport '../../shared-chunks/constants-oDhF27qL.js';\nimport '../runloop/index.js';\nimport RegistryProxyMixin from '../-internals/runtime/lib/mixins/registry_proxy.js';\nimport '../-internals/runtime/lib/mixins/container_proxy.js';\nimport '../-internals/runtime/lib/mixins/comparable.js';\nimport '../-internals/runtime/lib/mixins/action_handler.js';\nimport '../-internals/runtime/lib/mixins/-proxy.js';\nimport '../enumerable/mutable.js';\nimport '../-internals/runtime/lib/mixins/target_action_support.js';\nimport '../-internals/runtime/lib/ext/rsvp.js';\nimport { assert } from '../debug/lib/assert.js';\n\nfunction props(obj) {\n  let properties = [];\n  for (let key in obj) {\n    properties.push(key);\n  }\n  return properties;\n}\n\n/**\n@module @ember/engine\n*/\n\n/**\n  The `Engine` class contains core functionality for both applications and\n  engines.\n\n  Each engine manages a registry that's used for dependency injection and\n  exposed through `RegistryProxy`.\n\n  Engines also manage initializers and instance initializers.\n\n  Engines can spawn `EngineInstance` instances via `buildInstance()`.\n\n  @class Engine\n  @extends Ember.Namespace\n  @uses RegistryProxyMixin\n  @public\n*/\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\n\nclass Engine extends Namespace.extend(RegistryProxyMixin) {\n  static initializers = Object.create(null);\n  static instanceInitializers = Object.create(null);\n\n  /**\n    The goal of initializers should be to register dependencies and injections.\n    This phase runs once. Because these initializers may load code, they are\n    allowed to defer application readiness and advance it. If you need to access\n    the container or store you should use an InstanceInitializer that will be run\n    after all initializers and therefore after all code is loaded and the app is\n    ready.\n     Initializer receives an object which has the following attributes:\n    `name`, `before`, `after`, `initialize`. The only required attribute is\n    `initialize`, all others are optional.\n     * `name` allows you to specify under which name the initializer is registered.\n    This must be a unique name, as trying to register two initializers with the\n    same name will result in an error.\n     ```app/initializer/named-initializer.js\n    import { debug } from '@ember/debug';\n     export function initialize() {\n      debug('Running namedInitializer!');\n    }\n     export default {\n      name: 'named-initializer',\n      initialize\n    };\n    ```\n     * `before` and `after` are used to ensure that this initializer is ran prior\n    or after the one identified by the value. This value can be a single string\n    or an array of strings, referencing the `name` of other initializers.\n     An example of ordering initializers, we create an initializer named `first`:\n     ```app/initializer/first.js\n    import { debug } from '@ember/debug';\n     export function initialize() {\n      debug('First initializer!');\n    }\n     export default {\n      name: 'first',\n      initialize\n    };\n    ```\n     ```bash\n    // DEBUG: First initializer!\n    ```\n     We add another initializer named `second`, specifying that it should run\n    after the initializer named `first`:\n     ```app/initializer/second.js\n    import { debug } from '@ember/debug';\n     export function initialize() {\n      debug('Second initializer!');\n    }\n     export default {\n      name: 'second',\n      after: 'first',\n      initialize\n    };\n    ```\n     ```\n    // DEBUG: First initializer!\n    // DEBUG: Second initializer!\n    ```\n     Afterwards we add a further initializer named `pre`, this time specifying\n    that it should run before the initializer named `first`:\n     ```app/initializer/pre.js\n    import { debug } from '@ember/debug';\n     export function initialize() {\n      debug('Pre initializer!');\n    }\n     export default {\n      name: 'pre',\n      before: 'first',\n      initialize\n    };\n    ```\n     ```bash\n    // DEBUG: Pre initializer!\n    // DEBUG: First initializer!\n    // DEBUG: Second initializer!\n    ```\n     Finally we add an initializer named `post`, specifying it should run after\n    both the `first` and the `second` initializers:\n     ```app/initializer/post.js\n    import { debug } from '@ember/debug';\n     export function initialize() {\n      debug('Post initializer!');\n    }\n     export default {\n      name: 'post',\n      after: ['first', 'second'],\n      initialize\n    };\n    ```\n     ```bash\n    // DEBUG: Pre initializer!\n    // DEBUG: First initializer!\n    // DEBUG: Second initializer!\n    // DEBUG: Post initializer!\n    ```\n     * `initialize` is a callback function that receives one argument,\n      `application`, on which you can operate.\n     Example of using `application` to register an adapter:\n     ```app/initializer/api-adapter.js\n    import ApiAdapter from '../utils/api-adapter';\n     export function initialize(application) {\n      application.register('api-adapter:main', ApiAdapter);\n    }\n     export default {\n      name: 'post',\n      after: ['first', 'second'],\n      initialize\n    };\n    ```\n     @method initializer\n    @param initializer {Object}\n    @public\n  */\n\n  static initializer = buildInitializerMethod('initializers', 'initializer');\n\n  /**\n    Instance initializers run after all initializers have run. Because\n    instance initializers run after the app is fully set up. We have access\n    to the store, container, and other items. However, these initializers run\n    after code has loaded and are not allowed to defer readiness.\n     Instance initializer receives an object which has the following attributes:\n    `name`, `before`, `after`, `initialize`. The only required attribute is\n    `initialize`, all others are optional.\n     * `name` allows you to specify under which name the instanceInitializer is\n    registered. This must be a unique name, as trying to register two\n    instanceInitializer with the same name will result in an error.\n     ```app/initializer/named-instance-initializer.js\n    import { debug } from '@ember/debug';\n     export function initialize() {\n      debug('Running named-instance-initializer!');\n    }\n     export default {\n      name: 'named-instance-initializer',\n      initialize\n    };\n    ```\n     * `before` and `after` are used to ensure that this initializer is ran prior\n    or after the one identified by the value. This value can be a single string\n    or an array of strings, referencing the `name` of other initializers.\n     * See Application.initializer for discussion on the usage of before\n    and after.\n     Example instanceInitializer to preload data into the store.\n     ```app/initializer/preload-data.js\n     export function initialize(application) {\n        var userConfig, userConfigEncoded, store;\n        // We have a HTML escaped JSON representation of the user's basic\n        // configuration generated server side and stored in the DOM of the main\n        // index.html file. This allows the app to have access to a set of data\n        // without making any additional remote calls. Good for basic data that is\n        // needed for immediate rendering of the page. Keep in mind, this data,\n        // like all local models and data can be manipulated by the user, so it\n        // should not be relied upon for security or authorization.\n         // Grab the encoded data from the meta tag\n        userConfigEncoded = document.querySelector('head meta[name=app-user-config]').attr('content');\n         // Unescape the text, then parse the resulting JSON into a real object\n        userConfig = JSON.parse(unescape(userConfigEncoded));\n         // Lookup the store\n        store = application.lookup('service:store');\n         // Push the encoded JSON into the store\n        store.pushPayload(userConfig);\n    }\n     export default {\n      name: 'named-instance-initializer',\n      initialize\n    };\n    ```\n     @method instanceInitializer\n    @param instanceInitializer\n    @public\n  */\n  static instanceInitializer = buildInitializerMethod('instanceInitializers', 'instance initializer');\n\n  /**\n    This creates a registry with the default Ember naming conventions.\n     It also configures the registry:\n     * registered views are created every time they are looked up (they are\n      not singletons)\n    * registered templates are not factories; the registered value is\n      returned directly.\n    * the router receives the application as its `namespace` property\n    * all controllers receive the router as their `target` and `controllers`\n      properties\n    * all controllers receive the application as their `namespace` property\n    * the application view receives the application controller as its\n      `controller` property\n    * the application view receives the application template as its\n      `defaultTemplate` property\n     @method buildRegistry\n    @static\n    @param {Application} namespace the application for which to\n      build the registry\n    @return {Ember.Registry} the built registry\n    @private\n  */\n  static buildRegistry(namespace) {\n    let registry = new Registry({\n      resolver: resolverFor(namespace)\n    });\n    registry.set = set;\n    registry.register('application:main', namespace, {\n      instantiate: false\n    });\n    commonSetupRegistry(registry);\n    setupEngineRegistry(registry);\n    return registry;\n  }\n\n  /**\n    Set this to provide an alternate class to `DefaultResolver`\n     @property resolver\n    @public\n  */\n\n  init(properties) {\n    super.init(properties);\n    this.buildRegistry();\n  }\n\n  /**\n    A private flag indicating whether an engine's initializers have run yet.\n     @private\n    @property _initializersRan\n  */\n  _initializersRan = false;\n\n  /**\n    Ensure that initializers are run once, and only once, per engine.\n     @private\n    @method ensureInitializers\n  */\n  ensureInitializers() {\n    if (!this._initializersRan) {\n      this.runInitializers();\n      this._initializersRan = true;\n    }\n  }\n\n  /**\n    Create an EngineInstance for this engine.\n     @public\n    @method buildInstance\n    @return {EngineInstance} the engine instance\n  */\n  buildInstance(options = {}) {\n    this.ensureInitializers();\n    return EngineInstance.create({\n      ...options,\n      base: this\n    });\n  }\n\n  /**\n    Build and configure the registry for the current engine.\n     @private\n    @method buildRegistry\n    @return {Ember.Registry} the configured registry\n  */\n  buildRegistry() {\n    let registry = this.__registry__ = this.constructor.buildRegistry(this);\n    return registry;\n  }\n\n  /**\n    @private\n    @method initializer\n  */\n  initializer(initializer) {\n    this.constructor.initializer(initializer);\n  }\n\n  /**\n    @private\n    @method instanceInitializer\n  */\n  instanceInitializer(initializer) {\n    this.constructor.instanceInitializer(initializer);\n  }\n\n  /**\n    @private\n    @method runInitializers\n  */\n  runInitializers() {\n    this._runInitializer('initializers', (name, initializer) => {\n      (isDevelopingApp() && !(initializer) && assert(`No application initializer named '${name}'`, initializer));\n      initializer.initialize(this);\n    });\n  }\n\n  /**\n    @private\n    @since 1.12.0\n    @method runInstanceInitializers\n  */\n  runInstanceInitializers(instance) {\n    this._runInitializer('instanceInitializers', (name, initializer) => {\n      (isDevelopingApp() && !(initializer) && assert(`No instance initializer named '${name}'`, initializer));\n      initializer.initialize(instance);\n    });\n  }\n  _runInitializer(bucketName, cb) {\n    let initializersByName = get(this.constructor, bucketName);\n    let initializers = props(initializersByName);\n    let graph = new DAG();\n    let initializer;\n    for (let name of initializers) {\n      initializer = initializersByName[name];\n      (isDevelopingApp() && !(initializer) && assert(`missing ${bucketName}: ${name}`, initializer));\n      graph.add(initializer.name, initializer, initializer.before, initializer.after);\n    }\n    graph.topsort(cb);\n  }\n}\n\n/**\n  This function defines the default lookup rules for container lookups:\n\n  * templates are looked up on `Ember.TEMPLATES`\n  * other names are looked up on the application after classifying the name.\n    For example, `controller:post` looks up `App.PostController` by default.\n  * if the default lookup fails, look for registered classes on the container\n\n  This allows the application to register default injections in the container\n  that could be overridden by the normal naming convention.\n\n  @private\n  @method resolverFor\n  @param {Ember.Enginer} namespace the namespace to look for classes\n  @return {*} the resolved value for a given lookup\n*/\nfunction resolverFor(namespace) {\n  let ResolverClass = namespace.Resolver;\n  let props = {\n    namespace\n  };\n  return ResolverClass.create(props);\n}\n\n/** @internal */\nfunction buildInitializerMethod(bucketName, humanName) {\n  return function (initializer) {\n    // If this is the first initializer being added to a subclass, we are going to reopen the class\n    // to make sure we have a new `initializers` object, which extends from the parent class' using\n    // prototypal inheritance. Without this, attempting to add initializers to the subclass would\n    // pollute the parent class as well as other subclasses.\n    // SAFETY: The superclass may be an Engine, we don't call unless we confirmed it was ok.\n    let superclass = this.superclass;\n    if (superclass[bucketName] !== undefined && superclass[bucketName] === this[bucketName]) {\n      let attrs = {\n        [bucketName]: Object.create(this[bucketName])\n      };\n      this.reopenClass(attrs);\n    }\n    (isDevelopingApp() && !(!this[bucketName][initializer.name]) && assert(`The ${humanName} '${initializer.name}' has already been registered`, !this[bucketName][initializer.name]));\n    (isDevelopingApp() && !(canInvoke(initializer, 'initialize')) && assert(`An ${humanName} cannot be registered without an initialize function`, canInvoke(initializer, 'initialize')));\n    (isDevelopingApp() && !(initializer.name !== undefined) && assert(`An ${humanName} cannot be registered without a name property`, initializer.name !== undefined));\n    let initializers = this[bucketName];\n    initializers[initializer.name] = initializer;\n  };\n}\nfunction commonSetupRegistry(registry) {\n  registry.optionsForType('component', {\n    singleton: false\n  });\n  registry.optionsForType('view', {\n    singleton: false\n  });\n  registry.register('controller:basic', Controller, {\n    instantiate: false\n  });\n\n  // Register the routing service...\n  registry.register('service:-routing', RoutingService);\n\n  // DEBUGGING\n  registry.register('resolver-for-debugging:main', registry.resolver, {\n    instantiate: false\n  });\n  registry.register('container-debug-adapter:main', ContainerDebugAdapter);\n  registry.register('component-lookup:main', ComponentLookup);\n}\n\nexport { buildInitializerMethod, Engine as default };\n","import EmberObject from '../object/index.js';\nimport RegistryProxyMixin from '../-internals/runtime/lib/mixins/registry_proxy.js';\nimport ContainerProxyMixin from '../-internals/runtime/lib/mixins/container_proxy.js';\nimport '../-internals/runtime/lib/mixins/comparable.js';\nimport '../-internals/runtime/lib/mixins/action_handler.js';\nimport '../-internals/runtime/lib/mixins/-proxy.js';\nimport '../enumerable/mutable.js';\nimport '../-internals/runtime/lib/mixins/target_action_support.js';\nimport '../-internals/runtime/lib/ext/rsvp.js';\nimport '../debug/index.js';\nimport { R as Registry, p as privatize } from '../../shared-chunks/registry-XY5cfmbH.js';\nimport { g as guidFor } from '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { ENGINE_PARENT, getEngineParent, setEngineParent } from './lib/engine-parent.js';\nimport { isFactory } from '../-internals/owner/index.js';\nimport { assert } from '../debug/lib/assert.js';\nimport { R as RSVP } from '../../shared-chunks/rsvp-CnCSY930.js';\n\n/**\n@module @ember/engine\n*/\n\nclass EngineInstance extends EmberObject.extend(RegistryProxyMixin, ContainerProxyMixin) {\n  /**\n   @private\n   @method setupRegistry\n   @param {Registry} registry\n   @param {BootOptions} options\n   */\n  // This is effectively an \"abstract\" method: it defines the contract a\n  // subclass (e.g. `ApplicationInstance`) must follow to implement this\n  // behavior, but an `EngineInstance` has no behavior of its own here.\n  static setupRegistry(_registry, _options) {}\n\n  /**\n    The base `Engine` for which this is an instance.\n     @property {Engine} engine\n    @private\n  */\n\n  [ENGINE_PARENT];\n  _booted = false;\n  init(properties) {\n    super.init(properties);\n\n    // Ensure the guid gets setup for this instance\n    guidFor(this);\n    this.base ??= this.application;\n\n    // Create a per-instance registry that will use the application's registry\n    // as a fallback for resolving registrations.\n    let registry = this.__registry__ = new Registry({\n      fallback: this.base.__registry__\n    });\n\n    // Create a per-instance container from the instance's registry\n    this.__container__ = registry.container({\n      owner: this\n    });\n    this._booted = false;\n  }\n  _bootPromise = null;\n\n  /**\n    Initialize the `EngineInstance` and return a promise that resolves\n    with the instance itself when the boot process is complete.\n     The primary task here is to run any registered instance initializers.\n     See the documentation on `BootOptions` for the options it takes.\n     @public\n    @method boot\n    @param options {Object}\n    @return {Promise<EngineInstance,Error>}\n  */\n  boot(options) {\n    if (this._bootPromise) {\n      return this._bootPromise;\n    }\n    this._bootPromise = new RSVP.Promise(resolve => {\n      resolve(this._bootSync(options));\n    });\n    return this._bootPromise;\n  }\n\n  /**\n    Unfortunately, a lot of existing code assumes booting an instance is\n    synchronous – specifically, a lot of tests assume the last call to\n    `app.advanceReadiness()` or `app.reset()` will result in a new instance\n    being fully-booted when the current runloop completes.\n     We would like new code (like the `visit` API) to stop making this\n    assumption, so we created the asynchronous version above that returns a\n    promise. But until we have migrated all the code, we would have to expose\n    this method for use *internally* in places where we need to boot an instance\n    synchronously.\n     @private\n  */\n  _bootSync(options) {\n    if (this._booted) {\n      return this;\n    }\n    (isDevelopingApp() && !(getEngineParent(this)) && assert(\"An engine instance's parent must be set via `setEngineParent(engine, parent)` prior to calling `engine.boot()`.\", getEngineParent(this)));\n    this.cloneParentDependencies();\n    this.setupRegistry(options);\n    this.base.runInstanceInitializers(this);\n    this._booted = true;\n    return this;\n  }\n  setupRegistry(options = this.__container__.lookup('-environment:main')) {\n    this.constructor.setupRegistry(this.__registry__, options);\n  }\n\n  /**\n   Unregister a factory.\n    Overrides `RegistryProxy#unregister` in order to clear any cached instances\n   of the unregistered factory.\n    @public\n   @method unregister\n   @param {String} fullName\n   */\n  unregister(fullName) {\n    this.__container__.reset(fullName);\n\n    // We overwrote this method from RegistryProxyMixin.\n    this.__registry__.unregister(fullName);\n  }\n\n  /**\n    Build a new `EngineInstance` that's a child of this instance.\n     Engines must be registered by name with their parent engine\n    (or application).\n     @private\n    @method buildChildEngineInstance\n    @param name {String} the registered name of the engine.\n    @param options {Object} options provided to the engine instance.\n    @return {EngineInstance,Error}\n  */\n  buildChildEngineInstance(name, options = {}) {\n    let ChildEngine = this.lookup(`engine:${name}`);\n    if (!ChildEngine) {\n      throw new Error(`You attempted to mount the engine '${name}', but it is not registered with its parent.`);\n    }\n    let engineInstance = ChildEngine.buildInstance(options);\n    setEngineParent(engineInstance, this);\n    return engineInstance;\n  }\n\n  /**\n    Clone dependencies shared between an engine instance and its parent.\n     @private\n    @method cloneParentDependencies\n  */\n  cloneParentDependencies() {\n    const parent = getEngineParent(this);\n    (isDevelopingApp() && !(parent) && assert('expected parent', parent));\n    let registrations = ['route:basic', 'service:-routing'];\n    registrations.forEach(key => {\n      let registration = parent.resolveRegistration(key);\n      (isDevelopingApp() && !(isFactory(registration)) && assert('expected registration to be a factory', isFactory(registration)));\n      this.register(key, registration);\n    });\n    let env = parent.lookup('-environment:main');\n    this.register('-environment:main', env, {\n      instantiate: false\n    });\n\n    // The type annotation forces TS to (a) validate that these match and (b)\n    // *notice* that they match, e.g. below on the `singletons.push()`.\n    let singletons = ['router:main', privatize`-bucket-cache:main`, '-view-registry:main', `renderer:-dom`, 'service:-document'];\n    if (env['isInteractive']) {\n      singletons.push('event_dispatcher:main');\n    }\n    singletons.forEach(key => {\n      // SAFETY: We already expect this to be a singleton\n      let singleton = parent.lookup(key);\n      this.register(key, singleton, {\n        instantiate: false\n      });\n    });\n  }\n}\n\nexport { EngineInstance as default };\n","/**\n@module @ember/engine\n*/\n\nconst ENGINE_PARENT = Symbol('ENGINE_PARENT');\n\n/**\n  `getEngineParent` retrieves an engine instance's parent instance.\n\n  @method getEngineParent\n  @param {EngineInstance} engine An engine instance.\n  @return {EngineInstance} The parent engine instance.\n  @for @ember/engine\n  @static\n  @private\n*/\nfunction getEngineParent(engine) {\n  return engine[ENGINE_PARENT];\n}\n\n/**\n  `setEngineParent` sets an engine instance's parent instance.\n\n  @method setEngineParent\n  @param {EngineInstance} engine An engine instance.\n  @param {EngineInstance} parent The parent engine instance.\n  @private\n*/\nfunction setEngineParent(engine, parent) {\n  engine[ENGINE_PARENT] = parent;\n}\n\nexport { ENGINE_PARENT, getEngineParent, setEngineParent };\n","import Mixin from '../object/mixin.js';\n\n/**\n@module @ember/enumerable\n@private\n*/\n\n/**\n  The methods in this mixin have been moved to [MutableArray](/ember/release/classes/MutableArray). This mixin has\n  been intentionally preserved to avoid breaking Enumerable.detect checks\n  until the community migrates away from them.\n\n  @class Enumerable\n  @private\n*/\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\n\nconst Enumerable = Mixin.create();\n\nexport { Enumerable as default };\n","import Enumerable from './index.js';\nimport Mixin from '../object/mixin.js';\n\n/**\n@module ember\n*/\n\n/**\n  The methods in this mixin have been moved to MutableArray. This mixin has\n  been intentionally preserved to avoid breaking MutableEnumerable.detect\n  checks until the community migrates away from them.\n\n  @class MutableEnumerable\n  @namespace Ember\n  @uses Enumerable\n  @private\n*/\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\n\nconst MutableEnumerable = Mixin.create(Enumerable);\n\nexport { MutableEnumerable as default };\n","import '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '@embroider/macros';\nimport '../../@glimmer/global-context/index.js';\nimport { i as helperCapabilities } from '../../shared-chunks/api-CkUl6KyJ.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport { b as setHelperManager$1 } from '../../shared-chunks/api-1B_9SjFR.js';\nimport { a as array$1, c as concat$1, f as fn$1, g as get$1, h as hash$1, i as invokeHelper$1 } from '../../shared-chunks/dynamic-CuBsUXX8.js';\nimport '../../shared-chunks/constants-oDhF27qL.js';\nimport '../../shared-chunks/index-CQkjwqTv.js';\nimport { u as uniqueId$1 } from '../../shared-chunks/index-ByyoGpfz.js';\nimport '../../shared-chunks/registry-XY5cfmbH.js';\nimport '../debug/index.js';\nimport '../runloop/index.js';\n\n/**\n@module @ember/helper\n*/\n\n/**\n  `capabilities` returns a capabilities configuration which can be used to modify\n  the behavior of the manager. Manager capabilities _must_ be provided using the\n  `capabilities` function, as the underlying implementation can change over time.\n\n  The first argument to capabilities is a version string, which is the version of\n  Ember that the capabilities were defined in. Ember can add new versions at any\n  time, and these may have entirely different behaviors, but it will not remove\n  old versions until the next major version.\n\n  ```js\n  capabilities('3.23');\n  ```\n\n  The second argument is an object of capabilities and boolean values indicating\n  whether they are enabled or disabled.\n\n  ```js\n  capabilities('3.23', {\n    hasValue: true,\n    hasDestructor: true,\n  });\n  ```\n\n  If no value is specified, then the default value will be used.\n\n  ### `3.23` capabilities\n\n  #### `hasDestroyable`\n\n  - Default value: false\n\n  Determines if the helper has a destroyable to include in the destructor\n  hierarchy. If enabled, the `getDestroyable` hook will be called, and its result\n  will be associated with the destroyable parent block.\n\n  #### `hasValue`\n\n  - Default value: false\n\n  Determines if the helper has a value which can be used externally. The helper's\n  `getValue` hook will be run whenever the value of the helper is accessed if this\n  capability is enabled.\n\n  @method capabilities\n  @for @ember/helper\n  @static\n  @param {String} managerApiVersion The version of capabilities that are being used\n  @param options The capabilities values\n  @return {Capabilities} The capabilities object instance\n  @public\n*/\nconst capabilities = helperCapabilities;\n\n/**\n  Sets the helper manager for an object or function.\n\n  ```js\n  setHelperManager((owner) => new ClassHelperManager(owner), Helper)\n  ```\n\n  When a value is used as a helper in a template, the helper manager is looked up\n  on the object by walking up its prototype chain and finding the first helper\n  manager. This manager then receives the value and can create and manage an\n  instance of a helper from it. This provides a layer of indirection that allows\n  users to design high-level helper APIs, without Ember needing to worry about the\n  details. High-level APIs can be experimented with and iterated on while the\n  core of Ember helpers remains stable, and new APIs can be introduced gradually\n  over time to existing code bases.\n\n  `setHelperManager` receives two arguments:\n\n  1. A factory function, which receives the `owner` and returns an instance of a\n    helper manager.\n  2. A helper definition, which is the object or function to associate the factory function with.\n\n  The first time the object is looked up, the factory function will be called to\n  create the helper manager. It will be cached, and in subsequent lookups the\n  cached helper manager will be used instead.\n\n  Only one helper manager is guaranteed to exist per `owner` and per usage of\n  `setHelperManager`, so many helpers will end up using the same instance of the\n  helper manager. As such, you should only store state that is related to the\n  manager itself. If you want to store state specific to a particular helper\n  definition, you should assign a unique helper manager to that helper. In\n  general, most managers should either be stateless, or only have the `owner` they\n  were created with as state.\n\n  Helper managers must fulfill the following interface (This example uses\n  [TypeScript interfaces](https://www.typescriptlang.org/docs/handbook/interfaces.html)\n  for precision, you do not need to write helper managers using TypeScript):\n\n  ```ts\n  interface HelperManager<HelperStateBucket> {\n    capabilities: HelperCapabilities;\n\n    createHelper(definition: HelperDefinition, args: TemplateArgs): HelperStateBucket;\n\n    getValue?(bucket: HelperStateBucket): unknown;\n\n    runEffect?(bucket: HelperStateBucket): void;\n\n    getDestroyable?(bucket: HelperStateBucket): object;\n  }\n  ```\n\n  The capabilities property _must_ be provided using the `capabilities()` function\n  imported from the same module as `setHelperManager`:\n\n  ```js\n  import { capabilities } from '@ember/helper';\n\n  class MyHelperManager {\n    capabilities = capabilities('3.21.0', { hasValue: true });\n\n    // ...snip...\n  }\n  ```\n\n  Below is a description of each of the methods on the interface and their\n  functions.\n\n  #### `createHelper`\n\n  `createHelper` is a required hook on the HelperManager interface. The hook is\n  passed the definition of the helper that is currently being created, and is\n  expected to return a _state bucket_. This state bucket is what represents the\n  current state of the helper, and will be passed to the other lifecycle hooks at\n  appropriate times. It is not necessarily related to the definition of the\n  helper itself - for instance, you could return an object _containing_ an\n  instance of the helper:\n\n  ```js\n  class MyManager {\n    createHelper(Definition, args) {\n      return {\n        instance: new Definition(args);\n      };\n    }\n  }\n  ```\n\n  This allows the manager to store metadata that it doesn't want to expose to the\n  user.\n\n  This hook is _not_ autotracked - changes to tracked values used within this hook\n  will _not_ result in a call to any of the other lifecycle hooks. This is because\n  it is unclear what should happen if it invalidates, and rather than make a\n  decision at this point, the initial API is aiming to allow as much expressivity\n  as possible. This could change in the future with changes to capabilities and\n  their behaviors.\n\n  If users do want to autotrack some values used during construction, they can\n  either create the instance of the helper in `runEffect` or `getValue`, or they\n  can use the `cache` API to autotrack the `createHelper` hook themselves. This\n  provides maximum flexibility and expressiveness to manager authors.\n\n  This hook has the following timing semantics:\n\n  **Always**\n  - called as discovered during DOM construction\n  - called in definition order in the template\n\n  #### `getValue`\n\n  `getValue` is an optional hook that should return the value of the helper. This\n  is the value that is returned from the helper and passed into the template.\n\n  This hook is called when the value is requested from the helper (e.g. when the\n  template is rendering and the helper value is needed). The hook is autotracked,\n  and will rerun whenever any tracked values used inside of it are updated.\n  Otherwise it does not rerun.\n\n  > Note: This means that arguments which are not _consumed_ within the hook will\n  > not trigger updates.\n\n  This hook is only called for helpers with the `hasValue` capability enabled.\n  This hook has the following timing semantics:\n\n  **Always**\n  - called the first time the helper value is requested\n  - called after autotracked state has changed\n\n  **Never**\n  - called if the `hasValue` capability is disabled\n\n  #### `runEffect`\n\n  `runEffect` is an optional hook that should run the effect that the helper is\n  applying, setting it up or updating it.\n\n  This hook is scheduled to be called some time after render and prior to paint.\n  There is not a guaranteed, 1-to-1 relationship between a render pass and this\n  hook firing. For instance, multiple render passes could occur, and the hook may\n  only trigger once. It may also never trigger if it was dirtied in one render\n  pass and then destroyed in the next.\n\n  The hook is autotracked, and will rerun whenever any tracked values used inside\n  of it are updated. Otherwise it does not rerun.\n\n  The hook is also run during a time period where state mutations are _disabled_\n  in Ember. Any tracked state mutation will throw an error during this time,\n  including changes to tracked properties, changes made using `set`, updates\n  to computed properties, etc. This is meant to prevent infinite rerenders and\n  other antipatterns.\n\n  This hook is only called for helpers with the `hasScheduledEffect` capability\n  enabled. This hook is also not called in SSR currently, though this could be\n  added as a capability in the future. It has the following timing semantics:\n\n  **Always**\n  - called after the helper was first created, if the helper has not been\n    destroyed since creation\n  - called after autotracked state has changed, if the helper has not been\n    destroyed during render\n\n  **Never**\n  - called if the `hasScheduledEffect` capability is disabled\n  - called in SSR\n\n  #### `getDestroyable`\n\n  `getDestroyable` is an optional hook that users can use to register a\n  destroyable object for the helper. This destroyable will be registered to the\n  containing block or template parent, and will be destroyed when it is destroyed.\n  See the [Destroyables RFC](https://github.com/emberjs/rfcs/blob/master/text/0580-destroyables.md)\n  for more details.\n\n  `getDestroyable` is only called if the `hasDestroyable` capability is enabled.\n\n  This hook has the following timing semantics:\n\n  **Always**\n  - called immediately after the `createHelper` hook is called\n\n  **Never**\n  - called if the `hasDestroyable` capability is disabled\n\n  @method setHelperManager\n  @for @ember/helper\n  @static\n  @param {Function} factory A factory function which receives an optional owner, and returns a helper manager\n  @param {object} definition The definition to associate the manager factory with\n  @return {object} The definition passed into setHelperManager\n  @public\n*/\nconst setHelperManager = setHelperManager$1;\n\n/**\n  The `invokeHelper` function can be used to create a helper instance in\n  JavaScript.\n\n  To access a helper's value you have to use `getValue` from\n  `@glimmer/tracking/primitives/cache`.\n\n  ```js\n  // app/components/data-loader.js\n  import Component from '@glimmer/component';\n  import { getValue } from '@glimmer/tracking/primitives/cache';\n  import Helper from '@ember/component/helper';\n  import { invokeHelper } from '@ember/helper';\n\n  class PlusOne extends Helper {\n    compute([number]) {\n      return number + 1;\n    }\n  }\n\n  export default class PlusOneComponent extends Component {\n    plusOne = invokeHelper(this, PlusOne, () => {\n      return {\n        positional: [this.args.number],\n      };\n    });\n\n    get value() {\n      return getValue(this.plusOne);\n    }\n  }\n  ```\n  ```js\n  {{this.value}}\n  ```\n\n  It receives three arguments:\n\n  * `context`: The parent context of the helper. When the parent is torn down and\n    removed, the helper will be as well.\n  * `definition`: The definition of the helper.\n  * `computeArgs`: An optional function that produces the arguments to the helper.\n    The function receives the parent context as an argument, and must return an\n    object with a `positional` property that is an array and/or a `named`\n    property that is an object.\n\n  And it returns a Cache instance that contains the most recent value of the\n  helper. You can access the helper using `getValue()` like any other cache. The\n  cache is also destroyable, and using the `destroy()` function on it will cause\n  the helper to be torn down.\n\n  Note that using `getValue()` on helpers that have scheduled effects will not\n  trigger the effect early. Effects will continue to run at their scheduled time.\n\n  @method invokeHelper\n  @for @ember/helper\n  @static\n  @param {object} context The parent context of the helper\n  @param {object} definition The helper definition\n  @param {Function} computeArgs An optional function that produces args\n  @returns\n  @public\n*/\nconst invokeHelper = invokeHelper$1;\n\n// SAFETY: we need to provide interfaces that Glint can declaration-merge with\n// to provide appropriate completions. In each case, the imported item is\n// currently typed only as `object`, and we are replacing it with a similarly\n// low-information interface type: these are empty objects which are simply able\n// to be distinguished so that Glint can provide the relevant extensions.\n/* eslint-disable @typescript-eslint/no-empty-object-type */\n\n/**\n * Using the `{{hash}}` helper, you can pass objects directly from the template\n * as an argument to your components.\n *\n * ```\n * import { hash } from '@ember/helper';\n *\n * <template>\n *   {{#each-in (hash givenName='Jen' familyName='Weber') as |key value|}}\n *     <p>{{key}}: {{value}}</p>\n *   {{/each-in}}\n * </template>\n * ```\n *\n * **NOTE:** this example uses the experimental `<template>` feature, which is\n * the only place you need to import `hash` to use it (it is a built-in when\n * writing standalone `.hbs` files).\n */\nconst hash = hash$1;\n/**\n * Using the `{{array}}` helper, you can pass arrays directly from the template\n * as an argument to your components.\n *\n * ```js\n * import { array } from '@ember/helper';\n *\n * <template>\n *   <ul>\n *   {{#each (array 'Tom Dale' 'Yehuda Katz' @anotherPerson) as |person|}}\n *     <li>{{person}}</li>\n *   {{/each}}\n *   </ul>\n * </template>\n *\n * **NOTE:** this example uses the experimental `<template>` feature, which is\n * the only place you need to import `array` to use it (it is a built-in when\n * writing standalone `.hbs` files).\n * ```\n */\nconst array = array$1;\n/**\n * The `{{concat}}` helper makes it easy to dynamically send a number of\n * parameters to a component or helper as a single parameter in the format of a\n * concatenated string.\n *\n * For example:\n *\n * ```js\n * import { concat } from '@ember/helper';\n *\n * <template>\n *   {{get @foo (concat \"item\" @index)}}\n * </template>\n * ```\n *\n * This will display the result of `@foo.item1` when `index` is `1`, and\n * `this.foo.item2` when `index` is `2`, etc.\n *\n * **NOTE:** this example uses the experimental `<template>` feature, which is\n * the only place you need to import `concat` to use it (it is a built-in when\n * writing standalone `.hbs` files).\n */\nconst concat = concat$1;\n/**\n * The `{{get}}` helper makes it easy to dynamically look up a property on an\n * object or an element in an array. The second argument to `{{get}}` can be a\n * string or a number, depending on the object being accessed.\n *\n * To access a property on an object with a string key:\n *\n * ```js\n * import { get } from '@ember/helper';\n *\n * <template>\n *   {{get @someObject \"objectKey\"}}\n * </template>\n * ```\n *\n * To access the first element in an array:\n *\n * ```js\n * import { get } from '@ember/helper';\n *\n * <template>\n *   {{get @someArray 0}}\n * </template>\n * ```\n *\n * To access a property on an object with a dynamic key:\n *\n * ```js\n * import { get } from '@ember/helper';\n *\n * <template>\n *   {{get @address @field}}\n * </template>\n * ```\n *\n * This will display the result of `@foo.item1` when `index` is `1`, and\n * `this.foo.item2` when `index` is `2`, etc.\n *\n * **NOTE:** this example uses the experimental `<template>` feature, which is\n * the only place you need to import `concat` to use it (it is a built-in when\n * writing standalone `.hbs` files).\n */\nconst get = get$1;\n/**\n * `{{fn}}` is a helper that receives a function and some arguments, and returns\n * a new function that combines. This allows you to pass parameters along to\n * functions in your templates:\n *\n * ```js\n * import { fn } from '@ember/helper';\n *\n * function showAlert(message) {\n *   alert(`The message is: '${message}'`);\n * }\n *\n * <template>\n *   <button type=\"button\" {{on \"click\" (fn showAlert \"Hello!\")}}>\n *     Click me!\n *   </button>\n * </template>\n * ```\n */\nconst fn = fn$1;\n/**\n * Use the {{uniqueId}} helper to generate a unique ID string suitable for use as\n * an ID attribute in the DOM.\n *\n * Each invocation of {{uniqueId}} will return a new, unique ID string.\n * You can use the `let` helper to create an ID that can be reused within a template.\n *\n * ```js\n * import { uniqueId } from '@ember/helper';\n *\n * <template>\n *   {{#let (uniqueId) as |emailId|}}\n *     <label for={{emailId}}>Email address</label>\n *     <input id={{emailId}} type=\"email\" />\n *   {{/let}}\n * </template>\n * ```\n */\nconst uniqueId = uniqueId$1;\n\n/* eslint-enable @typescript-eslint/no-empty-object-type */\n\nexport { array, capabilities, concat, fn, get, hash, invokeHelper, setHelperManager, uniqueId };\n","import { E as ENV } from '../../shared-chunks/env-DEd6hPbj.js';\nimport '../debug/index.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { assert } from '../debug/lib/assert.js';\n\n/* eslint no-console:off */\n/* global console */\n\n/**\n@module @ember/instrumentation\n@private\n*/\n\n/**\n  The purpose of the Ember Instrumentation module is\n  to provide efficient, general-purpose instrumentation\n  for Ember.\n\n  Subscribe to a listener by using `subscribe`:\n\n  ```javascript\n  import { subscribe } from '@ember/instrumentation';\n\n  subscribe(\"render\", {\n    before(name, timestamp, payload) {\n\n    },\n\n    after(name, timestamp, payload) {\n\n    }\n  });\n  ```\n\n  If you return a value from the `before` callback, that same\n  value will be passed as a fourth parameter to the `after`\n  callback.\n\n  Instrument a block of code by using `instrument`:\n\n  ```javascript\n  import { instrument } from '@ember/instrumentation';\n\n  instrument(\"render.handlebars\", payload, function() {\n    // rendering logic\n  }, binding);\n  ```\n\n  Event names passed to `instrument` are namespaced\n  by periods, from more general to more specific. Subscribers\n  can listen for events by whatever level of granularity they\n  are interested in.\n\n  In the above example, the event is `render.handlebars`,\n  and the subscriber listened for all events beginning with\n  `render`. It would receive callbacks for events named\n  `render`, `render.handlebars`, `render.container`, or\n  even `render.handlebars.layout`.\n\n  @class Instrumentation\n  @static\n  @private\n*/\nlet subscribers = [];\nlet cache = {};\nfunction populateListeners(name) {\n  let listeners = [];\n  for (let subscriber of subscribers) {\n    if (subscriber.regex.test(name)) {\n      listeners.push(subscriber.object);\n    }\n  }\n  cache[name] = listeners;\n  return listeners;\n}\nconst time = (() => {\n  let perf = 'undefined' !== typeof window ? window.performance || {} : {};\n  let fn = perf.now || perf.mozNow || perf.webkitNow || perf.msNow || perf.oNow;\n  return fn ? fn.bind(perf) : Date.now;\n})();\nfunction isCallback(value) {\n  return typeof value === 'function';\n}\n\n/**\n  Notifies event's subscribers, calls `before` and `after` hooks.\n\n  @method instrument\n  @for @ember/instrumentation\n  @static\n  @param {String} [name] Namespaced event name.\n  @param {Object} payload\n  @param {Function} callback Function that you're instrumenting.\n  @param {Object} binding Context that instrument function is called with.\n  @private\n*/\n\nfunction instrument(name, p1, p2, p3) {\n  let _payload;\n  let callback;\n  let binding;\n  if (arguments.length <= 3 && isCallback(p1)) {\n    callback = p1;\n    binding = p2;\n  } else {\n    _payload = p1;\n    callback = p2;\n    binding = p3;\n  }\n\n  // fast path\n  if (subscribers.length === 0) {\n    return callback.call(binding);\n  }\n\n  // avoid allocating the payload in fast path\n  let payload = _payload || {};\n  let finalizer = _instrumentStart(name, () => payload);\n  if (finalizer === NOOP) {\n    return callback.call(binding);\n  } else {\n    return withFinalizer(callback, finalizer, payload, binding);\n  }\n}\nfunction flaggedInstrument(_name, _payload, callback) {\n  return callback();\n}\nfunction withFinalizer(callback, finalizer, payload, binding) {\n  try {\n    return callback.call(binding);\n  } catch (e) {\n    payload.exception = e;\n    throw e;\n  } finally {\n    finalizer();\n  }\n}\nfunction NOOP() {}\n\n// private for now\n\nfunction _instrumentStart(name, payloadFunc, payloadArg) {\n  if (subscribers.length === 0) {\n    return NOOP;\n  }\n  let listeners = cache[name];\n  if (!listeners) {\n    listeners = populateListeners(name);\n  }\n  if (listeners.length === 0) {\n    return NOOP;\n  }\n  let payload = payloadFunc(payloadArg);\n  let STRUCTURED_PROFILE = ENV.STRUCTURED_PROFILE;\n  let timeName;\n  if (STRUCTURED_PROFILE) {\n    timeName = `${name}: ${payload.object}`;\n    console.time(timeName);\n  }\n  let beforeValues = [];\n  let timestamp = time();\n  for (let listener of listeners) {\n    beforeValues.push(listener.before(name, timestamp, payload));\n  }\n  const constListeners = listeners;\n  return function _instrumentEnd() {\n    let timestamp = time();\n    for (let i = 0; i < constListeners.length; i++) {\n      let listener = constListeners[i];\n      (isDevelopingApp() && !(listener) && assert('has listener', listener)); // Iterating over values\n      if (typeof listener.after === 'function') {\n        listener.after(name, timestamp, payload, beforeValues[i]);\n      }\n    }\n    if (STRUCTURED_PROFILE) {\n      console.timeEnd(timeName);\n    }\n  };\n}\n\n/**\n  Subscribes to a particular event or instrumented block of code.\n\n  @method subscribe\n  @for @ember/instrumentation\n  @static\n\n  @param {String} [pattern] Namespaced event name.\n  @param {Object} [object] Before and After hooks.\n\n  @return {Subscriber}\n  @private\n*/\nfunction subscribe(pattern, object) {\n  let paths = pattern.split('.');\n  let regexes = [];\n  for (let path of paths) {\n    if (path === '*') {\n      regexes.push('[^\\\\.]*');\n    } else {\n      regexes.push(path);\n    }\n  }\n  let regex = regexes.join('\\\\.');\n  regex = `${regex}(\\\\..*)?`;\n  let subscriber = {\n    pattern,\n    regex: new RegExp(`^${regex}$`),\n    object\n  };\n  subscribers.push(subscriber);\n  cache = {};\n  return subscriber;\n}\n\n/**\n  Unsubscribes from a particular event or instrumented block of code.\n\n  @method unsubscribe\n  @for @ember/instrumentation\n  @static\n\n  @param {Object} [subscriber]\n  @private\n*/\nfunction unsubscribe(subscriber) {\n  let index = 0;\n  for (let i = 0; i < subscribers.length; i++) {\n    if (subscribers[i] === subscriber) {\n      index = i;\n    }\n  }\n  subscribers.splice(index, 1);\n  cache = {};\n}\n\n/**\n  Resets `Instrumentation` by flushing list of subscribers.\n\n  @method reset\n  @for @ember/instrumentation\n  @static\n  @private\n*/\nfunction reset() {\n  subscribers.length = 0;\n  cache = {};\n}\n\nexport { _instrumentStart, flaggedInstrument, instrument, reset, subscribe, subscribers, unsubscribe };\n","import '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '@embroider/macros';\nimport '../../@glimmer/global-context/index.js';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { d as setModifierManager$1 } from '../../shared-chunks/api-1B_9SjFR.js';\nexport { m as capabilities } from '../../shared-chunks/api-1B_9SjFR.js';\nexport { on } from './on.js';\nimport '../../shared-chunks/index-CQkjwqTv.js';\nimport '../../shared-chunks/index-ByyoGpfz.js';\nimport '../../shared-chunks/registry-XY5cfmbH.js';\nimport '../debug/index.js';\nimport '../../shared-chunks/dynamic-CuBsUXX8.js';\nimport '../../shared-chunks/constants-oDhF27qL.js';\nimport '../runloop/index.js';\n\n// NOTE: this uses assignment to *require* that the `glimmerSetModifierManager`\n// is legally assignable to this type, i.e. that variance is properly upheld.\nconst setModifierManager = setModifierManager$1;\n\nexport { setModifierManager };\n","import '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '@embroider/macros';\nimport '../../@glimmer/global-context/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport { o as on$1 } from '../../shared-chunks/dynamic-CuBsUXX8.js';\nimport '../../shared-chunks/constants-oDhF27qL.js';\nimport '../../@glimmer/destroyable/index.js';\n\n// In normal TypeScript, this modifier is essentially an opaque token that just\n// needs to be importable. Declaring it with a unique interface like this,\n// however, gives tools like Glint (that *do* have a richer notion of what it\n// is) a place to install more detailed type information.\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\n\n// SAFETY: at the time of writing, the cast here is from `{}` to `OnModifier`,\n// which makes it strictly safer to use outside this module because it is not\n// usable as \"any non-null item\", which is what `{}` means, without loss of any\n// information from the type itself.\nconst on = on$1;\n\nexport { on };\n","import '../-internals/meta/lib/meta.js';\nimport { s as symbol } from '../../shared-chunks/to-string-CqD7_vQ4.js';\nexport { g as guidFor } from '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport '../debug/index.js';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { F as addListener } from '../../shared-chunks/observers-DhgQ6ba5.js';\nexport { g as cacheFor } from '../../shared-chunks/computed_cache-DmYKevAP.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\nimport EmberObject from './index.js';\nimport { assert } from '../debug/lib/assert.js';\n\nlet FrameworkObject = class FrameworkObject extends EmberObject {};\nif (isDevelopingApp()) {\n  const INIT_WAS_CALLED = Symbol('INIT_WAS_CALLED');\n  let ASSERT_INIT_WAS_CALLED = symbol('ASSERT_INIT_WAS_CALLED');\n  FrameworkObject = class DebugFrameworkObject extends EmberObject {\n    [INIT_WAS_CALLED] = false;\n    init(properties) {\n      super.init(properties);\n      this[INIT_WAS_CALLED] = true;\n    }\n    [ASSERT_INIT_WAS_CALLED]() {\n      (isDevelopingApp() && !(this[INIT_WAS_CALLED]) && assert(`You must call \\`super.init(...arguments);\\` or \\`this._super(...arguments)\\` when overriding \\`init\\` on a framework object. Please update ${this} to call \\`super.init(...arguments);\\` from \\`init\\` when using native classes or \\`this._super(...arguments)\\` when using \\`EmberObject.extend()\\`.`, this[INIT_WAS_CALLED]));\n    }\n  };\n  addListener(FrameworkObject.prototype, 'init', null, ASSERT_INIT_WAS_CALLED);\n}\n\nexport { FrameworkObject };\n","import '../-internals/meta/lib/meta.js';\nimport '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../debug/index.js';\nimport '../../@glimmer/destroyable/index.js';\nimport { tagFor, track, updateTag as UPDATE_TAG, consumeTag } from '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { s as setClassicDecorator, i as isElementDescriptor, b as descriptorForProperty } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\nimport { assert } from '../debug/lib/assert.js';\n\nlet wrapGetterSetter = function (target, key, desc) {\n  let {\n    get: originalGet\n  } = desc;\n  (isDevelopingApp() && !(descriptorForProperty(target, key) === undefined) && assert('You attempted to use @dependentKeyCompat on a property that already has been decorated with either @computed or @tracked. @dependentKeyCompat is only necessary for native getters that are not decorated with @computed.', descriptorForProperty(target, key) === undefined));\n  if (originalGet !== undefined) {\n    desc.get = function () {\n      let propertyTag = tagFor(this, key);\n      let ret;\n      let tag = track(() => {\n        ret = originalGet.call(this);\n      });\n      UPDATE_TAG(propertyTag, tag);\n      consumeTag(tag);\n      return ret;\n    };\n  }\n  return desc;\n};\n\n/**\n  `@dependentKeyCompat` is decorator that can be used on _native getters_ that\n  use tracked properties. It exposes the getter to Ember's classic computed\n  property and observer systems, so they can watch it for changes. It can be\n  used in both native and classic classes.\n\n  Native Example:\n\n  ```js\n  import { tracked } from '@glimmer/tracking';\n  import { dependentKeyCompat } from '@ember/object/compat';\n  import { computed, set } from '@ember/object';\n\n  class Person {\n    @tracked firstName;\n    @tracked lastName;\n\n    @dependentKeyCompat\n    get fullName() {\n      return `${this.firstName} ${this.lastName}`;\n    }\n  }\n\n  class Profile {\n    constructor(person) {\n      set(this, 'person', person);\n    }\n\n    @computed('person.fullName')\n    get helloMessage() {\n      return `Hello, ${this.person.fullName}!`;\n    }\n  }\n  ```\n\n  Classic Example:\n\n  ```js\n  import { tracked } from '@glimmer/tracking';\n  import { dependentKeyCompat } from '@ember/object/compat';\n  import EmberObject, { computed, observer, set } from '@ember/object';\n\n  const Person = EmberObject.extend({\n    firstName: tracked(),\n    lastName: tracked(),\n\n    fullName: dependentKeyCompat(function() {\n      return `${this.firstName} ${this.lastName}`;\n    }),\n  });\n\n  const Profile = EmberObject.extend({\n    person: null,\n\n    helloMessage: computed('person.fullName', function() {\n      return `Hello, ${this.person.fullName}!`;\n    }),\n\n    onNameUpdated: observer('person.fullName', function() {\n      console.log('person name updated!');\n    }),\n  });\n  ```\n\n  `dependentKeyCompat()` can receive a getter function or an object containing\n  `get`/`set` methods when used in classic classes, like computed properties.\n\n  In general, only properties which you _expect_ to be watched by older,\n  untracked clases should be marked as dependency compatible. The decorator is\n  meant as an interop layer for parts of Ember's older classic APIs, and should\n  not be applied to every possible getter/setter in classes. The number of\n  dependency compatible getters should be _minimized_ wherever possible. New\n  application code should not need to use `@dependentKeyCompat`, since it is\n  only for interoperation with older code.\n\n  @public\n  @method dependentKeyCompat\n  @for @ember/object/compat\n  @static\n  @param {PropertyDescriptor|undefined} desc A property descriptor containing\n                                             the getter and setter (when used in\n                                             classic classes)\n  @return {PropertyDecorator} property decorator instance\n */\n\nfunction dependentKeyCompat(...args) {\n  if (isElementDescriptor(args)) {\n    let [target, key, desc] = args;\n    (isDevelopingApp() && !(desc != null && (typeof desc.get === 'function' || typeof desc.set === 'function')) && assert('The @dependentKeyCompat decorator must be applied to getters/setters when used in native classes', desc != null && (typeof desc.get === 'function' || typeof desc.set === 'function')));\n    return wrapGetterSetter(target, key, desc);\n  } else {\n    const desc = args[0];\n    (isDevelopingApp() && !((value => {\n      if (value && typeof value === 'object') {\n        let cast = value;\n        return (cast.configurable === undefined || cast.configurable === false || cast.configurable === true) && (cast.enumerable === undefined || cast.enumerable === false || cast.enumerable === true) && (cast.writable === undefined || cast.writable === false || cast.writable === true) && (cast.get === undefined || typeof cast.get === 'function') && (cast.set === undefined || typeof cast.set === 'function');\n      }\n      return false;\n    })(desc)) && assert('expected valid PropertyDescriptor', (value => {\n      if (value && typeof value === 'object') {\n        let cast = value;\n        return (cast.configurable === undefined || cast.configurable === false || cast.configurable === true) && (cast.enumerable === undefined || cast.enumerable === false || cast.enumerable === true) && (cast.writable === undefined || cast.writable === false || cast.writable === true) && (cast.get === undefined || typeof cast.get === 'function') && (cast.set === undefined || typeof cast.set === 'function');\n      }\n      return false;\n    })(desc)));\n    let decorator = function (target, key, _desc, _meta, isClassicDecorator) {\n      (isDevelopingApp() && !(isClassicDecorator) && assert('The @dependentKeyCompat decorator may only be passed a method when used in classic classes. You should decorate getters/setters directly in native classes', isClassicDecorator));\n      (isDevelopingApp() && !(typeof desc.get === 'function' || typeof desc.set === 'function') && assert('The dependentKeyCompat() decorator must be passed a getter or setter when used in classic classes', typeof desc.get === 'function' || typeof desc.set === 'function'));\n      return wrapGetterSetter(target, key, desc);\n    };\n    setClassicDecorator(decorator);\n    return decorator;\n  }\n}\nsetClassicDecorator(dependentKeyCompat);\n\nexport { dependentKeyCompat };\n","import { g as getFactoryFor, s as setFactoryFor } from '../../shared-chunks/registry-XY5cfmbH.js';\nimport { getOwner } from '../-internals/owner/index.js';\nimport { i as isInternalSymbol } from '../../shared-chunks/to-string-CqD7_vQ4.js';\nimport { g as guidFor } from '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { meta } from '../-internals/meta/lib/meta.js';\nimport '../debug/index.js';\nimport { registerDestructor, isDestroyed, isDestroying, destroy } from '../../@glimmer/destroyable/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { h as hasUnknownProperty, P as PROXY_CONTENT, b as descriptorForProperty, f as isClassicDecorator, d as defineProperty, j as activateObserver, k as sendEvent, D as DEBUG_INJECTION_FUNCTIONS } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\nimport Mixin, { applyMixin } from './mixin.js';\nimport '../-internals/runtime/lib/mixins/registry_proxy.js';\nimport '../-internals/runtime/lib/mixins/container_proxy.js';\nimport '../-internals/runtime/lib/mixins/comparable.js';\nimport ActionHandler from '../-internals/runtime/lib/mixins/action_handler.js';\nimport '../-internals/runtime/lib/mixins/-proxy.js';\nimport '../enumerable/mutable.js';\nimport '../-internals/runtime/lib/mixins/target_action_support.js';\nimport '../-internals/runtime/lib/ext/rsvp.js';\nimport makeArray from '../array/lib/make-array.js';\nimport { OWNER } from '../../@glimmer/owner/index.js';\nimport { assert } from '../debug/lib/assert.js';\n\n/**\n  @module @ember/object/core\n*/\n\nfunction hasSetUnknownProperty(val) {\n  return typeof val === 'object' && val !== null && typeof val.setUnknownProperty === 'function';\n}\nfunction hasToStringExtension(val) {\n  return typeof val === 'object' && val !== null && typeof val.toStringExtension === 'function';\n}\nconst reopen = Mixin.prototype.reopen;\nconst wasApplied = new WeakSet();\nconst prototypeMixinMap = new WeakMap();\nconst initCalled = isDevelopingApp() ? new WeakSet() : undefined; // only used in debug builds to enable the proxy trap\n\nconst destroyCalled = new Set();\nfunction ensureDestroyCalled(instance) {\n  if (!destroyCalled.has(instance)) {\n    instance.destroy();\n  }\n}\nfunction initialize(obj, properties) {\n  let m = meta(obj);\n  if (properties !== undefined) {\n    (isDevelopingApp() && !(typeof properties === 'object' && properties !== null) && assert('EmberObject.create only accepts objects.', typeof properties === 'object' && properties !== null));\n    (isDevelopingApp() && !(!(properties instanceof Mixin)) && assert('EmberObject.create no longer supports mixing in other ' + 'definitions, use .extend & .create separately instead.', !(properties instanceof Mixin)));\n    let concatenatedProperties = obj.concatenatedProperties;\n    let mergedProperties = obj.mergedProperties;\n    let keyNames = Object.keys(properties);\n    for (let keyName of keyNames) {\n      // SAFETY: this cast as a Record is safe because all object types can be\n      // indexed in JS, and we explicitly type it as returning `unknown`, so the\n      // result *must* be checked below.\n      let value = properties[keyName];\n      (isDevelopingApp() && !(!isClassicDecorator(value)) && assert('EmberObject.create no longer supports defining computed ' + 'properties. Define computed properties using extend() or reopen() ' + 'before calling create().', !isClassicDecorator(value)));\n      (isDevelopingApp() && !(!(typeof value === 'function' && value.toString().indexOf('._super') !== -1)) && assert('EmberObject.create no longer supports defining methods that call _super.', !(typeof value === 'function' && value.toString().indexOf('._super') !== -1)));\n      (isDevelopingApp() && !(!(keyName === 'actions' && ActionHandler.detect(obj))) && assert('`actions` must be provided at extend time, not at create time, ' + 'when Ember.ActionHandler is used (i.e. views, controllers & routes).', !(keyName === 'actions' && ActionHandler.detect(obj))));\n      let possibleDesc = descriptorForProperty(obj, keyName, m);\n      let isDescriptor = possibleDesc !== undefined;\n      if (!isDescriptor) {\n        if (concatenatedProperties !== undefined && concatenatedProperties.length > 0 && concatenatedProperties.includes(keyName)) {\n          let baseValue = obj[keyName];\n          if (baseValue) {\n            value = makeArray(baseValue).concat(value);\n          } else {\n            value = makeArray(value);\n          }\n        }\n        if (mergedProperties !== undefined && mergedProperties.length > 0 && mergedProperties.includes(keyName)) {\n          let baseValue = obj[keyName];\n          value = Object.assign({}, baseValue, value);\n        }\n      }\n      if (isDescriptor) {\n        possibleDesc.set(obj, keyName, value);\n      } else if (hasSetUnknownProperty(obj) && !(keyName in obj)) {\n        obj.setUnknownProperty(keyName, value);\n      } else {\n        if (isDevelopingApp()) {\n          defineProperty(obj, keyName, null, value, m); // setup mandatory setter\n        } else {\n          obj[keyName] = value;\n        }\n      }\n    }\n  }\n\n  // using DEBUG here to avoid the extraneous variable when not needed\n  if (isDevelopingApp()) {\n    initCalled.add(obj);\n  }\n  obj.init(properties);\n  m.unsetInitializing();\n  let observerEvents = m.observerEvents();\n  if (observerEvents !== undefined) {\n    for (let i = 0; i < observerEvents.length; i++) {\n      activateObserver(obj, observerEvents[i].event, observerEvents[i].sync);\n    }\n  }\n  sendEvent(obj, 'init', undefined, undefined, m);\n}\n\n/**\n  `CoreObject` is the base class for all Ember constructs. It establishes a\n  class system based on Ember's Mixin system, and provides the basis for the\n  Ember Object Model. `CoreObject` should generally not be used directly,\n  instead you should use `EmberObject`.\n\n  ## Usage\n\n  You can define a class by extending from `CoreObject` using the `extend`\n  method:\n\n  ```js\n  const Person = CoreObject.extend({\n    name: 'Tomster',\n  });\n  ```\n\n  For detailed usage, see the [Object Model](https://guides.emberjs.com/release/object-model/)\n  section of the guides.\n\n  ## Usage with Native Classes\n\n  Native JavaScript `class` syntax can be used to extend from any `CoreObject`\n  based class:\n\n  ```js\n  class Person extends CoreObject {\n    init() {\n      super.init(...arguments);\n      this.name = 'Tomster';\n    }\n  }\n  ```\n\n  Some notes about `class` usage:\n\n  * `new` syntax is not currently supported with classes that extend from\n    `EmberObject` or `CoreObject`. You must continue to use the `create` method\n    when making new instances of classes, even if they are defined using native\n    class syntax. If you want to use `new` syntax, consider creating classes\n    which do _not_ extend from `EmberObject` or `CoreObject`. Ember features,\n    such as computed properties and decorators, will still work with base-less\n    classes.\n  * Instead of using `this._super()`, you must use standard `super` syntax in\n    native classes. See the [MDN docs on classes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Super_class_calls_with_super)\n    for more details.\n  * Native classes support using [constructors](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Constructor)\n    to set up newly-created instances. Ember uses these to, among other things,\n    support features that need to retrieve other entities by name, like Service\n    injection and `getOwner`. To ensure your custom instance setup logic takes\n    place after this important work is done, avoid using the `constructor` in\n    favor of `init`.\n  * Properties passed to `create` will be available on the instance by the time\n    `init` runs, so any code that requires these values should work at that\n    time.\n  * Using native classes, and switching back to the old Ember Object model is\n    fully supported.\n\n  @class CoreObject\n  @public\n*/\n\nclass CoreObject {\n  /** @internal */\n  [OWNER];\n  constructor(owner) {\n    this[OWNER] = owner;\n\n    // prepare prototype...\n    this.constructor.proto();\n    let self;\n    if (isDevelopingApp() && hasUnknownProperty(this)) {\n      let messageFor = (obj, property) => {\n        return `You attempted to access the \\`${String(property)}\\` property (of ${obj}).\\n` + `Since Ember 3.1, this is usually fine as you no longer need to use \\`.get()\\`\\n` + `to access computed properties. However, in this case, the object in question\\n` + `is a special kind of Ember object (a proxy). Therefore, it is still necessary\\n` + `to use \\`.get('${String(property)}')\\` in this case.\\n\\n` + `If you encountered this error because of third-party code that you don't control,\\n` + `there is more information at https://github.com/emberjs/ember.js/issues/16148, and\\n` + `you can help us improve this error message by telling us more about what happened in\\n` + `this situation.`;\n      };\n\n      /* globals Proxy Reflect */\n      self = new Proxy(this, {\n        get(target, property, receiver) {\n          if (property === PROXY_CONTENT) {\n            return target;\n          } else if (\n          // init called will be set on the proxy, not the target, so get with the receiver\n          !initCalled.has(receiver) || typeof property === 'symbol' || isInternalSymbol(property) || property === 'toJSON' || property === 'toString' || property === 'toStringExtension' || property === 'didDefineProperty' || property === 'willWatchProperty' || property === 'didUnwatchProperty' || property === 'didAddListener' || property === 'didRemoveListener' || property === 'isDescriptor' || property === '_onLookup' || property in target) {\n            return Reflect.get(target, property, receiver);\n          }\n          let value = target.unknownProperty.call(receiver, property);\n          if (typeof value !== 'function') {\n            (isDevelopingApp() && !(value === undefined || value === null) && assert(messageFor(receiver, property), value === undefined || value === null));\n          }\n        }\n      });\n    } else {\n      self = this;\n    }\n    const destroyable = self;\n    registerDestructor(self, ensureDestroyCalled, true);\n    registerDestructor(self, () => destroyable.willDestroy());\n\n    // disable chains\n    let m = meta(self);\n    m.setInitializing();\n\n    // only return when in debug builds and `self` is the proxy created above\n    if (isDevelopingApp() && self !== this) {\n      return self;\n    }\n  }\n  reopen(...args) {\n    applyMixin(this, args);\n    return this;\n  }\n\n  /**\n    An overridable method called when objects are instantiated. By default,\n    does nothing unless it is overridden during class definition.\n     Example:\n     ```javascript\n    import EmberObject from '@ember/object';\n     const Person = EmberObject.extend({\n      init() {\n        alert(`Name is ${this.get('name')}`);\n      }\n    });\n     let steve = Person.create({\n      name: 'Steve'\n    });\n     // alerts 'Name is Steve'.\n    ```\n     NOTE: If you do override `init` for a framework class like `Component`\n    from `@ember/component`, be sure to call `this._super(...arguments)`\n    in your `init` declaration!\n    If you don't, Ember may not have an opportunity to\n    do important setup work, and you'll see strange behavior in your\n    application.\n     @method init\n    @public\n  */\n  init(_properties) {}\n\n  /**\n    Defines the properties that will be concatenated from the superclass\n    (instead of overridden).\n     By default, when you extend an Ember class a property defined in\n    the subclass overrides a property with the same name that is defined\n    in the superclass. However, there are some cases where it is preferable\n    to build up a property's value by combining the superclass' property\n    value with the subclass' value. An example of this in use within Ember\n    is the `classNames` property of `Component` from `@ember/component`.\n     Here is some sample code showing the difference between a concatenated\n    property and a normal one:\n     ```javascript\n    import EmberObject from '@ember/object';\n     const Bar = EmberObject.extend({\n      // Configure which properties to concatenate\n      concatenatedProperties: ['concatenatedProperty'],\n       someNonConcatenatedProperty: ['bar'],\n      concatenatedProperty: ['bar']\n    });\n     const FooBar = Bar.extend({\n      someNonConcatenatedProperty: ['foo'],\n      concatenatedProperty: ['foo']\n    });\n     let fooBar = FooBar.create();\n    fooBar.get('someNonConcatenatedProperty'); // ['foo']\n    fooBar.get('concatenatedProperty'); // ['bar', 'foo']\n    ```\n     This behavior extends to object creation as well. Continuing the\n    above example:\n     ```javascript\n    let fooBar = FooBar.create({\n      someNonConcatenatedProperty: ['baz'],\n      concatenatedProperty: ['baz']\n    })\n    fooBar.get('someNonConcatenatedProperty'); // ['baz']\n    fooBar.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n    ```\n     Adding a single property that is not an array will just add it in the array:\n     ```javascript\n    let fooBar = FooBar.create({\n      concatenatedProperty: 'baz'\n    })\n    view.get('concatenatedProperty'); // ['bar', 'foo', 'baz']\n    ```\n     Using the `concatenatedProperties` property, we can tell Ember to mix the\n    content of the properties.\n     In `Component` the `classNames`, `classNameBindings` and\n    `attributeBindings` properties are concatenated.\n     This feature is available for you to use throughout the Ember object model,\n    although typical app developers are likely to use it infrequently. Since\n    it changes expectations about behavior of properties, you should properly\n    document its usage in each individual concatenated property (to not\n    mislead your users to think they can override the property in a subclass).\n     @property concatenatedProperties\n    @type Array\n    @default null\n    @public\n  */\n\n  /**\n    Defines the properties that will be merged from the superclass\n    (instead of overridden).\n     By default, when you extend an Ember class a property defined in\n    the subclass overrides a property with the same name that is defined\n    in the superclass. However, there are some cases where it is preferable\n    to build up a property's value by merging the superclass property value\n    with the subclass property's value. An example of this in use within Ember\n    is the `queryParams` property of routes.\n     Here is some sample code showing the difference between a merged\n    property and a normal one:\n     ```javascript\n    import EmberObject from '@ember/object';\n     const Bar = EmberObject.extend({\n      // Configure which properties are to be merged\n      mergedProperties: ['mergedProperty'],\n       someNonMergedProperty: {\n        nonMerged: 'superclass value of nonMerged'\n      },\n      mergedProperty: {\n        page: { replace: false },\n        limit: { replace: true }\n      }\n    });\n     const FooBar = Bar.extend({\n      someNonMergedProperty: {\n        completelyNonMerged: 'subclass value of nonMerged'\n      },\n      mergedProperty: {\n        limit: { replace: false }\n      }\n    });\n     let fooBar = FooBar.create();\n     fooBar.get('someNonMergedProperty');\n    // => { completelyNonMerged: 'subclass value of nonMerged' }\n    //\n    // Note the entire object, including the nonMerged property of\n    // the superclass object, has been replaced\n     fooBar.get('mergedProperty');\n    // => {\n    //   page: {replace: false},\n    //   limit: {replace: false}\n    // }\n    //\n    // Note the page remains from the superclass, and the\n    // `limit` property's value of `false` has been merged from\n    // the subclass.\n    ```\n     This behavior is not available during object `create` calls. It is only\n    available at `extend` time.\n     In `Route` the `queryParams` property is merged.\n     This feature is available for you to use throughout the Ember object model,\n    although typical app developers are likely to use it infrequently. Since\n    it changes expectations about behavior of properties, you should properly\n    document its usage in each individual merged property (to not\n    mislead your users to think they can override the property in a subclass).\n     @property mergedProperties\n    @type Array\n    @default null\n    @public\n  */\n\n  /**\n    Destroyed object property flag.\n     if this property is `true` the observers and bindings were already\n    removed by the effect of calling the `destroy()` method.\n     @property isDestroyed\n    @default false\n    @public\n  */\n  get isDestroyed() {\n    return isDestroyed(this);\n  }\n  set isDestroyed(_value) {\n    (isDevelopingApp() && true && assert(`You cannot set \\`${this}.isDestroyed\\` directly, please use \\`.destroy()\\`.`, false));\n  }\n\n  /**\n    Destruction scheduled flag. The `destroy()` method has been called.\n     The object stays intact until the end of the run loop at which point\n    the `isDestroyed` flag is set.\n     @property isDestroying\n    @default false\n    @public\n  */\n  get isDestroying() {\n    return isDestroying(this);\n  }\n  set isDestroying(_value) {\n    (isDevelopingApp() && true && assert(`You cannot set \\`${this}.isDestroying\\` directly, please use \\`.destroy()\\`.`, false));\n  }\n\n  /**\n    Destroys an object by setting the `isDestroyed` flag and removing its\n    metadata, which effectively destroys observers and bindings.\n     If you try to set a property on a destroyed object, an exception will be\n    raised.\n     Note that destruction is scheduled for the end of the run loop and does not\n    happen immediately.  It will set an isDestroying flag immediately.\n     @method destroy\n    @return {EmberObject} receiver\n    @public\n  */\n  destroy() {\n    // Used to ensure that manually calling `.destroy()` does not immediately call destroy again\n    destroyCalled.add(this);\n    try {\n      destroy(this);\n    } finally {\n      destroyCalled.delete(this);\n    }\n    return this;\n  }\n\n  /**\n    Override to implement teardown.\n     @method willDestroy\n    @public\n  */\n  willDestroy() {}\n\n  /**\n    Returns a string representation which attempts to provide more information\n    than Javascript's `toString` typically does, in a generic way for all Ember\n    objects.\n     ```javascript\n    import EmberObject from '@ember/object';\n     const Person = EmberObject.extend();\n    person = Person.create();\n    person.toString(); //=> \"<Person:ember1024>\"\n    ```\n     If the object's class is not defined on an Ember namespace, it will\n    indicate it is a subclass of the registered superclass:\n     ```javascript\n    const Student = Person.extend();\n    let student = Student.create();\n    student.toString(); //=> \"<(subclass of Person):ember1025>\"\n    ```\n     If the method `toStringExtension` is defined, its return value will be\n    included in the output.\n     ```javascript\n    const Teacher = Person.extend({\n      toStringExtension() {\n        return this.get('fullName');\n      }\n    });\n    teacher = Teacher.create();\n    teacher.toString(); //=> \"<Teacher:ember1026:Tom Dale>\"\n    ```\n     @method toString\n    @return {String} string representation\n    @public\n  */\n  toString() {\n    let extension = hasToStringExtension(this) ? `:${this.toStringExtension()}` : '';\n    return `<${getFactoryFor(this) || '(unknown)'}:${guidFor(this)}${extension}>`;\n  }\n\n  /**\n    Creates a new subclass.\n     ```javascript\n    import EmberObject from '@ember/object';\n     const Person = EmberObject.extend({\n      say(thing) {\n        alert(thing);\n       }\n    });\n    ```\n     This defines a new subclass of EmberObject: `Person`. It contains one method: `say()`.\n     You can also create a subclass from any existing class by calling its `extend()` method.\n    For example, you might want to create a subclass of Ember's built-in `Component` class:\n     ```javascript\n    import Component from '@ember/component';\n     const PersonComponent = Component.extend({\n      tagName: 'li',\n      classNameBindings: ['isAdministrator']\n    });\n    ```\n     When defining a subclass, you can override methods but still access the\n    implementation of your parent class by calling the special `_super()` method:\n     ```javascript\n    import EmberObject from '@ember/object';\n     const Person = EmberObject.extend({\n      say(thing) {\n        let name = this.get('name');\n        alert(`${name} says: ${thing}`);\n      }\n    });\n     const Soldier = Person.extend({\n      say(thing) {\n        this._super(`${thing}, sir!`);\n      },\n      march(numberOfHours) {\n        alert(`${this.get('name')} marches for ${numberOfHours} hours.`);\n      }\n    });\n     let yehuda = Soldier.create({\n      name: 'Yehuda Katz'\n    });\n     yehuda.say('Yes');  // alerts \"Yehuda Katz says: Yes, sir!\"\n    ```\n     The `create()` on line #17 creates an *instance* of the `Soldier` class.\n    The `extend()` on line #8 creates a *subclass* of `Person`. Any instance\n    of the `Person` class will *not* have the `march()` method.\n     You can also pass `Mixin` classes to add additional properties to the subclass.\n     ```javascript\n    import EmberObject from '@ember/object';\n    import Mixin from '@ember/object/mixin';\n     const Person = EmberObject.extend({\n      say(thing) {\n        alert(`${this.get('name')} says: ${thing}`);\n      }\n    });\n     const SingingMixin = Mixin.create({\n      sing(thing) {\n        alert(`${this.get('name')} sings: la la la ${thing}`);\n      }\n    });\n     const BroadwayStar = Person.extend(SingingMixin, {\n      dance() {\n        alert(`${this.get('name')} dances: tap tap tap tap `);\n      }\n    });\n    ```\n     The `BroadwayStar` class contains three methods: `say()`, `sing()`, and `dance()`.\n     @method extend\n    @static\n    @for @ember/object\n    @param {Mixin} [mixins]* One or more Mixin classes\n    @param {Object} [arguments]* Object containing values to use within the new class\n    @public\n  */\n\n  static extend(...mixins) {\n    let Class = class extends this {};\n    reopen.apply(Class.PrototypeMixin, mixins);\n    return Class;\n  }\n\n  /**\n    Creates an instance of a class. Accepts either no arguments, or an object\n    containing values to initialize the newly instantiated object with.\n     ```javascript\n    import EmberObject from '@ember/object';\n     const Person = EmberObject.extend({\n      helloWorld() {\n        alert(`Hi, my name is ${this.get('name')}`);\n      }\n    });\n     let tom = Person.create({\n      name: 'Tom Dale'\n    });\n     tom.helloWorld(); // alerts \"Hi, my name is Tom Dale\".\n    ```\n     `create` will call the `init` function if defined during\n    `AnyObject.extend`\n     If no arguments are passed to `create`, it will not set values to the new\n    instance during initialization:\n     ```javascript\n    let noName = Person.create();\n    noName.helloWorld(); // alerts undefined\n    ```\n     NOTE: For performance reasons, you cannot declare methods or computed\n    properties during `create`. You should instead declare methods and computed\n    properties when using `extend`.\n     @method create\n    @for @ember/object\n    @static\n    @param [arguments]*\n    @public\n  */\n\n  static create(...args) {\n    let props = args[0];\n    let instance;\n    if (props !== undefined) {\n      instance = new this(getOwner(props));\n      // TODO(SAFETY): at present, we cannot actually rely on this being set,\n      // because a number of acceptance tests are (incorrectly? Unclear!)\n      // relying on the ability to run through this path with `factory` being\n      // `undefined`. It's *possible* that actually means that the type for\n      // `setFactoryFor()` should allow `undefined`, but we typed it the other\n      // way for good reason! Accordingly, this *casts* `factory`, and the\n      // commented-out `assert()` is here in the hope that we can enable it\n      // after addressing tests *or* updating the call signature here.\n      let factory = getFactoryFor(props);\n      // assert(`missing factory when creating object ${instance}`, factory !== undefined);\n      setFactoryFor(instance, factory);\n    } else {\n      instance = new this();\n    }\n    if (args.length <= 1) {\n      initialize(instance, props);\n    } else {\n      initialize(instance, flattenProps.apply(this, args));\n    }\n\n    // SAFETY: The `initialize` call is responsible to merge the prototype chain\n    // so that this holds.\n    return instance;\n  }\n\n  /**\n    Augments a constructor's prototype with additional\n    properties and functions:\n     ```javascript\n    import EmberObject from '@ember/object';\n     const MyObject = EmberObject.extend({\n      name: 'an object'\n    });\n     o = MyObject.create();\n    o.get('name'); // 'an object'\n     MyObject.reopen({\n      say(msg) {\n        console.log(msg);\n      }\n    });\n     o2 = MyObject.create();\n    o2.say('hello'); // logs \"hello\"\n     o.say('goodbye'); // logs \"goodbye\"\n    ```\n     To add functions and properties to the constructor itself,\n    see `reopenClass`\n     @method reopen\n    @for @ember/object\n    @static\n    @public\n  */\n  static reopen(...args) {\n    this.willReopen();\n    reopen.apply(this.PrototypeMixin, args);\n    return this;\n  }\n  static willReopen() {\n    let p = this.prototype;\n    if (wasApplied.has(p)) {\n      wasApplied.delete(p);\n\n      // If the base mixin already exists and was applied, create a new mixin to\n      // make sure that it gets properly applied. Reusing the same mixin after\n      // the first `proto` call will cause it to get skipped.\n      if (prototypeMixinMap.has(this)) {\n        prototypeMixinMap.set(this, Mixin.create(this.PrototypeMixin));\n      }\n    }\n  }\n\n  /**\n    Augments a constructor's own properties and functions:\n     ```javascript\n    import EmberObject from '@ember/object';\n     const MyObject = EmberObject.extend({\n      name: 'an object'\n    });\n     MyObject.reopenClass({\n      canBuild: false\n    });\n     MyObject.canBuild; // false\n    o = MyObject.create();\n    ```\n     In other words, this creates static properties and functions for the class.\n    These are only available on the class and not on any instance of that class.\n     ```javascript\n    import EmberObject from '@ember/object';\n     const Person = EmberObject.extend({\n      name: '',\n      sayHello() {\n        alert(`Hello. My name is ${this.get('name')}`);\n      }\n    });\n     Person.reopenClass({\n      species: 'Homo sapiens',\n       createPerson(name) {\n        return Person.create({ name });\n      }\n    });\n     let tom = Person.create({\n      name: 'Tom Dale'\n    });\n    let yehuda = Person.createPerson('Yehuda Katz');\n     tom.sayHello(); // \"Hello. My name is Tom Dale\"\n    yehuda.sayHello(); // \"Hello. My name is Yehuda Katz\"\n    alert(Person.species); // \"Homo sapiens\"\n    ```\n     Note that `species` and `createPerson` are *not* valid on the `tom` and `yehuda`\n    variables. They are only valid on `Person`.\n     To add functions and properties to instances of\n    a constructor by extending the constructor's prototype\n    see `reopen`\n     @method reopenClass\n    @for @ember/object\n    @static\n    @public\n  */\n  static reopenClass(...mixins) {\n    applyMixin(this, mixins);\n    return this;\n  }\n  static detect(obj) {\n    if ('function' !== typeof obj) {\n      return false;\n    }\n    while (obj) {\n      if (obj === this) {\n        return true;\n      }\n      obj = obj.superclass;\n    }\n    return false;\n  }\n  static detectInstance(obj) {\n    return obj instanceof this;\n  }\n\n  /**\n    In some cases, you may want to annotate computed properties with additional\n    metadata about how they function or what values they operate on. For\n    example, computed property functions may close over variables that are then\n    no longer available for introspection.\n     You can pass a hash of these values to a computed property like this:\n     ```javascript\n    import { computed } from '@ember/object';\n     person: computed(function() {\n      let personId = this.get('personId');\n      return Person.create({ id: personId });\n    }).meta({ type: Person })\n    ```\n     Once you've done this, you can retrieve the values saved to the computed\n    property from your class like this:\n     ```javascript\n    MyClass.metaForProperty('person');\n    ```\n     This will return the original hash that was passed to `meta()`.\n     @static\n    @method metaForProperty\n    @param key {String} property name\n    @private\n  */\n  static metaForProperty(key) {\n    let proto = this.proto(); // ensure prototype is initialized\n    let possibleDesc = descriptorForProperty(proto, key);\n    (isDevelopingApp() && !(possibleDesc !== undefined) && assert(`metaForProperty() could not find a computed property with key '${key}'.`, possibleDesc !== undefined));\n    return possibleDesc._meta || {};\n  }\n\n  /**\n    Iterate over each computed property for the class, passing its name\n    and any associated metadata (see `metaForProperty`) to the callback.\n     @static\n    @method eachComputedProperty\n    @param {Function} callback\n    @param {Object} binding\n    @private\n  */\n  static eachComputedProperty(callback, binding = this) {\n    this.proto(); // ensure prototype is initialized\n    let empty = {};\n    meta(this.prototype).forEachDescriptors((name, descriptor) => {\n      if (descriptor.enumerable) {\n        let meta = descriptor._meta || empty;\n        callback.call(binding, name, meta);\n      }\n    });\n  }\n  static get PrototypeMixin() {\n    let prototypeMixin = prototypeMixinMap.get(this);\n    if (prototypeMixin === undefined) {\n      prototypeMixin = Mixin.create();\n      prototypeMixin.ownerConstructor = this;\n      prototypeMixinMap.set(this, prototypeMixin);\n    }\n    return prototypeMixin;\n  }\n  static get superclass() {\n    let c = Object.getPrototypeOf(this);\n    return c !== Function.prototype ? c : undefined;\n  }\n  static proto() {\n    let p = this.prototype;\n    if (!wasApplied.has(p)) {\n      wasApplied.add(p);\n      let parent = this.superclass;\n      if (parent) {\n        parent.proto();\n      }\n\n      // If the prototype mixin exists, apply it. In the case of native classes,\n      // it will not exist (unless the class has been reopened).\n      if (prototypeMixinMap.has(this)) {\n        this.PrototypeMixin.apply(p);\n      }\n    }\n    return p;\n  }\n  static toString() {\n    return `<${getFactoryFor(this) || '(unknown)'}:constructor>`;\n  }\n  static isClass = true;\n  static isMethod = false;\n  static _onLookup;\n  static _lazyInjections;\n}\nfunction flattenProps(...props) {\n  let initProperties = {};\n  for (let properties of props) {\n    (isDevelopingApp() && !(!(properties instanceof Mixin)) && assert('EmberObject.create no longer supports mixing in other ' + 'definitions, use .extend & .create separately instead.', !(properties instanceof Mixin)));\n    let keyNames = Object.keys(properties);\n    for (let j = 0, k = keyNames.length; j < k; j++) {\n      let keyName = keyNames[j];\n      let value = properties[keyName];\n      initProperties[keyName] = value;\n    }\n  }\n  return initProperties;\n}\nif (isDevelopingApp()) {\n  /**\n    Provides lookup-time type validation for injected properties.\n     @private\n    @method _onLookup\n  */\n  CoreObject._onLookup = function injectedPropertyAssertion(debugContainerKey) {\n    let [type] = debugContainerKey.split(':');\n    let proto = this.proto();\n    for (let key in proto) {\n      let desc = descriptorForProperty(proto, key);\n      if (desc && DEBUG_INJECTION_FUNCTIONS.has(desc._getter)) {\n        (isDevelopingApp() && !(type === 'controller' || DEBUG_INJECTION_FUNCTIONS.get(desc._getter).type !== 'controller') && assert(`Defining \\`${key}\\` as an injected controller property on a non-controller (\\`${debugContainerKey}\\`) is not allowed.`, type === 'controller' || DEBUG_INJECTION_FUNCTIONS.get(desc._getter).type !== 'controller'));\n      }\n    }\n  };\n\n  /**\n    Returns a hash of property names and container names that injected\n    properties will lookup on the container lazily.\n     @method _lazyInjections\n    @return {Object} Hash of all lazy injected property keys to container names\n    @private\n  */\n  CoreObject._lazyInjections = function () {\n    let injections = {};\n    let proto = this.proto();\n    let key;\n    let desc;\n    for (key in proto) {\n      desc = descriptorForProperty(proto, key);\n      if (desc && DEBUG_INJECTION_FUNCTIONS.has(desc._getter)) {\n        let {\n          namespace,\n          source,\n          type,\n          name\n        } = DEBUG_INJECTION_FUNCTIONS.get(desc._getter);\n        injections[key] = {\n          namespace,\n          source,\n          specifier: `${type}:${name || key}`\n        };\n      }\n    }\n    return injections;\n  };\n}\n\nexport { CoreObject as default };\n","import '../-internals/meta/lib/meta.js';\nimport '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport '@embroider/macros';\nimport '../debug/index.js';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { v as hasListeners, G as removeListener, k as sendEvent, F as addListener } from '../../shared-chunks/observers-DhgQ6ba5.js';\nexport { N as on } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\nimport Mixin from './mixin.js';\n\n/**\n@module @ember/object/evented\n*/\n\n/**\n  This mixin allows for Ember objects to subscribe to and emit events.\n\n  ```app/utils/person.js\n  import EmberObject from '@ember/object';\n  import Evented from '@ember/object/evented';\n\n  export default class Person extends EmberObject.extend(Evented) {\n    greet() {\n      // ...\n      this.trigger('greet');\n    }\n  }\n  ```\n\n  ```javascript\n  var person = Person.create();\n\n  person.on('greet', function() {\n    console.log('Our person has greeted');\n  });\n\n  person.greet();\n\n  // outputs: 'Our person has greeted'\n  ```\n\n  You can also chain multiple event subscriptions:\n\n  ```javascript\n  person.on('greet', function() {\n    console.log('Our person has greeted');\n  }).one('greet', function() {\n    console.log('Offer one-time special');\n  }).off('event', this, forgetThis);\n  ```\n\n  @class Evented\n  @public\n */\n\nconst Evented = Mixin.create({\n  on(name, target, method) {\n    addListener(this, name, target, method);\n    return this;\n  },\n  one(name, target, method) {\n    addListener(this, name, target, method, true);\n    return this;\n  },\n  trigger(name, ...args) {\n    sendEvent(this, name, args);\n  },\n  off(name, target, method) {\n    removeListener(this, name, target, method);\n    return this;\n  },\n  has(name) {\n    return hasListeners(this, name);\n  }\n});\n\nexport { Evented as default };\n","import '../debug/index.js';\nimport { E as ENV } from '../../shared-chunks/env-DEd6hPbj.js';\nimport { s as setClassicDecorator, i as isElementDescriptor, e as expandProperties } from '../../shared-chunks/observers-DhgQ6ba5.js';\nexport { c as computed, d as defineProperty, g as get, n as notifyPropertyChange } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../-internals/meta/lib/meta.js';\nimport '../../@glimmer/validator/index.js';\nimport { e as setObservers } from '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nexport { s as set, t as trySet } from '../../shared-chunks/property_set-DrZnfGQ7.js';\nexport { g as getProperties, s as setProperties } from '../../shared-chunks/set_properties-Dag9Xz6u.js';\nimport { g as getFactoryFor } from '../../shared-chunks/registry-XY5cfmbH.js';\nimport CoreObject from './core.js';\nimport Observable from './observable.js';\nimport { assert } from '../debug/lib/assert.js';\n\n/**\n@module @ember/object\n*/\n\n/**\n  `EmberObject` is the main base class for all Ember objects. It is a subclass\n  of `CoreObject` with the `Observable` mixin applied. For details,\n  see the documentation for each of these.\n\n  @class EmberObject\n  @extends CoreObject\n  @uses Observable\n  @public\n*/\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\n\nclass EmberObject extends CoreObject.extend(Observable) {\n  get _debugContainerKey() {\n    let factory = getFactoryFor(this);\n    return factory !== undefined && factory.fullName;\n  }\n}\n\n/**\n  Decorator that turns the target function into an Action which can be accessed\n  directly by reference.\n\n  ```js\n  import Component from '@ember/component';\n  import { tracked } from '@glimmer/tracking';\n  import { action } from '@ember/object';\n\n  export default class Tooltip extends Component {\n    @tracked isShowing = false;\n\n    @action\n    toggleShowing() {\n      this.isShowing = !this.isShowing;\n    }\n  }\n  ```\n  ```hbs\n  <!-- template.hbs -->\n  <button {{on \"click\" this.toggleShowing}}>Show tooltip</button>\n\n  {{#if isShowing}}\n    <div class=\"tooltip\">\n      I'm a tooltip!\n    </div>\n  {{/if}}\n  ```\n\n  It also binds the function directly to the instance, so it can be used in any\n  context and will correctly refer to the class it came from:\n\n  ```js\n  import Component from '@ember/component';\n  import { tracked } from '@glimmer/tracking';\n  import { action } from '@ember/object';\n\n  export default class Tooltip extends Component {\n    constructor() {\n      super(...arguments);\n\n      // this.toggleShowing is still bound correctly when added to\n      // the event listener\n      document.addEventListener('click', this.toggleShowing);\n    }\n\n    @tracked isShowing = false;\n\n    @action\n    toggleShowing() {\n      this.isShowing = !this.isShowing;\n    }\n  }\n  ```\n\n  @public\n  @method action\n  @for @ember/object\n  @static\n  @param {Function|undefined} callback The function to turn into an action,\n                                       when used in classic classes\n  @return {PropertyDecorator} property decorator instance\n*/\n\nconst BINDINGS_MAP = new WeakMap();\nfunction hasProto(obj) {\n  return obj != null && obj.constructor !== undefined && typeof obj.constructor.proto === 'function';\n}\nfunction setupAction(target, key, actionFn) {\n  if (hasProto(target)) {\n    target.constructor.proto();\n  }\n  if (!Object.prototype.hasOwnProperty.call(target, 'actions')) {\n    let parentActions = target.actions;\n    // we need to assign because of the way mixins copy actions down when inheriting\n    target.actions = parentActions ? Object.assign({}, parentActions) : {};\n  }\n  (isDevelopingApp() && !(target.actions != null) && assert(\"[BUG] Somehow the target doesn't have actions!\", target.actions != null));\n  target.actions[key] = actionFn;\n  return {\n    get() {\n      let bindings = BINDINGS_MAP.get(this);\n      if (bindings === undefined) {\n        bindings = new Map();\n        BINDINGS_MAP.set(this, bindings);\n      }\n      let fn = bindings.get(actionFn);\n      if (fn === undefined) {\n        fn = actionFn.bind(this);\n        bindings.set(actionFn, fn);\n      }\n      return fn;\n    }\n  };\n}\nfunction action(...args) {\n  let actionFn;\n  if (!isElementDescriptor(args)) {\n    actionFn = args[0];\n    let decorator = function (target, key, _desc, _meta, isClassicDecorator) {\n      (isDevelopingApp() && !(isClassicDecorator) && assert('The @action decorator may only be passed a method when used in classic classes. You should decorate methods directly in native classes', isClassicDecorator));\n      (isDevelopingApp() && !(typeof actionFn === 'function') && assert('The action() decorator must be passed a method when used in classic classes', typeof actionFn === 'function'));\n      return setupAction(target, key, actionFn);\n    };\n    setClassicDecorator(decorator);\n    return decorator;\n  }\n  let [target, key, desc] = args;\n  actionFn = desc?.value;\n  (isDevelopingApp() && !(typeof actionFn === 'function') && assert('The @action decorator must be applied to methods when used in native classes', typeof actionFn === 'function')); // SAFETY: TS types are weird with decorators. This should work.\n  return setupAction(target, key, actionFn);\n}\n\n// SAFETY: TS types are weird with decorators. This should work.\nsetClassicDecorator(action);\n\n// ..........................................................\n// OBSERVER HELPER\n//\n\n/**\n  Specify a method that observes property changes.\n\n  ```javascript\n  import EmberObject from '@ember/object';\n  import { observer } from '@ember/object';\n\n  export default EmberObject.extend({\n    valueObserver: observer('value', function() {\n      // Executes whenever the \"value\" property changes\n    })\n  });\n  ```\n\n  Also available as `Function.prototype.observes` if prototype extensions are\n  enabled.\n\n  @method observer\n  @for @ember/object\n  @param {String} propertyNames*\n  @param {Function} func\n  @return func\n  @public\n  @static\n*/\nfunction observer(...args) {\n  let funcOrDef = args.pop();\n  (isDevelopingApp() && !(typeof funcOrDef === 'function' || typeof funcOrDef === 'object' && funcOrDef !== null) && assert('observer must be provided a function or an observer definition', typeof funcOrDef === 'function' || typeof funcOrDef === 'object' && funcOrDef !== null));\n  let func;\n  let dependentKeys;\n  let sync;\n  if (typeof funcOrDef === 'function') {\n    func = funcOrDef;\n    dependentKeys = args;\n    sync = !ENV._DEFAULT_ASYNC_OBSERVERS;\n  } else {\n    func = funcOrDef.fn;\n    dependentKeys = funcOrDef.dependentKeys;\n    sync = funcOrDef.sync;\n  }\n  (isDevelopingApp() && !(typeof func === 'function') && assert('observer called without a function', typeof func === 'function'));\n  (isDevelopingApp() && !(Array.isArray(dependentKeys) && dependentKeys.length > 0 && dependentKeys.every(p => typeof p === 'string' && Boolean(p.length))) && assert('observer called without valid path', Array.isArray(dependentKeys) && dependentKeys.length > 0 && dependentKeys.every(p => typeof p === 'string' && Boolean(p.length))));\n  (isDevelopingApp() && !(typeof sync === 'boolean') && assert('observer called without sync', typeof sync === 'boolean'));\n  let paths = [];\n  for (let dependentKey of dependentKeys) {\n    expandProperties(dependentKey, path => paths.push(path));\n  }\n  setObservers(func, {\n    paths,\n    sync\n  });\n  return func;\n}\n\nexport { action, EmberObject as default, observer };\n","import { i as isElementDescriptor, c as computed, g as get, e as expandProperties } from '../../../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../../-internals/meta/lib/meta.js';\nimport { a as alias } from '../../../../shared-chunks/alias-BEMS3qgG.js';\nimport { deprecate } from '../../../debug/index.js';\nimport { s as set } from '../../../../shared-chunks/property_set-DrZnfGQ7.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport '../../../../@glimmer/destroyable/index.js';\nimport '../../../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../../../@glimmer/global-context/index.js';\nimport '../../../../@glimmer/validator/index.js';\nimport '../../../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../../../shared-chunks/capabilities-DHiXCCuB.js';\nimport '../../../../shared-chunks/env-DEd6hPbj.js';\nimport '../../index.js';\nimport isNone from '../../../utils/lib/is_none.js';\nimport isEmpty from '../../../utils/lib/is_empty.js';\nimport '../../core.js';\nimport '../../../-internals/runtime/lib/mixins/registry_proxy.js';\nimport '../../../-internals/runtime/lib/mixins/container_proxy.js';\nimport '../../../-internals/runtime/lib/mixins/comparable.js';\nimport '../../../-internals/runtime/lib/mixins/action_handler.js';\nimport '../../../-internals/runtime/lib/mixins/-proxy.js';\nimport '../../../enumerable/mutable.js';\nimport '../../../-internals/runtime/lib/mixins/target_action_support.js';\nimport '../../../-internals/runtime/lib/ext/rsvp.js';\nimport { assert } from '../../../debug/lib/assert.js';\n\nfunction expandPropertiesToArray(predicateName, properties) {\n  let expandedProperties = [];\n  function extractProperty(entry) {\n    expandedProperties.push(entry);\n  }\n  for (let property of properties) {\n    (isDevelopingApp() && !(property.indexOf(' ') < 0) && assert(`Dependent keys passed to \\`${predicateName}\\` computed macro can't have spaces.`, property.indexOf(' ') < 0));\n    expandProperties(property, extractProperty);\n  }\n  return expandedProperties;\n}\nfunction generateComputedWithPredicate(name, predicate) {\n  return (dependentKey, ...additionalDependentKeys) => {\n    let properties = [dependentKey, ...additionalDependentKeys];\n    (isDevelopingApp() && !(!isElementDescriptor(properties)) && assert(`You attempted to use @${name} as a decorator directly, but it requires at least one dependent key parameter`, !isElementDescriptor(properties)));\n    let dependentKeys = expandPropertiesToArray(name, properties);\n    let computedFunc = computed(...dependentKeys, function () {\n      let lastIdx = dependentKeys.length - 1;\n      for (let i = 0; i < lastIdx; i++) {\n        // SAFETY: `i` is derived from the length of `dependentKeys`\n        let value = get(this, dependentKeys[i]);\n        if (!predicate(value)) {\n          return value;\n        }\n      }\n\n      // SAFETY: `lastIdx` is derived from the length of `dependentKeys`\n      return get(this, dependentKeys[lastIdx]);\n    });\n    return computedFunc;\n  };\n}\n\n/**\n  A computed property macro that returns true if the value of the dependent\n  property is null, an empty string, empty array, or empty function.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { empty } from '@ember/object/computed';\n\n  class ToDoList {\n    constructor(todos) {\n      set(this, 'todos', todos);\n    }\n\n    @empty('todos') isDone;\n  }\n\n  let todoList = new ToDoList(\n    ['Unit Test', 'Documentation', 'Release']\n  );\n\n  todoList.isDone; // false\n  set(todoList, 'todos', []);\n  todoList.isDone; // true\n  ```\n\n  @since 1.6.0\n  @method empty\n  @static\n  @for @ember/object/computed\n  @param {String} dependentKey\n  @return {ComputedProperty} computed property which returns true if the value\n  of the dependent property is null, an empty string, empty array, or empty\n  function and false if the underlying value is not empty.\n\n  @public\n*/\nfunction empty(dependentKey) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @empty as a decorator directly, but it requires a `dependentKey` parameter', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  return computed(`${dependentKey}.length`, function () {\n    return isEmpty(get(this, dependentKey));\n  });\n}\n\n/**\n  A computed property that returns true if the value of the dependent property\n  is NOT null, an empty string, empty array, or empty function.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { notEmpty } from '@ember/object/computed';\n\n  class Hamster {\n    constructor(backpack) {\n      set(this, 'backpack', backpack);\n    }\n\n    @notEmpty('backpack') hasStuff\n  }\n\n  let hamster = new Hamster(\n    ['Food', 'Sleeping Bag', 'Tent']\n  );\n\n  hamster.hasStuff; // true\n  set(hamster, 'backpack', []);\n  hamster.hasStuff; // false\n  ```\n\n  @method notEmpty\n  @static\n  @for @ember/object/computed\n  @param {String} dependentKey\n  @return {ComputedProperty} computed property which returns true if original\n  value for property is not empty.\n  @public\n*/\nfunction notEmpty(dependentKey) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @notEmpty as a decorator directly, but it requires a `dependentKey` parameter', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  return computed(`${dependentKey}.length`, function () {\n    return !isEmpty(get(this, dependentKey));\n  });\n}\n\n/**\n  A computed property that returns true if the value of the dependent property\n  is null or undefined. This avoids errors from JSLint complaining about use of\n  ==, which can be technically confusing.\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { none } from '@ember/object/computed';\n\n  class Hamster {\n    @none('food') isHungry;\n  }\n\n  let hamster = new Hamster();\n\n  hamster.isHungry; // true\n\n  set(hamster, 'food', 'Banana');\n  hamster.isHungry; // false\n\n  set(hamster, 'food', null);\n  hamster.isHungry; // true\n  ```\n\n  @method none\n  @static\n  @for @ember/object/computed\n  @param {String} dependentKey\n  @return {ComputedProperty} computed property which returns true if original\n  value for property is null or undefined.\n  @public\n*/\nfunction none(dependentKey) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @none as a decorator directly, but it requires a `dependentKey` parameter', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  return computed(dependentKey, function () {\n    return isNone(get(this, dependentKey));\n  });\n}\n\n/**\n  A computed property that returns the inverse boolean value of the original\n  value for the dependent property.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { not } from '@ember/object/computed';\n\n  class User {\n    loggedIn = false;\n\n    @not('loggedIn') isAnonymous;\n  }\n\n  let user = new User();\n\n  user.isAnonymous; // true\n  set(user, 'loggedIn', true);\n  user.isAnonymous; // false\n  ```\n\n  @method not\n  @static\n  @for @ember/object/computed\n  @param {String} dependentKey\n  @return {ComputedProperty} computed property which returns inverse of the\n  original value for property\n  @public\n*/\nfunction not(dependentKey) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @not as a decorator directly, but it requires a `dependentKey` parameter', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  return computed(dependentKey, function () {\n    return !get(this, dependentKey);\n  });\n}\n\n/**\n  A computed property that converts the provided dependent property into a\n  boolean value.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { bool } from '@ember/object/computed';\n\n\n  class Hamster {\n    @bool('numBananas') hasBananas\n  }\n\n  let hamster = new Hamster();\n\n  hamster.hasBananas; // false\n\n  set(hamster, 'numBananas', 0);\n  hamster.hasBananas; // false\n\n  set(hamster, 'numBananas', 1);\n  hamster.hasBananas; // true\n\n  set(hamster, 'numBananas', null);\n  hamster.hasBananas; // false\n  ```\n\n  @method bool\n  @static\n  @for @ember/object/computed\n  @param {String} dependentKey\n  @return {ComputedProperty} computed property which converts to boolean the\n  original value for property\n  @public\n*/\nfunction bool(dependentKey) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @bool as a decorator directly, but it requires a `dependentKey` parameter', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  return computed(dependentKey, function () {\n    return Boolean(get(this, dependentKey));\n  });\n}\n\n/**\n  A computed property which matches the original value for the dependent\n  property against a given RegExp, returning `true` if the value matches the\n  RegExp and `false` if it does not.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { match } from '@ember/object/computed';\n\n  class User {\n    @match('email', /^.+@.+\\..+$/) hasValidEmail;\n  }\n\n  let user = new User();\n\n  user.hasValidEmail; // false\n\n  set(user, 'email', '');\n  user.hasValidEmail; // false\n\n  set(user, 'email', 'ember_hamster@example.com');\n  user.hasValidEmail; // true\n  ```\n\n  @method match\n  @static\n  @for @ember/object/computed\n  @param {String} dependentKey\n  @param {RegExp} regexp\n  @return {ComputedProperty} computed property which match the original value\n  for property against a given RegExp\n  @public\n*/\nfunction match(dependentKey, regexp) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @match as a decorator directly, but it requires `dependentKey` and `regexp` parameters', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  return computed(dependentKey, function () {\n    let value = get(this, dependentKey);\n    return regexp.test(value);\n  });\n}\n\n/**\n  A computed property that returns true if the provided dependent property is\n  equal to the given value.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { equal } from '@ember/object/computed';\n\n  class Hamster {\n    @equal('percentCarrotsEaten', 100) satisfied;\n  }\n\n  let hamster = new Hamster();\n\n  hamster.satisfied; // false\n\n  set(hamster, 'percentCarrotsEaten', 100);\n  hamster.satisfied; // true\n\n  set(hamster, 'percentCarrotsEaten', 50);\n  hamster.satisfied; // false\n  ```\n\n  @method equal\n  @static\n  @for @ember/object/computed\n  @param {String} dependentKey\n  @param {String|Number|Object} value\n  @return {ComputedProperty} computed property which returns true if the\n  original value for property is equal to the given value.\n  @public\n*/\nfunction equal(dependentKey, value) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @equal as a decorator directly, but it requires `dependentKey` and `value` parameter', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  return computed(dependentKey, function () {\n    return get(this, dependentKey) === value;\n  });\n}\n\n/**\n  A computed property that returns true if the provided dependent property is\n  greater than the provided value.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { gt } from '@ember/object/computed';\n\n  class Hamster {\n    @gt('numBananas', 10) hasTooManyBananas;\n  }\n\n  let hamster = new Hamster();\n\n  hamster.hasTooManyBananas; // false\n\n  set(hamster, 'numBananas', 3);\n  hamster.hasTooManyBananas; // false\n\n  set(hamster, 'numBananas', 11);\n  hamster.hasTooManyBananas; // true\n  ```\n\n  @method gt\n  @static\n  @for @ember/object/computed\n  @param {String} dependentKey\n  @param {Number} value\n  @return {ComputedProperty} computed property which returns true if the\n  original value for property is greater than given value.\n  @public\n*/\nfunction gt(dependentKey, value) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @gt as a decorator directly, but it requires `dependentKey` and `value` parameters', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  return computed(dependentKey, function () {\n    return get(this, dependentKey) > value;\n  });\n}\n\n/**\n  A computed property that returns true if the provided dependent property is\n  greater than or equal to the provided value.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { gte } from '@ember/object/computed';\n\n  class Hamster {\n    @gte('numBananas', 10) hasTooManyBananas;\n  }\n\n  let hamster = new Hamster();\n\n  hamster.hasTooManyBananas; // false\n\n  set(hamster, 'numBananas', 3);\n  hamster.hasTooManyBananas; // false\n\n  set(hamster, 'numBananas', 10);\n  hamster.hasTooManyBananas; // true\n  ```\n\n  @method gte\n  @static\n  @for @ember/object/computed\n  @param {String} dependentKey\n  @param {Number} value\n  @return {ComputedProperty} computed property which returns true if the\n  original value for property is greater or equal then given value.\n  @public\n*/\nfunction gte(dependentKey, value) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @gte as a decorator directly, but it requires `dependentKey` and `value` parameters', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  return computed(dependentKey, function () {\n    return get(this, dependentKey) >= value;\n  });\n}\n\n/**\n  A computed property that returns true if the provided dependent property is\n  less than the provided value.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { lt } from '@ember/object/computed';\n\n  class Hamster {\n    @lt('numBananas', 3) needsMoreBananas;\n  }\n\n  let hamster = new Hamster();\n\n  hamster.needsMoreBananas; // true\n\n  set(hamster, 'numBananas', 3);\n  hamster.needsMoreBananas; // false\n\n  set(hamster, 'numBananas', 2);\n  hamster.needsMoreBananas; // true\n  ```\n\n  @method lt\n  @static\n  @for @ember/object/computed\n  @param {String} dependentKey\n  @param {Number} value\n  @return {ComputedProperty} computed property which returns true if the\n  original value for property is less then given value.\n  @public\n*/\nfunction lt(dependentKey, value) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @lt as a decorator directly, but it requires `dependentKey` and `value` parameters', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  return computed(dependentKey, function () {\n    return get(this, dependentKey) < value;\n  });\n}\n\n/**\n  A computed property that returns true if the provided dependent property is\n  less than or equal to the provided value.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { lte } from '@ember/object/computed';\n\n  class Hamster {\n    @lte('numBananas', 3) needsMoreBananas;\n  }\n\n  let hamster = new Hamster();\n\n  hamster.needsMoreBananas; // true\n\n  set(hamster, 'numBananas', 5);\n  hamster.needsMoreBananas; // false\n\n  set(hamster, 'numBananas', 3);\n  hamster.needsMoreBananas; // true\n  ```\n\n  @method lte\n  @static\n  @for @ember/object/computed\n  @param {String} dependentKey\n  @param {Number} value\n  @return {ComputedProperty} computed property which returns true if the\n  original value for property is less or equal than given value.\n  @public\n*/\nfunction lte(dependentKey, value) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @lte as a decorator directly, but it requires `dependentKey` and `value` parameters', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  return computed(dependentKey, function () {\n    return get(this, dependentKey) <= value;\n  });\n}\n\n/**\n  A computed property that performs a logical `and` on the original values for\n  the provided dependent properties.\n\n  You may pass in more than two properties and even use property brace\n  expansion.  The computed property will return the first falsy value or last\n  truthy value just like JavaScript's `&&` operator.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { and } from '@ember/object/computed';\n\n  class Hamster {\n    @and('hasTent', 'hasBackpack') readyForCamp;\n    @and('hasWalkingStick', 'hasBackpack') readyForHike;\n  }\n\n  let tomster = new Hamster();\n\n  tomster.readyForCamp; // false\n\n  set(tomster, 'hasTent', true);\n  tomster.readyForCamp; // false\n\n  set(tomster, 'hasBackpack', true);\n  tomster.readyForCamp; // true\n\n  set(tomster, 'hasBackpack', 'Yes');\n  tomster.readyForCamp; // 'Yes'\n\n  set(tomster, 'hasWalkingStick', null);\n  tomster.readyForHike; // null\n  ```\n\n  @method and\n  @static\n  @for @ember/object/computed\n  @param {String} dependentKey*\n  @return {ComputedProperty} computed property which performs a logical `and` on\n  the values of all the original values for properties.\n  @public\n*/\nconst and = generateComputedWithPredicate('and', value => value);\n\n/**\n  A computed property which performs a logical `or` on the original values for\n  the provided dependent properties.\n\n  You may pass in more than two properties and even use property brace\n  expansion.  The computed property will return the first truthy value or last\n  falsy value just like JavaScript's `||` operator.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { or } from '@ember/object/computed';\n\n  class Hamster {\n    @or('hasJacket', 'hasUmbrella') readyForRain;\n    @or('hasSunscreen', 'hasUmbrella') readyForBeach;\n  }\n\n  let tomster = new Hamster();\n\n  tomster.readyForRain; // undefined\n\n  set(tomster, 'hasUmbrella', true);\n  tomster.readyForRain; // true\n\n  set(tomster, 'hasJacket', 'Yes');\n  tomster.readyForRain; // 'Yes'\n\n  set(tomster, 'hasSunscreen', 'Check');\n  tomster.readyForBeach; // 'Check'\n  ```\n\n  @method or\n  @static\n  @for @ember/object/computed\n  @param {String} dependentKey*\n  @return {ComputedProperty} computed property which performs a logical `or` on\n  the values of all the original values for properties.\n  @public\n*/\nconst or = generateComputedWithPredicate('or', value => !value);\n\n/**\n  Creates a new property that is an alias for another property on an object.\n  Calls to `get` or `set` this property behave as though they were called on the\n  original property.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { alias } from '@ember/object/computed';\n\n  class Person {\n    name = 'Alex Matchneer';\n\n    @alias('name') nomen;\n  }\n\n  let alex = new Person();\n\n  alex.nomen; // 'Alex Matchneer'\n  alex.name;  // 'Alex Matchneer'\n\n  set(alex, 'nomen', '@machty');\n  alex.name;  // '@machty'\n  ```\n\n  @method alias\n  @static\n  @for @ember/object/computed\n  @param {String} dependentKey\n  @return {ComputedProperty} computed property which creates an alias to the\n  original value for property.\n  @public\n*/\n\n/**\n  Where the `alias` computed macro aliases `get` and `set`, and allows for\n  bidirectional data flow, the `oneWay` computed macro only provides an aliased\n  `get`. The `set` will not mutate the upstream property, rather causes the\n  current property to become the value set. This causes the downstream property\n  to permanently diverge from the upstream property.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { oneWay }from '@ember/object/computed';\n\n  class User {\n    constructor(firstName, lastName) {\n      set(this, 'firstName', firstName);\n      set(this, 'lastName', lastName);\n    }\n\n    @oneWay('firstName') nickName;\n  }\n\n  let teddy = new User('Teddy', 'Zeenny');\n\n  teddy.nickName; // 'Teddy'\n\n  set(teddy, 'nickName', 'TeddyBear');\n  teddy.firstName; // 'Teddy'\n  teddy.nickName; // 'TeddyBear'\n  ```\n\n  @method oneWay\n  @static\n  @for @ember/object/computed\n  @param {String} dependentKey\n  @return {ComputedProperty} computed property which creates a one way computed\n  property to the original value for property.\n  @public\n*/\nfunction oneWay(dependentKey) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @oneWay as a decorator directly, but it requires a `dependentKey` parameter', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  return alias(dependentKey).oneWay();\n}\n\n/**\n  This is a more semantically meaningful alias of the `oneWay` computed macro,\n  whose name is somewhat ambiguous as to which direction the data flows.\n\n  @method reads\n  @static\n  @for @ember/object/computed\n  @param {String} dependentKey\n  @return {ComputedProperty} computed property which creates a one way computed\n    property to the original value for property.\n  @public\n */\n\n/**\n  Where `oneWay` computed macro provides oneWay bindings, the `readOnly`\n  computed macro provides a readOnly one way binding. Very often when using\n  the `oneWay` macro one does not also want changes to propagate back up, as\n  they will replace the value.\n\n  This prevents the reverse flow, and also throws an exception when it occurs.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { readOnly } from '@ember/object/computed';\n\n  class User {\n    constructor(firstName, lastName) {\n      set(this, 'firstName', firstName);\n      set(this, 'lastName', lastName);\n    }\n\n    @readOnly('firstName') nickName;\n  });\n\n  let teddy = new User('Teddy', 'Zeenny');\n\n  teddy.nickName; // 'Teddy'\n\n  set(teddy, 'nickName', 'TeddyBear'); // throws Exception\n  // throw new EmberError('Cannot Set: nickName on: <User:ember27288>' );`\n\n  teddy.firstName; // 'Teddy'\n  ```\n\n  @method readOnly\n  @static\n  @for @ember/object/computed\n  @param {String} dependentKey\n  @return {ComputedProperty} computed property which creates a one way computed\n  property to the original value for property.\n  @since 1.5.0\n  @public\n*/\nfunction readOnly(dependentKey) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @readOnly as a decorator directly, but it requires a `dependentKey` parameter', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  return alias(dependentKey).readOnly();\n}\n\n/**\n  Creates a new property that is an alias for another property on an object.\n  Calls to `get` or `set` this property behave as though they were called on the\n  original property, but also print a deprecation warning.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { deprecatingAlias } from '@ember/object/computed';\n\n  class Hamster {\n    @deprecatingAlias('cavendishCount', {\n      id: 'hamster.deprecate-banana',\n      until: '3.0.0'\n    })\n    bananaCount;\n  }\n\n  let hamster = new Hamster();\n\n  set(hamster, 'bananaCount', 5); // Prints a deprecation warning.\n  hamster.cavendishCount; // 5\n  ```\n\n  @method deprecatingAlias\n  @static\n  @for @ember/object/computed\n  @param {String} dependentKey\n  @param {Object} options Options for `deprecate`.\n  @return {ComputedProperty} computed property which creates an alias with a\n  deprecation to the original value for property.\n  @since 1.7.0\n  @public\n*/\nfunction deprecatingAlias(dependentKey, options) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @deprecatingAlias as a decorator directly, but it requires `dependentKey` and `options` parameters', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  return computed(dependentKey, {\n    get(key) {\n      (isDevelopingApp() && true && deprecate(`Usage of \\`${key}\\` is deprecated, use \\`${dependentKey}\\` instead.`, false, options));\n      return get(this, dependentKey);\n    },\n    set(key, value) {\n      (isDevelopingApp() && true && deprecate(`Usage of \\`${key}\\` is deprecated, use \\`${dependentKey}\\` instead.`, false, options));\n      set(this, dependentKey, value);\n      return value;\n    }\n  });\n}\n\nexport { and, bool, deprecatingAlias, empty, equal, gt, gte, lt, lte, match, none, not, notEmpty, oneWay, or, readOnly };\n","import '../../../debug/index.js';\nimport { i as isElementDescriptor, g as get, c as computed, R as autoComputed } from '../../../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../../-internals/meta/lib/meta.js';\nimport '../../../../@glimmer/validator/index.js';\nimport '../../../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../../../@glimmer/destroyable/index.js';\nimport '../../../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../../../@glimmer/global-context/index.js';\nimport '../../../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../../../shared-chunks/capabilities-DHiXCCuB.js';\nimport '../../../../shared-chunks/env-DEd6hPbj.js';\nimport '../../index.js';\nimport '../../core.js';\nimport compare from '../../../utils/lib/compare.js';\nimport EmberArray, { A, uniqBy as uniqBy$1 } from '../../../array/index.js';\nimport { assert } from '../../../debug/lib/assert.js';\n\n/**\n@module @ember/object\n*/\n\nfunction isNativeOrEmberArray(obj) {\n  return Array.isArray(obj) || EmberArray.detect(obj);\n}\nfunction reduceMacro(dependentKey, callback, initialValue, name) {\n  (isDevelopingApp() && !(!/[[\\]{}]/g.test(dependentKey)) && assert(`Dependent key passed to \\`${name}\\` computed macro shouldn't contain brace expanding pattern.`, !/[[\\]{}]/g.test(dependentKey)));\n  return computed(`${dependentKey}.[]`, function () {\n    let arr = get(this, dependentKey);\n    if (arr === null || typeof arr !== 'object') {\n      return initialValue;\n    }\n    return arr.reduce(callback, initialValue, this);\n  }).readOnly();\n}\nfunction arrayMacro(dependentKey, additionalDependentKeys, callback) {\n  // This is a bit ugly\n  let propertyName;\n  if (/@each/.test(dependentKey)) {\n    propertyName = dependentKey.replace(/\\.@each.*$/, '');\n  } else {\n    propertyName = dependentKey;\n    dependentKey += '.[]';\n  }\n  return computed(dependentKey, ...additionalDependentKeys, function () {\n    let value = get(this, propertyName);\n    if (isNativeOrEmberArray(value)) {\n      return A(callback.call(this, value));\n    } else {\n      return A();\n    }\n  }).readOnly();\n}\nfunction multiArrayMacro(_dependentKeys, callback, name) {\n  (isDevelopingApp() && !(_dependentKeys.every(dependentKey => !/[[\\]{}]/g.test(dependentKey))) && assert(`Dependent keys passed to \\`${name}\\` computed macro shouldn't contain brace expanding pattern.`, _dependentKeys.every(dependentKey => !/[[\\]{}]/g.test(dependentKey))));\n  let dependentKeys = _dependentKeys.map(key => `${key}.[]`);\n  return computed(...dependentKeys, function () {\n    return A(callback.call(this, _dependentKeys));\n  }).readOnly();\n}\n\n/**\n  A computed property that returns the sum of the values in the dependent array.\n\n  Example:\n\n  ```javascript\n  import { sum } from '@ember/object/computed';\n\n  class Invoice {\n    lineItems = [1.00, 2.50, 9.99];\n\n    @sum('lineItems') total;\n  }\n\n  let invoice = new Invoice();\n\n  invoice.total; // 13.49\n  ```\n\n  @method sum\n  @for @ember/object/computed\n  @static\n  @param {String} dependentKey\n  @return {ComputedProperty} computes the sum of all values in the\n  dependentKey's array\n  @since 1.4.0\n  @public\n*/\nfunction sum(dependentKey) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @sum as a decorator directly, but it requires a `dependentKey` parameter', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  return reduceMacro(dependentKey, (sum, item) => sum + item, 0, 'sum');\n}\n\n/**\n  A computed property that calculates the maximum value in the dependent array.\n  This will return `-Infinity` when the dependent array is empty.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { mapBy, max } from '@ember/object/computed';\n\n  class Person {\n    children = [];\n\n    @mapBy('children', 'age') childAges;\n    @max('childAges') maxChildAge;\n  }\n\n  let lordByron = new Person();\n\n  lordByron.maxChildAge; // -Infinity\n\n  set(lordByron, 'children', [\n    {\n      name: 'Augusta Ada Byron',\n      age: 7\n    }\n  ]);\n  lordByron.maxChildAge; // 7\n\n  set(lordByron, 'children', [\n    ...lordByron.children,\n    {\n      name: 'Allegra Byron',\n      age: 5\n    }, {\n      name: 'Elizabeth Medora Leigh',\n      age: 8\n    }\n  ]);\n  lordByron.maxChildAge; // 8\n  ```\n\n  If the types of the arguments are not numbers, they will be converted to\n  numbers and the type of the return value will always be `Number`. For example,\n  the max of a list of Date objects will be the highest timestamp as a `Number`.\n  This behavior is consistent with `Math.max`.\n\n  @method max\n  @for @ember/object/computed\n  @static\n  @param {String} dependentKey\n  @return {ComputedProperty} computes the largest value in the dependentKey's\n  array\n  @public\n*/\nfunction max(dependentKey) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @max as a decorator directly, but it requires a `dependentKey` parameter', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  return reduceMacro(dependentKey, (max, item) => Math.max(max, item), -Infinity, 'max');\n}\n\n/**\n  A computed property that calculates the minimum value in the dependent array.\n  This will return `Infinity` when the dependent array is empty.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { mapBy, min } from '@ember/object/computed';\n\n  class Person {\n    children = [];\n\n    @mapBy('children', 'age') childAges;\n    @min('childAges') minChildAge;\n  }\n\n  let lordByron = Person.create({ children: [] });\n\n  lordByron.minChildAge; // Infinity\n\n  set(lordByron, 'children', [\n    {\n      name: 'Augusta Ada Byron',\n      age: 7\n    }\n  ]);\n  lordByron.minChildAge; // 7\n\n  set(lordByron, 'children', [\n    ...lordByron.children,\n    {\n      name: 'Allegra Byron',\n      age: 5\n    }, {\n      name: 'Elizabeth Medora Leigh',\n      age: 8\n    }\n  ]);\n  lordByron.minChildAge; // 5\n  ```\n\n  If the types of the arguments are not numbers, they will be converted to\n  numbers and the type of the return value will always be `Number`. For example,\n  the min of a list of Date objects will be the lowest timestamp as a `Number`.\n  This behavior is consistent with `Math.min`.\n\n  @method min\n  @for @ember/object/computed\n  @static\n  @param {String} dependentKey\n  @return {ComputedProperty} computes the smallest value in the dependentKey's array\n  @public\n*/\nfunction min(dependentKey) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @min as a decorator directly, but it requires a `dependentKey` parameter', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  return reduceMacro(dependentKey, (min, item) => Math.min(min, item), Infinity, 'min');\n}\n\n/**\n  Returns an array mapped via the callback\n\n  The callback method you provide should have the following signature:\n  - `item` is the current item in the iteration.\n  - `index` is the integer index of the current item in the iteration.\n\n  ```javascript\n  function mapCallback(item, index);\n  ```\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { map } from '@ember/object/computed';\n\n  class Hamster {\n    constructor(chores) {\n      set(this, 'chores', chores);\n    }\n\n    @map('chores', function(chore, index) {\n      return `${chore.toUpperCase()}!`;\n    })\n    excitingChores;\n  });\n\n  let hamster = new Hamster(['clean', 'write more unit tests']);\n\n  hamster.excitingChores; // ['CLEAN!', 'WRITE MORE UNIT TESTS!']\n  ```\n\n  You can optionally pass an array of additional dependent keys as the second\n  parameter to the macro, if your map function relies on any external values:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { map } from '@ember/object/computed';\n\n  class Hamster {\n    shouldUpperCase = false;\n\n    constructor(chores) {\n      set(this, 'chores', chores);\n    }\n\n    @map('chores', ['shouldUpperCase'], function(chore, index) {\n      if (this.shouldUpperCase) {\n        return `${chore.toUpperCase()}!`;\n      } else {\n        return `${chore}!`;\n      }\n    })\n    excitingChores;\n  }\n\n  let hamster = new Hamster(['clean', 'write more unit tests']);\n\n  hamster.excitingChores; // ['clean!', 'write more unit tests!']\n\n  set(hamster, 'shouldUpperCase', true);\n  hamster.excitingChores; // ['CLEAN!', 'WRITE MORE UNIT TESTS!']\n  ```\n\n  @method map\n  @for @ember/object/computed\n  @static\n  @param {String} dependentKey\n  @param {Array} [additionalDependentKeys] optional array of additional\n  dependent keys\n  @param {Function} callback\n  @return {ComputedProperty} an array mapped via the callback\n  @public\n*/\n\nfunction map(dependentKey, additionalDependentKeysOrCallback, callback) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @map as a decorator directly, but it requires atleast `dependentKey` and `callback` parameters', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  (isDevelopingApp() && !(typeof callback === 'function' || callback === undefined && typeof additionalDependentKeysOrCallback === 'function') && assert('The final parameter provided to map must be a callback function', typeof callback === 'function' || callback === undefined && typeof additionalDependentKeysOrCallback === 'function'));\n  (isDevelopingApp() && !(Array.isArray(additionalDependentKeysOrCallback) || typeof additionalDependentKeysOrCallback === 'function') && assert('The second parameter provided to map must either be the callback or an array of additional dependent keys', Array.isArray(additionalDependentKeysOrCallback) || typeof additionalDependentKeysOrCallback === 'function'));\n  let additionalDependentKeys;\n  if (typeof additionalDependentKeysOrCallback === 'function') {\n    callback = additionalDependentKeysOrCallback;\n    additionalDependentKeys = [];\n  } else {\n    additionalDependentKeys = additionalDependentKeysOrCallback;\n  }\n  const cCallback = callback;\n  (isDevelopingApp() && !(cCallback) && assert('[BUG] Missing callback', cCallback));\n  return arrayMacro(dependentKey, additionalDependentKeys, function (value) {\n    // This is so dumb...\n    return Array.isArray(value) ? value.map(cCallback, this) : value.map(cCallback, this);\n  });\n}\n\n/**\n  Returns an array mapped to the specified key.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { mapBy } from '@ember/object/computed';\n\n  class Person {\n    children = [];\n\n    @mapBy('children', 'age') childAges;\n  }\n\n  let lordByron = new Person();\n\n  lordByron.childAges; // []\n\n  set(lordByron, 'children', [\n    {\n      name: 'Augusta Ada Byron',\n      age: 7\n    }\n  ]);\n  lordByron.childAges; // [7]\n\n  set(lordByron, 'children', [\n    ...lordByron.children,\n    {\n      name: 'Allegra Byron',\n      age: 5\n    }, {\n      name: 'Elizabeth Medora Leigh',\n      age: 8\n    }\n  ]);\n  lordByron.childAges; // [7, 5, 8]\n  ```\n\n  @method mapBy\n  @for @ember/object/computed\n  @static\n  @param {String} dependentKey\n  @param {String} propertyKey\n  @return {ComputedProperty} an array mapped to the specified key\n  @public\n*/\nfunction mapBy(dependentKey, propertyKey) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @mapBy as a decorator directly, but it requires `dependentKey` and `propertyKey` parameters', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  (isDevelopingApp() && !(typeof propertyKey === 'string') && assert('`mapBy` computed macro expects a property string for its second argument, ' + 'perhaps you meant to use \"map\"', typeof propertyKey === 'string'));\n  (isDevelopingApp() && !(!/[[\\]{}]/g.test(dependentKey)) && assert(`Dependent key passed to \\`mapBy\\` computed macro shouldn't contain brace expanding pattern.`, !/[[\\]{}]/g.test(dependentKey)));\n  return map(`${dependentKey}.@each.${propertyKey}`, item => get(item, propertyKey));\n}\n\n/**\n  Filters the array by the callback, like the `Array.prototype.filter` method.\n\n  The callback method you provide should have the following signature:\n  - `item` is the current item in the iteration.\n  - `index` is the integer index of the current item in the iteration.\n  - `array` is the dependant array itself.\n\n  ```javascript\n  function filterCallback(item, index, array);\n  ```\n\n  In the callback, return a truthy value that coerces to true to keep the\n  element, or a falsy to reject it.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { filter } from '@ember/object/computed';\n\n  class Hamster {\n    constructor(chores) {\n      set(this, 'chores', chores);\n    }\n\n    @filter('chores', function(chore, index, array) {\n      return !chore.done;\n    })\n    remainingChores;\n  }\n\n  let hamster = Hamster.create([\n    { name: 'cook', done: true },\n    { name: 'clean', done: true },\n    { name: 'write more unit tests', done: false }\n  ]);\n\n  hamster.remainingChores; // [{name: 'write more unit tests', done: false}]\n  ```\n\n  You can also use `@each.property` in your dependent key, the callback will\n  still use the underlying array:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { filter } from '@ember/object/computed';\n\n  class Hamster {\n    constructor(chores) {\n      set(this, 'chores', chores);\n    }\n\n    @filter('chores.@each.done', function(chore, index, array) {\n      return !chore.done;\n    })\n    remainingChores;\n  }\n\n  let hamster = new Hamster([\n    { name: 'cook', done: true },\n    { name: 'clean', done: true },\n    { name: 'write more unit tests', done: false }\n  ]);\n  hamster.remainingChores; // [{name: 'write more unit tests', done: false}]\n\n  set(hamster.chores[2], 'done', true);\n  hamster.remainingChores; // []\n  ```\n\n  Finally, you can optionally pass an array of additional dependent keys as the\n  second parameter to the macro, if your filter function relies on any external\n  values:\n\n  ```javascript\n  import { filter } from '@ember/object/computed';\n\n  class Hamster {\n    constructor(chores) {\n      set(this, 'chores', chores);\n    }\n\n    doneKey = 'finished';\n\n    @filter('chores', ['doneKey'], function(chore, index, array) {\n      return !chore[this.doneKey];\n    })\n    remainingChores;\n  }\n\n  let hamster = new Hamster([\n    { name: 'cook', finished: true },\n    { name: 'clean', finished: true },\n    { name: 'write more unit tests', finished: false }\n  ]);\n\n  hamster.remainingChores; // [{name: 'write more unit tests', finished: false}]\n  ```\n\n  @method filter\n  @for @ember/object/computed\n  @static\n  @param {String} dependentKey\n  @param {Array} [additionalDependentKeys] optional array of additional dependent keys\n  @param {Function} callback\n  @return {ComputedProperty} the filtered array\n  @public\n*/\n\nfunction filter(dependentKey, additionalDependentKeysOrCallback, callback) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @filter as a decorator directly, but it requires atleast `dependentKey` and `callback` parameters', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  (isDevelopingApp() && !(typeof callback === 'function' || callback === undefined && typeof additionalDependentKeysOrCallback === 'function') && assert('The final parameter provided to filter must be a callback function', typeof callback === 'function' || callback === undefined && typeof additionalDependentKeysOrCallback === 'function'));\n  (isDevelopingApp() && !(Array.isArray(additionalDependentKeysOrCallback) || typeof additionalDependentKeysOrCallback === 'function') && assert('The second parameter provided to filter must either be the callback or an array of additional dependent keys', Array.isArray(additionalDependentKeysOrCallback) || typeof additionalDependentKeysOrCallback === 'function'));\n  let additionalDependentKeys;\n  if (typeof additionalDependentKeysOrCallback === 'function') {\n    callback = additionalDependentKeysOrCallback;\n    additionalDependentKeys = [];\n  } else {\n    additionalDependentKeys = additionalDependentKeysOrCallback;\n  }\n  const cCallback = callback;\n  return arrayMacro(dependentKey, additionalDependentKeys, function (value) {\n    // This is a really silly way to keep TS happy\n    return Array.isArray(value) ? value.filter(cCallback, this) : value.filter(cCallback, this);\n  });\n}\n\n/**\n  Filters the array by the property and value.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { filterBy } from '@ember/object/computed';\n\n  class Hamster {\n    constructor(chores) {\n      set(this, 'chores', chores);\n    }\n\n    @filterBy('chores', 'done', false) remainingChores;\n  }\n\n  let hamster = new Hamster([\n    { name: 'cook', done: true },\n    { name: 'clean', done: true },\n    { name: 'write more unit tests', done: false }\n  ]);\n\n  hamster.remainingChores; // [{ name: 'write more unit tests', done: false }]\n  ```\n\n  @method filterBy\n  @for @ember/object/computed\n  @static\n  @param {String} dependentKey\n  @param {String} propertyKey\n  @param {*} value\n  @return {ComputedProperty} the filtered array\n  @public\n*/\nfunction filterBy(dependentKey, propertyKey, value) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @filterBy as a decorator directly, but it requires atleast `dependentKey` and `propertyKey` parameters', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  (isDevelopingApp() && !(!/[[\\]{}]/g.test(dependentKey)) && assert(`Dependent key passed to \\`filterBy\\` computed macro shouldn't contain brace expanding pattern.`, !/[[\\]{}]/g.test(dependentKey)));\n  let callback;\n  if (arguments.length === 2) {\n    callback = item => get(item, propertyKey);\n  } else {\n    callback = item => get(item, propertyKey) === value;\n  }\n  return filter(`${dependentKey}.@each.${propertyKey}`, callback);\n}\n\n/**\n  A computed property which returns a new array with all the unique elements\n  from one or more dependent arrays.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { uniq } from '@ember/object/computed';\n\n  class Hamster {\n    constructor(fruits) {\n      set(this, 'fruits', fruits);\n    }\n\n    @uniq('fruits') uniqueFruits;\n  }\n\n  let hamster = new Hamster([\n    'banana',\n    'grape',\n    'kale',\n    'banana'\n  ]);\n\n  hamster.uniqueFruits; // ['banana', 'grape', 'kale']\n  ```\n\n  @method uniq\n  @for @ember/object/computed\n  @static\n  @param {String} propertyKey*\n  @return {ComputedProperty} computes a new array with all the\n  unique elements from the dependent array\n  @public\n*/\nfunction uniq(dependentKey, ...additionalDependentKeys) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @uniq/@union as a decorator directly, but it requires atleast one dependent key parameter', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  let args = [dependentKey, ...additionalDependentKeys];\n  return multiArrayMacro(args, function (dependentKeys) {\n    let uniq = A();\n    let seen = new Set();\n    dependentKeys.forEach(dependentKey => {\n      let value = get(this, dependentKey);\n      if (isNativeOrEmberArray(value)) {\n        value.forEach(item => {\n          if (!seen.has(item)) {\n            seen.add(item);\n            uniq.push(item);\n          }\n        });\n      }\n    });\n    return uniq;\n  }, 'uniq');\n}\n\n/**\n  A computed property which returns a new array with all the unique elements\n  from an array, with uniqueness determined by specific key.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { uniqBy } from '@ember/object/computed';\n\n  class Hamster {\n    constructor(fruits) {\n      set(this, 'fruits', fruits);\n    }\n\n    @uniqBy('fruits', 'id') uniqueFruits;\n  }\n\n  let hamster = new Hamster([\n    { id: 1, 'banana' },\n    { id: 2, 'grape' },\n    { id: 3, 'peach' },\n    { id: 1, 'banana' }\n  ]);\n\n  hamster.uniqueFruits; // [ { id: 1, 'banana' }, { id: 2, 'grape' }, { id: 3, 'peach' }]\n  ```\n\n  @method uniqBy\n  @for @ember/object/computed\n  @static\n  @param {String} dependentKey\n  @param {String} propertyKey\n  @return {ComputedProperty} computes a new array with all the\n  unique elements from the dependent array\n  @public\n*/\nfunction uniqBy(dependentKey, propertyKey) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @uniqBy as a decorator directly, but it requires `dependentKey` and `propertyKey` parameters', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  (isDevelopingApp() && !(!/[[\\]{}]/g.test(dependentKey)) && assert(`Dependent key passed to \\`uniqBy\\` computed macro shouldn't contain brace expanding pattern.`, !/[[\\]{}]/g.test(dependentKey)));\n  return computed(`${dependentKey}.[]`, function () {\n    let list = get(this, dependentKey);\n    return isNativeOrEmberArray(list) ? uniqBy$1(list, propertyKey) : A();\n  }).readOnly();\n}\n\n/**\n  A computed property which returns a new array with all the unique elements\n  from one or more dependent arrays.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { union } from '@ember/object/computed';\n\n  class Hamster {\n    constructor(fruits, vegetables) {\n      set(this, 'fruits', fruits);\n      set(this, 'vegetables', vegetables);\n    }\n\n    @union('fruits', 'vegetables') uniqueFruits;\n  });\n\n  let hamster = new, Hamster(\n    [\n      'banana',\n      'grape',\n      'kale',\n      'banana',\n      'tomato'\n    ],\n    [\n      'tomato',\n      'carrot',\n      'lettuce'\n    ]\n  );\n\n  hamster.uniqueFruits; // ['banana', 'grape', 'kale', 'tomato', 'carrot', 'lettuce']\n  ```\n\n  @method union\n  @for @ember/object/computed\n  @static\n  @param {String} propertyKey*\n  @return {ComputedProperty} computes a new array with all the unique elements\n  from one or more dependent arrays.\n  @public\n*/\nlet union = uniq;\n\n/**\n  A computed property which returns a new array with all the elements\n  two or more dependent arrays have in common.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { intersect } from '@ember/object/computed';\n\n  class FriendGroups {\n    constructor(adaFriends, charlesFriends) {\n      set(this, 'adaFriends', adaFriends);\n      set(this, 'charlesFriends', charlesFriends);\n    }\n\n    @intersect('adaFriends', 'charlesFriends') friendsInCommon;\n  }\n\n  let groups = new FriendGroups(\n    ['Charles Babbage', 'John Hobhouse', 'William King', 'Mary Somerville'],\n    ['William King', 'Mary Somerville', 'Ada Lovelace', 'George Peacock']\n  );\n\n  groups.friendsInCommon; // ['William King', 'Mary Somerville']\n  ```\n\n  @method intersect\n  @for @ember/object/computed\n  @static\n  @param {String} propertyKey*\n  @return {ComputedProperty} computes a new array with all the duplicated\n  elements from the dependent arrays\n  @public\n*/\nfunction intersect(dependentKey, ...additionalDependentKeys) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @intersect as a decorator directly, but it requires atleast one dependent key parameter', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  let args = [dependentKey, ...additionalDependentKeys];\n  return multiArrayMacro(args, function (dependentKeys) {\n    let arrays = dependentKeys.map(dependentKey => {\n      let array = get(this, dependentKey);\n      return Array.isArray(array) ? array : [];\n    });\n    let firstArray = arrays.pop();\n    (isDevelopingApp() && !(firstArray) && assert('Attempted to apply multiArrayMacro for intersect without any dependentKeys', firstArray));\n    let results = firstArray.filter(candidate => {\n      for (let array of arrays) {\n        let found = false;\n        for (let item of array) {\n          if (item === candidate) {\n            found = true;\n            break;\n          }\n        }\n        if (found === false) {\n          return false;\n        }\n      }\n      return true;\n    });\n    return A(results);\n  }, 'intersect');\n}\n\n/**\n  A computed property which returns a new array with all the properties from the\n  first dependent array that are not in the second dependent array.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { setDiff } from '@ember/object/computed';\n\n  class Hamster {\n    constructor(likes, fruits) {\n      set(this, 'likes', likes);\n      set(this, 'fruits', fruits);\n    }\n\n    @setDiff('likes', 'fruits') wants;\n  }\n\n  let hamster = new Hamster(\n    [\n      'banana',\n      'grape',\n      'kale'\n    ],\n    [\n      'grape',\n      'kale',\n    ]\n  );\n\n  hamster.wants; // ['banana']\n  ```\n\n  @method setDiff\n  @for @ember/object/computed\n  @static\n  @param {String} setAProperty\n  @param {String} setBProperty\n  @return {ComputedProperty} computes a new array with all the items from the\n  first dependent array that are not in the second dependent array\n  @public\n*/\nfunction setDiff(setAProperty, setBProperty) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @setDiff as a decorator directly, but it requires atleast one dependent key parameter', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  (isDevelopingApp() && !(arguments.length === 2) && assert('`setDiff` computed macro requires exactly two dependent arrays.', arguments.length === 2));\n  (isDevelopingApp() && !(!/[[\\]{}]/g.test(setAProperty) && !/[[\\]{}]/g.test(setBProperty)) && assert(`Dependent keys passed to \\`setDiff\\` computed macro shouldn't contain brace expanding pattern.`, !/[[\\]{}]/g.test(setAProperty) && !/[[\\]{}]/g.test(setBProperty)));\n  return computed(`${setAProperty}.[]`, `${setBProperty}.[]`, function () {\n    let setA = get(this, setAProperty);\n    let setB = get(this, setBProperty);\n    if (!isNativeOrEmberArray(setA)) {\n      return A();\n    }\n    if (!isNativeOrEmberArray(setB)) {\n      return setA;\n    }\n    return setA.filter(x => setB.indexOf(x) === -1);\n  }).readOnly();\n}\n\n/**\n  A computed property that returns the array of values for the provided\n  dependent properties.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { collect } from '@ember/object/computed';\n\n  class Hamster {\n    @collect('hat', 'shirt') clothes;\n  }\n\n  let hamster = new Hamster();\n\n  hamster.clothes; // [null, null]\n\n  set(hamster, 'hat', 'Camp Hat');\n  set(hamster, 'shirt', 'Camp Shirt');\n  hamster.clothes; // ['Camp Hat', 'Camp Shirt']\n  ```\n\n  @method collect\n  @for @ember/object/computed\n  @static\n  @param {String} dependentKey*\n  @return {ComputedProperty} computed property which maps values of all passed\n  in properties to an array.\n  @public\n*/\nfunction collect(dependentKey, ...additionalDependentKeys) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @collect as a decorator directly, but it requires atleast one dependent key parameter', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  let dependentKeys = [dependentKey, ...additionalDependentKeys];\n  return multiArrayMacro(dependentKeys, function () {\n    let res = dependentKeys.map(key => {\n      let val = get(this, key);\n      return val === undefined ? null : val;\n    });\n    return A(res);\n  }, 'collect');\n}\n\n// (UN)SAFETY: we use `any` here to match how TS defines the sorting for arrays.\n// Additionally, since we're using it with *decorators*, we don't have any way\n// to plumb through the relationship between the types in a way that would be\n// variance-safe.\n\n/**\n  A computed property which returns a new array with all the properties from the\n  first dependent array sorted based on a property or sort function. The sort\n  macro can be used in two different ways:\n\n  1. By providing a sort callback function\n  2. By providing an array of keys to sort the array\n\n  In the first form, the callback method you provide should have the following\n  signature:\n\n  ```javascript\n  function sortCallback(itemA, itemB);\n  ```\n\n  - `itemA` the first item to compare.\n  - `itemB` the second item to compare.\n\n  This function should return negative number (e.g. `-1`) when `itemA` should\n  come before `itemB`. It should return positive number (e.g. `1`) when `itemA`\n  should come after `itemB`. If the `itemA` and `itemB` are equal this function\n  should return `0`.\n\n  Therefore, if this function is comparing some numeric values, simple `itemA -\n  itemB` or `itemA.get( 'foo' ) - itemB.get( 'foo' )` can be used instead of\n  series of `if`.\n\n  Example:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { sort } from '@ember/object/computed';\n\n  class ToDoList {\n    constructor(todos) {\n      set(this, 'todos', todos);\n    }\n\n    // using a custom sort function\n    @sort('todos', function(a, b){\n      if (a.priority > b.priority) {\n        return 1;\n      } else if (a.priority < b.priority) {\n        return -1;\n      }\n\n      return 0;\n    })\n    priorityTodos;\n  }\n\n  let todoList = new ToDoList([\n    { name: 'Unit Test', priority: 2 },\n    { name: 'Documentation', priority: 3 },\n    { name: 'Release', priority: 1 }\n  ]);\n\n  todoList.priorityTodos; // [{ name:'Release', priority:1 }, { name:'Unit Test', priority:2 }, { name:'Documentation', priority:3 }]\n  ```\n\n  You can also optionally pass an array of additional dependent keys as the\n  second parameter, if your sort function is dependent on additional values that\n  could changes:\n\n  ```js\n  import EmberObject, { set } from '@ember/object';\n  import { sort } from '@ember/object/computed';\n\n  class ToDoList {\n    sortKey = 'priority';\n\n    constructor(todos) {\n      set(this, 'todos', todos);\n    }\n\n    // using a custom sort function\n    @sort('todos', ['sortKey'], function(a, b){\n      if (a[this.sortKey] > b[this.sortKey]) {\n        return 1;\n      } else if (a[this.sortKey] < b[this.sortKey]) {\n        return -1;\n      }\n\n      return 0;\n    })\n    sortedTodos;\n  });\n\n  let todoList = new ToDoList([\n    { name: 'Unit Test', priority: 2 },\n    { name: 'Documentation', priority: 3 },\n    { name: 'Release', priority: 1 }\n  ]);\n\n  todoList.priorityTodos; // [{ name:'Release', priority:1 }, { name:'Unit Test', priority:2 }, { name:'Documentation', priority:3 }]\n  ```\n\n  In the second form, you should provide the key of the array of sort values as\n  the second parameter:\n\n  ```javascript\n  import { set } from '@ember/object';\n  import { sort } from '@ember/object/computed';\n\n  class ToDoList {\n    constructor(todos) {\n      set(this, 'todos', todos);\n    }\n\n    // using standard ascending sort\n    todosSorting = ['name'];\n    @sort('todos', 'todosSorting') sortedTodos;\n\n    // using descending sort\n    todosSortingDesc = ['name:desc'];\n    @sort('todos', 'todosSortingDesc') sortedTodosDesc;\n  }\n\n  let todoList = new ToDoList([\n    { name: 'Unit Test', priority: 2 },\n    { name: 'Documentation', priority: 3 },\n    { name: 'Release', priority: 1 }\n  ]);\n\n  todoList.sortedTodos; // [{ name:'Documentation', priority:3 }, { name:'Release', priority:1 }, { name:'Unit Test', priority:2 }]\n  todoList.sortedTodosDesc; // [{ name:'Unit Test', priority:2 }, { name:'Release', priority:1 }, { name:'Documentation', priority:3 }]\n  ```\n\n  @method sort\n  @for @ember/object/computed\n  @static\n  @param {String} itemsKey\n  @param {String|Function|Array} sortDefinitionOrDependentKeys The key of the sort definition (an array of sort properties),\n  the sort function, or an array of additional dependent keys\n  @param {Function?} sortDefinition the sort function (when used with additional dependent keys)\n  @return {ComputedProperty} computes a new sorted array based on the sort\n  property array or callback function\n  @public\n*/\n\nfunction sort(itemsKey, additionalDependentKeysOrDefinition, sortDefinition) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @sort as a decorator directly, but it requires atleast an `itemsKey` parameter', !isElementDescriptor(Array.prototype.slice.call(arguments))));\n  if (isDevelopingApp()) {\n    let argumentsValid = false;\n    if (arguments.length === 2) {\n      argumentsValid = typeof itemsKey === 'string' && (typeof additionalDependentKeysOrDefinition === 'string' || typeof additionalDependentKeysOrDefinition === 'function');\n    }\n    if (arguments.length === 3) {\n      argumentsValid = typeof itemsKey === 'string' && Array.isArray(additionalDependentKeysOrDefinition) && typeof sortDefinition === 'function';\n    }\n    (isDevelopingApp() && !(argumentsValid) && assert('The `sort` computed macro can either be used with an array of sort properties or with a sort function. If used with an array of sort properties, it must receive exactly two arguments: the key of the array to sort, and the key of the array of sort properties. If used with a sort function, it may receive up to three arguments: the key of the array to sort, an optional additional array of dependent keys for the computed property, and the sort function.', argumentsValid));\n  }\n  let additionalDependentKeys;\n  let sortDefinitionOrString;\n  if (Array.isArray(additionalDependentKeysOrDefinition)) {\n    additionalDependentKeys = additionalDependentKeysOrDefinition;\n    sortDefinitionOrString = sortDefinition;\n  } else {\n    additionalDependentKeys = [];\n    sortDefinitionOrString = additionalDependentKeysOrDefinition;\n  }\n  if (typeof sortDefinitionOrString === 'function') {\n    return customSort(itemsKey, additionalDependentKeys, sortDefinitionOrString);\n  } else {\n    return propertySort(itemsKey, sortDefinitionOrString);\n  }\n}\nfunction customSort(itemsKey, additionalDependentKeys, comparator) {\n  return arrayMacro(itemsKey, additionalDependentKeys, function (value) {\n    return value.slice().sort((x, y) => comparator.call(this, x, y));\n  });\n}\n\n// This one needs to dynamically set up and tear down observers on the itemsKey\n// depending on the sortProperties\nfunction propertySort(itemsKey, sortPropertiesKey) {\n  let cp = autoComputed(function (key) {\n    let sortProperties = get(this, sortPropertiesKey);\n    (isDevelopingApp() && !(function (arr) {\n      return isNativeOrEmberArray(arr) && arr.every(s => typeof s === 'string');\n    }(sortProperties)) && assert(`The sort definition for '${key}' on ${this} must be a function or an array of strings`, function (arr) {\n      return isNativeOrEmberArray(arr) && arr.every(s => typeof s === 'string');\n    }(sortProperties)));\n    let itemsKeyIsAtThis = itemsKey === '@this';\n    let normalizedSortProperties = normalizeSortProperties(sortProperties);\n    let items = itemsKeyIsAtThis ? this : get(this, itemsKey);\n    if (!isNativeOrEmberArray(items)) {\n      return A();\n    }\n    if (normalizedSortProperties.length === 0) {\n      return A(items.slice());\n    } else {\n      return sortByNormalizedSortProperties(items, normalizedSortProperties);\n    }\n  }).readOnly();\n  return cp;\n}\nfunction normalizeSortProperties(sortProperties) {\n  let callback = p => {\n    let [prop, direction] = p.split(':');\n    direction = direction || 'asc';\n\n    // SAFETY: There will always be at least one value returned by split\n    return [prop, direction];\n  };\n  // This nonsense is necessary since technically the two map implementations diverge.\n  return Array.isArray(sortProperties) ? sortProperties.map(callback) : sortProperties.map(callback);\n}\nfunction sortByNormalizedSortProperties(items, normalizedSortProperties) {\n  return A(items.slice().sort((itemA, itemB) => {\n    for (let [prop, direction] of normalizedSortProperties) {\n      let result = compare(get(itemA, prop), get(itemB, prop));\n      if (result !== 0) {\n        return direction === 'desc' ? -1 * result : result;\n      }\n    }\n    return 0;\n  }));\n}\n\nexport { collect, filter, filterBy, intersect, map, mapBy, max, min, setDiff, sort, sum, union, uniq, uniqBy };\n","import { I as INIT_FACTORY } from '../../shared-chunks/registry-XY5cfmbH.js';\nimport { peekMeta, meta } from '../-internals/meta/lib/meta.js';\nimport { g as guidFor, R as ROOT, o as observerListenerMetaFor, w as wrap } from '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../debug/index.js';\nimport { y as nativeDescDecorator, z as defineValue, A as defineDecorator, B as revalidateObservers, f as isClassicDecorator, E as descriptorForDecorator, x as addObserver, w as removeObserver, F as addListener, G as removeListener, C as ComputedProperty, H as makeComputedDecorator } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { s as setUnprocessedMixins } from '../../shared-chunks/namespace_search-ClQOZuFA.js';\nimport { assert } from '../debug/lib/assert.js';\n\n/**\n@module @ember/object/mixin\n*/\nconst a_concat = Array.prototype.concat;\nconst {\n  isArray\n} = Array;\nfunction extractAccessors(properties) {\n  if (properties !== undefined) {\n    for (let key of Object.keys(properties)) {\n      let desc = Object.getOwnPropertyDescriptor(properties, key);\n      if (desc.get !== undefined || desc.set !== undefined) {\n        Object.defineProperty(properties, key, {\n          value: nativeDescDecorator(desc)\n        });\n      }\n    }\n  }\n  return properties;\n}\nfunction concatenatedMixinProperties(concatProp, props, values, base) {\n  // reset before adding each new mixin to pickup concats from previous\n  let concats = values[concatProp] || base[concatProp];\n  if (props[concatProp]) {\n    concats = concats ? a_concat.call(concats, props[concatProp]) : props[concatProp];\n  }\n  return concats;\n}\nfunction giveDecoratorSuper(key, decorator, property, descs) {\n  if (property === true) {\n    return decorator;\n  }\n  let originalGetter = property._getter;\n  if (originalGetter === undefined) {\n    return decorator;\n  }\n  let superDesc = descs[key];\n\n  // Check to see if the super property is a decorator first, if so load its descriptor\n  let superProperty = typeof superDesc === 'function' ? descriptorForDecorator(superDesc) : superDesc;\n  if (superProperty === undefined || superProperty === true) {\n    return decorator;\n  }\n  let superGetter = superProperty._getter;\n  if (superGetter === undefined) {\n    return decorator;\n  }\n  let get = wrap(originalGetter, superGetter);\n  let set;\n  let originalSetter = property._setter;\n  let superSetter = superProperty._setter;\n  if (superSetter !== undefined) {\n    if (originalSetter !== undefined) {\n      set = wrap(originalSetter, superSetter);\n    } else {\n      // If the super property has a setter, we default to using it no matter what.\n      // This is clearly very broken and weird, but it's what was here so we have\n      // to keep it until the next major at least.\n      //\n      // TODO: Add a deprecation here.\n      set = superSetter;\n    }\n  } else {\n    set = originalSetter;\n  }\n\n  // only create a new CP if we must\n  if (get !== originalGetter || set !== originalSetter) {\n    // Since multiple mixins may inherit from the same parent, we need\n    // to clone the computed property so that other mixins do not receive\n    // the wrapped version.\n    let dependentKeys = property._dependentKeys || [];\n    let newProperty = new ComputedProperty([...dependentKeys, {\n      get,\n      set\n    }]);\n    newProperty._readOnly = property._readOnly;\n    newProperty._meta = property._meta;\n    newProperty.enumerable = property.enumerable;\n\n    // SAFETY: We passed in the impl for this class\n    return makeComputedDecorator(newProperty, ComputedProperty);\n  }\n  return decorator;\n}\nfunction giveMethodSuper(key, method, values, descs) {\n  // Methods overwrite computed properties, and do not call super to them.\n  if (descs[key] !== undefined) {\n    return method;\n  }\n\n  // Find the original method in a parent mixin\n  let superMethod = values[key];\n\n  // Only wrap the new method if the original method was a function\n  if (typeof superMethod === 'function') {\n    return wrap(method, superMethod);\n  }\n  return method;\n}\nfunction simpleMakeArray(value) {\n  if (!value) {\n    return [];\n  } else if (!Array.isArray(value)) {\n    return [value];\n  } else {\n    return value;\n  }\n}\nfunction applyConcatenatedProperties(key, value, values) {\n  let baseValue = values[key];\n  let ret = simpleMakeArray(baseValue).concat(simpleMakeArray(value));\n  if (isDevelopingApp()) {\n    // it is possible to use concatenatedProperties with strings (which cannot be frozen)\n    // only freeze objects...\n    if (typeof ret === 'object' && ret !== null) {\n      // prevent mutating `concatenatedProperties` array after it is applied\n      Object.freeze(ret);\n    }\n  }\n  return ret;\n}\nfunction applyMergedProperties(key, value, values) {\n  let baseValue = values[key];\n  (isDevelopingApp() && !(!isArray(value)) && assert(`You passed in \\`${JSON.stringify(value)}\\` as the value for \\`${key}\\` but \\`${key}\\` cannot be an Array`, !isArray(value)));\n  if (!baseValue) {\n    return value;\n  }\n  let newBase = Object.assign({}, baseValue);\n  let hasFunction = false;\n  let props = Object.keys(value);\n  for (let prop of props) {\n    let propValue = value[prop];\n    if (typeof propValue === 'function') {\n      hasFunction = true;\n      newBase[prop] = giveMethodSuper(prop, propValue, baseValue, {});\n    } else {\n      newBase[prop] = propValue;\n    }\n  }\n  if (hasFunction) {\n    newBase._super = ROOT;\n  }\n  return newBase;\n}\nfunction mergeMixins(mixins, meta, descs, values, base, keys, keysWithSuper) {\n  let currentMixin;\n  for (let i = 0; i < mixins.length; i++) {\n    currentMixin = mixins[i];\n    (isDevelopingApp() && !(typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]') && assert(`Expected hash or Mixin instance, got ${Object.prototype.toString.call(currentMixin)}`, typeof currentMixin === 'object' && currentMixin !== null && Object.prototype.toString.call(currentMixin) !== '[object Array]'));\n    if (MIXINS.has(currentMixin)) {\n      if (meta.hasMixin(currentMixin)) {\n        continue;\n      }\n      meta.addMixin(currentMixin);\n      let {\n        properties,\n        mixins\n      } = currentMixin;\n      if (properties !== undefined) {\n        mergeProps(meta, properties, descs, values, base, keys, keysWithSuper);\n      } else if (mixins !== undefined) {\n        mergeMixins(mixins, meta, descs, values, base, keys, keysWithSuper);\n        if (currentMixin instanceof Mixin && currentMixin._without !== undefined) {\n          currentMixin._without.forEach(keyName => {\n            // deleting the key means we won't process the value\n            let index = keys.indexOf(keyName);\n            if (index !== -1) {\n              keys.splice(index, 1);\n            }\n          });\n        }\n      }\n    } else {\n      mergeProps(meta, currentMixin, descs, values, base, keys, keysWithSuper);\n    }\n  }\n}\nfunction mergeProps(meta, props, descs, values, base, keys, keysWithSuper) {\n  let concats = concatenatedMixinProperties('concatenatedProperties', props, values, base);\n  let mergings = concatenatedMixinProperties('mergedProperties', props, values, base);\n  let propKeys = Object.keys(props);\n  for (let key of propKeys) {\n    let value = props[key];\n    if (value === undefined) continue;\n    if (keys.indexOf(key) === -1) {\n      keys.push(key);\n      let desc = meta.peekDescriptors(key);\n      if (desc === undefined) {\n        // If the value is a classic decorator, we don't want to actually\n        // access it, because that will execute the decorator while we're\n        // building the class.\n        if (!isClassicDecorator(value)) {\n          // The superclass did not have a CP, which means it may have\n          // observers or listeners on that property.\n          let prev = values[key] = base[key];\n          if (typeof prev === 'function') {\n            updateObserversAndListeners(base, key, prev, false);\n          }\n        }\n      } else {\n        descs[key] = desc;\n\n        // The super desc will be overwritten on descs, so save off the fact that\n        // there was a super so we know to Object.defineProperty when writing\n        // the value\n        keysWithSuper.push(key);\n        desc.teardown(base, key, meta);\n      }\n    }\n    let isFunction = typeof value === 'function';\n    if (isFunction) {\n      let desc = descriptorForDecorator(value);\n      if (desc !== undefined) {\n        // Wrap descriptor function to implement _super() if needed\n        descs[key] = giveDecoratorSuper(key, value, desc, descs);\n        values[key] = undefined;\n        continue;\n      }\n    }\n    if (concats && concats.indexOf(key) >= 0 || key === 'concatenatedProperties' || key === 'mergedProperties') {\n      value = applyConcatenatedProperties(key, value, values);\n    } else if (mergings && mergings.indexOf(key) > -1) {\n      value = applyMergedProperties(key, value, values);\n    } else if (isFunction) {\n      value = giveMethodSuper(key, value, values, descs);\n    }\n    values[key] = value;\n    descs[key] = undefined;\n  }\n}\nfunction updateObserversAndListeners(obj, key, fn, add) {\n  let meta = observerListenerMetaFor(fn);\n  if (meta === undefined) return;\n  let {\n    observers,\n    listeners\n  } = meta;\n  if (observers !== undefined) {\n    let updateObserver = add ? addObserver : removeObserver;\n    for (let path of observers.paths) {\n      updateObserver(obj, path, null, key, observers.sync);\n    }\n  }\n  if (listeners !== undefined) {\n    let updateListener = add ? addListener : removeListener;\n    for (let listener of listeners) {\n      updateListener(obj, listener, null, key);\n    }\n  }\n}\nfunction applyMixin(obj, mixins, _hideKeys = false) {\n  let descs = Object.create(null);\n  let values = Object.create(null);\n  let meta$1 = meta(obj);\n  let keys = [];\n  let keysWithSuper = [];\n  obj._super = ROOT;\n\n  // Go through all mixins and hashes passed in, and:\n  //\n  // * Handle concatenated properties\n  // * Handle merged properties\n  // * Set up _super wrapping if necessary\n  // * Set up computed property descriptors\n  // * Copying `toString` in broken browsers\n  mergeMixins(mixins, meta$1, descs, values, obj, keys, keysWithSuper);\n  for (let key of keys) {\n    let value = values[key];\n    let desc = descs[key];\n    if (value !== undefined) {\n      if (typeof value === 'function') {\n        updateObserversAndListeners(obj, key, value, true);\n      }\n      defineValue(obj, key, value, keysWithSuper.indexOf(key) !== -1, !_hideKeys);\n    } else if (desc !== undefined) {\n      defineDecorator(obj, key, desc, meta$1);\n    }\n  }\n  if (!meta$1.isPrototypeMeta(obj)) {\n    revalidateObservers(obj);\n  }\n  return obj;\n}\n\n/**\n  @method mixin\n  @param obj\n  @param mixins*\n  @return obj\n  @private\n*/\nfunction mixin(obj, ...args) {\n  applyMixin(obj, args);\n  return obj;\n}\nconst MIXINS = new WeakSet();\n\n/**\n  The `Mixin` class allows you to create mixins, whose properties can be\n  added to other classes. For instance,\n\n  ```javascript\n  import Mixin from '@ember/object/mixin';\n\n  const EditableMixin = Mixin.create({\n    edit() {\n      console.log('starting to edit');\n      this.set('isEditing', true);\n    },\n    isEditing: false\n  });\n  ```\n\n  ```javascript\n  import EmberObject from '@ember/object';\n  import EditableMixin from '../mixins/editable';\n\n  // Mix mixins into classes by passing them as the first arguments to\n  // `.extend.`\n  class Comment extends EmberObject.extend(EditableMixin) {\n    post = null\n  }\n\n  let comment = Comment.create({\n    post: somePost\n  });\n\n  comment.edit(); // outputs 'starting to edit'\n  ```\n\n  Note that Mixins are created with `Mixin.create`, not\n  `Mixin.extend`.\n\n  Note that mixins extend a constructor's prototype so arrays and object literals\n  defined as properties will be shared amongst objects that implement the mixin.\n  If you want to define a property in a mixin that is not shared, you can define\n  it either as a computed property or have it be created on initialization of the object.\n\n  ```javascript\n  // filters array will be shared amongst any object implementing mixin\n  import Mixin from '@ember/object/mixin';\n  import { A } from '@ember/array';\n\n  const FilterableMixin = Mixin.create({\n    filters: A()\n  });\n  ```\n\n  ```javascript\n  import Mixin from '@ember/object/mixin';\n  import { A } from '@ember/array';\n  import { computed } from '@ember/object';\n\n  // filters will be a separate array for every object implementing the mixin\n  const FilterableMixin = Mixin.create({\n    filters: computed(function() {\n      return A();\n    })\n  });\n  ```\n\n  ```javascript\n  import Mixin from '@ember/object/mixin';\n  import { A } from '@ember/array';\n\n  // filters will be created as a separate array during the object's initialization\n  const Filterable = Mixin.create({\n    filters: null,\n\n    init() {\n      this._super(...arguments);\n      this.set(\"filters\", A());\n    }\n  });\n  ```\n\n  @class Mixin\n  @public\n*/\nclass Mixin {\n  /** @internal */\n\n  /** @internal */\n  mixins;\n\n  /** @internal */\n  properties;\n\n  /** @internal */\n  ownerConstructor;\n\n  /** @internal */\n  _without;\n  /** @internal */\n  constructor(mixins, properties) {\n    MIXINS.add(this);\n    this.properties = extractAccessors(properties);\n    this.mixins = buildMixinsArray(mixins);\n    this.ownerConstructor = undefined;\n    this._without = undefined;\n    if (isDevelopingApp()) {\n      // Eagerly add INIT_FACTORY to avoid issues in DEBUG as a result of Object.seal(mixin)\n      this[INIT_FACTORY] = null;\n      /*\n        In debug builds, we seal mixins to help avoid performance pitfalls.\n         In IE11 there is a quirk that prevents sealed objects from being added\n        to a WeakMap. Unfortunately, the mixin system currently relies on\n        weak maps in `guidFor`, so we need to prime the guid cache weak map.\n      */\n      guidFor(this);\n      if (Mixin._disableDebugSeal !== true) {\n        Object.seal(this);\n      }\n    }\n  }\n\n  /**\n    @method create\n    @for @ember/object/mixin\n    @static\n    @param arguments*\n    @public\n  */\n  static create(...args) {\n    setUnprocessedMixins();\n    let M = this;\n    return new M(args, undefined);\n  }\n\n  // returns the mixins currently applied to the specified object\n  // TODO: Make `mixin`\n  /** @internal */\n  static mixins(obj) {\n    let meta = peekMeta(obj);\n    let ret = [];\n    if (meta === null) {\n      return ret;\n    }\n    meta.forEachMixins(currentMixin => {\n      // skip primitive mixins since these are always anonymous\n      if (!currentMixin.properties) {\n        ret.push(currentMixin);\n      }\n    });\n    return ret;\n  }\n\n  /**\n    @method reopen\n    @param arguments*\n    @private\n    @internal\n  */\n  reopen(...args) {\n    if (args.length === 0) {\n      return this;\n    }\n    if (this.properties) {\n      let currentMixin = new Mixin(undefined, this.properties);\n      this.properties = undefined;\n      this.mixins = [currentMixin];\n    } else if (!this.mixins) {\n      this.mixins = [];\n    }\n    this.mixins = this.mixins.concat(buildMixinsArray(args));\n    return this;\n  }\n\n  /**\n    @method apply\n    @param obj\n    @return applied object\n    @private\n    @internal\n  */\n  apply(obj, _hideKeys = false) {\n    // Ember.NativeArray is a normal Ember.Mixin that we mix into `Array.prototype` when prototype extensions are enabled\n    // mutating a native object prototype like this should _not_ result in enumerable properties being added (or we have significant\n    // issues with things like deep equality checks from test frameworks, or things like jQuery.extend(true, [], [])).\n    //\n    // _hideKeys disables enumerablity when applying the mixin. This is a hack, and we should stop mutating the array prototype by default 😫\n    return applyMixin(obj, [this], _hideKeys);\n  }\n\n  /** @internal */\n  applyPartial(obj) {\n    return applyMixin(obj, [this]);\n  }\n\n  /**\n    @method detect\n    @param obj\n    @return {Boolean}\n    @private\n    @internal\n  */\n  detect(obj) {\n    if (typeof obj !== 'object' || obj === null) {\n      return false;\n    }\n    if (MIXINS.has(obj)) {\n      return _detect(obj, this);\n    }\n    let meta = peekMeta(obj);\n    if (meta === null) {\n      return false;\n    }\n    return meta.hasMixin(this);\n  }\n\n  /** @internal */\n  without(...args) {\n    let ret = new Mixin([this]);\n    ret._without = args;\n    return ret;\n  }\n\n  /** @internal */\n  keys() {\n    let keys = _keys(this);\n    (isDevelopingApp() && !(keys) && assert('[BUG] Missing keys for mixin!', keys));\n    return keys;\n  }\n\n  /** @internal */\n  toString() {\n    return '(unknown mixin)';\n  }\n}\nif (isDevelopingApp()) {\n  Object.defineProperty(Mixin, '_disableDebugSeal', {\n    configurable: true,\n    enumerable: false,\n    writable: true,\n    value: false\n  });\n}\nfunction buildMixinsArray(mixins) {\n  let length = mixins && mixins.length || 0;\n  let m = undefined;\n  if (length > 0) {\n    m = new Array(length);\n    for (let i = 0; i < length; i++) {\n      let x = mixins[i];\n      (isDevelopingApp() && !(typeof x === 'object' && x !== null && Object.prototype.toString.call(x) !== '[object Array]') && assert(`Expected hash or Mixin instance, got ${Object.prototype.toString.call(x)}`, typeof x === 'object' && x !== null && Object.prototype.toString.call(x) !== '[object Array]'));\n      if (MIXINS.has(x)) {\n        m[i] = x;\n      } else {\n        m[i] = new Mixin(undefined, x);\n      }\n    }\n  }\n  return m;\n}\nif (isDevelopingApp()) {\n  Object.seal(Mixin.prototype);\n}\nfunction _detect(curMixin, targetMixin, seen = new Set()) {\n  if (seen.has(curMixin)) {\n    return false;\n  }\n  seen.add(curMixin);\n  if (curMixin === targetMixin) {\n    return true;\n  }\n  let mixins = curMixin.mixins;\n  if (mixins) {\n    return mixins.some(mixin => _detect(mixin, targetMixin, seen));\n  }\n  return false;\n}\nfunction _keys(mixin, ret = new Set(), seen = new Set()) {\n  if (seen.has(mixin)) {\n    return;\n  }\n  seen.add(mixin);\n  if (mixin.properties) {\n    let props = Object.keys(mixin.properties);\n    for (let prop of props) {\n      ret.add(prop);\n    }\n  } else if (mixin.mixins) {\n    mixin.mixins.forEach(x => _keys(x, ret, seen));\n  }\n  return ret;\n}\n\nexport { applyMixin, Mixin as default, mixin };\n","import { peekMeta } from '../-internals/meta/lib/meta.js';\nimport '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../debug/index.js';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { g as get, v as hasListeners, w as removeObserver, x as addObserver, n as notifyPropertyChange, m as endPropertyChanges, l as beginPropertyChanges } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport { s as set } from '../../shared-chunks/property_set-DrZnfGQ7.js';\nimport { s as setProperties, g as getProperties } from '../../shared-chunks/set_properties-Dag9Xz6u.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\nimport Mixin from './mixin.js';\nimport { assert } from '../debug/lib/assert.js';\n\n/**\n@module @ember/object/observable\n*/\n\nconst Observable = Mixin.create({\n  get(keyName) {\n    return get(this, keyName);\n  },\n  getProperties(...args) {\n    return getProperties(this, ...args);\n  },\n  set(keyName, value) {\n    return set(this, keyName, value);\n  },\n  setProperties(hash) {\n    return setProperties(this, hash);\n  },\n  /**\n    Begins a grouping of property changes.\n     You can use this method to group property changes so that notifications\n    will not be sent until the changes are finished. If you plan to make a\n    large number of changes to an object at one time, you should call this\n    method at the beginning of the changes to begin deferring change\n    notifications. When you are done making changes, call\n    `endPropertyChanges()` to deliver the deferred change notifications and end\n    deferring.\n     @method beginPropertyChanges\n    @return {Observable}\n    @private\n  */\n  beginPropertyChanges() {\n    beginPropertyChanges();\n    return this;\n  },\n  /**\n    Ends a grouping of property changes.\n     You can use this method to group property changes so that notifications\n    will not be sent until the changes are finished. If you plan to make a\n    large number of changes to an object at one time, you should call\n    `beginPropertyChanges()` at the beginning of the changes to defer change\n    notifications. When you are done making changes, call this method to\n    deliver the deferred change notifications and end deferring.\n     @method endPropertyChanges\n    @return {Observable}\n    @private\n  */\n  endPropertyChanges() {\n    endPropertyChanges();\n    return this;\n  },\n  notifyPropertyChange(keyName) {\n    notifyPropertyChange(this, keyName);\n    return this;\n  },\n  addObserver(key, target, method, sync) {\n    addObserver(this, key, target, method, sync);\n    return this;\n  },\n  removeObserver(key, target, method, sync) {\n    removeObserver(this, key, target, method, sync);\n    return this;\n  },\n  /**\n    Returns `true` if the object currently has observers registered for a\n    particular key. You can use this method to potentially defer performing\n    an expensive action until someone begins observing a particular property\n    on the object.\n     @method hasObserverFor\n    @param {String} key Key to check\n    @return {Boolean}\n    @private\n  */\n  hasObserverFor(key) {\n    return hasListeners(this, `${key}:change`);\n  },\n  incrementProperty(keyName, increment = 1) {\n    (isDevelopingApp() && !(!isNaN(parseFloat(String(increment))) && isFinite(increment)) && assert('Must pass a numeric value to incrementProperty', !isNaN(parseFloat(String(increment))) && isFinite(increment)));\n    return set(this, keyName, (parseFloat(get(this, keyName)) || 0) + increment);\n  },\n  decrementProperty(keyName, decrement = 1) {\n    (isDevelopingApp() && !((typeof decrement === 'number' || !isNaN(parseFloat(decrement))) && isFinite(decrement)) && assert('Must pass a numeric value to decrementProperty', (typeof decrement === 'number' || !isNaN(parseFloat(decrement))) && isFinite(decrement)));\n    return set(this, keyName, (get(this, keyName) || 0) - decrement);\n  },\n  toggleProperty(keyName) {\n    return set(this, keyName, !get(this, keyName));\n  },\n  cacheFor(keyName) {\n    let meta = peekMeta(this);\n    return meta !== null ? meta.valueFor(keyName) : undefined;\n  }\n});\n\nexport { Observable as default };\n","import './index.js';\nimport Mixin from './mixin.js';\nimport { c as computed, g as get } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../-internals/meta/lib/meta.js';\nimport '../debug/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport '@embroider/macros';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { s as setProperties } from '../../shared-chunks/set_properties-Dag9Xz6u.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\n\n/**\n  @module @ember/object/promise-proxy-mixin\n*/\n\nfunction tap(proxy, promise) {\n  setProperties(proxy, {\n    isFulfilled: false,\n    isRejected: false\n  });\n  return promise.then(value => {\n    if (!proxy.isDestroyed && !proxy.isDestroying) {\n      setProperties(proxy, {\n        content: value,\n        isFulfilled: true\n      });\n    }\n    return value;\n  }, reason => {\n    if (!proxy.isDestroyed && !proxy.isDestroying) {\n      setProperties(proxy, {\n        reason,\n        isRejected: true\n      });\n    }\n    throw reason;\n  }, 'Ember: PromiseProxy');\n}\n\n/**\n  A low level mixin making ObjectProxy promise-aware.\n\n  ```javascript\n  import { resolve } from 'rsvp';\n  import $ from 'jquery';\n  import ObjectProxy from '@ember/object/proxy';\n  import PromiseProxyMixin from '@ember/object/promise-proxy-mixin';\n\n  let ObjectPromiseProxy = ObjectProxy.extend(PromiseProxyMixin);\n\n  let proxy = ObjectPromiseProxy.create({\n    promise: resolve($.getJSON('/some/remote/data.json'))\n  });\n\n  proxy.then(function(json){\n     // the json\n  }, function(reason) {\n     // the reason why you have no json\n  });\n  ```\n\n  the proxy has bindable attributes which\n  track the promises life cycle\n\n  ```javascript\n  proxy.get('isPending')   //=> true\n  proxy.get('isSettled')  //=> false\n  proxy.get('isRejected')  //=> false\n  proxy.get('isFulfilled') //=> false\n  ```\n\n  When the $.getJSON completes, and the promise is fulfilled\n  with json, the life cycle attributes will update accordingly.\n  Note that $.getJSON doesn't return an ECMA specified promise,\n  it is useful to wrap this with an `RSVP.resolve` so that it behaves\n  as a spec compliant promise.\n\n  ```javascript\n  proxy.get('isPending')   //=> false\n  proxy.get('isSettled')   //=> true\n  proxy.get('isRejected')  //=> false\n  proxy.get('isFulfilled') //=> true\n  ```\n\n  As the proxy is an ObjectProxy, and the json now its content,\n  all the json properties will be available directly from the proxy.\n\n  ```javascript\n  // Assuming the following json:\n  {\n    firstName: 'Stefan',\n    lastName: 'Penner'\n  }\n\n  // both properties will accessible on the proxy\n  proxy.get('firstName') //=> 'Stefan'\n  proxy.get('lastName')  //=> 'Penner'\n  ```\n\n  @class PromiseProxyMixin\n  @public\n*/\n\nconst PromiseProxyMixin = Mixin.create({\n  reason: null,\n  isPending: computed('isSettled', function () {\n    return !get(this, 'isSettled');\n  }).readOnly(),\n  isSettled: computed('isRejected', 'isFulfilled', function () {\n    return get(this, 'isRejected') || get(this, 'isFulfilled');\n  }).readOnly(),\n  isRejected: false,\n  isFulfilled: false,\n  promise: computed({\n    get() {\n      throw new Error(\"PromiseProxy's promise must be set\");\n    },\n    set(_key, promise) {\n      return tap(this, promise);\n    }\n  }),\n  then: promiseAlias('then'),\n  catch: promiseAlias('catch'),\n  finally: promiseAlias('finally')\n});\nfunction promiseAlias(name) {\n  return function (...args) {\n    let promise = get(this, 'promise');\n\n    // We need this cast because `Parameters` is deferred so that it is not\n    // possible for TS to see it will always produce the right type. However,\n    // since `AnyFn` has a rest type, it is allowed. See discussion on [this\n    // issue](https://github.com/microsoft/TypeScript/issues/47615).\n    return promise[name](...args);\n  };\n}\n\nexport { PromiseProxyMixin as default };\n","import { FrameworkObject } from './-internals.js';\nimport '../-internals/runtime/lib/mixins/registry_proxy.js';\nimport '../-internals/runtime/lib/mixins/container_proxy.js';\nimport '../-internals/runtime/lib/mixins/comparable.js';\nimport '../-internals/runtime/lib/mixins/action_handler.js';\nimport ProxyMixin from '../-internals/runtime/lib/mixins/-proxy.js';\nimport '../enumerable/mutable.js';\nimport '../-internals/runtime/lib/mixins/target_action_support.js';\nimport '../-internals/runtime/lib/ext/rsvp.js';\n\n/**\n@module @ember/object/proxy\n*/\n\n\n/**\n  `ObjectProxy` forwards all properties not defined by the proxy itself\n  to a proxied `content` object.\n\n  ```javascript\n  import EmberObject from '@ember/object';\n  import ObjectProxy from '@ember/object/proxy';\n\n  let exampleObject = EmberObject.create({\n    name: 'Foo'\n  });\n\n  let exampleProxy = ObjectProxy.create({\n    content: exampleObject\n  });\n\n  // Access and change existing properties\n  exampleProxy.get('name');          // 'Foo'\n  exampleProxy.set('name', 'Bar');\n  exampleObject.get('name');         // 'Bar'\n\n  // Create new 'description' property on `exampleObject`\n  exampleProxy.set('description', 'Foo is a whizboo baz');\n  exampleObject.get('description');  // 'Foo is a whizboo baz'\n  ```\n\n  While `content` is unset, setting a property to be delegated will throw an\n  Error.\n\n  ```javascript\n  import ObjectProxy from '@ember/object/proxy';\n\n  let exampleProxy = ObjectProxy.create({\n    content: null,\n    flag: null\n  });\n  exampleProxy.set('flag', true);\n  exampleProxy.get('flag');         // true\n  exampleProxy.get('foo');          // undefined\n  exampleProxy.set('foo', 'data');  // throws Error\n  ```\n\n  Delegated properties can be bound to and will change when content is updated.\n\n  Computed properties on the proxy itself can depend on delegated properties.\n\n  ```javascript\n  import { computed } from '@ember/object';\n  import ObjectProxy from '@ember/object/proxy';\n\n  class ProxyWithComputedProperty extends ObjectProxy {\n    @computed('firstName', 'lastName')\n    get fullName() {\n      var firstName = this.get('firstName'),\n          lastName = this.get('lastName');\n      if (firstName && lastName) {\n        return firstName + ' ' + lastName;\n      }\n      return firstName || lastName;\n    }\n  }\n\n  let exampleProxy = ProxyWithComputedProperty.create();\n\n  exampleProxy.get('fullName');  // undefined\n  exampleProxy.set('content', {\n    firstName: 'Tom', lastName: 'Dale'\n  }); // triggers property change for fullName on proxy\n\n  exampleProxy.get('fullName');  // 'Tom Dale'\n  ```\n\n  @class ObjectProxy\n  @extends EmberObject\n  @uses Ember.ProxyMixin\n  @public\n*/\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nclass ObjectProxy extends FrameworkObject {}\nObjectProxy.PrototypeMixin.reopen(ProxyMixin);\n\nexport { ObjectProxy as default };\n","import { getOwner as getOwner$1 } from '../-internals/owner/index.js';\nexport { setOwner } from '../-internals/owner/index.js';\n\n/**\n  Ember’s dependency injection system is built on the idea of an \"owner\": an\n  object responsible for managing items which can be registered and looked up\n  with the system.\n\n  This module does not provide any concrete instances of owners. Instead, it\n  defines the core type, `Owner`, which specifies the public API contract for an\n  owner. The primary concrete implementations of `Owner` are `EngineInstance`,\n  from `@ember/engine/instance`, and its `ApplicationInstance` subclass, from\n  `@ember/application/instance`.\n\n  Along with `Owner` itself, this module provides a number of supporting types\n  related to Ember's DI system:\n\n  - `Factory`, Ember's primary interface for something which can create class\n    instances registered with the DI system.\n\n  - `FactoryManager`, an interface for inspecting a `Factory`'s class.\n\n  - `Resolver`, an interface defining the contract for the object responsible\n    for mapping string names to the corresponding classes. For example, when you\n    write `@service('session')`, a resolver is responsible to map that back to\n    the `Session` service class in your codebase. Normally, this is handled for\n    you automatically with `ember-resolver`, which is the main implementor of\n    this interface.\n\n  For more details on each, see their per-item docs.\n\n  @module @ember/owner\n  @public\n*/\n\n\n// NOTE: this documentation appears here instead of at the definition site so\n// it can appear correctly in both API docs and for TS, while providing a richer\n// internal representation for Ember's own usage.\n/**\n  Framework objects in an Ember application (components, services, routes, etc.)\n  are created via a factory and dependency injection system. Each of these\n  objects is the responsibility of an \"owner\", which handled its\n  instantiation and manages its lifetime.\n\n  `getOwner` fetches the owner object responsible for an instance. This can\n  be used to lookup or resolve other class instances, or register new factories\n  into the owner.\n\n  For example, this component dynamically looks up a service based on the\n  `audioType` passed as an argument:\n\n  ```app/components/play-audio.js\n  import Component from '@glimmer/component';\n  import { action } from '@ember/object';\n  import { getOwner } from '@ember/owner';\n\n  // Usage:\n  //\n  //   <PlayAudio @audioType={{@model.audioType}} @audioFile={{@model.file}}/>\n  //\n  export default class extends Component {\n    get audioService() {\n      return getOwner(this)?.lookup(`service:${this.args.audioType}`);\n    }\n\n    @action\n    onPlay() {\n      this.audioService?.play(this.args.audioFile);\n    }\n  }\n  ```\n\n  @method getOwner\n  @static\n  @for @ember/owner\n  @param {Object} object An object with an owner.\n  @return {Object} An owner object.\n  @since 2.3.0\n  @public\n*/\n// SAFETY: the cast here is necessary, instead of using an assignment, because\n// TS (not incorrectly! Nothing expressly relates them) does not see that the\n// `InternalOwner` and `Owner` do actually have identical constraints on their\n// relations to the `DIRegistry`.\nconst getOwner = getOwner$1;\n\nexport { getOwner };\n","import EmberObject from '../object/index.js';\nimport { bind } from '../runloop/index.js';\nimport { getHash } from './lib/location-utils.js';\n\n/**\n@module @ember/routing/hash-location\n*/\n\n/**\n  `HashLocation` implements the location API using the browser's\n  hash. At present, it relies on a `hashchange` event existing in the\n  browser.\n\n  Using `HashLocation` results in URLs with a `#` (hash sign) separating the\n  server side URL portion of the URL from the portion that is used by Ember.\n\n  Example:\n\n  ```app/router.js\n  Router.map(function() {\n    this.route('posts', function() {\n      this.route('new');\n    });\n  });\n\n  Router.reopen({\n    location: 'hash'\n  });\n  ```\n\n  This will result in a posts.new url of `/#/posts/new`.\n\n  @class HashLocation\n  @extends EmberObject\n  @protected\n*/\nclass HashLocation extends EmberObject {\n  _hashchangeHandler;\n  _location;\n  init() {\n    this.location = this._location ?? window.location;\n    this._hashchangeHandler = undefined;\n  }\n\n  /**\n    @private\n     Returns normalized location.hash\n     @since 1.5.1\n    @method getHash\n  */\n  getHash() {\n    return getHash(this.location);\n  }\n\n  /**\n    Returns the normalized URL, constructed from `location.hash`.\n     e.g. `#/foo` => `/foo` as well as `#/foo#bar` => `/foo#bar`.\n     By convention, hashed paths must begin with a forward slash, otherwise they\n    are not treated as a path so we can distinguish intent.\n     @private\n    @method getURL\n  */\n  getURL() {\n    let originalPath = this.getHash().substring(1);\n    let outPath = originalPath;\n    if (outPath[0] !== '/') {\n      outPath = '/';\n\n      // Only add the # if the path isn't empty.\n      // We do NOT want `/#` since the ampersand\n      // is only included (conventionally) when\n      // the location.hash has a value\n      if (originalPath) {\n        outPath += `#${originalPath}`;\n      }\n    }\n    return outPath;\n  }\n\n  /**\n    Set the `location.hash` and remembers what was set. This prevents\n    `onUpdateURL` callbacks from triggering when the hash was set by\n    `HashLocation`.\n     @private\n    @method setURL\n    @param path {String}\n  */\n  setURL(path) {\n    this.location.hash = path;\n    this.lastSetURL = path;\n  }\n\n  /**\n    Uses location.replace to update the url without a page reload\n    or history modification.\n     @private\n    @method replaceURL\n    @param path {String}\n  */\n  replaceURL(path) {\n    this.location.replace(`#${path}`);\n    this.lastSetURL = path;\n  }\n  lastSetURL = null;\n\n  /**\n    Register a callback to be invoked when the hash changes. These\n    callbacks will execute when the user presses the back or forward\n    button, but not after `setURL` is invoked.\n     @private\n    @method onUpdateURL\n    @param callback {Function}\n  */\n  onUpdateURL(callback) {\n    this._removeEventListener();\n    this._hashchangeHandler = bind(this, function (_event) {\n      let path = this.getURL();\n      if (this.lastSetURL === path) {\n        return;\n      }\n      this.lastSetURL = null;\n      callback(path);\n    });\n    window.addEventListener('hashchange', this._hashchangeHandler);\n  }\n\n  /**\n    Given a URL, formats it to be placed into the page as part\n    of an element's `href` attribute.\n     @private\n    @method formatURL\n    @param url {String}\n  */\n  formatURL(url) {\n    return `#${url}`;\n  }\n\n  /**\n    Cleans up the HashLocation event listener.\n     @private\n    @method willDestroy\n  */\n  willDestroy() {\n    this._removeEventListener();\n  }\n  _removeEventListener() {\n    if (this._hashchangeHandler) {\n      window.removeEventListener('hashchange', this._hashchangeHandler);\n    }\n  }\n}\n\nexport { HashLocation as default };\n","import EmberObject from '../object/index.js';\nimport '../debug/index.js';\nimport { getHash } from './lib/location-utils.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { assert } from '../debug/lib/assert.js';\n\nlet popstateFired = false;\nfunction _uuid() {\n  return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n    let r, v;\n    r = Math.random() * 16 | 0;\n    v = c === 'x' ? r : r & 3 | 8;\n    return v.toString(16);\n  });\n}\n\n/**\n  HistoryLocation implements the location API using the browser's\n  history.pushState API.\n\n  Using `HistoryLocation` results in URLs that are indistinguishable from a\n  standard URL. This relies upon the browser's `history` API.\n\n  Example:\n\n  ```app/router.js\n  Router.map(function() {\n    this.route('posts', function() {\n      this.route('new');\n    });\n  });\n\n  Router.reopen({\n    location: 'history'\n  });\n  ```\n\n  This will result in a posts.new url of `/posts/new`.\n\n  Keep in mind that your server must serve the Ember app at all the routes you\n  define.\n\n  Using `HistoryLocation` will also result in location states being recorded by\n  the browser `history` API with the following schema:\n\n  ```\n  window.history.state -> { path: '/', uuid: '3552e730-b4a6-46bd-b8bf-d8c3c1a97e0a' }\n  ```\n\n  This allows each in-app location state to be tracked uniquely across history\n  state changes via the `uuid` field.\n\n  @class HistoryLocation\n  @extends EmberObject\n  @protected\n*/\nclass HistoryLocation extends EmberObject {\n  // SAFETY: both of these properties initialized via `init`.\n\n  history;\n  _previousURL;\n  _popstateHandler;\n\n  /**\n    Will be pre-pended to path upon state change\n     @property rootURL\n    @default '/'\n    @private\n  */\n  rootURL = '/';\n\n  /**\n    @private\n     Returns normalized location.hash\n     @method getHash\n  */\n  getHash() {\n    return getHash(this.location);\n  }\n  init() {\n    this._super(...arguments);\n    let base = document.querySelector('base');\n    let baseURL = '';\n    if (base !== null && base.hasAttribute('href')) {\n      baseURL = base.getAttribute('href') ?? '';\n    }\n    this.baseURL = baseURL;\n    this.location = this.location ?? window.location;\n    this._popstateHandler = undefined;\n  }\n\n  /**\n    Used to set state on first call to setURL\n     @private\n    @method initState\n  */\n  initState() {\n    let history = this.history ?? window.history;\n    this.history = history;\n    let {\n      state\n    } = history;\n    let path = this.formatURL(this.getURL());\n    if (state && state.path === path) {\n      // preserve existing state\n      // used for webkit workaround, since there will be no initial popstate event\n      this._previousURL = this.getURL();\n    } else {\n      this.replaceState(path);\n    }\n  }\n\n  /**\n    Returns the current `location.pathname` without `rootURL` or `baseURL`\n     @private\n    @method getURL\n    @return url {String}\n  */\n  getURL() {\n    let {\n      location,\n      rootURL,\n      baseURL\n    } = this;\n    let path = location.pathname;\n\n    // remove trailing slashes if they exists\n    rootURL = rootURL.replace(/\\/$/, '');\n    baseURL = baseURL.replace(/\\/$/, '');\n\n    // remove baseURL and rootURL from start of path\n    let url = path.replace(new RegExp(`^${baseURL}(?=/|$)`), '').replace(new RegExp(`^${rootURL}(?=/|$)`), '').replace(/\\/\\//g, '/'); // remove extra slashes\n\n    let search = location.search || '';\n    url += search + this.getHash();\n    return url;\n  }\n\n  /**\n    Uses `history.pushState` to update the url without a page reload.\n     @private\n    @method setURL\n    @param path {String}\n  */\n  setURL(path) {\n    (isDevelopingApp() && !(this.history) && assert('HistoryLocation.history is unexpectedly missing', this.history));\n    let {\n      state\n    } = this.history;\n    path = this.formatURL(path);\n    if (!state || state.path !== path) {\n      this.pushState(path);\n    }\n  }\n\n  /**\n    Uses `history.replaceState` to update the url without a page reload\n    or history modification.\n     @private\n    @method replaceURL\n    @param path {String}\n  */\n  replaceURL(path) {\n    (isDevelopingApp() && !(this.history) && assert('HistoryLocation.history is unexpectedly missing', this.history));\n    let {\n      state\n    } = this.history;\n    path = this.formatURL(path);\n    if (!state || state.path !== path) {\n      this.replaceState(path);\n    }\n  }\n\n  /**\n   Pushes a new state.\n    @private\n   @method pushState\n   @param path {String}\n  */\n  pushState(path) {\n    let state = {\n      path,\n      uuid: _uuid()\n    };\n    (isDevelopingApp() && !(this.history) && assert('HistoryLocation.history is unexpectedly missing', this.history));\n    this.history.pushState(state, '', path);\n\n    // used for webkit workaround\n    this._previousURL = this.getURL();\n  }\n\n  /**\n   Replaces the current state.\n    @private\n   @method replaceState\n   @param path {String}\n  */\n  replaceState(path) {\n    let state = {\n      path,\n      uuid: _uuid()\n    };\n    (isDevelopingApp() && !(this.history) && assert('HistoryLocation.history is unexpectedly missing', this.history));\n    this.history.replaceState(state, '', path);\n\n    // used for webkit workaround\n    this._previousURL = this.getURL();\n  }\n\n  /**\n    Register a callback to be invoked whenever the browser\n    history changes, including using forward and back buttons.\n     @private\n    @method onUpdateURL\n    @param callback {Function}\n  */\n  onUpdateURL(callback) {\n    this._removeEventListener();\n    this._popstateHandler = () => {\n      // Ignore initial page load popstate event in Chrome\n      if (!popstateFired) {\n        popstateFired = true;\n        if (this.getURL() === this._previousURL) {\n          return;\n        }\n      }\n      callback(this.getURL());\n    };\n    window.addEventListener('popstate', this._popstateHandler);\n  }\n\n  /**\n    Formats url to be placed into href attribute.\n     @private\n    @method formatURL\n    @param url {String}\n    @return formatted url {String}\n  */\n  formatURL(url) {\n    let {\n      rootURL,\n      baseURL\n    } = this;\n    if (url !== '') {\n      // remove trailing slashes if they exists\n      rootURL = rootURL.replace(/\\/$/, '');\n      baseURL = baseURL.replace(/\\/$/, '');\n    } else if (baseURL[0] === '/' && rootURL[0] === '/') {\n      // if baseURL and rootURL both start with a slash\n      // ... remove trailing slash from baseURL if it exists\n      baseURL = baseURL.replace(/\\/$/, '');\n    }\n    return baseURL + rootURL + url;\n  }\n\n  /**\n    Cleans up the HistoryLocation event listener.\n     @private\n    @method willDestroy\n  */\n  willDestroy() {\n    this._removeEventListener();\n  }\n  _removeEventListener() {\n    if (this._popstateHandler) {\n      window.removeEventListener('popstate', this._popstateHandler);\n    }\n  }\n}\n\nexport { HistoryLocation as default };\n","/**\n  A two-tiered cache with support for fallback values when doing lookups.\n  Uses \"buckets\" and then \"keys\" to cache values.\n\n  @private\n  @class BucketCache\n*/\nclass BucketCache {\n  cache;\n  constructor() {\n    this.cache = new Map();\n  }\n  has(bucketKey) {\n    return this.cache.has(bucketKey);\n  }\n  stash(bucketKey, key, value) {\n    let bucket = this.cache.get(bucketKey);\n    if (bucket === undefined) {\n      bucket = new Map();\n      this.cache.set(bucketKey, bucket);\n    }\n    bucket.set(key, value);\n  }\n  lookup(bucketKey, prop, defaultValue) {\n    if (!this.has(bucketKey)) {\n      return defaultValue;\n    }\n    let bucket = this.cache.get(bucketKey);\n    if (bucket.has(prop)) {\n      return bucket.get(prop);\n    } else {\n      return defaultValue;\n    }\n  }\n}\n\nexport { BucketCache as default };\n","/**\n  @module @ember/routing\n*/\n\n/**\n  Finds a controller instance.\n\n  @for Ember\n  @method controllerFor\n  @private\n*/\nfunction controllerFor(container, controllerName, lookupOptions) {\n  return container.lookup(`controller:${controllerName}`, lookupOptions);\n}\n\nexport { controllerFor as default };\n","import '../../debug/index.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { assert } from '../../debug/lib/assert.js';\n\nlet uuid = 0;\nfunction isCallback(value) {\n  return typeof value === 'function';\n}\nfunction isOptions(value) {\n  return value !== null && typeof value === 'object';\n}\nclass DSLImpl {\n  parent;\n  // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types\n  matches;\n  enableLoadingSubstates;\n  explicitIndex = false;\n  options;\n  constructor(name = null, options) {\n    this.parent = name;\n    this.enableLoadingSubstates = Boolean(options && options.enableLoadingSubstates);\n    this.matches = [];\n    this.options = options;\n  }\n  route(name, _options, _callback) {\n    let options;\n    let callback = null;\n    let dummyErrorRoute = `/_unused_dummy_error_path_route_${name}/:error`;\n    if (isCallback(_options)) {\n      (isDevelopingApp() && !(arguments.length === 2) && assert('Unexpected arguments', arguments.length === 2));\n      options = {};\n      callback = _options;\n    } else if (isCallback(_callback)) {\n      (isDevelopingApp() && !(arguments.length === 3) && assert('Unexpected arguments', arguments.length === 3));\n      (isDevelopingApp() && !(isOptions(_options)) && assert('Unexpected arguments', isOptions(_options)));\n      options = _options;\n      callback = _callback;\n    } else {\n      options = _options || {};\n    }\n    (isDevelopingApp() && !((() => {\n      if (options.overrideNameAssertion === true) {\n        return true;\n      }\n      return ['basic', 'application'].indexOf(name) === -1;\n    })()) && assert(`'${name}' cannot be used as a route name.`, (() => {\n      if (options.overrideNameAssertion === true) {\n        return true;\n      }\n      return ['basic', 'application'].indexOf(name) === -1;\n    })()));\n    (isDevelopingApp() && !(name.indexOf(':') === -1) && assert(`'${name}' is not a valid route name. It cannot contain a ':'. You may want to use the 'path' option instead.`, name.indexOf(':') === -1));\n    if (this.enableLoadingSubstates) {\n      createRoute(this, `${name}_loading`, {\n        resetNamespace: options.resetNamespace\n      });\n      createRoute(this, `${name}_error`, {\n        resetNamespace: options.resetNamespace,\n        path: dummyErrorRoute\n      });\n    }\n    if (callback) {\n      let fullName = getFullName(this, name, options.resetNamespace);\n      let dsl = new DSLImpl(fullName, this.options);\n      createRoute(dsl, 'loading');\n      createRoute(dsl, 'error', {\n        path: dummyErrorRoute\n      });\n      callback.call(dsl);\n      createRoute(this, name, options, dsl.generate());\n    } else {\n      createRoute(this, name, options);\n    }\n  }\n  push(url, name, callback,\n  // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n  serialize) {\n    let parts = name.split('.');\n    if (this.options.engineInfo) {\n      let localFullName = name.slice(this.options.engineInfo.fullName.length + 1);\n      let routeInfo = Object.assign({\n        localFullName\n      }, this.options.engineInfo);\n      if (serialize) {\n        routeInfo.serializeMethod = serialize;\n      }\n      this.options.addRouteForEngine(name, routeInfo);\n    } else if (serialize) {\n      throw new Error(`Defining a route serializer on route '${name}' outside an Engine is not allowed.`);\n    }\n    if (url === '' || url === '/' || parts[parts.length - 1] === 'index') {\n      this.explicitIndex = true;\n    }\n    this.matches.push(url, name, callback);\n  }\n  generate() {\n    let dslMatches = this.matches;\n    if (!this.explicitIndex) {\n      this.route('index', {\n        path: '/'\n      });\n    }\n    return match => {\n      for (let i = 0; i < dslMatches.length; i += 3) {\n        match(dslMatches[i]).to(dslMatches[i + 1], dslMatches[i + 2]);\n      }\n    };\n  }\n  mount(_name, options = {}) {\n    let engineRouteMap = this.options.resolveRouteMap(_name);\n    let name = _name;\n    if (options.as) {\n      name = options.as;\n    }\n    let fullName = getFullName(this, name, options.resetNamespace);\n    let engineInfo = {\n      name: _name,\n      instanceId: uuid++,\n      mountPoint: fullName,\n      fullName\n    };\n    let path = options.path;\n    if (typeof path !== 'string') {\n      path = `/${name}`;\n    }\n    let callback;\n    let dummyErrorRoute = `/_unused_dummy_error_path_route_${name}/:error`;\n    if (engineRouteMap) {\n      let shouldResetEngineInfo = false;\n      let oldEngineInfo = this.options.engineInfo;\n      if (oldEngineInfo) {\n        shouldResetEngineInfo = true;\n        this.options.engineInfo = engineInfo;\n      }\n      let optionsForChild = Object.assign({\n        engineInfo\n      }, this.options);\n      let childDSL = new DSLImpl(fullName, optionsForChild);\n      createRoute(childDSL, 'loading');\n      createRoute(childDSL, 'error', {\n        path: dummyErrorRoute\n      });\n      engineRouteMap.class.call(childDSL);\n      callback = childDSL.generate();\n      if (shouldResetEngineInfo) {\n        this.options.engineInfo = oldEngineInfo;\n      }\n    }\n    let localFullName = 'application';\n    let routeInfo = Object.assign({\n      localFullName\n    }, engineInfo);\n    if (this.enableLoadingSubstates) {\n      // These values are important to register the loading routes under their\n      // proper names for the Router and within the Engine's registry.\n      let substateName = `${name}_loading`;\n      let localFullName = `application_loading`;\n      let routeInfo = Object.assign({\n        localFullName\n      }, engineInfo);\n      createRoute(this, substateName, {\n        resetNamespace: options.resetNamespace\n      });\n      this.options.addRouteForEngine(substateName, routeInfo);\n      substateName = `${name}_error`;\n      localFullName = `application_error`;\n      routeInfo = Object.assign({\n        localFullName\n      }, engineInfo);\n      createRoute(this, substateName, {\n        resetNamespace: options.resetNamespace,\n        path: dummyErrorRoute\n      });\n      this.options.addRouteForEngine(substateName, routeInfo);\n    }\n    this.options.addRouteForEngine(fullName, routeInfo);\n    this.push(path, fullName, callback);\n  }\n}\nfunction canNest(dsl) {\n  return dsl.parent !== 'application';\n}\nfunction getFullName(dsl, name, resetNamespace) {\n  if (canNest(dsl) && resetNamespace !== true) {\n    return `${dsl.parent}.${name}`;\n  } else {\n    return name;\n  }\n}\nfunction createRoute(dsl, name, options = {}, callback) {\n  let fullName = getFullName(dsl, name, options.resetNamespace);\n  if (typeof options.path !== 'string') {\n    options.path = `/${name}`;\n  }\n  dsl.push(options.path, fullName, callback, options.serialize);\n}\n\nexport { DSLImpl as default };\n","import '../../-internals/meta/lib/meta.js';\nimport '../../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { info } from '../../debug/index.js';\nimport '../../../@glimmer/destroyable/index.js';\nimport '../../../@glimmer/validator/index.js';\nimport '../../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../../@glimmer/global-context/index.js';\nimport '../../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { g as get } from '../../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../../shared-chunks/env-DEd6hPbj.js';\nimport Controller from '../../controller/index.js';\nimport { assert } from '../../debug/lib/assert.js';\n\nfunction generateControllerFactory(owner, controllerName) {\n  /* eslint-enable @typescript-eslint/no-empty-object-type */\n  let factoryManager = owner.factoryFor('controller:basic');\n  (isDevelopingApp() && !(factoryManager !== undefined) && assert('[BUG] unexpectedly missing a factoryManager for `controller:basic`', factoryManager !== undefined)); // SAFETY: This is *not* safe, and the cast should be removed in favor of the\n  // `assert()` below after altering *tests*. It is left in this state for the\n  // moment in the interest of keeping type-only changes separate from changes\n  // to the runtime behavior of the system, even for tests.\n  let Factory = factoryManager.class;\n  // assert(\n  //   '[BUG] factory for `controller:main` is unexpectedly not a Controller',\n  //   ((factory): factory is typeof Controller => factory === Controller)(Factory)\n  // );\n\n  Factory = class extends Factory {\n    toString() {\n      return `(generated ${controllerName} controller)`;\n    }\n  };\n  let fullName = `controller:${controllerName}`;\n  owner.register(fullName, Factory);\n\n  // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n  return owner.factoryFor(fullName);\n}\n\n/**\n  Generates and instantiates a controller extending from `controller:basic`\n  if present, or `Controller` if not.\n\n  @for Ember\n  @method generateController\n  @private\n  @since 1.3.0\n*/\nfunction generateController(owner, controllerName) {\n  generateControllerFactory(owner, controllerName);\n  let fullName = `controller:${controllerName}`;\n  let instance = owner.lookup(fullName);\n  (isDevelopingApp() && !(instance instanceof Controller) && assert('Expected an instance of controller', instance instanceof Controller));\n  if (isDevelopingApp()) {\n    if (get(instance, 'namespace.LOG_ACTIVE_GENERATION')) {\n      info(`generated -> ${fullName}`, {\n        fullName\n      });\n    }\n  }\n  return instance;\n}\n\nexport { generateController as default, generateControllerFactory };\n","/**\n  @private\n\n  Returns the current `location.pathname`, normalized for IE inconsistencies.\n*/\nfunction getPath(location) {\n  let pathname = location.pathname;\n  // Various versions of IE/Opera don't always return a leading slash\n  if (pathname[0] !== '/') {\n    pathname = `/${pathname}`;\n  }\n  return pathname;\n}\n\n/**\n  @private\n\n  Returns the current `location.search`.\n*/\nfunction getQuery(location) {\n  return location.search;\n}\n\n/**\n  @private\n\n  Returns the hash or empty string\n*/\nfunction getHash(location) {\n  if (location.hash !== undefined) {\n    return location.hash.substring(0);\n  }\n  return '';\n}\nfunction getFullPath(location) {\n  return getPath(location) + getQuery(location) + getHash(location);\n}\nfunction getOrigin(location) {\n  let origin = location.origin;\n\n  // Older browsers, especially IE, don't have origin\n  if (!origin) {\n    origin = `${location.protocol}//${location.hostname}`;\n    if (location.port) {\n      origin += `:${location.port}`;\n    }\n  }\n  return origin;\n}\n\n/**\n  Replaces the current location, making sure we explicitly include the origin\n  to prevent redirecting to a different origin.\n\n  @private\n*/\nfunction replacePath(location, path) {\n  location.replace(getOrigin(location) + path);\n}\n\nexport { getFullPath, getHash, getOrigin, getPath, getQuery, replacePath };\n","class QueryParams {\n  values;\n  isQueryParams = true;\n  constructor(values = null) {\n    this.values = values;\n  }\n}\n\nexport { QueryParams as default };\n","import { shallowEqual } from './utils.js';\n\nclass RouterState {\n  router;\n  emberRouter;\n  routerJsState;\n  constructor(emberRouter, router, routerJsState) {\n    this.emberRouter = emberRouter;\n    this.router = router;\n    this.routerJsState = routerJsState;\n  }\n  isActiveIntent(routeName, models, queryParams) {\n    let state = this.routerJsState;\n    if (!this.router.isActiveIntent(routeName, models, undefined, state)) {\n      return false;\n    }\n    if (queryParams !== undefined && Object.keys(queryParams).length > 0) {\n      let visibleQueryParams = Object.assign({}, queryParams);\n      this.emberRouter._prepareQueryParams(routeName, models, visibleQueryParams);\n      return shallowEqual(visibleQueryParams, state.queryParams);\n    }\n    return true;\n  }\n}\n\nexport { RouterState as default };\n","import { getOwner } from '../../-internals/owner/index.js';\nimport '../../debug/index.js';\nimport '../../-internals/meta/lib/meta.js';\nimport '../../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../../@glimmer/destroyable/index.js';\nimport '../../../@glimmer/validator/index.js';\nimport '../../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../../@glimmer/global-context/index.js';\nimport '../../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../../shared-chunks/capabilities-DHiXCCuB.js';\nimport '../../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../../shared-chunks/env-DEd6hPbj.js';\nimport { readOnly } from '../../object/lib/computed/computed_macros.js';\nimport '../../object/index.js';\nimport '../../object/core.js';\nimport '../../-internals/runtime/lib/mixins/registry_proxy.js';\nimport '../../-internals/runtime/lib/mixins/container_proxy.js';\nimport '../../-internals/runtime/lib/mixins/comparable.js';\nimport '../../-internals/runtime/lib/mixins/action_handler.js';\nimport '../../-internals/runtime/lib/mixins/-proxy.js';\nimport '../../enumerable/mutable.js';\nimport '../../-internals/runtime/lib/mixins/target_action_support.js';\nimport '../../-internals/runtime/lib/ext/rsvp.js';\nimport '../../array/index.js';\nimport Service from '../../service/index.js';\nimport EmberRouter from '../router.js';\nimport { ROUTER } from '../router-service.js';\nimport { assert } from '../../debug/lib/assert.js';\n\n/**\n@module ember\n*/\n\nclass RoutingService extends Service {\n  [ROUTER];\n  get router() {\n    let router = this[ROUTER];\n    if (router !== undefined) {\n      return router;\n    }\n    let owner = getOwner(this);\n    (isDevelopingApp() && !(owner) && assert('RoutingService is unexpectedly missing an owner', owner));\n    let _router = owner.lookup('router:main');\n    (isDevelopingApp() && !(_router instanceof EmberRouter) && assert('ROUTING SERVICE BUG: Expected router to be an instance of EmberRouter', _router instanceof EmberRouter));\n    _router.setupRouter();\n    return this[ROUTER] = _router;\n  }\n  hasRoute(routeName) {\n    return this.router.hasRoute(routeName);\n  }\n  transitionTo(routeName, models, queryParams, shouldReplace) {\n    let transition = this.router._doTransition(routeName, models, queryParams);\n    if (shouldReplace) {\n      transition.method('replace');\n    }\n    return transition;\n  }\n  normalizeQueryParams(routeName, models, queryParams) {\n    this.router._prepareQueryParams(routeName, models, queryParams);\n  }\n  _generateURL(routeName, models, queryParams) {\n    let visibleQueryParams = {};\n    if (queryParams) {\n      Object.assign(visibleQueryParams, queryParams);\n      this.normalizeQueryParams(routeName, models, visibleQueryParams);\n    }\n    return this.router.generate(routeName, ...models, {\n      queryParams: visibleQueryParams\n    });\n  }\n  generateURL(routeName, models, queryParams) {\n    if (this.router._initialTransitionStarted) {\n      return this._generateURL(routeName, models, queryParams);\n    } else {\n      // Swallow error when transition has not started.\n      // When rendering in tests without visit(), we cannot infer the route context which <LinkTo/> needs be aware of\n      try {\n        return this._generateURL(routeName, models, queryParams);\n      } catch (_e) {\n        return;\n      }\n    }\n  }\n  isActiveForRoute(contexts, queryParams, routeName, routerState) {\n    let handlers = this.router._routerMicrolib.recognizer.handlersFor(routeName);\n    let leafName = handlers[handlers.length - 1].handler;\n    let maximumContexts = numberOfContextsAcceptedByHandler(routeName, handlers);\n\n    // NOTE: any ugliness in the calculation of activeness is largely\n    // due to the fact that we support automatic normalizing of\n    // `resource` -> `resource.index`, even though there might be\n    // dynamic segments / query params defined on `resource.index`\n    // which complicates (and makes somewhat ambiguous) the calculation\n    // of activeness for links that link to `resource` instead of\n    // directly to `resource.index`.\n\n    // if we don't have enough contexts revert back to full route name\n    // this is because the leaf route will use one of the contexts\n    if (contexts.length > maximumContexts) {\n      routeName = leafName;\n    }\n    return routerState.isActiveIntent(routeName, contexts, queryParams);\n  }\n}\nRoutingService.reopen({\n  targetState: readOnly('router.targetState'),\n  currentState: readOnly('router.currentState'),\n  currentRouteName: readOnly('router.currentRouteName'),\n  currentPath: readOnly('router.currentPath')\n});\nfunction numberOfContextsAcceptedByHandler(handlerName, handlerInfos) {\n  let req = 0;\n  for (let i = 0; i < handlerInfos.length; i++) {\n    req += handlerInfos[i].names.length;\n    if (handlerInfos[i].handler === handlerName) {\n      break;\n    }\n  }\n  return req;\n}\n\nexport { RoutingService as default };\n","import '../../-internals/meta/lib/meta.js';\nimport '../../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../debug/index.js';\nimport '../../../@glimmer/destroyable/index.js';\nimport '../../../@glimmer/validator/index.js';\nimport '../../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../../@glimmer/global-context/index.js';\nimport '../../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { g as get } from '../../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../../shared-chunks/env-DEd6hPbj.js';\nimport { getOwner } from '../../-internals/owner/index.js';\nimport EngineInstance from '../../engine/instance.js';\nimport '../../../route-recognizer/index.js';\nimport '../../../shared-chunks/rsvp-CnCSY930.js';\nimport { S as STATE_SYMBOL } from '../../../shared-chunks/unrecognized-url-error-BBMMZhBN.js';\nimport { assert } from '../../debug/lib/assert.js';\n\nconst ALL_PERIODS_REGEX = /\\./g;\nfunction extractRouteArgs(args) {\n  // SAFETY: This should just be the same thing\n  args = args.slice();\n  let possibleOptions = args[args.length - 1];\n  let queryParams;\n  if (isRouteOptions(possibleOptions)) {\n    args.pop(); // Remove options\n    queryParams = possibleOptions.queryParams;\n  } else {\n    queryParams = {};\n  }\n  let routeName;\n  if (typeof args[0] === 'string') {\n    routeName = args.shift();\n    // We just checked this!\n    (isDevelopingApp() && !(typeof routeName === 'string') && assert('routeName is a string', typeof routeName === 'string'));\n  }\n\n  // SAFTEY: We removed the name and options if they existed, only models left.\n  let models = args;\n  return {\n    routeName,\n    models,\n    queryParams\n  };\n}\nfunction getActiveTargetName(router) {\n  let routeInfos = router.activeTransition ? router.activeTransition[STATE_SYMBOL].routeInfos : router.state.routeInfos;\n  let lastRouteInfo = routeInfos[routeInfos.length - 1];\n  (isDevelopingApp() && !(lastRouteInfo) && assert('has last route info', lastRouteInfo));\n  return lastRouteInfo.name;\n}\nfunction stashParamNames(router, routeInfos) {\n  if (routeInfos['_namesStashed']) {\n    return;\n  }\n\n  // This helper exists because router.js/route-recognizer.js awkwardly\n  // keeps separate a routeInfo's list of parameter names depending\n  // on whether a URL transition or named transition is happening.\n  // Hopefully we can remove this in the future.\n  let routeInfo = routeInfos[routeInfos.length - 1];\n  (isDevelopingApp() && !(routeInfo) && assert('has route info', routeInfo));\n  let targetRouteName = routeInfo.name;\n  let recogHandlers = router._routerMicrolib.recognizer.handlersFor(targetRouteName);\n  let dynamicParent;\n  for (let i = 0; i < routeInfos.length; ++i) {\n    let routeInfo = routeInfos[i];\n    (isDevelopingApp() && !(routeInfo) && assert('has route info', routeInfo));\n    let names = recogHandlers[i].names;\n    if (names.length) {\n      dynamicParent = routeInfo;\n    }\n    routeInfo['_names'] = names;\n    let route = routeInfo.route;\n    route._stashNames(routeInfo, dynamicParent);\n  }\n  routeInfos['_namesStashed'] = true;\n}\nfunction _calculateCacheValuePrefix(prefix, part) {\n  // calculates the dot separated sections from prefix that are also\n  // at the start of part - which gives us the route name\n\n  // given : prefix = site.article.comments, part = site.article.id\n  //      - returns: site.article (use get(values[site.article], 'id') to get the dynamic part - used below)\n\n  // given : prefix = site.article, part = site.article.id\n  //      - returns: site.article. (use get(values[site.article], 'id') to get the dynamic part - used below)\n\n  let prefixParts = prefix.split('.');\n  let currPrefix = '';\n  for (let i = 0; i < prefixParts.length; i++) {\n    let currPart = prefixParts.slice(0, i + 1).join('.');\n    if (part.indexOf(currPart) !== 0) {\n      break;\n    }\n    currPrefix = currPart;\n  }\n  return currPrefix;\n}\n\n/*\n  Stolen from Controller\n*/\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nfunction calculateCacheKey(prefix, parts = [], values) {\n  let suffixes = '';\n  for (let part of parts) {\n    let cacheValuePrefix = _calculateCacheValuePrefix(prefix, part);\n    let value;\n    if (values) {\n      if (cacheValuePrefix && cacheValuePrefix in values) {\n        let partRemovedPrefix = part.indexOf(cacheValuePrefix) === 0 ? part.substring(cacheValuePrefix.length + 1) : part;\n        value = get(values[cacheValuePrefix], partRemovedPrefix);\n      } else {\n        value = get(values, part);\n      }\n    }\n    suffixes += `::${part}:${value}`;\n  }\n  return prefix + suffixes.replace(ALL_PERIODS_REGEX, '-');\n}\n\n/*\n  Controller-defined query parameters can come in three shapes:\n\n  Array\n    queryParams: ['foo', 'bar']\n  Array of simple objects where value is an alias\n    queryParams: [\n      {\n        'foo': 'rename_foo_to_this'\n      },\n      {\n        'bar': 'call_bar_this_instead'\n      }\n    ]\n  Array of fully defined objects\n    queryParams: [\n      {\n        'foo': {\n          as: 'rename_foo_to_this'\n        },\n      }\n      {\n        'bar': {\n          as: 'call_bar_this_instead',\n          scope: 'controller'\n        }\n      }\n    ]\n\n  This helper normalizes all three possible styles into the\n  'Array of fully defined objects' style.\n*/\nfunction normalizeControllerQueryParams(queryParams) {\n  let qpMap = {};\n  for (let queryParam of queryParams) {\n    accumulateQueryParamDescriptors(queryParam, qpMap);\n  }\n  return qpMap;\n}\nfunction accumulateQueryParamDescriptors(_desc, accum) {\n  let desc = typeof _desc === 'string' ? {\n    [_desc]: {\n      as: null\n    }\n  } : _desc;\n  for (let key in desc) {\n    if (!Object.prototype.hasOwnProperty.call(desc, key)) {\n      return;\n    }\n    let _singleDesc = desc[key];\n    let singleDesc = typeof _singleDesc === 'string' ? {\n      as: _singleDesc\n    } : _singleDesc;\n    let partialVal = accum[key] || {\n      as: null,\n      scope: 'model'\n    };\n    let val = {\n      ...partialVal,\n      ...singleDesc\n    };\n    accum[key] = val;\n  }\n}\n\n/*\n  Check if a routeName resembles a url instead\n\n  @private\n*/\nfunction resemblesURL(str) {\n  return typeof str === 'string' && (str === '' || str[0] === '/');\n}\n\n/*\n  Returns an arguments array where the route name arg is prefixed based on the mount point\n\n  @private\n*/\nfunction prefixRouteNameArg(route, args) {\n  let routeName;\n  let owner = getOwner(route);\n  (isDevelopingApp() && !(owner instanceof EngineInstance) && assert('Expected route to have EngineInstance as owner', owner instanceof EngineInstance));\n  let prefix = owner.mountPoint;\n\n  // only alter the routeName if it's actually referencing a route.\n  if (owner.routable && typeof args[0] === 'string') {\n    routeName = args[0];\n    if (resemblesURL(routeName)) {\n      throw new Error('Programmatic transitions by URL cannot be used within an Engine. Please use the route name instead.');\n    } else {\n      routeName = `${prefix}.${routeName}`;\n      args[0] = routeName;\n    }\n  }\n  return args;\n}\nfunction shallowEqual(a, b) {\n  let aCount = 0;\n  let bCount = 0;\n  for (let kA in a) {\n    if (Object.prototype.hasOwnProperty.call(a, kA)) {\n      if (a[kA] !== b[kA]) {\n        return false;\n      }\n      aCount++;\n    }\n  }\n  for (let kB in b) {\n    if (Object.prototype.hasOwnProperty.call(b, kB)) {\n      bCount++;\n    }\n  }\n  return aCount === bCount;\n}\nfunction isRouteOptions(value) {\n  if (value && typeof value === 'object') {\n    let qps = value.queryParams;\n    if (qps && typeof qps === 'object') {\n      return Object.keys(qps).every(k => typeof k === 'string');\n    }\n  }\n  return false;\n}\n\nexport { calculateCacheKey, extractRouteArgs, getActiveTargetName, normalizeControllerQueryParams, prefixRouteNameArg, resemblesURL, shallowEqual, stashParamNames };\n","import EmberObject from '../object/index.js';\nimport '../debug/index.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { assert } from '../debug/lib/assert.js';\n\n/**\n@module @ember/routing/none-location\n*/\n\n/**\n  NoneLocation does not interact with the browser. It is useful for\n  testing, or when you need to manage state with your Router, but temporarily\n  don't want it to muck with the URL (for example when you embed your\n  application in a larger page).\n\n  Using `NoneLocation` causes Ember to not store the applications URL state\n  in the actual URL. This is generally used for testing purposes, and is one\n  of the changes made when calling `App.setupForTesting()`.\n\n  @class NoneLocation\n  @extends EmberObject\n  @protected\n*/\nclass NoneLocation extends EmberObject {\n  updateCallback;\n\n  // Set in reopen so it can be overwritten with extend\n\n  /**\n    Will be pre-pended to path.\n     @private\n    @property rootURL\n    @default '/'\n  */\n  // Set in reopen so it can be overwritten with extend\n\n  initState() {\n    this._super(...arguments);\n    let {\n      rootURL\n    } = this;\n\n    // This assert doesn't have anything to do with state initialization,\n    // but we're hijacking this method since it's called after the route has\n    // set the rootURL property on its Location instance.\n    (isDevelopingApp() && !(rootURL.charAt(rootURL.length - 1) === '/') && assert('rootURL must end with a trailing forward slash e.g. \"/app/\"', rootURL.charAt(rootURL.length - 1) === '/'));\n  }\n\n  /**\n    Returns the current path without `rootURL`.\n     @private\n    @method getURL\n    @return {String} path\n  */\n  getURL() {\n    let {\n      path,\n      rootURL\n    } = this;\n\n    // remove trailing slashes if they exists\n    rootURL = rootURL.replace(/\\/$/, '');\n\n    // remove rootURL from url\n    return path.replace(new RegExp(`^${rootURL}(?=/|$)`), '');\n  }\n\n  /**\n    Set the path and remembers what was set. Using this method\n    to change the path will not invoke the `updateURL` callback.\n     @private\n    @method setURL\n    @param path {String}\n  */\n  setURL(path) {\n    this.path = path;\n  }\n\n  /**\n    Register a callback to be invoked when the path changes. These\n    callbacks will execute when the user presses the back or forward\n    button, but not after `setURL` is invoked.\n     @private\n    @method onUpdateURL\n    @param callback {Function}\n  */\n  onUpdateURL(callback) {\n    this.updateCallback = callback;\n  }\n\n  /**\n    Sets the path and calls the `updateURL` callback.\n     @private\n    @method handleURL\n    @param url {String}\n  */\n  handleURL(url) {\n    this.path = url;\n    if (this.updateCallback) {\n      this.updateCallback(url);\n    }\n  }\n\n  /**\n    Given a URL, formats it to be placed into the page as part\n    of an element's `href` attribute.\n     @private\n    @method formatURL\n    @param {String} url\n    @return {String} url\n  */\n  formatURL(url) {\n    let {\n      rootURL\n    } = this;\n    if (url !== '') {\n      // remove trailing slashes if they exists\n      rootURL = rootURL.replace(/\\/$/, '');\n    }\n    return rootURL + url;\n  }\n}\nNoneLocation.reopen({\n  path: '',\n  rootURL: '/'\n});\n\nexport { NoneLocation as default };\n","import { p as privatize } from '../../shared-chunks/registry-XY5cfmbH.js';\nimport { g as get, I as flushAsyncObservers, b as descriptorForProperty, d as defineProperty, x as addObserver, c as computed } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../-internals/meta/lib/meta.js';\nimport { info } from '../debug/index.js';\nimport '../../@glimmer/validator/index.js';\nimport { l as lookupDescriptor } from '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { i as isProxy } from '../../shared-chunks/is_proxy-C2q5rUMp.js';\nimport '../../@glimmer/destroyable/index.js';\nimport { c as hasInternalComponentManager } from '../../shared-chunks/api-CkUl6KyJ.js';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { s as set } from '../../shared-chunks/property_set-DrZnfGQ7.js';\nimport { g as getProperties, s as setProperties } from '../../shared-chunks/set_properties-Dag9Xz6u.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\nimport { getOwner } from '../-internals/owner/index.js';\nimport EmberObject from '../object/index.js';\nimport Evented from '../object/evented.js';\nimport { A } from '../array/index.js';\nimport '../-internals/runtime/lib/mixins/registry_proxy.js';\nimport '../-internals/runtime/lib/mixins/container_proxy.js';\nimport '../-internals/runtime/lib/mixins/comparable.js';\nimport ActionHandler from '../-internals/runtime/lib/mixins/action_handler.js';\nimport '../-internals/runtime/lib/mixins/-proxy.js';\nimport '../enumerable/mutable.js';\nimport '../-internals/runtime/lib/mixins/target_action_support.js';\nimport '../-internals/runtime/lib/ext/rsvp.js';\nimport typeOf from '../utils/lib/type-of.js';\nimport Controller from '../controller/index.js';\nimport EngineInstance from '../engine/instance.js';\nimport { dependentKeyCompat } from '../object/compat.js';\nimport { once } from '../runloop/index.js';\nimport '../../route-recognizer/index.js';\nimport '../../shared-chunks/rsvp-CnCSY930.js';\nimport { S as STATE_SYMBOL, P as PARAMS_SYMBOL } from '../../shared-chunks/unrecognized-url-error-BBMMZhBN.js';\nimport generateController from './lib/generate_controller.js';\nimport { prefixRouteNameArg, stashParamNames, calculateCacheKey, normalizeControllerQueryParams } from './lib/utils.js';\nimport { a as decorateMethodV2 } from '../../shared-chunks/chunk-3SQBS3Y5-Cj4eryg1.js';\nimport { assert } from '../debug/lib/assert.js';\nimport { isTesting } from '../debug/lib/testing.js';\n\nconst RENDER = Symbol('render');\nconst RENDER_STATE = Symbol('render-state');\n\n/**\n@module @ember/routing/route\n*/\n\n/**\n  The `Route` class is used to define individual routes. Refer to\n  the [routing guide](https://guides.emberjs.com/release/routing/) for documentation.\n\n  @class Route\n  @extends EmberObject\n  @uses ActionHandler\n  @uses Evented\n  @since 1.0.0\n  @public\n*/\n\nclass Route extends EmberObject.extend(ActionHandler, Evented) {\n  static isRouteFactory = true;\n\n  // These properties will end up appearing in the public interface because we\n  // `implements IRoute` from `router.js`, which has them as part of *its*\n  // public contract. We mark them as `@internal` so they at least signal to\n  // people subclassing `Route` that they should not use them.\n  /** @internal */\n  context = {};\n  /** @internal */\n\n  /** @internal */\n  _bucketCache;\n  /** @internal */\n  _internalName;\n  _names;\n  _router;\n  constructor(owner) {\n    super(owner);\n    if (owner) {\n      let router = owner.lookup('router:main');\n      let bucketCache = owner.lookup(privatize`-bucket-cache:main`);\n      this._router = router;\n      this._bucketCache = bucketCache;\n      this._topLevelViewTemplate = owner.lookup('template:-outlet');\n      this._environment = owner.lookup('-environment:main');\n    }\n  }\n\n  /**\n    A hook you can implement to convert the route's model into parameters\n    for the URL.\n     ```app/router.js\n    // ...\n     Router.map(function() {\n      this.route('post', { path: '/posts/:post_id' });\n    });\n     ```\n     ```app/routes/post.js\n    import Route from '@ember/routing/route';\n     export default class PostRoute extends Route {\n      model({ post_id }) {\n        // the server returns `{ id: 12 }`\n        return fetch(`/posts/${post_id}`;\n      }\n       serialize(model) {\n        // this will make the URL `/posts/12`\n        return { post_id: model.id };\n      }\n    }\n    ```\n     The default `serialize` method will insert the model's `id` into the\n    route's dynamic segment (in this case, `:post_id`) if the segment contains '_id'.\n    If the route has multiple dynamic segments or does not contain '_id', `serialize`\n    will return `getProperties(model, params)`\n     This method is called when `transitionTo` is called with a context\n    in order to populate the URL.\n     @method serialize\n    @param {Object} model the routes model\n    @param {Array} params an Array of parameter names for the current\n      route (in the example, `['post_id']`.\n    @return {Object} the serialized parameters\n    @since 1.0.0\n    @public\n  */\n  serialize(model, params) {\n    if (params.length < 1 || !model) {\n      return;\n    }\n    let object = {};\n    if (params.length === 1) {\n      let [name] = params;\n      (isDevelopingApp() && !(name) && assert('has name', name));\n      if (typeof model === 'object' && name in model) {\n        object[name] = get(model, name);\n      } else if (/_id$/.test(name)) {\n        object[name] = get(model, 'id');\n      } else if (isProxy(model)) {\n        object[name] = get(model, name);\n      }\n    } else {\n      object = getProperties(model, params);\n    }\n    return object;\n  }\n\n  /**\n    Configuration hash for this route's queryParams. The possible\n    configuration options and their defaults are as follows\n    (assuming a query param whose controller property is `page`):\n     ```javascript\n    queryParams = {\n      page: {\n        // By default, controller query param properties don't\n        // cause a full transition when they are changed, but\n        // rather only cause the URL to update. Setting\n        // `refreshModel` to true will cause an \"in-place\"\n        // transition to occur, whereby the model hooks for\n        // this route (and any child routes) will re-fire, allowing\n        // you to reload models (e.g., from the server) using the\n        // updated query param values.\n        refreshModel: false,\n         // By default, changes to controller query param properties\n        // cause the URL to update via `pushState`, which means an\n        // item will be added to the browser's history, allowing\n        // you to use the back button to restore the app to the\n        // previous state before the query param property was changed.\n        // Setting `replace` to true will use `replaceState` (or its\n        // hash location equivalent), which causes no browser history\n        // item to be added. This options name and default value are\n        // the same as the `link-to` helper's `replace` option.\n        replace: false,\n         // By default, the query param URL key is the same name as\n        // the controller property name. Use `as` to specify a\n        // different URL key.\n        as: 'page'\n      }\n    };\n    ```\n     @property queryParams\n    @for Route\n    @type Object\n    @since 1.6.0\n    @public\n  */\n  // Set in reopen so it can be overriden with extend\n\n  /**\n    The name of the template to use by default when rendering this route's\n    template.\n     ```app/routes/posts/list.js\n    import Route from '@ember/routing/route';\n     export default class PostsListRoute extends Route {\n      templateName = 'posts/list';\n    }\n    ```\n     ```app/routes/posts/index.js\n    import PostsListRoute from '../posts/list';\n     export default class PostsIndexRoute extends PostsListRoute {};\n    ```\n     ```app/routes/posts/archived.js\n    import PostsListRoute from '../posts/list';\n     export default class PostsArchivedRoute extends PostsListRoute {};\n    ```\n     @property templateName\n    @type String\n    @default null\n    @since 1.4.0\n    @public\n  */\n  // Set in reopen so it can be overriden with extend\n\n  /**\n    The name of the controller to associate with this route.\n     By default, Ember will lookup a route's controller that matches the name\n    of the route (i.e. `posts.new`). However,\n    if you would like to define a specific controller to use, you can do so\n    using this property.\n     This is useful in many ways, as the controller specified will be:\n     * passed to the `setupController` method.\n    * used as the controller for the template being rendered by the route.\n    * returned from a call to `controllerFor` for the route.\n     @property controllerName\n    @type String\n    @default null\n    @since 1.4.0\n    @public\n  */\n  // Set in reopen so it can be overriden with extend\n\n  /**\n    The controller associated with this route.\n     Example\n     ```app/routes/form.js\n    import Route from '@ember/routing/route';\n    import { action } from '@ember/object';\n     export default class FormRoute extends Route {\n      @action\n      willTransition(transition) {\n        if (this.controller.get('userHasEnteredData') &&\n            !confirm('Are you sure you want to abandon progress?')) {\n          transition.abort();\n        } else {\n          // Bubble the `willTransition` action so that\n          // parent routes can decide whether or not to abort.\n          return true;\n        }\n      }\n    }\n    ```\n     @property controller\n    @type Controller\n    @since 1.6.0\n    @public\n  */\n\n  /**\n    The name of the route, dot-delimited.\n     For example, a route found at `app/routes/posts/post.js` will have\n    a `routeName` of `posts.post`.\n     @property routeName\n    @for Route\n    @type String\n    @since 1.0.0\n    @public\n  */\n\n  /**\n    The name of the route, dot-delimited, including the engine prefix\n    if applicable.\n     For example, a route found at `addon/routes/posts/post.js` within an\n    engine named `admin` will have a `fullRouteName` of `admin.posts.post`.\n     @property fullRouteName\n    @for Route\n    @type String\n    @since 2.10.0\n    @public\n  */\n\n  /**\n    Sets the name for this route, including a fully resolved name for routes\n    inside engines.\n     @private\n    @method _setRouteName\n    @param {String} name\n  */\n  _setRouteName(name) {\n    this.routeName = name;\n    let owner = getOwner(this);\n    (isDevelopingApp() && !(owner instanceof EngineInstance) && assert('Expected route to have EngineInstance as owner', owner instanceof EngineInstance));\n    this.fullRouteName = getEngineRouteName(owner, name);\n  }\n\n  /**\n    @private\n     @method _stashNames\n  */\n  _stashNames(routeInfo, dynamicParent) {\n    if (this._names) {\n      return;\n    }\n    let names = this._names = routeInfo['_names'];\n    if (!names.length) {\n      routeInfo = dynamicParent;\n      names = routeInfo && routeInfo['_names'] || [];\n    }\n\n    // SAFETY: Since `_qp` is protected we can't infer the type\n    let qps = get(this, '_qp').qps;\n    let namePaths = new Array(names.length);\n    for (let a = 0; a < names.length; ++a) {\n      namePaths[a] = `${routeInfo.name}.${names[a]}`;\n    }\n    for (let qp of qps) {\n      if (qp.scope === 'model') {\n        qp.parts = namePaths;\n      }\n    }\n  }\n\n  /**\n    @private\n     @property _activeQPChanged\n  */\n  _activeQPChanged(qp, value) {\n    this._router._activeQPChanged(qp.scopedPropertyName, value);\n  }\n\n  /**\n    @private\n    @method _updatingQPChanged\n  */\n  _updatingQPChanged(qp) {\n    this._router._updatingQPChanged(qp.urlKey);\n  }\n\n  /**\n    Returns a hash containing the parameters of an ancestor route.\n     You may notice that `this.paramsFor` sometimes works when referring to a\n    child route, but this behavior should not be relied upon as only ancestor\n    routes are certain to be loaded in time.\n     Example\n     ```app/router.js\n    // ...\n     Router.map(function() {\n      this.route('member', { path: ':name' }, function() {\n        this.route('interest', { path: ':interest' });\n      });\n    });\n    ```\n     ```app/routes/member.js\n    import Route from '@ember/routing/route';\n     export default class MemberRoute extends Route {\n      queryParams = {\n        memberQp: { refreshModel: true }\n      }\n    }\n    ```\n     ```app/routes/member/interest.js\n    import Route from '@ember/routing/route';\n     export default class MemberInterestRoute extends Route {\n      queryParams = {\n        interestQp: { refreshModel: true }\n      }\n       model() {\n        return this.paramsFor('member');\n      }\n    }\n    ```\n     If we visit `/turing/maths?memberQp=member&interestQp=interest` the model for\n    the `member.interest` route is a hash with:\n     * `name`: `turing`\n    * `memberQp`: `member`\n     @method paramsFor\n    @param {String} name\n    @return {Object} hash containing the parameters of the route `name`\n    @since 1.4.0\n    @public\n  */\n  paramsFor(name) {\n    let owner = getOwner(this);\n    (isDevelopingApp() && !(owner) && assert('Route is unexpectedly missing an owner', owner));\n    let route = owner.lookup(`route:${name}`);\n    if (route === undefined) {\n      return {};\n    }\n    let transition = this._router._routerMicrolib.activeTransition;\n    let state = transition ? transition[STATE_SYMBOL] : this._router._routerMicrolib.state;\n    let fullName = route.fullRouteName;\n    let params = {\n      ...state.params[fullName]\n    };\n    let queryParams = getQueryParamsFor(route, state);\n    return Object.entries(queryParams).reduce((params, [key, value]) => {\n      (isDevelopingApp() && !(!params[key]) && assert(`The route '${this.routeName}' has both a dynamic segment and query param with name '${key}'. Please rename one to avoid collisions.`, !params[key]));\n      params[key] = value;\n      return params;\n    }, params);\n  }\n\n  /**\n    Serializes the query parameter key\n     @method serializeQueryParamKey\n    @param {String} controllerPropertyName\n    @private\n  */\n  serializeQueryParamKey(controllerPropertyName) {\n    return controllerPropertyName;\n  }\n\n  /**\n    Serializes value of the query parameter based on defaultValueType\n     @method serializeQueryParam\n    @param {Object} value\n    @param {String} urlKey\n    @param {String} defaultValueType\n    @private\n  */\n  serializeQueryParam(value, _urlKey, defaultValueType) {\n    // urlKey isn't used here, but anyone overriding\n    // can use it to provide serialization specific\n    // to a certain query param.\n    return this._router._serializeQueryParam(value, defaultValueType);\n  }\n\n  /**\n    Deserializes value of the query parameter based on defaultValueType\n     @method deserializeQueryParam\n    @param {Object} value\n    @param {String} urlKey\n    @param {String} defaultValueType\n    @private\n  */\n  deserializeQueryParam(value, _urlKey, defaultValueType) {\n    // urlKey isn't used here, but anyone overriding\n    // can use it to provide deserialization specific\n    // to a certain query param.\n    return this._router._deserializeQueryParam(value, defaultValueType);\n  }\n\n  /**\n    @private\n     @property _optionsForQueryParam\n  */\n  // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n  _optionsForQueryParam(qp) {\n    const queryParams = get(this, 'queryParams');\n    return get(queryParams, qp.urlKey) || get(queryParams, qp.prop) || queryParams[qp.urlKey] || queryParams[qp.prop] || {};\n  }\n\n  /**\n    A hook you can use to reset controller values either when the model\n    changes or the route is exiting.\n     ```app/routes/articles.js\n    import Route from '@ember/routing/route';\n     export default class ArticlesRoute extends Route {\n      resetController(controller, isExiting, transition) {\n        if (isExiting && transition.targetName !== 'error') {\n          controller.set('page', 1);\n        }\n      }\n    }\n    ```\n     @method resetController\n    @param {Controller} controller instance\n    @param {Boolean} isExiting\n    @param {Object} transition\n    @since 1.7.0\n    @public\n  */\n  resetController(_controller, _isExiting, _transition) {\n    // We document that subclasses do not have to return *anything* and in fact\n    // do not even have to call super, so whiel we *do* return `this`, we need\n    // to be explicit in the types that our return type is *effectively* `void`.\n    return this;\n  }\n\n  /**\n    @private\n     @method exit\n  */\n  exit(transition) {\n    this.deactivate(transition);\n    this.trigger('deactivate', transition);\n    this.teardownViews();\n  }\n\n  /**\n    @private\n     @method _internalReset\n    @since 3.6.0\n  */\n  _internalReset(isExiting, transition) {\n    let controller = this.controller;\n    // SAFETY: Since `_qp` is protected we can't infer the type\n    controller['_qpDelegate'] = get(this, '_qp').states.inactive;\n    this.resetController(controller, isExiting, transition);\n  }\n\n  /**\n    @private\n     @method enter\n  */\n  enter(transition) {\n    this[RENDER_STATE] = undefined;\n    this.activate(transition);\n    this.trigger('activate', transition);\n  }\n\n  /**\n    This event is triggered when the router enters the route. It is\n    not executed when the model for the route changes.\n     ```app/routes/application.js\n    import { on } from '@ember/object/evented';\n    import Route from '@ember/routing/route';\n     export default Route.extend({\n      collectAnalytics: on('activate', function(){\n        collectAnalytics();\n      })\n    });\n    ```\n     @event activate\n    @since 1.9.0\n    @public\n  */\n\n  /**\n    This event is triggered when the router completely exits this\n    route. It is not executed when the model for the route changes.\n     ```app/routes/index.js\n    import { on } from '@ember/object/evented';\n    import Route from '@ember/routing/route';\n     export default Route.extend({\n      trackPageLeaveAnalytics: on('deactivate', function(){\n        trackPageLeaveAnalytics();\n      })\n    });\n    ```\n     @event deactivate\n    @since 1.9.0\n    @public\n  */\n\n  /**\n    This hook is executed when the router completely exits this route. It is\n    not executed when the model for the route changes.\n     @method deactivate\n    @param {Transition} transition\n    @since 1.0.0\n    @public\n  */\n  deactivate(_transition) {}\n\n  /**\n    This hook is executed when the router enters the route. It is not executed\n    when the model for the route changes.\n     @method activate\n    @param {Transition} transition\n    @since 1.0.0\n    @public\n  */\n  activate(_transition) {}\n\n  /**\n    Perform a synchronous transition into another route without attempting\n    to resolve promises, update the URL, or abort any currently active\n    asynchronous transitions (i.e. regular transitions caused by\n    `transitionTo` or URL changes).\n     This method is handy for performing intermediate transitions on the\n    way to a final destination route, and is called internally by the\n    default implementations of the `error` and `loading` handlers.\n     @method intermediateTransitionTo\n    @param {String} name the name of the route\n    @param {...Object} models the model(s) to be used while transitioning\n    to the route.\n    @since 1.2.0\n    @public\n   */\n  intermediateTransitionTo(...args) {\n    let [name, ...preparedArgs] = prefixRouteNameArg(this, args);\n    this._router.intermediateTransitionTo(name, ...preparedArgs);\n  }\n\n  /**\n    Refresh the model on this route and any child routes, firing the\n    `beforeModel`, `model`, and `afterModel` hooks in a similar fashion\n    to how routes are entered when transitioning in from other route.\n    The current route params (e.g. `article_id`) will be passed in\n    to the respective model hooks, and if a different model is returned,\n    `setupController` and associated route hooks will re-fire as well.\n     An example usage of this method is re-querying the server for the\n    latest information using the same parameters as when the route\n    was first entered.\n     Note that this will cause `model` hooks to fire even on routes\n    that were provided a model object when the route was initially\n    entered.\n     @method refresh\n    @return {Transition} the transition object associated with this\n      attempted transition\n    @since 1.4.0\n    @public\n   */\n  refresh() {\n    return this._router._routerMicrolib.refresh(this);\n  }\n\n  /**\n    This hook is the entry point for router.js\n     @private\n    @method setup\n  */\n  setup(context, transition) {\n    let controllerName = this.controllerName || this.routeName;\n    let definedController = this.controllerFor(controllerName, true);\n    let controller = definedController ?? this.generateController(controllerName);\n\n    // SAFETY: Since `_qp` is protected we can't infer the type\n    let queryParams = get(this, '_qp');\n\n    // Assign the route's controller so that it can more easily be\n    // referenced in action handlers. Side effects. Side effects everywhere.\n    if (!this.controller) {\n      let propNames = queryParams.propertyNames;\n      addQueryParamsObservers(controller, propNames);\n      this.controller = controller;\n    }\n    let states = queryParams.states;\n    controller._qpDelegate = states.allowOverrides;\n    if (transition) {\n      // Update the model dep values used to calculate cache keys.\n      stashParamNames(this._router, transition[STATE_SYMBOL].routeInfos);\n      let cache = this._bucketCache;\n      let params = transition[PARAMS_SYMBOL];\n      let allParams = queryParams.propertyNames;\n      allParams.forEach(prop => {\n        let aQp = queryParams.map[prop];\n        (isDevelopingApp() && !(aQp) && assert('expected aQp', aQp));\n        aQp.values = params;\n        let cacheKey = calculateCacheKey(aQp.route.fullRouteName, aQp.parts, aQp.values);\n        let value = cache.lookup(cacheKey, prop, aQp.undecoratedDefaultValue);\n        set(controller, prop, value);\n      });\n      let qpValues = getQueryParamsFor(this, transition[STATE_SYMBOL]);\n      setProperties(controller, qpValues);\n    }\n    this.setupController(controller, context, transition);\n    if (this._environment.options.shouldRender) {\n      this[RENDER]();\n    }\n\n    // Setup can cause changes to QPs which need to be propogated immediately in\n    // some situations. Eventually, we should work on making these async somehow.\n    flushAsyncObservers(false);\n  }\n\n  /*\n    Called when a query parameter for this route changes, regardless of whether the route\n    is currently part of the active route hierarchy. This will update the query parameter's\n    value in the cache so if this route becomes active, the cache value has been updated.\n  */\n  _qpChanged(prop, value, qp) {\n    if (!qp) {\n      return;\n    }\n\n    // Update model-dep cache\n    let cache = this._bucketCache;\n    let cacheKey = calculateCacheKey(qp.route.fullRouteName, qp.parts, qp.values);\n    cache.stash(cacheKey, prop, value);\n  }\n\n  /**\n    This hook is the first of the route entry validation hooks\n    called when an attempt is made to transition into a route\n    or one of its children. It is called before `model` and\n    `afterModel`, and is appropriate for cases when:\n     1) A decision can be made to redirect elsewhere without\n       needing to resolve the model first.\n    2) Any async operations need to occur first before the\n       model is attempted to be resolved.\n     This hook is provided the current `transition` attempt\n    as a parameter, which can be used to `.abort()` the transition,\n    save it for a later `.retry()`, or retrieve values set\n    on it from a previous hook. You can also just call\n    `router.transitionTo` to another route to implicitly\n    abort the `transition`.\n     You can return a promise from this hook to pause the\n    transition until the promise resolves (or rejects). This could\n    be useful, for instance, for retrieving async code from\n    the server that is required to enter a route.\n     @method beforeModel\n    @param {Transition} transition\n    @return {any | Promise<any>} if the value returned from this hook is\n      a promise, the transition will pause until the transition\n      resolves. Otherwise, non-promise return values are not\n      utilized in any way.\n    @since 1.0.0\n    @public\n  */\n\n  beforeModel(_transition) {}\n\n  /**\n    This hook is called after this route's model has resolved.\n    It follows identical async/promise semantics to `beforeModel`\n    but is provided the route's resolved model in addition to\n    the `transition`, and is therefore suited to performing\n    logic that can only take place after the model has already\n    resolved.\n     ```app/routes/posts.js\n    import Route from '@ember/routing/route';\n    import { service } from '@ember/service';\n     export default class PostsRoute extends Route {\n      @service router;\n       afterModel(posts, transition) {\n        if (posts.get('length') === 1) {\n          this.router.transitionTo('post.show', posts.get('firstObject'));\n        }\n      }\n    }\n    ```\n     Refer to documentation for `beforeModel` for a description\n    of transition-pausing semantics when a promise is returned\n    from this hook.\n     @method afterModel\n    @param {Object} resolvedModel the value returned from `model`,\n      or its resolved value if it was a promise\n    @param {Transition} transition\n    @return {any | Promise<any>} if the value returned from this hook is\n      a promise, the transition will pause until the transition\n      resolves. Otherwise, non-promise return values are not\n      utilized in any way.\n    @since 1.0.0\n    @public\n   */\n\n  afterModel(_resolvedModel, _transition) {}\n\n  /**\n    A hook you can implement to optionally redirect to another route.\n     Calling `this.router.transitionTo` from inside of the `redirect` hook will\n    abort the current transition (into the route that has implemented `redirect`).\n     `redirect` and `afterModel` behave very similarly and are\n    called almost at the same time, but they have an important\n    distinction when calling `this.router.transitionTo` to a child route\n    of the current route. From `afterModel`, this new transition\n    invalidates the current transition, causing `beforeModel`,\n    `model`, and `afterModel` hooks to be called again. But the\n    same transition started from `redirect` does _not_ invalidate\n    the current transition. In other words, by the time the `redirect`\n    hook has been called, both the resolved model and the attempted\n    entry into this route are considered fully validated.\n     @method redirect\n    @param {Object} model the model for this route\n    @param {Transition} transition the transition object associated with the current transition\n    @since 1.0.0\n    @public\n  */\n  redirect(_model, _transition) {}\n\n  /**\n    Called when the context is changed by router.js.\n     @private\n    @method contextDidChange\n  */\n  contextDidChange() {\n    this.currentModel = this.context;\n  }\n\n  /**\n    A hook you can implement to convert the URL into the model for\n    this route.\n     ```app/router.js\n    // ...\n     Router.map(function() {\n      this.route('post', { path: '/posts/:post_id' });\n    });\n     export default Router;\n    ```\n     Note that for routes with dynamic segments, this hook is not always\n    executed. If the route is entered through a transition (e.g. when\n    using the `link-to` Handlebars helper or the `transitionTo` method\n    of routes), and a model context is already provided this hook\n    is not called.\n     A model context does not include a primitive string or number,\n    which does cause the model hook to be called.\n     Routes without dynamic segments will always execute the model hook.\n     ```javascript\n    // no dynamic segment, model hook always called\n    this.router.transitionTo('posts');\n     // model passed in, so model hook not called\n    thePost = store.findRecord('post', 1);\n    this.router.transitionTo('post', thePost);\n     // integer passed in, model hook is called\n    this.router.transitionTo('post', 1);\n     // model id passed in, model hook is called\n    // useful for forcing the hook to execute\n    thePost = store.findRecord('post', 1);\n    this.router.transitionTo('post', thePost.id);\n    ```\n     This hook follows the asynchronous/promise semantics\n    described in the documentation for `beforeModel`. In particular,\n    if a promise returned from `model` fails, the error will be\n    handled by the `error` hook on `Route`.\n     Note that the legacy behavior of automatically defining a model\n    hook when a dynamic segment ending in `_id` is present is\n    [deprecated](https://deprecations.emberjs.com/v5.x#toc_deprecate-implicit-route-model).\n    You should explicitly define a model hook whenever any segments are\n    present.\n     Example\n     ```app/routes/post.js\n    import Route from '@ember/routing/route';\n    import { service } from '@ember/service';\n     export default class PostRoute extends Route {\n      @service store;\n       model(params) {\n        return this.store.findRecord('post', params.post_id);\n      }\n    }\n    ```\n     @method model\n    @param {Object} params the parameters extracted from the URL\n    @param {Transition} transition\n    @return {any | Promise<any>} the model for this route. If\n      a promise is returned, the transition will pause until\n      the promise resolves, and the resolved value of the promise\n      will be used as the model for this route.\n    @since 1.0.0\n    @public\n  */\n  model(params, transition) {\n    let name, sawParams;\n    // SAFETY: Since `_qp` is protected we can't infer the type\n    let queryParams = get(this, '_qp').map;\n    for (let prop in params) {\n      if (prop === 'queryParams' || queryParams && prop in queryParams) {\n        continue;\n      }\n      let match = prop.match(/^(.*)_id$/);\n      if (match !== null) {\n        name = match[1];\n      }\n      sawParams = true;\n    }\n    if (!name) {\n      if (sawParams) {\n        // SAFETY: This should be equivalent\n        return Object.assign({}, params);\n      } else {\n        if (transition.resolveIndex < 1) {\n          return;\n        }\n        // SAFETY: This should be correct, but TS is unable to infer this.\n        return transition[STATE_SYMBOL].routeInfos[transition.resolveIndex - 1].context;\n      }\n    }\n    return undefined;\n  }\n\n  /**\n    @private\n    @method deserialize\n    @param {Object} params the parameters extracted from the URL\n    @param {Transition} transition\n    @return {any | Promise<any>} the model for this route.\n     Router.js hook.\n   */\n  deserialize(_params, transition) {\n    return this.model(this._paramsFor(this.routeName, _params), transition);\n  }\n\n  /**\n    A hook you can use to setup the controller for the current route.\n     This method is called with the controller for the current route and the\n    model supplied by the `model` hook.\n     By default, the `setupController` hook sets the `model` property of\n    the controller to the specified `model` when it is not `undefined`.\n     If you implement the `setupController` hook in your Route, it will\n    prevent this default behavior. If you want to preserve that behavior\n    when implementing your `setupController` function, make sure to call\n    `super`:\n     ```app/routes/photos.js\n    import Route from '@ember/routing/route';\n    import { service } from '@ember/service';\n     export default class PhotosRoute extends Route {\n      @service store;\n       model() {\n        return this.store.findAll('photo');\n      }\n       setupController(controller, model) {\n        super.setupController(controller, model);\n         this.controllerFor('application').set('showingPhotos', true);\n      }\n    }\n    ```\n     The provided controller will be one resolved based on the name\n    of this route.\n     If no explicit controller is defined, Ember will automatically create one.\n     As an example, consider the router:\n     ```app/router.js\n    // ...\n     Router.map(function() {\n      this.route('post', { path: '/posts/:post_id' });\n    });\n     export default Router;\n    ```\n     If you have defined a file for the post controller,\n    the framework will use it.\n    If it is not defined, a basic `Controller` instance would be used.\n     @example Behavior of a basic Controller\n     ```app/routes/post.js\n    import Route from '@ember/routing/route';\n     export default class PostRoute extends Route {\n      setupController(controller, model) {\n        controller.set('model', model);\n      }\n    });\n    ```\n     @method setupController\n    @param {Controller} controller instance\n    @param {Object} model\n    @param {Transition} [transition]\n    @since 1.0.0\n    @public\n  */\n  setupController(controller, context, _transition) {\n    if (controller && context !== undefined) {\n      set(controller, 'model', context);\n    }\n  }\n\n  /**\n    Returns the controller of the current route, or a parent (or any ancestor)\n    route in a route hierarchy.\n     The controller instance must already have been created, either through entering the\n    associated route or using `generateController`.\n     ```app/routes/post.js\n    import Route from '@ember/routing/route';\n     export default class PostRoute extends Route {\n      setupController(controller, post) {\n        super.setupController(controller, post);\n         this.controllerFor('posts').set('currentPost', post);\n      }\n    }\n    ```\n     @method controllerFor\n    @param {String} name the name of the route or controller\n    @return {Controller | undefined}\n    @since 1.0.0\n    @public\n  */\n\n  controllerFor(name, _skipAssert = false) {\n    let owner = getOwner(this);\n    (isDevelopingApp() && !(owner) && assert('Route is unexpectedly missing an owner', owner));\n    let route = owner.lookup(`route:${name}`);\n    if (route && route.controllerName) {\n      name = route.controllerName;\n    }\n    let controller = owner.lookup(`controller:${name}`);\n\n    // NOTE: We're specifically checking that skipAssert is true, because according\n    //   to the old API the second parameter was model. We do not want people who\n    //   passed a model to skip the assertion.\n    (isDevelopingApp() && !(controller !== undefined || _skipAssert === true) && assert(`The controller named '${name}' could not be found. Make sure that this route exists and has already been entered at least once. If you are accessing a controller not associated with a route, make sure the controller class is explicitly defined.`, controller !== undefined || _skipAssert === true));\n    (isDevelopingApp() && !(controller === undefined || controller instanceof Controller) && assert(`Expected controller:${name} to be an instance of Controller`, controller === undefined || controller instanceof Controller));\n    return controller;\n  }\n\n  /**\n    Generates a controller for a route.\n     Example\n     ```app/routes/post.js\n    import Route from '@ember/routing/route';\n     export default class Post extends Route {\n      setupController(controller, post) {\n        super.setupController(controller, post);\n         this.generateController('posts');\n      }\n    }\n    ```\n     @method generateController\n    @param {String} name the name of the controller\n    @private\n  */\n  generateController(name) {\n    let owner = getOwner(this);\n    (isDevelopingApp() && !(owner) && assert('Route is unexpectedly missing an owner', owner));\n    return generateController(owner, name);\n  }\n\n  /**\n    Returns the resolved model of a parent (or any ancestor) route\n    in a route hierarchy.  During a transition, all routes\n    must resolve a model object, and if a route\n    needs access to a parent route's model in order to\n    resolve a model (or just reuse the model from a parent),\n    it can call `this.modelFor(theNameOfParentRoute)` to\n    retrieve it. If the ancestor route's model was a promise,\n    its resolved result is returned.\n     Example\n     ```app/router.js\n    // ...\n     Router.map(function() {\n      this.route('post', { path: '/posts/:post_id' }, function() {\n        this.route('comments');\n      });\n    });\n     export default Router;\n    ```\n     ```app/routes/post/comments.js\n    import Route from '@ember/routing/route';\n     export default class PostCommentsRoute extends Route {\n      model() {\n        let post = this.modelFor('post');\n         return post.comments;\n      }\n    }\n    ```\n     @method modelFor\n    @param {String} name the name of the route\n    @return {Object} the model object\n    @since 1.0.0\n    @public\n  */\n  modelFor(_name) {\n    let name;\n    let owner = getOwner(this);\n    (isDevelopingApp() && !(owner instanceof EngineInstance) && assert('Expected router owner to be an EngineInstance', owner instanceof EngineInstance));\n    let transition = this._router && this._router._routerMicrolib ? this._router._routerMicrolib.activeTransition : undefined;\n\n    // Only change the route name when there is an active transition.\n    // Otherwise, use the passed in route name.\n    if (owner.routable && transition !== undefined) {\n      name = getEngineRouteName(owner, _name);\n    } else {\n      name = _name;\n    }\n    let route = owner.lookup(`route:${name}`);\n    // If we are mid-transition, we want to try and look up\n    // resolved parent contexts on the current transitionEvent.\n    if (transition !== undefined && transition !== null) {\n      let modelLookupName = route && route.routeName || name;\n      if (Object.prototype.hasOwnProperty.call(transition.resolvedModels, modelLookupName)) {\n        return transition.resolvedModels[modelLookupName];\n      }\n    }\n    return route?.currentModel;\n  }\n  [RENDER_STATE] = undefined;\n\n  /**\n    `this[RENDER]` is used to set up the rendering option for the outlet state.\n    @method this[RENDER]\n    @private\n   */\n  [RENDER]() {\n    this[RENDER_STATE] = buildRenderState(this);\n    once(this._router, '_setOutlets');\n  }\n  willDestroy() {\n    this.teardownViews();\n  }\n\n  /**\n    @private\n     @method teardownViews\n  */\n  teardownViews() {\n    if (this[RENDER_STATE]) {\n      this[RENDER_STATE] = undefined;\n      once(this._router, '_setOutlets');\n    }\n  }\n\n  /**\n    Allows you to produce custom metadata for the route.\n    The return value of this method will be attached to\n    its corresponding RouteInfoWithAttributes object.\n     Example\n     ```app/routes/posts/index.js\n    import Route from '@ember/routing/route';\n     export default class PostsIndexRoute extends Route {\n      buildRouteInfoMetadata() {\n        return { title: 'Posts Page' }\n      }\n    }\n    ```\n     ```app/routes/application.js\n    import Route from '@ember/routing/route';\n    import { service } from '@ember/service';\n     export default class ApplicationRoute extends Route {\n      @service router\n       constructor() {\n        super(...arguments);\n         this.router.on('routeDidChange', transition => {\n          document.title = transition.to.metadata.title;\n          // would update document's title to \"Posts Page\"\n        });\n      }\n    }\n    ```\n    @method buildRouteInfoMetadata\n    @return any\n    @since 3.10.0\n    @public\n   */\n\n  buildRouteInfoMetadata() {}\n  _paramsFor(routeName, params) {\n    let transition = this._router._routerMicrolib.activeTransition;\n    if (transition !== undefined) {\n      return this.paramsFor(routeName);\n    }\n    return params;\n  }\n\n  /** @deprecated Manually define your own store, such as with `@service store` */\n  get _store() {\n    const owner = getOwner(this);\n    (isDevelopingApp() && !(owner) && assert('Route is unexpectedly missing an owner', owner));\n    let routeName = this.routeName;\n    return {\n      find(name, value) {\n        let modelClass = owner.factoryFor(`model:${name}`);\n        (isDevelopingApp() && !(Boolean(modelClass)) && assert(`You used the dynamic segment \\`${name}_id\\` in your route ` + `\\`${routeName}\\` for which Ember requires you provide a ` + `data-loading implementation. Commonly, that is done by ` + `adding a model hook implementation on the route ` + `(\\`model({${name}_id}) {\\`) or by injecting an implemention of ` + `a data store: \\`@service store;\\`.`, Boolean(modelClass)));\n        if (!modelClass) {\n          return;\n        }\n        modelClass = modelClass.class;\n        (isDevelopingApp() && !(typeof modelClass.find === 'function') && assert(`You used the dynamic segment \\`${name}_id\\` in your route ` + `\\`${routeName}\\` for which Ember requires you provide a ` + `data-loading implementation. Commonly, that is done by ` + `adding a model hook implementation on the route ` + `(\\`model({${name}_id}) {\\`) or by injecting an implemention of ` + `a data store: \\`@service store;\\`.\\n\\n` + `Rarely, applications may attempt to use a legacy behavior where ` + `the model class (in this case \\`${name}\\`) is resolved and the ` + `\\`find\\` method on that class is invoked to load data. In this ` + `application, a model of \\`${name}\\` was found but it did not ` + `provide a \\`find\\` method. You should not add a \\`find\\` ` + `method to your model. Instead, please implement an appropriate ` + `\\`model\\` hook on the \\`${routeName}\\` route.`, typeof modelClass.find === 'function'));\n        return modelClass.find(value);\n      }\n    };\n  }\n\n  /**\n    @private\n    @property _qp\n    */\n  static {\n    decorateMethodV2(this.prototype, \"_store\", [computed]);\n  }\n  get _qp() {\n    let combinedQueryParameterConfiguration = {};\n    let controllerName = this.controllerName || this.routeName;\n    let owner = getOwner(this);\n    (isDevelopingApp() && !(owner) && assert('Route is unexpectedly missing an owner', owner));\n    let controller = owner.lookup(`controller:${controllerName}`);\n    let queryParameterConfiguraton = get(this, 'queryParams');\n    let hasRouterDefinedQueryParams = Object.keys(queryParameterConfiguraton).length > 0;\n    if (controller) {\n      (isDevelopingApp() && !(controller instanceof Controller) && assert('Expected an instance of controller', controller instanceof Controller)); // the developer has authored a controller class in their application for\n      // this route find its query params and normalize their object shape them\n      // merge in the query params for the route. As a mergedProperty,\n      // Route#queryParams is always at least `{}`\n      let controllerDefinedQueryParameterConfiguration = get(controller, 'queryParams') || [];\n      let normalizedControllerQueryParameterConfiguration = normalizeControllerQueryParams(controllerDefinedQueryParameterConfiguration);\n      combinedQueryParameterConfiguration = mergeEachQueryParams(normalizedControllerQueryParameterConfiguration, queryParameterConfiguraton);\n    } else if (hasRouterDefinedQueryParams) {\n      // the developer has not defined a controller but *has* supplied route query params.\n      // Generate a class for them so we can later insert default values\n      controller = generateController(owner, controllerName);\n      combinedQueryParameterConfiguration = queryParameterConfiguraton;\n    }\n    let qps = [];\n    let map = {};\n    let propertyNames = [];\n    for (let propName in combinedQueryParameterConfiguration) {\n      if (!Object.prototype.hasOwnProperty.call(combinedQueryParameterConfiguration, propName)) {\n        continue;\n      }\n\n      // to support the dubious feature of using unknownProperty\n      // on queryParams configuration\n      if (propName === 'unknownProperty' || propName === '_super') {\n        // possible todo: issue deprecation warning?\n        continue;\n      }\n      let desc = combinedQueryParameterConfiguration[propName];\n      (isDevelopingApp() && !(desc) && assert(`[BUG] missing query parameter configuration for ${propName}`, desc));\n      let scope = desc.scope || 'model';\n      let parts = undefined;\n      if (scope === 'controller') {\n        parts = [];\n      }\n      let urlKey = desc.as || this.serializeQueryParamKey(propName);\n      let defaultValue = get(controller, propName);\n      defaultValue = copyDefaultValue(defaultValue);\n      let type = desc.type || typeOf(defaultValue);\n      let defaultValueSerialized = this.serializeQueryParam(defaultValue, urlKey, type);\n      let scopedPropertyName = `${controllerName}:${propName}`;\n      let qp = {\n        undecoratedDefaultValue: get(controller, propName),\n        defaultValue,\n        serializedDefaultValue: defaultValueSerialized,\n        serializedValue: defaultValueSerialized,\n        type,\n        urlKey,\n        prop: propName,\n        scopedPropertyName,\n        controllerName,\n        route: this,\n        parts,\n        // provided later when stashNames is called if 'model' scope\n        values: null,\n        // provided later when setup is called. no idea why.\n        scope\n      };\n      map[propName] = map[urlKey] = map[scopedPropertyName] = qp;\n      qps.push(qp);\n      propertyNames.push(propName);\n    }\n    return {\n      qps,\n      map,\n      propertyNames,\n      states: {\n        /*\n          Called when a query parameter changes in the URL, this route cares\n          about that query parameter, but the route is not currently\n          in the active route hierarchy.\n        */\n        inactive: (prop, value) => {\n          let qp = map[prop];\n          (isDevelopingApp() && !(qp) && assert('expected inactive callback to only be called for registered qps', qp));\n          this._qpChanged(prop, value, qp);\n        },\n        /*\n          Called when a query parameter changes in the URL, this route cares\n          about that query parameter, and the route is currently\n          in the active route hierarchy.\n        */\n        active: (prop, value) => {\n          let qp = map[prop];\n          (isDevelopingApp() && !(qp) && assert('expected active callback to only be called for registered qps', qp));\n          this._qpChanged(prop, value, qp);\n          return this._activeQPChanged(qp, value);\n        },\n        /*\n          Called when a value of a query parameter this route handles changes in a controller\n          and the route is currently in the active route hierarchy.\n        */\n        allowOverrides: (prop, value) => {\n          let qp = map[prop];\n          (isDevelopingApp() && !(qp) && assert('expected allowOverrides callback to only be called for registered qps', qp));\n          this._qpChanged(prop, value, qp);\n          return this._updatingQPChanged(qp);\n        }\n      }\n    };\n  }\n\n  // Set in reopen\n  static {\n    decorateMethodV2(this.prototype, \"_qp\", [computed]);\n  }\n  /**\n    Sends an action to the router, which will delegate it to the currently\n    active route hierarchy per the bubbling rules explained under `actions`.\n     Example\n     ```app/router.js\n    // ...\n     Router.map(function() {\n      this.route('index');\n    });\n     export default Router;\n    ```\n     ```app/routes/application.js\n    import Route from '@ember/routing/route';\n    import { action } from '@ember/object';\n     export default class ApplicationRoute extends Route {\n      @action\n      track(arg) {\n        console.log(arg, 'was clicked');\n      }\n    }\n    ```\n     ```app/routes/index.js\n    import Route from '@ember/routing/route';\n    import { action } from '@ember/object';\n     export default class IndexRoute extends Route {\n      @action\n      trackIfDebug(arg) {\n        if (debug) {\n          this.send('track', arg);\n        }\n      }\n    }\n    ```\n     @method send\n    @param {String} name the name of the action to trigger\n    @param {...*} args\n    @since 1.0.0\n    @public\n  */\n  // Set with reopen to override parent behavior\n}\nfunction getRenderState(route) {\n  return route[RENDER_STATE];\n}\nfunction buildRenderState(route) {\n  let owner = getOwner(route);\n  (isDevelopingApp() && !(owner) && assert('Route is unexpectedly missing an owner', owner));\n  let name = route.routeName;\n  let controller = owner.lookup(`controller:${route.controllerName || name}`);\n  (isDevelopingApp() && !(controller instanceof Controller) && assert('Expected an instance of controller', controller instanceof Controller));\n  let model = route.currentModel;\n  let templateFactoryOrComponent = owner.lookup(`template:${route.templateName || name}`);\n\n  // Now we support either a component or a template to be returned by this\n  // resolver call, but if it's a `TemplateFactory`, we need to instantiate\n  // it into a `Template`, since that's what `RenderState` wants. We can't\n  // easily change it, it's intimate API used by @ember/test-helpers and the\n  // like. We could compatibly allow `Template` | `TemplateFactory`, and that's\n  // what it used to do but we _just_ went through deprecations to get that\n  // removed. It's also not ideal since once you mix the two types, they are\n  // not exactly easy to tell apart.\n  //\n  // It may also be tempting to just normalize `Template` into `RouteTemplate`\n  // here, and we could. However, this is not the only entrypoint where this\n  // `RenderState` is made – @ember/test-helpers punches through an impressive\n  // amount of private API to set it directly, and this feature would also be\n  // useful for them. So, even if we had normalized here, we'd still have to\n  // check and do that again during render anyway.\n  let template;\n  if (templateFactoryOrComponent) {\n    if (hasInternalComponentManager(templateFactoryOrComponent)) {\n      template = templateFactoryOrComponent;\n    } else {\n      if (isDevelopingApp() && typeof templateFactoryOrComponent !== 'function') {\n        let label;\n        try {\n          label = `\\`${String(templateFactoryOrComponent)}\\``;\n        } catch {\n          label = 'an unknown object';\n        }\n        (isDevelopingApp() && true && assert(`Failed to render the ${name} route, expected ` + `\\`template:${route.templateName || name}\\` to resolve into ` + `a component or a \\`TemplateFactory\\`, got: ${label}. ` + `Most likely an improperly defined class or an invalid module export.`));\n      }\n      template = templateFactoryOrComponent(owner);\n    }\n  } else {\n    // default `{{outlet}}`\n    template = route._topLevelViewTemplate(owner);\n  }\n  let render = {\n    owner,\n    name,\n    controller,\n    model,\n    template\n  };\n  if (isDevelopingApp()) {\n    let LOG_VIEW_LOOKUPS = get(route._router, 'namespace.LOG_VIEW_LOOKUPS');\n    // This is covered by tests and the existing code was deliberately\n    // targeting the value prior to normalization, but is this message actually\n    // accurate? It seems like we will always default the `{{outlet}}` template\n    // so I'm not sure about \"Nothing will be rendered?\" (who consumes these\n    // logs anyway? as lookups happen more infrequently now I doubt this is all\n    // that useful)\n    if (LOG_VIEW_LOOKUPS && !templateFactoryOrComponent) {\n      info(`Could not find \"${name}\" template. Nothing will be rendered`, {\n        fullName: `template:${name}`\n      });\n    }\n  }\n  return render;\n}\nfunction getFullQueryParams(router, state) {\n  if (state.fullQueryParams) {\n    return state.fullQueryParams;\n  }\n  let haveAllRouteInfosResolved = state.routeInfos.every(routeInfo => routeInfo.route);\n  let fullQueryParamsState = {\n    ...state.queryParams\n  };\n  router._deserializeQueryParams(state.routeInfos, fullQueryParamsState);\n\n  // only cache query params state if all routeinfos have resolved; it's possible\n  // for lazy routes to not have resolved when `getFullQueryParams` is called, so\n  // we wait until all routes have resolved prior to caching query params state\n  if (haveAllRouteInfosResolved) {\n    state.fullQueryParams = fullQueryParamsState;\n  }\n  return fullQueryParamsState;\n}\nfunction getQueryParamsFor(route, state) {\n  state.queryParamsFor = state.queryParamsFor || {};\n  let name = route.fullRouteName;\n  let existing = state.queryParamsFor[name];\n  if (existing) {\n    return existing;\n  }\n  let fullQueryParams = getFullQueryParams(route._router, state);\n  let params = state.queryParamsFor[name] = {};\n\n  // Copy over all the query params for this route/controller into params hash.\n  // SAFETY: Since `_qp` is protected we can't infer the type\n  let qps = get(route, '_qp').qps;\n  for (let qp of qps) {\n    // Put deserialized qp on params hash.\n    let qpValueWasPassedIn = qp.prop in fullQueryParams;\n    params[qp.prop] = qpValueWasPassedIn ? fullQueryParams[qp.prop] : copyDefaultValue(qp.defaultValue);\n  }\n  return params;\n}\n\n// FIXME: This should probably actually return a `NativeArray` if the passed in value is an Array.\nfunction copyDefaultValue(value) {\n  if (Array.isArray(value)) {\n    // SAFETY: We lost the type data about the array if we don't cast.\n    return A(value.slice());\n  }\n  return value;\n}\n\n/*\n  Merges all query parameters from a controller with those from\n  a route, returning a new object and avoiding any mutations to\n  the existing objects.\n*/\nfunction mergeEachQueryParams(controllerQP, routeQP) {\n  let qps = {};\n  let keysAlreadyMergedOrSkippable = {\n    defaultValue: true,\n    type: true,\n    scope: true,\n    as: true\n  };\n\n  // first loop over all controller qps, merging them with any matching route qps\n  // into a new empty object to avoid mutating.\n  for (let cqpName in controllerQP) {\n    if (!Object.prototype.hasOwnProperty.call(controllerQP, cqpName)) {\n      continue;\n    }\n    qps[cqpName] = {\n      ...controllerQP[cqpName],\n      ...routeQP[cqpName]\n    };\n\n    // allows us to skip this QP when we check route QPs.\n    keysAlreadyMergedOrSkippable[cqpName] = true;\n  }\n\n  // loop over all route qps, skipping those that were merged in the first pass\n  // because they also appear in controller qps\n  for (let rqpName in routeQP) {\n    if (!Object.prototype.hasOwnProperty.call(routeQP, rqpName) || keysAlreadyMergedOrSkippable[rqpName]) {\n      continue;\n    }\n    qps[rqpName] = {\n      ...routeQP[rqpName],\n      ...controllerQP[rqpName]\n    };\n  }\n  return qps;\n}\nfunction addQueryParamsObservers(controller, propNames) {\n  propNames.forEach(prop => {\n    if (descriptorForProperty(controller, prop) === undefined) {\n      let desc = lookupDescriptor(controller, prop);\n      if (desc !== null && (typeof desc.get === 'function' || typeof desc.set === 'function')) {\n        defineProperty(controller, prop, dependentKeyCompat({\n          get: desc.get,\n          set: desc.set\n        }));\n      }\n    }\n    addObserver(controller, `${prop}.[]`, controller, controller._qpChanged, false);\n  });\n}\nfunction getEngineRouteName(engine, routeName) {\n  if (engine.routable) {\n    let prefix = engine.mountPoint;\n    if (routeName === 'application') {\n      return prefix;\n    } else {\n      return `${prefix}.${routeName}`;\n    }\n  }\n  return routeName;\n}\nconst defaultSerialize = Route.prototype.serialize;\nfunction hasDefaultSerialize(route) {\n  return route.serialize === defaultSerialize;\n}\n\n// Set these here so they can be overridden with extend\nRoute.reopen({\n  mergedProperties: ['queryParams'],\n  queryParams: {},\n  templateName: null,\n  controllerName: null,\n  send(...args) {\n    (isDevelopingApp() && !(!this.isDestroying && !this.isDestroyed) && assert(`Attempted to call .send() with the action '${args[0]}' on the destroyed route '${this.routeName}'.`, !this.isDestroying && !this.isDestroyed));\n    if (this._router && this._router._routerMicrolib || !isTesting()) {\n      this._router.send(...args);\n    } else {\n      let name = args.shift();\n      let action = this.actions[name];\n      if (action) {\n        return action.apply(this, args);\n      }\n    }\n  },\n  /**\n    The controller associated with this route.\n     Example\n     ```app/routes/form.js\n    import Route from '@ember/routing/route';\n    import { action } from '@ember/object';\n     export default class FormRoute extends Route {\n      @action\n      willTransition(transition) {\n        if (this.controller.get('userHasEnteredData') &&\n            !confirm('Are you sure you want to abandon progress?')) {\n          transition.abort();\n        } else {\n          // Bubble the `willTransition` action so that\n          // parent routes can decide whether or not to abort.\n          return true;\n        }\n      }\n    }\n    ```\n     @property controller\n    @type Controller\n    @since 1.6.0\n    @public\n  */\n\n  actions: {\n    /**\n    This action is called when one or more query params have changed. Bubbles.\n     @method queryParamsDidChange\n    @param changed {Object} Keys are names of query params that have changed.\n    @param totalPresent {Object} Keys are names of query params that are currently set.\n    @param removed {Object} Keys are names of query params that have been removed.\n    @returns {boolean}\n    @private\n    */\n    // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n    queryParamsDidChange(changed, _totalPresent, removed) {\n      // SAFETY: Since `_qp` is protected we can't infer the type\n      let qpMap = get(this, '_qp').map;\n      let totalChanged = Object.keys(changed).concat(Object.keys(removed));\n      for (let change of totalChanged) {\n        let qp = qpMap[change];\n        if (qp) {\n          let options = this._optionsForQueryParam(qp);\n          (isDevelopingApp() && !(options && typeof options === 'object') && assert('options exists', options && typeof options === 'object'));\n          if (get(options, 'refreshModel') && this._router.currentState) {\n            this.refresh();\n            break;\n          }\n        }\n      }\n      return true;\n    },\n    finalizeQueryParamChange(params,\n    // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n    finalParams, transition) {\n      if (this.fullRouteName !== 'application') {\n        return true;\n      }\n\n      // Transition object is absent for intermediate transitions.\n      if (!transition) {\n        return;\n      }\n      let routeInfos = transition[STATE_SYMBOL].routeInfos;\n      let router = this._router;\n      let qpMeta = router._queryParamsFor(routeInfos);\n      let changes = router._qpUpdates;\n      let qpUpdated = false;\n      let replaceUrl;\n      stashParamNames(router, routeInfos);\n      for (let qp of qpMeta.qps) {\n        let route = qp.route;\n        let controller = route.controller;\n        let presentKey = qp.urlKey in params && qp.urlKey;\n\n        // Do a reverse lookup to see if the changed query\n        // param URL key corresponds to a QP property on\n        // this controller.\n        let value;\n        let svalue;\n        if (changes.has(qp.urlKey)) {\n          // Value updated in/before setupController\n          value = get(controller, qp.prop);\n          svalue = route.serializeQueryParam(value, qp.urlKey, qp.type);\n        } else {\n          if (presentKey) {\n            svalue = params[presentKey];\n            if (svalue !== undefined) {\n              value = route.deserializeQueryParam(svalue, qp.urlKey, qp.type);\n            }\n          } else {\n            // No QP provided; use default value.\n            svalue = qp.serializedDefaultValue;\n            value = copyDefaultValue(qp.defaultValue);\n          }\n        }\n\n        // SAFETY: Since `_qp` is protected we can't infer the type\n        controller._qpDelegate = get(route, '_qp').states.inactive;\n        let thisQueryParamChanged = svalue !== qp.serializedValue;\n        if (thisQueryParamChanged) {\n          if (transition.queryParamsOnly && replaceUrl !== false) {\n            let options = route._optionsForQueryParam(qp);\n            let replaceConfigValue = get(options, 'replace');\n            if (replaceConfigValue) {\n              replaceUrl = true;\n            } else if (replaceConfigValue === false) {\n              // Explicit pushState wins over any other replaceStates.\n              replaceUrl = false;\n            }\n          }\n          set(controller, qp.prop, value);\n          qpUpdated = true;\n        }\n\n        // Stash current serialized value of controller.\n        qp.serializedValue = svalue;\n        let thisQueryParamHasDefaultValue = qp.serializedDefaultValue === svalue;\n        if (!thisQueryParamHasDefaultValue) {\n          finalParams.push({\n            value: svalue,\n            visible: true,\n            key: presentKey || qp.urlKey\n          });\n        }\n      }\n\n      // Some QPs have been updated, and those changes need to be propogated\n      // immediately. Eventually, we should work on making this async somehow.\n      if (qpUpdated === true) {\n        flushAsyncObservers(false);\n      }\n      if (replaceUrl) {\n        transition.method('replace');\n      }\n      qpMeta.qps.forEach(qp => {\n        // SAFETY: Since `_qp` is protected we can't infer the type\n        let routeQpMeta = get(qp.route, '_qp');\n        let finalizedController = qp.route.controller;\n        finalizedController['_qpDelegate'] = get(routeQpMeta, 'states.active');\n      });\n      router._qpUpdates.clear();\n      return;\n    }\n  }\n});\n\nexport { Route as default, defaultSerialize, getFullQueryParams, getRenderState, hasDefaultSerialize };\n","import { getOwner } from '../-internals/owner/index.js';\nimport Evented from '../object/evented.js';\nimport '../debug/index.js';\nimport '../-internals/meta/lib/meta.js';\nimport '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../@glimmer/destroyable/index.js';\nimport { consumeTag, tagFor } from '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport '../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\nimport { readOnly } from '../object/lib/computed/computed_macros.js';\nimport '../object/index.js';\nimport '../object/core.js';\nimport '../-internals/runtime/lib/mixins/registry_proxy.js';\nimport '../-internals/runtime/lib/mixins/container_proxy.js';\nimport '../-internals/runtime/lib/mixins/comparable.js';\nimport '../-internals/runtime/lib/mixins/action_handler.js';\nimport '../-internals/runtime/lib/mixins/-proxy.js';\nimport '../enumerable/mutable.js';\nimport '../-internals/runtime/lib/mixins/target_action_support.js';\nimport '../-internals/runtime/lib/ext/rsvp.js';\nimport '../array/index.js';\nimport Service from '../service/index.js';\nimport EmberRouter from './router.js';\nimport { resemblesURL, extractRouteArgs, shallowEqual } from './lib/utils.js';\nimport { d as decorateFieldV2, i as initializeDeferredDecorator } from '../../shared-chunks/chunk-3SQBS3Y5-Cj4eryg1.js';\nimport { assert } from '../debug/lib/assert.js';\n\n/**\n * @module @ember/routing/router-service\n */\nconst ROUTER = Symbol('ROUTER');\nfunction cleanURL(url, rootURL) {\n  if (rootURL === '/') {\n    return url;\n  }\n  return url.substring(rootURL.length);\n}\n\n/**\n   The Router service is the public API that provides access to the router.\n\n   The immediate benefit of the Router service is that you can inject it into components,\n   giving them a friendly way to initiate transitions and ask questions about the current\n   global router state.\n\n   In this example, the Router service is injected into a component to initiate a transition\n   to a dedicated route:\n\n   ```app/components/example.js\n   import Component from '@glimmer/component';\n   import { action } from '@ember/object';\n   import { service } from '@ember/service';\n\n   export default class ExampleComponent extends Component {\n     @service router;\n\n     @action\n     next() {\n       this.router.transitionTo('other.route');\n     }\n   }\n   ```\n\n   Like any service, it can also be injected into helpers, routes, etc.\n\n   @public\n   @extends Service\n   @class RouterService\n */\n\nclass RouterService extends Service.extend(Evented) {\n  [ROUTER];\n  get _router() {\n    let router = this[ROUTER];\n    if (router !== undefined) {\n      return router;\n    }\n    let owner = getOwner(this);\n    (isDevelopingApp() && !(owner) && assert('RouterService is unexpectedly missing an owner', owner));\n    let _router = owner.lookup('router:main');\n    (isDevelopingApp() && !(_router instanceof EmberRouter) && assert('ROUTER SERVICE BUG: Expected router to be an instance of EmberRouter', _router instanceof EmberRouter));\n    return this[ROUTER] = _router;\n  }\n  willDestroy() {\n    super.willDestroy();\n    this[ROUTER] = undefined;\n  }\n\n  /**\n     Transition the application into another route. The route may\n     be either a single route or route path:\n      Calling `transitionTo` from the Router service will cause default query parameter values to be included in the URL.\n     This behavior is different from calling `transitionTo` on a route or `transitionToRoute` on a controller.\n     See the [Router Service RFC](https://github.com/emberjs/rfcs/blob/master/text/0095-router-service.md#query-parameter-semantics) for more info.\n      In the following example we use the Router service to navigate to a route with a\n     specific model from a Component in the first action, and in the second we trigger\n     a query-params only transition.\n      ```app/components/example.js\n     import Component from '@glimmer/component';\n     import { action } from '@ember/object';\n     import { service } from '@ember/service';\n      export default class extends Component {\n       @service router;\n        @action\n       goToComments(post) {\n         this.router.transitionTo('comments', post);\n       }\n        @action\n       fetchMoreComments(latestComment) {\n         this.router.transitionTo({\n           queryParams: { commentsAfter: latestComment }\n         });\n       }\n     }\n     ```\n      @method transitionTo\n     @param {String} [routeNameOrUrl] the name of the route or a URL\n     @param {...Object} [models] the model(s) or identifier(s) to be used while\n       transitioning to the route.\n     @param {Object} [options] optional hash with a queryParams property\n       containing a mapping of query parameters. May be supplied as the only\n      parameter to trigger a query-parameter-only transition.\n     @return {Transition} the transition object associated with this\n       attempted transition\n     @public\n   */\n  transitionTo(...args) {\n    if (resemblesURL(args[0])) {\n      // NOTE: this `args[0] as string` cast is safe and TS correctly infers it\n      // in 3.6+, so it can be removed when TS is upgraded.\n      return this._router._doURLTransition('transitionTo', args[0]);\n    }\n    let {\n      routeName,\n      models,\n      queryParams\n    } = extractRouteArgs(args);\n    let transition = this._router._doTransition(routeName, models, queryParams, true);\n    return transition;\n  }\n\n  /**\n     Similar to `transitionTo`, but instead of adding the destination to the browser's URL history,\n     it replaces the entry for the current route.\n     When the user clicks the \"back\" button in the browser, there will be fewer steps.\n     This is most commonly used to manage redirects in a way that does not cause confusing additions\n     to the user's browsing history.\n      Calling `replaceWith` from the Router service will cause default query parameter values to be included in the URL.\n     This behavior is different from calling `replaceWith` on a route.\n     See the [Router Service RFC](https://github.com/emberjs/rfcs/blob/master/text/0095-router-service.md#query-parameter-semantics) for more info.\n      Usage example:\n      ```app/routes/application.js\n     import Route from '@ember/routing/route';\n     import { service } from '@ember/service';\n      export default class extends Route {\n       @service router;\n       beforeModel() {\n         if (!authorized()){\n           this.router.replaceWith('unauthorized');\n         }\n       }\n     });\n     ```\n      @method replaceWith\n     @param {String} routeNameOrUrl the name of the route or a URL of the desired destination\n     @param {...Object} models the model(s) or identifier(s) to be used while\n       transitioning to the route i.e. an object of params to pass to the destination route\n     @param {Object} [options] optional hash with a queryParams property\n       containing a mapping of query parameters\n     @return {Transition} the transition object associated with this\n       attempted transition\n     @public\n   */\n  replaceWith(...args) {\n    return this.transitionTo(...args).method('replace');\n  }\n\n  /**\n    Generate a URL based on the supplied route name and optionally a model. The\n    URL is returned as a string that can be used for any purpose.\n     In this example, the URL for the `author.books` route for a given author\n    is copied to the clipboard.\n     ```app/templates/application.hbs\n    <CopyLink @author={{hash id=\"tomster\" name=\"Tomster\"}} />\n    ```\n     ```app/components/copy-link.js\n    import Component from '@glimmer/component';\n    import { service } from '@ember/service';\n    import { action } from '@ember/object';\n     export default class CopyLinkComponent extends Component {\n      @service router;\n      @service clipboard;\n       @action\n      copyBooksURL() {\n        if (this.author) {\n          const url = this.router.urlFor('author.books', this.args.author);\n          this.clipboard.set(url);\n          // Clipboard now has /author/tomster/books\n        }\n      }\n    }\n    ```\n     Just like with `transitionTo` and `replaceWith`, `urlFor` can also handle\n    query parameters.\n     ```app/templates/application.hbs\n    <CopyLink @author={{hash id=\"tomster\" name=\"Tomster\"}} />\n    ```\n     ```app/components/copy-link.js\n    import Component from '@glimmer/component';\n    import { service } from '@ember/service';\n    import { action } from '@ember/object';\n     export default class CopyLinkComponent extends Component {\n      @service router;\n      @service clipboard;\n       @action\n      copyOnlyEmberBooksURL() {\n        if (this.author) {\n          const url = this.router.urlFor('author.books', this.author, {\n            queryParams: { filter: 'emberjs' }\n          });\n          this.clipboard.set(url);\n          // Clipboard now has /author/tomster/books?filter=emberjs\n        }\n      }\n    }\n    ```\n      @method urlFor\n     @param {String} routeName the name of the route\n     @param {...Object} models the model(s) for the route.\n     @param {Object} [options] optional hash with a queryParams property\n       containing a mapping of query parameters\n     @return {String} the string representing the generated URL\n     @public\n   */\n  urlFor(routeName, ...args) {\n    this._router.setupRouter();\n    return this._router.generate(routeName, ...args);\n  }\n\n  /**\n     Returns `true` if `routeName/models/queryParams` is the active route, where `models` and `queryParams` are optional.\n     See [model](api/ember/release/classes/Route/methods/model?anchor=model) and\n     [queryParams](/api/ember/3.7/classes/Route/properties/queryParams?anchor=queryParams) for more information about these arguments.\n      In the following example, `isActive` will return `true` if the current route is `/posts`.\n      ```app/components/posts.js\n     import Component from '@glimmer/component';\n     import { service } from '@ember/service';\n      export default class extends Component {\n       @service router;\n        displayComments() {\n         return this.router.isActive('posts');\n       }\n     });\n     ```\n      The next example includes a dynamic segment, and will return `true` if the current route is `/posts/1`,\n     assuming the post has an id of 1:\n      ```app/components/posts.js\n     import Component from '@glimmer/component';\n     import { service } from '@ember/service';\n      export default class extends Component {\n       @service router;\n        displayComments(post) {\n         return this.router.isActive('posts', post.id);\n       }\n     });\n     ```\n      Where `post.id` is the id of a specific post, which is represented in the route as /posts/[post.id].\n     If `post.id` is equal to 1, then isActive will return true if the current route is /posts/1, and false if the route is anything else.\n      @method isActive\n     @param {String} routeName the name of the route\n     @param {...Object} models the model(s) or identifier(s) to be used when determining the active route.\n     @param {Object} [options] optional hash with a queryParams property\n       containing a mapping of query parameters\n     @return {boolean} true if the provided routeName/models/queryParams are active\n     @public\n   */\n  isActive(...args) {\n    let {\n      routeName,\n      models,\n      queryParams\n    } = extractRouteArgs(args);\n    this._router.setupRouter();\n    let routerMicrolib = this._router._routerMicrolib;\n\n    // When using isActive() in a getter, we want to entagle with the auto-tracking system\n    // for example,\n    // in\n    // get isBarActive() {\n    //   return isActive('foo.bar');\n    // }\n    //\n    // you'd expect isBarActive to be dirtied when the route changes.\n    //\n    // https://github.com/emberjs/ember.js/issues/19004\n    consumeTag(tagFor(this._router, 'currentURL'));\n\n    // UNSAFE: casting `routeName as string` here encodes the existing\n    // assumption but may be wrong: `extractRouteArgs` correctly returns it as\n    // `string | undefined`. There may be bugs if `isActiveIntent` does\n    // not correctly account for `undefined` values for `routeName`. Spoilers:\n    // it *does not* account for this being `undefined`.\n    if (!routerMicrolib.isActiveIntent(routeName, models)) {\n      return false;\n    }\n    let hasQueryParams = Object.keys(queryParams).length > 0;\n    if (hasQueryParams) {\n      // UNSAFE: casting `routeName as string` here encodes the existing\n      // assumption but may be wrong: `extractRouteArgs` correctly returns it\n      // as `string | undefined`. There may be bugs if `_prepareQueryParams`\n      // does not correctly account for `undefined` values for `routeName`.\n      //  Spoilers: under the hood this currently uses router.js APIs which\n      // *do not* account for this being `undefined`.\n      let targetRouteName = routeName;\n      queryParams = Object.assign({}, queryParams);\n      this._router._prepareQueryParams(targetRouteName, models, queryParams, true /* fromRouterService */);\n      let currentQueryParams = Object.assign({}, routerMicrolib.state.queryParams);\n      this._router._prepareQueryParams(targetRouteName, models, currentQueryParams, true /* fromRouterService */);\n      return shallowEqual(queryParams, currentQueryParams);\n    }\n    return true;\n  }\n\n  /**\n     Takes a string URL and returns a `RouteInfo` for the leafmost route represented\n     by the URL. Returns `null` if the URL is not recognized. This method expects to\n     receive the actual URL as seen by the browser including the app's `rootURL`.\n      See [RouteInfo](/ember/release/classes/RouteInfo) for more info.\n      In the following example `recognize` is used to verify if a path belongs to our\n     application before transitioning to it.\n      ```\n     import Component from '@ember/component';\n     import { service } from '@ember/service';\n      export default class extends Component {\n       @service router;\n       path = '/';\n        click() {\n         if (this.router.recognize(this.path)) {\n           this.router.transitionTo(this.path);\n         }\n       }\n     }\n     ```\n       @method recognize\n      @param {String} url\n      @return {RouteInfo | null}\n      @public\n    */\n  recognize(url) {\n    (isDevelopingApp() && !(url.indexOf(this.rootURL) === 0) && assert(`You must pass a url that begins with the application's rootURL \"${this.rootURL}\"`, url.indexOf(this.rootURL) === 0));\n    this._router.setupRouter();\n    let internalURL = cleanURL(url, this.rootURL);\n    return this._router._routerMicrolib.recognize(internalURL);\n  }\n\n  /**\n    Takes a string URL and returns a promise that resolves to a\n    `RouteInfoWithAttributes` for the leafmost route represented by the URL.\n    The promise rejects if the URL is not recognized or an unhandled exception\n    is encountered. This method expects to receive the actual URL as seen by\n    the browser including the app's `rootURL`.\n       @method recognizeAndLoad\n      @param {String} url\n      @return {RouteInfo}\n      @public\n   */\n  recognizeAndLoad(url) {\n    (isDevelopingApp() && !(url.indexOf(this.rootURL) === 0) && assert(`You must pass a url that begins with the application's rootURL \"${this.rootURL}\"`, url.indexOf(this.rootURL) === 0));\n    this._router.setupRouter();\n    let internalURL = cleanURL(url, this.rootURL);\n    return this._router._routerMicrolib.recognizeAndLoad(internalURL);\n  }\n\n  /**\n    You can register a listener for events emitted by this service with `.on()`:\n     ```app/routes/contact-form.js\n    import Route from '@ember/routing';\n    import { service } from '@ember/service';\n     export default class extends Route {\n      @service router;\n       activate() {\n        this.router.on('routeWillChange', (transition) => {\n          if (!transition.to.find(route => route.name === this.routeName)) {\n            alert(\"Please save or cancel your changes.\");\n            transition.abort();\n          }\n        })\n      }\n    }\n    ```\n     @method on\n    @param {String} eventName\n    @param {Function} callback\n    @public\n  */\n\n  /**\n    You can unregister a listener for events emitted by this service with `.off()`:\n     ```app/routes/contact-form.js\n    import Route from '@ember/routing';\n    import { service } from '@ember/service';\n     export default class ContactFormRoute extends Route {\n      @service router;\n       callback = (transition) => {\n        if (!transition.to.find(route => route.name === this.routeName)) {\n          alert('Please save or cancel your changes.');\n          transition.abort();\n        }\n      };\n       activate() {\n        this.router.on('routeWillChange', this.callback);\n      }\n       deactivate() {\n        this.router.off('routeWillChange', this.callback);\n      }\n    }\n    ```\n     @method off\n    @param {String} eventName\n    @param {Function} callback\n    @public\n  */\n\n  /**\n    The `routeWillChange` event is fired at the beginning of any\n    attempted transition with a `Transition` object as the sole\n    argument. This action can be used for aborting, redirecting,\n    or decorating the transition from the currently active routes.\n     A good example is preventing navigation when a form is\n    half-filled out:\n     ```app/routes/contact-form.js\n    import Route from '@ember/routing';\n    import { service } from '@ember/service';\n     export default class extends Route {\n      @service router;\n       activate() {\n        this.router.on('routeWillChange', (transition) => {\n          if (!transition.to.find(route => route.name === this.routeName)) {\n            alert(\"Please save or cancel your changes.\");\n            transition.abort();\n          }\n        })\n      }\n    }\n    ```\n     The `routeWillChange` event fires whenever a new route is chosen as the desired target of a transition. This includes `transitionTo`, `replaceWith`, all redirection for any reason including error handling, and abort. Aborting implies changing the desired target back to where you already were. Once a transition has completed, `routeDidChange` fires.\n     @event routeWillChange\n    @param {Transition} transition\n    @public\n  */\n\n  /**\n    The `routeDidChange` event only fires once a transition has settled.\n    This includes aborts and error substates. Like the `routeWillChange` event\n    it receives a Transition as the sole argument.\n     A good example is sending some analytics when the route has transitioned:\n     ```app/routes/contact-form.js\n    import Route from '@ember/routing';\n    import { service } from '@ember/service';\n     export default class extends Route {\n      @service router;\n       activate() {\n        this.router.on('routeDidChange', (transition) => {\n          ga.send('pageView', {\n            current: transition.to.name,\n            from: transition.from.name\n          });\n        })\n      }\n    }\n    ```\n     `routeDidChange` will be called after any `Route`'s\n    [didTransition](/ember/release/classes/Route/events/didTransition?anchor=didTransition)\n    action has been fired.\n    The updates of properties\n    [currentURL](/ember/release/classes/RouterService/properties/currentURL?anchor=currentURL),\n    [currentRouteName](/ember/release/classes/RouterService/properties/currentURL?anchor=currentRouteName)\n    and\n    [currentRoute](/ember/release/classes/RouterService/properties/currentURL?anchor=currentRoute)\n    are completed at the time `routeDidChange` is called.\n     @event routeDidChange\n    @param {Transition} transition\n    @public\n  */\n\n  /**\n   * Refreshes all currently active routes, doing a full transition.\n   * If a route name is provided and refers to a currently active route,\n   * it will refresh only that route and its descendents.\n   * Returns a promise that will be resolved once the refresh is complete.\n   * All resetController, beforeModel, model, afterModel, redirect, and setupController\n   * hooks will be called again. You will get new data from the model hook.\n   *\n   * @method refresh\n   * @param {String} [routeName] the route to refresh (along with all child routes)\n   * @return Transition\n   * @public\n   */\n  refresh(pivotRouteName) {\n    if (!pivotRouteName) {\n      return this._router._routerMicrolib.refresh();\n    }\n    (isDevelopingApp() && !(this._router.hasRoute(pivotRouteName)) && assert(`The route \"${pivotRouteName}\" was not found`, this._router.hasRoute(pivotRouteName)));\n    (isDevelopingApp() && !(this.isActive(pivotRouteName)) && assert(`The route \"${pivotRouteName}\" is currently not active`, this.isActive(pivotRouteName)));\n    let owner = getOwner(this);\n    (isDevelopingApp() && !(owner) && assert('RouterService is unexpectedly missing an owner', owner));\n    let pivotRoute = owner.lookup(`route:${pivotRouteName}`);\n    return this._router._routerMicrolib.refresh(pivotRoute);\n  }\n\n  /**\n   Name of the current route.\n     This property represents the logical name of the route,\n    which is dot separated.\n    For the following router:\n     ```app/router.js\n    Router.map(function() {\n      this.route('about');\n      this.route('blog', function () {\n        this.route('post', { path: ':post_id' });\n      });\n    });\n    ```\n     It will return:\n     * `index` when you visit `/`\n    * `about` when you visit `/about`\n    * `blog.index` when you visit `/blog`\n    * `blog.post` when you visit `/blog/some-post-id`\n     @property currentRouteName\n    @type {String | null}\n    @public\n  */\n  static {\n    decorateFieldV2(this.prototype, \"currentRouteName\", [readOnly('_router.currentRouteName')]);\n  }\n  #currentRouteName = (initializeDeferredDecorator(this, \"currentRouteName\"), void 0);\n  static {\n    decorateFieldV2(this.prototype, \"currentURL\", [readOnly('_router.currentURL')]);\n  }\n  #currentURL = (initializeDeferredDecorator(this, \"currentURL\"), void 0);\n  /**\n   Current URL for the application.\n   This property represents the URL path for this route.\n  For the following router:\n     ```app/router.js\n    Router.map(function() {\n      this.route('about');\n      this.route('blog', function () {\n        this.route('post', { path: ':post_id' });\n      });\n    });\n    ```\n     It will return:\n     * `/` when you visit `/`\n    * `/about` when you visit `/about`\n    * `/blog` when you visit `/blog`\n    * `/blog/some-post-id` when you visit `/blog/some-post-id`\n     @property currentURL\n    @type String\n    @public\n  */\n  static {\n    decorateFieldV2(this.prototype, \"location\", [readOnly('_router.location')]);\n  }\n  #location = (initializeDeferredDecorator(this, \"location\"), void 0);\n  /**\n    The `location` property returns what implementation of the `location` API\n    your application is using, which determines what type of URL is being used.\n     See [Location](/ember/release/classes/Location) for more information.\n     To force a particular `location` API implementation to be used in your\n    application you can set a location type on your `config/environment`.\n    For example, to set the `history` type:\n     ```config/environment.js\n    'use strict';\n     module.exports = function(environment) {\n      let ENV = {\n        modulePrefix: 'router-service',\n        environment,\n        rootURL: '/',\n        locationType: 'history',\n        ...\n      }\n    }\n    ```\n     The following location types are available by default:\n    `hash`, `history`, `none`.\n     See [HashLocation](/ember/release/classes/HashLocation).\n    See [HistoryLocation](/ember/release/classes/HistoryLocation).\n    See [NoneLocation](/ember/release/classes/NoneLocation).\n     @property location\n    @default 'hash'\n    @see {Location}\n    @public\n  */\n  static {\n    decorateFieldV2(this.prototype, \"rootURL\", [readOnly('_router.rootURL')]);\n  }\n  #rootURL = (initializeDeferredDecorator(this, \"rootURL\"), void 0);\n  /**\n    The `rootURL` property represents the URL of the root of\n    the application, '/' by default.\n    This prefix is assumed on all routes defined on this app.\n     If you change the `rootURL` in your environment configuration\n    like so:\n     ```config/environment.js\n    'use strict';\n     module.exports = function(environment) {\n      let ENV = {\n        modulePrefix: 'router-service',\n        environment,\n        rootURL: '/my-root',\n      …\n      }\n    ]\n    ```\n     This property will return `/my-root`.\n     @property rootURL\n    @default '/'\n    @public\n  */\n  static {\n    decorateFieldV2(this.prototype, \"currentRoute\", [readOnly('_router.currentRoute')]);\n  }\n  #currentRoute = (initializeDeferredDecorator(this, \"currentRoute\"), void 0);\n  /**\n    The `currentRoute` property contains metadata about the current leaf route.\n    It returns a `RouteInfo` object that has information like the route name,\n    params, query params and more.\n     See [RouteInfo](/ember/release/classes/RouteInfo) for more info.\n     This property is guaranteed to change whenever a route transition\n    happens (even when that transition only changes parameters\n    and doesn't change the active route).\n     Usage example:\n    ```app/components/header.js\n      import Component from '@glimmer/component';\n      import { service } from '@ember/service';\n      import { notEmpty } from '@ember/object/computed';\n       export default class extends Component {\n        @service router;\n         @notEmpty('router.currentRoute.child') isChildRoute;\n      });\n    ```\n     @property currentRoute\n    @type RouteInfo\n    @public\n  */\n}\n\nexport { ROUTER, RouterService as default };\n","import { p as privatize } from '../../shared-chunks/registry-XY5cfmbH.js';\nimport EmberObject from '../object/index.js';\nimport { getOwner } from '../owner/index.js';\nimport BucketCache from './lib/cache.js';\nimport DSLImpl from './lib/dsl.js';\nimport RouterState from './lib/router_state.js';\nimport { resemblesURL, extractRouteArgs, getActiveTargetName, calculateCacheKey } from './lib/utils.js';\nimport { A } from '../array/index.js';\nimport { g as get, c as computed } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../-internals/meta/lib/meta.js';\nimport { info } from '../debug/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { s as set } from '../../shared-chunks/property_set-DrZnfGQ7.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\nimport typeOf from '../utils/lib/type-of.js';\nimport '../-internals/runtime/lib/mixins/registry_proxy.js';\nimport '../-internals/runtime/lib/mixins/container_proxy.js';\nimport '../-internals/runtime/lib/mixins/comparable.js';\nimport '../-internals/runtime/lib/mixins/action_handler.js';\nimport '../-internals/runtime/lib/mixins/-proxy.js';\nimport '../enumerable/mutable.js';\nimport '../-internals/runtime/lib/mixins/target_action_support.js';\nimport '../-internals/runtime/lib/ext/rsvp.js';\nimport Evented from '../object/evented.js';\nimport { run, once, scheduleOnce, cancel } from '../runloop/index.js';\nimport { getRenderState, getFullQueryParams, hasDefaultSerialize, defaultSerialize } from './route.js';\nimport { R as Router } from '../../shared-chunks/router-DSi8WnDi.js';\nimport { S as STATE_SYMBOL, l as logAbort } from '../../shared-chunks/unrecognized-url-error-BBMMZhBN.js';\nimport '../../shared-chunks/rsvp-CnCSY930.js';\nimport EngineInstance from '../engine/instance.js';\nimport { assert } from '../debug/lib/assert.js';\n\n/**\n@module @ember/routing/router\n*/\n\nfunction defaultDidTransition(infos) {\n  updatePaths(this);\n  this._cancelSlowTransitionTimer();\n  this.notifyPropertyChange('url');\n  this.set('currentState', this.targetState);\n  if (isDevelopingApp()) {\n    // @ts-expect-error namespace isn't public\n    if (this.namespace.LOG_TRANSITIONS) {\n      // eslint-disable-next-line no-console\n      console.log(`Transitioned into '${EmberRouter._routePath(infos)}'`);\n    }\n  }\n}\nfunction defaultWillTransition(oldInfos, newInfos) {\n  if (isDevelopingApp()) {\n    // @ts-expect-error namespace isn't public\n    if (this.namespace.LOG_TRANSITIONS) {\n      // eslint-disable-next-line no-console\n      console.log(`Preparing to transition from '${EmberRouter._routePath(oldInfos)}' to '${EmberRouter._routePath(newInfos)}'`);\n    }\n  }\n}\nlet freezeRouteInfo;\nif (isDevelopingApp()) {\n  freezeRouteInfo = transition => {\n    if (transition.from !== null && !Object.isFrozen(transition.from)) {\n      Object.freeze(transition.from);\n    }\n    if (transition.to !== null && !Object.isFrozen(transition.to)) {\n      Object.freeze(transition.to);\n    }\n  };\n}\nfunction K() {\n  return this;\n}\nconst {\n  slice\n} = Array.prototype;\n\n/**\n  The `EmberRouter` class manages the application state and URLs. Refer to\n  the [routing guide](https://guides.emberjs.com/release/routing/) for documentation.\n\n  @class EmberRouter\n  @extends EmberObject\n  @uses Evented\n  @public\n*/\nclass EmberRouter extends EmberObject.extend(Evented) {\n  /**\n   Represents the URL of the root of the application, often '/'. This prefix is\n    assumed on all routes defined on this router.\n     @property rootURL\n    @default '/'\n    @public\n  */\n  // Set with reopen to allow overriding via extend\n\n  /**\n   The `location` property determines the type of URL's that your\n    application will use.\n     The following location types are currently available:\n     * `history` - use the browser's history API to make the URLs look just like any standard URL\n    * `hash` - use `#` to separate the server part of the URL from the Ember part: `/blog/#/posts/new`\n    * `none` - do not store the Ember URL in the actual browser URL (mainly used for testing)\n    * `auto` - use the best option based on browser capabilities: `history` if possible, then `hash` if possible, otherwise `none`\n     This value is defaulted to `history` by the `locationType` setting of `/config/environment.js`\n     @property location\n    @default 'hash'\n    @see {Location}\n    @public\n  */\n  // Set with reopen to allow overriding via extend\n\n  _routerMicrolib;\n  _didSetupRouter = false;\n  _initialTransitionStarted = false;\n  currentURL = null;\n  currentRouteName = null;\n  currentPath = null;\n  currentRoute = null;\n  _qpCache = Object.create(null);\n\n  // Set of QueryParam['urlKey']\n  _qpUpdates = new Set();\n  _queuedQPChanges = {};\n  _bucketCache;\n  _toplevelView = null;\n  _handledErrors = new Set();\n  _engineInstances = Object.create(null);\n  _engineInfoByRoute = Object.create(null);\n  _routerService;\n  _slowTransitionTimer = null;\n  namespace;\n\n  // Begin Evented\n\n  // End Evented\n\n  // Set with reopenClass\n  static dslCallbacks;\n\n  /**\n    The `Router.map` function allows you to define mappings from URLs to routes\n    in your application. These mappings are defined within the\n    supplied callback function using `this.route`.\n     The first parameter is the name of the route which is used by default as the\n    path name as well.\n     The second parameter is the optional options hash. Available options are:\n       * `path`: allows you to provide your own path as well as mark dynamic\n        segments.\n      * `resetNamespace`: false by default; when nesting routes, ember will\n        combine the route names to form the fully-qualified route name, which is\n        used with `{{link-to}}` or manually transitioning to routes. Setting\n        `resetNamespace: true` will cause the route not to inherit from its\n        parent route's names. This is handy for preventing extremely long route names.\n        Keep in mind that the actual URL path behavior is still retained.\n     The third parameter is a function, which can be used to nest routes.\n    Nested routes, by default, will have the parent route tree's route name and\n    path prepended to it's own.\n     ```app/router.js\n    Router.map(function(){\n      this.route('post', { path: '/post/:post_id' }, function() {\n        this.route('edit');\n        this.route('comments', { resetNamespace: true }, function() {\n          this.route('new');\n        });\n      });\n    });\n    ```\n     @method map\n    @param callback\n    @public\n  */\n  static map(callback) {\n    if (!this.dslCallbacks) {\n      this.dslCallbacks = [];\n      // FIXME: Can we remove this?\n      this.reopenClass({\n        dslCallbacks: this.dslCallbacks\n      });\n    }\n    this.dslCallbacks.push(callback);\n    return this;\n  }\n  static _routePath(routeInfos) {\n    let path = [];\n\n    // We have to handle coalescing resource names that\n    // are prefixed with their parent's names, e.g.\n    // ['foo', 'foo.bar.baz'] => 'foo.bar.baz', not 'foo.foo.bar.baz'\n\n    function intersectionMatches(a1, a2) {\n      for (let i = 0; i < a1.length; ++i) {\n        if (a1[i] !== a2[i]) {\n          return false;\n        }\n      }\n      return true;\n    }\n    let name, nameParts, oldNameParts;\n    for (let i = 1; i < routeInfos.length; i++) {\n      let routeInfo = routeInfos[i];\n      (isDevelopingApp() && !(routeInfo) && assert('has routeInfo', routeInfo));\n      name = routeInfo.name;\n      nameParts = name.split('.');\n      oldNameParts = slice.call(path);\n      while (oldNameParts.length) {\n        if (intersectionMatches(oldNameParts, nameParts)) {\n          break;\n        }\n        oldNameParts.shift();\n      }\n      path.push(...nameParts.slice(oldNameParts.length));\n    }\n    return path.join('.');\n  }\n\n  // Note that owner is actually required in this scenario, but since it is strictly\n  // optional in other contexts trying to make it required here confuses TS.\n  constructor(owner) {\n    super(owner);\n    (isDevelopingApp() && !(owner) && assert('BUG: Missing owner', owner));\n    this._resetQueuedQueryParameterChanges();\n    this.namespace = owner.lookup('application:main');\n    let bucketCache = owner.lookup(privatize`-bucket-cache:main`);\n    (isDevelopingApp() && !(bucketCache instanceof BucketCache) && assert('BUG: BucketCache should always be present', bucketCache instanceof BucketCache));\n    this._bucketCache = bucketCache;\n    let routerService = owner.lookup('service:router');\n    (isDevelopingApp() && !(routerService !== undefined) && assert('BUG: RouterService should always be present', routerService !== undefined));\n    this._routerService = routerService;\n  }\n  _initRouterJs() {\n    let location = get(this, 'location');\n    let router = this;\n    const owner = getOwner(this);\n    (isDevelopingApp() && !(owner) && assert('Router is unexpectedly missing an owner', owner));\n    let seen = Object.create(null);\n    class PrivateRouter extends Router {\n      getRoute(name) {\n        let routeName = name;\n        let routeOwner = owner;\n        let engineInfo = router._engineInfoByRoute[routeName];\n        if (engineInfo) {\n          let engineInstance = router._getEngineInstance(engineInfo);\n          routeOwner = engineInstance;\n          routeName = engineInfo.localFullName;\n        }\n        let fullRouteName = `route:${routeName}`;\n        (isDevelopingApp() && !(routeOwner) && assert('Route is unexpectedly missing an owner', routeOwner));\n        let route = routeOwner.lookup(fullRouteName);\n        if (seen[name]) {\n          (isDevelopingApp() && !(route) && assert('seen routes should exist', route));\n          return route;\n        }\n        seen[name] = true;\n        if (!route) {\n          // SAFETY: this is configured in `commonSetupRegistry` in the\n          // `@ember/application/lib` package.\n          let DefaultRoute = routeOwner.factoryFor('route:basic').class;\n          routeOwner.register(fullRouteName, class extends DefaultRoute {});\n          route = routeOwner.lookup(fullRouteName);\n          if (isDevelopingApp()) {\n            if (router.namespace.LOG_ACTIVE_GENERATION) {\n              info(`generated -> ${fullRouteName}`, {\n                fullName: fullRouteName\n              });\n            }\n          }\n        }\n        route._setRouteName(routeName);\n        if (engineInfo && !hasDefaultSerialize(route)) {\n          throw new Error('Defining a custom serialize method on an Engine route is not supported.');\n        }\n        return route;\n      }\n      getSerializer(name) {\n        let engineInfo = router._engineInfoByRoute[name];\n\n        // If this is not an Engine route, we fall back to the handler for serialization\n        if (!engineInfo) {\n          return;\n        }\n        return engineInfo.serializeMethod || defaultSerialize;\n      }\n      updateURL(path) {\n        once(() => {\n          location.setURL(path);\n          set(router, 'currentURL', path);\n        });\n      }\n\n      // TODO: merge into routeDidChange\n      didTransition(infos) {\n        (isDevelopingApp() && !(router.didTransition === defaultDidTransition) && assert('You attempted to override the \"didTransition\" method which has been deprecated. Please inject the router service and listen to the \"routeDidChange\" event.', router.didTransition === defaultDidTransition));\n        router.didTransition(infos);\n      }\n\n      // TODO: merge into routeWillChange\n      willTransition(oldInfos, newInfos) {\n        (isDevelopingApp() && !(router.willTransition === defaultWillTransition) && assert('You attempted to override the \"willTransition\" method which has been deprecated. Please inject the router service and listen to the \"routeWillChange\" event.', router.willTransition === defaultWillTransition));\n        router.willTransition(oldInfos, newInfos);\n      }\n      triggerEvent(routeInfos, ignoreFailure, name, args) {\n        return triggerEvent.bind(router)(routeInfos, ignoreFailure, name, args);\n      }\n      routeWillChange(transition) {\n        router.trigger('routeWillChange', transition);\n        if (isDevelopingApp()) {\n          freezeRouteInfo(transition);\n        }\n        router._routerService.trigger('routeWillChange', transition);\n\n        // in case of intermediate transition we update the current route\n        // to make router.currentRoute.name consistent with router.currentRouteName\n        // see https://github.com/emberjs/ember.js/issues/19449\n        if (transition.isIntermediate) {\n          router.set('currentRoute', transition.to);\n        }\n      }\n      routeDidChange(transition) {\n        router.set('currentRoute', transition.to);\n        once(() => {\n          router.trigger('routeDidChange', transition);\n          if (isDevelopingApp()) {\n            freezeRouteInfo(transition);\n          }\n          router._routerService.trigger('routeDidChange', transition);\n        });\n      }\n      transitionDidError(error, transition) {\n        if (error.wasAborted || transition.isAborted) {\n          // If the error was a transition erorr or the transition aborted\n          // log the abort.\n          return logAbort(transition);\n        } else {\n          // Otherwise trigger the \"error\" event to attempt an intermediate\n          // transition into an error substate\n          transition.trigger(false, 'error', error.error, transition, error.route);\n          if (router._isErrorHandled(error.error)) {\n            // If we handled the error with a substate just roll the state back on\n            // the transition and send the \"routeDidChange\" event for landing on\n            // the error substate and return the error.\n            transition.rollback();\n            this.routeDidChange(transition);\n            return error.error;\n          } else {\n            // If it was not handled, abort the transition completely and return\n            // the error.\n            transition.abort();\n            return error.error;\n          }\n        }\n      }\n      replaceURL(url) {\n        if (location.replaceURL) {\n          let doReplaceURL = () => {\n            location.replaceURL(url);\n            set(router, 'currentURL', url);\n          };\n          once(doReplaceURL);\n        } else {\n          this.updateURL(url);\n        }\n      }\n    }\n    let routerMicrolib = this._routerMicrolib = new PrivateRouter();\n    let dslCallbacks = this.constructor.dslCallbacks || [K];\n    let dsl = this._buildDSL();\n    dsl.route('application', {\n      path: '/',\n      resetNamespace: true,\n      overrideNameAssertion: true\n    }, function () {\n      for (let i = 0; i < dslCallbacks.length; i++) {\n        dslCallbacks[i].call(this);\n      }\n    });\n    if (isDevelopingApp()) {\n      if (this.namespace.LOG_TRANSITIONS_INTERNAL) {\n        routerMicrolib.log = console.log.bind(console); // eslint-disable-line no-console\n      }\n    }\n    routerMicrolib.map(dsl.generate());\n  }\n  _buildDSL() {\n    let enableLoadingSubstates = this._hasModuleBasedResolver();\n    let router = this;\n    const owner = getOwner(this);\n    (isDevelopingApp() && !(owner) && assert('Router is unexpectedly missing an owner', owner));\n    let options = {\n      enableLoadingSubstates,\n      resolveRouteMap(name) {\n        return owner.factoryFor(`route-map:${name}`);\n      },\n      addRouteForEngine(name, engineInfo) {\n        if (!router._engineInfoByRoute[name]) {\n          router._engineInfoByRoute[name] = engineInfo;\n        }\n      }\n    };\n    return new DSLImpl(null, options);\n  }\n\n  /*\n    Resets all pending query parameter changes.\n    Called after transitioning to a new route\n    based on query parameter changes.\n  */\n  _resetQueuedQueryParameterChanges() {\n    this._queuedQPChanges = {};\n  }\n  _hasModuleBasedResolver() {\n    let owner = getOwner(this);\n    (isDevelopingApp() && !(owner) && assert('Router is unexpectedly missing an owner', owner));\n    let resolver = get(owner, 'application.__registry__.resolver.moduleBasedResolver');\n    return Boolean(resolver);\n  }\n\n  /**\n    Initializes the current router instance and sets up the change handling\n    event listeners used by the instances `location` implementation.\n     A property named `initialURL` will be used to determine the initial URL.\n    If no value is found `/` will be used.\n     @method startRouting\n    @private\n  */\n  startRouting() {\n    if (this.setupRouter()) {\n      let initialURL = get(this, 'initialURL');\n      if (initialURL === undefined) {\n        initialURL = get(this, 'location').getURL();\n      }\n      let initialTransition = this.handleURL(initialURL);\n      if (initialTransition && initialTransition.error) {\n        throw initialTransition.error;\n      }\n    }\n  }\n  setupRouter() {\n    if (this._didSetupRouter) {\n      return false;\n    }\n    this._didSetupRouter = true;\n    this._setupLocation();\n    let location = get(this, 'location');\n\n    // Allow the Location class to cancel the router setup while it refreshes\n    // the page\n    if (get(location, 'cancelRouterSetup')) {\n      return false;\n    }\n    this._initRouterJs();\n    location.onUpdateURL(url => {\n      this.handleURL(url);\n    });\n    return true;\n  }\n  _setOutlets() {\n    // This is triggered async during Route#willDestroy.\n    // If the router is also being destroyed we do not want to\n    // to create another this._toplevelView (and leak the renderer)\n    if (this.isDestroying || this.isDestroyed) {\n      return;\n    }\n    let routeInfos = this._routerMicrolib.currentRouteInfos;\n    if (!routeInfos) {\n      return;\n    }\n    let root = null;\n    let parent = null;\n    for (let routeInfo of routeInfos) {\n      let route = routeInfo.route;\n      let render = getRenderState(route);\n      if (render) {\n        let state = {\n          render,\n          outlets: {\n            main: undefined\n          }\n        };\n        if (parent) {\n          parent.outlets.main = state;\n        } else {\n          root = state;\n        }\n        parent = state;\n      } else {\n        // It used to be that we would create a stub entry and keep traversing,\n        // but I don't think that is necessary anymore – if a parent route did\n        // not render, then the child routes have nowhere to render into these\n        // days. That wasn't always the case since in the past any route can\n        // render into any other route's outlets.\n        break;\n      }\n    }\n\n    // when a transitionTo happens after the validation phase\n    // during the initial transition _setOutlets is called\n    // when no routes are active. However, it will get called\n    // again with the correct values during the next turn of\n    // the runloop\n    if (root === null) {\n      return;\n    }\n    if (!this._toplevelView) {\n      let owner = getOwner(this);\n      (isDevelopingApp() && !(owner) && assert('Router is unexpectedly missing an owner', owner)); // SAFETY: we don't presently have any type registries internally to make\n      // this safe, so in each of these cases we assume that nothing *else* is\n      // registered at this `FullName`, and simply check to make sure that\n      // *something* is.\n      let OutletView = owner.factoryFor('view:-outlet');\n      (isDevelopingApp() && !(OutletView !== undefined) && assert('[BUG] unexpectedly missing `view:-outlet`', OutletView !== undefined));\n      let application = owner.lookup('application:main');\n      (isDevelopingApp() && !(application !== undefined) && assert('[BUG] unexpectedly missing `application:-main`', application !== undefined));\n      let environment = owner.lookup('-environment:main');\n      (isDevelopingApp() && !(environment !== undefined) && assert('[BUG] unexpectedly missing `-environment:main`', environment !== undefined));\n      let template = owner.lookup('template:-outlet');\n      (isDevelopingApp() && !(template !== undefined) && assert('[BUG] unexpectedly missing `template:-outlet`', template !== undefined));\n      this._toplevelView = OutletView.create({\n        environment,\n        template,\n        application\n      });\n      this._toplevelView.setOutletState(root);\n\n      // TODO(SAFETY): At least one test runs without this set correctly. At a\n      // later time, update the test to configure this correctly. The test ID:\n      // `Router Service - non application test:  RouterService#transitionTo with basic route`\n      let instance = owner.lookup('-application-instance:main');\n      // let instance = owner.lookup('-application-instance:main') as ApplicationInstance | undefined;\n      // assert('[BUG] unexpectedly missing `-application-instance:main`', instance !== undefined);\n\n      if (instance) {\n        // SAFETY: LOL. This is calling a deprecated API with a type that we\n        // cannot actually confirm at a type level *is* a `ViewMixin`. Seems:\n        // not great on multiple fronts!\n        instance.didCreateRootView(this._toplevelView);\n      }\n    } else {\n      this._toplevelView.setOutletState(root);\n    }\n  }\n  handleURL(url) {\n    // Until we have an ember-idiomatic way of accessing #hashes, we need to\n    // remove it because router.js doesn't know how to handle it.\n    let _url = url.split(/#(.+)?/)[0];\n    return this._doURLTransition('handleURL', _url);\n  }\n  _doURLTransition(routerJsMethod, url) {\n    this._initialTransitionStarted = true;\n    let transition = this._routerMicrolib[routerJsMethod](url || '/');\n    didBeginTransition(transition, this);\n    return transition;\n  }\n\n  /**\n    Transition the application into another route. The route may\n    be either a single route or route path:\n     @method transitionTo\n    @param {String} [name] the name of the route or a URL\n    @param {...Object} models the model(s) or identifier(s) to be used while\n      transitioning to the route.\n    @param {Object} [options] optional hash with a queryParams property\n      containing a mapping of query parameters\n    @return {Transition} the transition object associated with this\n      attempted transition\n    @public\n  */\n  transitionTo(...args) {\n    if (resemblesURL(args[0])) {\n      (isDevelopingApp() && !(!this.isDestroying && !this.isDestroyed) && assert(`A transition was attempted from '${this.currentRouteName}' to '${args[0]}' but the application instance has already been destroyed.`, !this.isDestroying && !this.isDestroyed));\n      return this._doURLTransition('transitionTo', args[0]);\n    }\n    let {\n      routeName,\n      models,\n      queryParams\n    } = extractRouteArgs(args);\n    (isDevelopingApp() && !(!this.isDestroying && !this.isDestroyed) && assert(`A transition was attempted from '${this.currentRouteName}' to '${routeName}' but the application instance has already been destroyed.`, !this.isDestroying && !this.isDestroyed));\n    return this._doTransition(routeName, models, queryParams);\n  }\n  intermediateTransitionTo(name, ...args) {\n    this._routerMicrolib.intermediateTransitionTo(name, ...args);\n    updatePaths(this);\n    if (isDevelopingApp()) {\n      let infos = this._routerMicrolib.currentRouteInfos;\n      if (this.namespace.LOG_TRANSITIONS) {\n        (isDevelopingApp() && !(infos) && assert('expected infos to be set', infos)); // eslint-disable-next-line no-console\n        console.log(`Intermediate-transitioned into '${EmberRouter._routePath(infos)}'`);\n      }\n    }\n  }\n\n  /**\n    Similar to `transitionTo`, but instead of adding the destination to the browser's URL history,\n    it replaces the entry for the current route.\n    When the user clicks the \"back\" button in the browser, there will be fewer steps.\n    This is most commonly used to manage redirects in a way that does not cause confusing additions\n    to the user's browsing history.\n     @method replaceWith\n    @param {String} [name] the name of the route or a URL\n    @param {...Object} models the model(s) or identifier(s) to be used while\n      transitioning to the route.\n    @param {Object} [options] optional hash with a queryParams property\n      containing a mapping of query parameters\n    @return {Transition} the transition object associated with this\n      attempted transition\n    @public\n  */\n  replaceWith(...args) {\n    return this.transitionTo(...args).method('replace');\n  }\n  generate(name, ...args) {\n    let url = this._routerMicrolib.generate(name, ...args);\n    (isDevelopingApp() && !(typeof this.location !== 'string') && assert('expected non-string location', typeof this.location !== 'string'));\n    return this.location.formatURL(url);\n  }\n\n  /**\n    Determines if the supplied route is currently active.\n     @method isActive\n    @param routeName\n    @return {Boolean}\n    @private\n  */\n  isActive(routeName) {\n    return this._routerMicrolib.isActive(routeName);\n  }\n\n  /**\n    An alternative form of `isActive` that doesn't require\n    manual concatenation of the arguments into a single\n    array.\n     @method isActiveIntent\n    @param routeName\n    @param models\n    @param queryParams\n    @return {Boolean}\n    @private\n    @since 1.7.0\n  */\n  isActiveIntent(routeName, models, queryParams) {\n    return this.currentState.isActiveIntent(routeName, models, queryParams);\n  }\n  send(name, ...args) {\n    /*name, context*/\n    this._routerMicrolib.trigger(name, ...args);\n  }\n\n  /**\n    Does this router instance have the given route.\n     @method hasRoute\n    @return {Boolean}\n    @private\n  */\n  hasRoute(route) {\n    return this._routerMicrolib.hasRoute(route);\n  }\n\n  /**\n    Resets the state of the router by clearing the current route\n    handlers and deactivating them.\n     @private\n    @method reset\n   */\n  reset() {\n    this._didSetupRouter = false;\n    this._initialTransitionStarted = false;\n    if (this._routerMicrolib) {\n      this._routerMicrolib.reset();\n    }\n  }\n  willDestroy() {\n    if (this._toplevelView) {\n      this._toplevelView.destroy();\n      this._toplevelView = null;\n    }\n    super.willDestroy();\n    this.reset();\n    let instances = this._engineInstances;\n    for (let name in instances) {\n      let instanceMap = instances[name];\n      (isDevelopingApp() && !(instanceMap) && assert('has instanceMap', instanceMap));\n      for (let id in instanceMap) {\n        let instance = instanceMap[id];\n        (isDevelopingApp() && !(instance) && assert('has instance', instance));\n        run(instance, 'destroy');\n      }\n    }\n  }\n\n  /*\n    Called when an active route's query parameter has changed.\n    These changes are batched into a runloop run and trigger\n    a single transition.\n  */\n  _activeQPChanged(queryParameterName, newValue) {\n    this._queuedQPChanges[queryParameterName] = newValue;\n    once(this, this._fireQueryParamTransition);\n  }\n\n  // The queryParameterName is QueryParam['urlKey']\n  _updatingQPChanged(queryParameterName) {\n    this._qpUpdates.add(queryParameterName);\n  }\n\n  /*\n    Triggers a transition to a route based on query parameter changes.\n    This is called once per runloop, to batch changes.\n     e.g.\n     if these methods are called in succession:\n    this._activeQPChanged('foo', '10');\n      // results in _queuedQPChanges = { foo: '10' }\n    this._activeQPChanged('bar', false);\n      // results in _queuedQPChanges = { foo: '10', bar: false }\n     _queuedQPChanges will represent both of these changes\n    and the transition using `transitionTo` will be triggered\n    once.\n  */\n  _fireQueryParamTransition() {\n    this.transitionTo({\n      queryParams: this._queuedQPChanges\n    });\n    this._resetQueuedQueryParameterChanges();\n  }\n  _setupLocation() {\n    let location = this.location;\n    let rootURL = this.rootURL;\n    let owner = getOwner(this);\n    (isDevelopingApp() && !(owner) && assert('Router is unexpectedly missing an owner', owner));\n    if ('string' === typeof location) {\n      let resolvedLocation = owner.lookup(`location:${location}`);\n      (isDevelopingApp() && !(resolvedLocation) && assert(`Could not resolve a location class at 'location:${location}'`, resolvedLocation));\n      location = set(this, 'location', resolvedLocation);\n    }\n    if (location !== null && typeof location === 'object') {\n      if (rootURL) {\n        set(location, 'rootURL', rootURL);\n      }\n\n      // ensure that initState is called AFTER the rootURL is set on\n      // the location instance\n      if (typeof location.initState === 'function') {\n        location.initState();\n      }\n    }\n  }\n\n  /**\n    Serializes the given query params according to their QP meta information.\n     @private\n    @method _serializeQueryParams\n    @param {Arrray<RouteInfo>} routeInfos\n    @param {Object} queryParams\n    @return {Void}\n  */\n  _serializeQueryParams(routeInfos, queryParams) {\n    forEachQueryParam(this, routeInfos, queryParams, (key, value, qp) => {\n      if (qp) {\n        delete queryParams[key];\n        queryParams[qp.urlKey] = qp.route.serializeQueryParam(value, qp.urlKey, qp.type);\n      } else if (value === undefined) {\n        return; // We don't serialize undefined values\n      } else {\n        queryParams[key] = this._serializeQueryParam(value, typeOf(value));\n      }\n    });\n  }\n\n  /**\n    Serializes the value of a query parameter based on a type\n     @private\n    @method _serializeQueryParam\n    @param {Object} value\n    @param {String} type\n  */\n  _serializeQueryParam(value, type) {\n    if (value === null || value === undefined) {\n      return value;\n    } else if (type === 'array') {\n      return JSON.stringify(value);\n    }\n    return `${value}`;\n  }\n\n  /**\n    Deserializes the given query params according to their QP meta information.\n     @private\n    @method _deserializeQueryParams\n    @param {Array<RouteInfo>} routeInfos\n    @param {Object} queryParams\n    @return {Void}\n  */\n  _deserializeQueryParams(routeInfos, queryParams) {\n    forEachQueryParam(this, routeInfos, queryParams, (key, value, qp) => {\n      // If we don't have QP meta info for a given key, then we do nothing\n      // because all values will be treated as strings\n      if (qp) {\n        delete queryParams[key];\n        queryParams[qp.prop] = qp.route.deserializeQueryParam(value, qp.urlKey, qp.type);\n      }\n    });\n  }\n\n  /**\n    Deserializes the value of a query parameter based on a default type\n     @private\n    @method _deserializeQueryParam\n    @param {Object} value\n    @param {String} defaultType\n  */\n  _deserializeQueryParam(value, defaultType) {\n    if (value === null || value === undefined) {\n      return value;\n    } else if (defaultType === 'boolean') {\n      return value === 'true';\n    } else if (defaultType === 'number') {\n      return Number(value).valueOf();\n    } else if (defaultType === 'array') {\n      return A(JSON.parse(value));\n    }\n    return value;\n  }\n\n  /**\n    Removes (prunes) any query params with default values from the given QP\n    object. Default values are determined from the QP meta information per key.\n     @private\n    @method _pruneDefaultQueryParamValues\n    @param {Array<RouteInfo>} routeInfos\n    @param {Object} queryParams\n    @return {Void}\n  */\n  _pruneDefaultQueryParamValues(routeInfos, queryParams) {\n    let qps = this._queryParamsFor(routeInfos);\n    for (let key in queryParams) {\n      let qp = qps.map[key];\n      if (qp && qp.serializedDefaultValue === queryParams[key]) {\n        delete queryParams[key];\n      }\n    }\n  }\n  _doTransition(_targetRouteName, models, _queryParams, _fromRouterService) {\n    let targetRouteName = _targetRouteName || getActiveTargetName(this._routerMicrolib);\n    (isDevelopingApp() && !(Boolean(targetRouteName) && this._routerMicrolib.hasRoute(targetRouteName)) && assert(`The route ${targetRouteName} was not found`, Boolean(targetRouteName) && this._routerMicrolib.hasRoute(targetRouteName)));\n    this._initialTransitionStarted = true;\n    let queryParams = {};\n    this._processActiveTransitionQueryParams(targetRouteName, models, queryParams, _queryParams);\n    Object.assign(queryParams, _queryParams);\n    this._prepareQueryParams(targetRouteName, models, queryParams, Boolean(_fromRouterService));\n    let transition = this._routerMicrolib.transitionTo(targetRouteName, ...models, {\n      queryParams\n    });\n    didBeginTransition(transition, this);\n    return transition;\n  }\n  _processActiveTransitionQueryParams(targetRouteName, models, queryParams,\n  // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n  _queryParams) {\n    // merge in any queryParams from the active transition which could include\n    // queryParams from the url on initial load.\n    if (!this._routerMicrolib.activeTransition) {\n      return;\n    }\n    let unchangedQPs = {};\n    let qpUpdates = this._qpUpdates;\n    let params = getFullQueryParams(this, this._routerMicrolib.activeTransition[STATE_SYMBOL]);\n    for (let key in params) {\n      if (!qpUpdates.has(key)) {\n        unchangedQPs[key] = params[key];\n      }\n    }\n\n    // We need to fully scope queryParams so that we can create one object\n    // that represents both passed-in queryParams and ones that aren't changed\n    // from the active transition.\n    this._fullyScopeQueryParams(targetRouteName, models, _queryParams);\n    this._fullyScopeQueryParams(targetRouteName, models, unchangedQPs);\n    Object.assign(queryParams, unchangedQPs);\n  }\n\n  /**\n    Prepares the query params for a URL or Transition. Restores any undefined QP\n    keys/values, serializes all values, and then prunes any default values.\n     @private\n    @method _prepareQueryParams\n    @param {String} targetRouteName\n    @param {Array<Object>} models\n    @param {Object} queryParams\n    @param {boolean} keepDefaultQueryParamValues\n    @return {Void}\n  */\n  _prepareQueryParams(targetRouteName, models, queryParams, _fromRouterService) {\n    let state = calculatePostTransitionState(this, targetRouteName, models);\n    this._hydrateUnsuppliedQueryParams(state, queryParams, Boolean(_fromRouterService));\n    this._serializeQueryParams(state.routeInfos, queryParams);\n    if (!_fromRouterService) {\n      this._pruneDefaultQueryParamValues(state.routeInfos, queryParams);\n    }\n  }\n\n  /**\n    Returns the meta information for the query params of a given route. This\n    will be overridden to allow support for lazy routes.\n     @private\n    @method _getQPMeta\n    @param {RouteInfo} routeInfo\n    @return {Object}\n  */\n  _getQPMeta(routeInfo) {\n    let route = routeInfo.route;\n    return route && get(route, '_qp');\n  }\n\n  /**\n    Returns a merged query params meta object for a given set of routeInfos.\n    Useful for knowing what query params are available for a given route hierarchy.\n     @private\n    @method _queryParamsFor\n    @param {Array<RouteInfo>} routeInfos\n    @return {Object}\n   */\n  _queryParamsFor(routeInfos) {\n    let routeInfoLength = routeInfos.length;\n    let leafRouteName = routeInfos[routeInfoLength - 1].name;\n    let cached = this._qpCache[leafRouteName];\n    if (cached !== undefined) {\n      return cached;\n    }\n    let shouldCache = true;\n    let map = {};\n    let qps = [];\n    let qpsByUrlKey = isDevelopingApp() ? {} : null;\n    let qpMeta;\n    let urlKey;\n    let qpOther;\n    for (let routeInfo of routeInfos) {\n      qpMeta = this._getQPMeta(routeInfo);\n      if (!qpMeta) {\n        shouldCache = false;\n        continue;\n      }\n\n      // Loop over each QP to make sure we don't have any collisions by urlKey\n      for (let qp of qpMeta.qps) {\n        if (isDevelopingApp()) {\n          urlKey = qp.urlKey;\n          qpOther = qpsByUrlKey[urlKey];\n          if (qpOther && qpOther.controllerName !== qp.controllerName) {\n            (isDevelopingApp() && true && assert(`You're not allowed to have more than one controller property map to the same query param key, but both \\`${qpOther.scopedPropertyName}\\` and \\`${qp.scopedPropertyName}\\` map to \\`${urlKey}\\`. You can fix this by mapping one of the controller properties to a different query param key via the \\`as\\` config option, e.g. \\`${qpOther.prop}: { as: 'other-${qpOther.prop}' }\\``, false));\n          }\n          qpsByUrlKey[urlKey] = qp;\n        }\n        qps.push(qp);\n      }\n      Object.assign(map, qpMeta.map);\n    }\n    let finalQPMeta = {\n      qps,\n      map\n    };\n    if (shouldCache) {\n      this._qpCache[leafRouteName] = finalQPMeta;\n    }\n    return finalQPMeta;\n  }\n\n  /**\n    Maps all query param keys to their fully scoped property name of the form\n    `controllerName:propName`.\n     @private\n    @method _fullyScopeQueryParams\n    @param {String} leafRouteName\n    @param {Array<Object>} contexts\n    @param {Object} queryParams\n    @return {Void}\n  */\n  _fullyScopeQueryParams(leafRouteName, contexts, queryParams) {\n    let state = calculatePostTransitionState(this, leafRouteName, contexts);\n    let routeInfos = state.routeInfos;\n    let qpMeta;\n    for (let routeInfo of routeInfos) {\n      qpMeta = this._getQPMeta(routeInfo);\n      if (!qpMeta) {\n        continue;\n      }\n      for (let qp of qpMeta.qps) {\n        let presentProp = qp.prop in queryParams && qp.prop || qp.scopedPropertyName in queryParams && qp.scopedPropertyName || qp.urlKey in queryParams && qp.urlKey;\n        if (presentProp) {\n          if (presentProp !== qp.scopedPropertyName) {\n            queryParams[qp.scopedPropertyName] = queryParams[presentProp];\n            delete queryParams[presentProp];\n          }\n        }\n      }\n    }\n  }\n\n  /**\n    Hydrates (adds/restores) any query params that have pre-existing values into\n    the given queryParams hash. This is what allows query params to be \"sticky\"\n    and restore their last known values for their scope.\n     @private\n    @method _hydrateUnsuppliedQueryParams\n    @param {TransitionState} state\n    @param {Object} queryParams\n    @return {Void}\n  */\n  _hydrateUnsuppliedQueryParams(state, queryParams, _fromRouterService) {\n    let routeInfos = state.routeInfos;\n    let appCache = this._bucketCache;\n    let qpMeta;\n    let qp;\n    let presentProp;\n    for (let routeInfo of routeInfos) {\n      qpMeta = this._getQPMeta(routeInfo);\n      if (!qpMeta) {\n        continue;\n      }\n\n      // Needs to stay for index loop to avoid throwIfClosureRequired\n      for (let j = 0, qpLen = qpMeta.qps.length; j < qpLen; ++j) {\n        qp = qpMeta.qps[j];\n        (isDevelopingApp() && !(qp) && assert('expected qp', qp));\n        presentProp = qp.prop in queryParams && qp.prop || qp.scopedPropertyName in queryParams && qp.scopedPropertyName || qp.urlKey in queryParams && qp.urlKey;\n        (isDevelopingApp() && !(function () {\n          if (qp.urlKey === presentProp || qp.scopedPropertyName === presentProp) {\n            return true;\n          }\n          if (_fromRouterService && presentProp !== false && qp.urlKey !== qp.prop) {\n            // assumptions (mainly from current transitionTo_test):\n            // - this is only supposed to be run when there is an alias to a query param and the alias is used to set the param\n            // - when there is no alias: qp.urlKey == qp.prop\n            return false;\n          }\n          return true;\n        }()) && assert(`You passed the \\`${presentProp}\\` query parameter during a transition into ${qp.route.routeName}, please update to ${qp.urlKey}`, function () {\n          if (qp.urlKey === presentProp || qp.scopedPropertyName === presentProp) {\n            return true;\n          }\n          if (_fromRouterService && presentProp !== false && qp.urlKey !== qp.prop) {\n            return false;\n          }\n          return true;\n        }()));\n        if (presentProp) {\n          if (presentProp !== qp.scopedPropertyName) {\n            queryParams[qp.scopedPropertyName] = queryParams[presentProp];\n            delete queryParams[presentProp];\n          }\n        } else {\n          let cacheKey = calculateCacheKey(qp.route.fullRouteName, qp.parts, state.params);\n          (isDevelopingApp() && !(appCache) && assert('ROUTER BUG: expected appCache to be defined. This is an internal bug, please open an issue on Github if you see this message!', appCache));\n          queryParams[qp.scopedPropertyName] = appCache.lookup(cacheKey, qp.prop, qp.defaultValue);\n        }\n      }\n    }\n  }\n  _scheduleLoadingEvent(transition, originRoute) {\n    this._cancelSlowTransitionTimer();\n    this._slowTransitionTimer = scheduleOnce('routerTransitions', this, this._handleSlowTransition, transition, originRoute);\n  }\n  currentState = null;\n  targetState = null;\n  _handleSlowTransition(transition, originRoute) {\n    if (!this._routerMicrolib.activeTransition) {\n      // Don't fire an event if we've since moved on from\n      // the transition that put us in a loading state.\n      return;\n    }\n    let targetState = new RouterState(this, this._routerMicrolib, this._routerMicrolib.activeTransition[STATE_SYMBOL]);\n    this.set('targetState', targetState);\n    transition.trigger(true, 'loading', transition, originRoute);\n  }\n  _cancelSlowTransitionTimer() {\n    if (this._slowTransitionTimer) {\n      cancel(this._slowTransitionTimer);\n    }\n    this._slowTransitionTimer = null;\n  }\n\n  // These three helper functions are used to ensure errors aren't\n  // re-raised if they're handled in a route's error action.\n  _markErrorAsHandled(error) {\n    this._handledErrors.add(error);\n  }\n  _isErrorHandled(error) {\n    return this._handledErrors.has(error);\n  }\n  _clearHandledError(error) {\n    this._handledErrors.delete(error);\n  }\n  _getEngineInstance({\n    name,\n    instanceId,\n    mountPoint\n  }) {\n    let engineInstances = this._engineInstances;\n    let namedInstances = engineInstances[name];\n    if (!namedInstances) {\n      namedInstances = Object.create(null);\n      engineInstances[name] = namedInstances;\n    }\n\n    // We just set these!\n    (isDevelopingApp() && !(namedInstances) && assert('has namedInstances', namedInstances));\n    let engineInstance = namedInstances[instanceId];\n    if (!engineInstance) {\n      let owner = getOwner(this);\n      (isDevelopingApp() && !(owner instanceof EngineInstance) && assert('Expected router to have EngineInstance as owner', owner instanceof EngineInstance));\n      (isDevelopingApp() && !(owner.hasRegistration(`engine:${name}`)) && assert(`You attempted to mount the engine '${name}' in your router map, but the engine can not be found.`, owner.hasRegistration(`engine:${name}`)));\n      engineInstance = owner.buildChildEngineInstance(name, {\n        routable: true,\n        mountPoint\n      });\n      engineInstance.boot();\n      namedInstances[instanceId] = engineInstance;\n    }\n    return engineInstance;\n  }\n\n  /**\n    Handles updating the paths and notifying any listeners of the URL\n    change.\n     Triggers the router level `didTransition` hook.\n     For example, to notify google analytics when the route changes,\n    you could use this hook.  (Note: requires also including GA scripts, etc.)\n     ```javascript\n    import config from './config/environment';\n    import EmberRouter from '@ember/routing/router';\n    import { service } from '@ember/service';\n     export default class Router extends EmberRouter {\n      location = config.locationType;\n       @service()\n      router;\n       didTransition() {\n        super.didTransition(...arguments);\n         ga('send', 'pageview', {\n          page: this.router.currentURL,\n          title: this.router.currentRouteName,\n        });\n      }\n    }\n    ```\n     @method didTransition\n    @private\n    @since 1.2.0\n  */\n  // Set with reopen to allow overriding via extend\n\n  /**\n    Handles notifying any listeners of an impending URL\n    change.\n     Triggers the router level `willTransition` hook.\n     @method willTransition\n    @private\n    @since 1.11.0\n  */\n  // Set with reopen to allow overriding via extend\n\n  /**\n   Represents the current URL.\n     @property url\n    @type {String}\n    @private\n  */\n  // Set with reopen to allow overriding via extend\n}\n\n/*\n  Helper function for iterating over routes in a set of routeInfos that are\n  at or above the given origin route. Example: if `originRoute` === 'foo.bar'\n  and the routeInfos given were for 'foo.bar.baz', then the given callback\n  will be invoked with the routes for 'foo.bar', 'foo', and 'application'\n  individually.\n\n  If the callback returns anything other than `true`, then iteration will stop.\n\n  @private\n  @param {Route} originRoute\n  @param {Array<RouteInfo>} routeInfos\n  @param {Function} callback\n  @return {Void}\n */\nfunction forEachRouteAbove(routeInfos, callback) {\n  for (let i = routeInfos.length - 1; i >= 0; --i) {\n    let routeInfo = routeInfos[i];\n    (isDevelopingApp() && !(routeInfo) && assert('has routeInfo', routeInfo));\n    let route = routeInfo.route;\n\n    // routeInfo.handler being `undefined` generally means either:\n    //\n    // 1. an error occurred during creation of the route in question\n    // 2. the route is across an async boundary (e.g. within an engine)\n    //\n    // In both of these cases, we cannot invoke the callback on that specific\n    // route, because it just doesn't exist...\n    if (route === undefined) {\n      continue;\n    }\n    if (callback(route, routeInfo) !== true) {\n      return;\n    }\n  }\n}\n\n// These get invoked when an action bubbles above ApplicationRoute\n// and are not meant to be overridable.\nlet defaultActionHandlers = {\n  willResolveModel(_routeInfos, transition, originRoute) {\n    this._scheduleLoadingEvent(transition, originRoute);\n  },\n  // Attempt to find an appropriate error route or substate to enter.\n  error(routeInfos, error, transition) {\n    let router = this;\n    let routeInfoWithError = routeInfos[routeInfos.length - 1];\n    forEachRouteAbove(routeInfos, (route, routeInfo) => {\n      // We don't check the leaf most routeInfo since that would\n      // technically be below where we're at in the route hierarchy.\n      if (routeInfo !== routeInfoWithError) {\n        // Check for the existence of an 'error' route.\n        let errorRouteName = findRouteStateName(route, 'error');\n        if (errorRouteName) {\n          router._markErrorAsHandled(error);\n          router.intermediateTransitionTo(errorRouteName, error);\n          return false;\n        }\n      }\n\n      // Check for an 'error' substate route\n      let errorSubstateName = findRouteSubstateName(route, 'error');\n      if (errorSubstateName) {\n        router._markErrorAsHandled(error);\n        router.intermediateTransitionTo(errorSubstateName, error);\n        return false;\n      }\n      return true;\n    });\n    logError(error, `Error while processing route: ${transition.targetName}`);\n  },\n  // Attempt to find an appropriate loading route or substate to enter.\n  loading(routeInfos, transition) {\n    let router = this;\n    let routeInfoWithSlowLoading = routeInfos[routeInfos.length - 1];\n    forEachRouteAbove(routeInfos, (route, routeInfo) => {\n      // We don't check the leaf most routeInfos since that would\n      // technically be below where we're at in the route hierarchy.\n      if (routeInfo !== routeInfoWithSlowLoading) {\n        // Check for the existence of a 'loading' route.\n        let loadingRouteName = findRouteStateName(route, 'loading');\n        if (loadingRouteName) {\n          router.intermediateTransitionTo(loadingRouteName);\n          return false;\n        }\n      }\n\n      // Check for loading substate\n      let loadingSubstateName = findRouteSubstateName(route, 'loading');\n      if (loadingSubstateName) {\n        router.intermediateTransitionTo(loadingSubstateName);\n        return false;\n      }\n\n      // Don't bubble above pivot route.\n      return transition.pivotHandler !== route;\n    });\n  }\n};\nfunction logError(_error, initialMessage) {\n  let errorArgs = [];\n  let error;\n  if (_error && typeof _error === 'object' && typeof _error.errorThrown === 'object') {\n    error = _error.errorThrown;\n  } else {\n    error = _error;\n  }\n  if (initialMessage) {\n    errorArgs.push(initialMessage);\n  }\n  if (error) {\n    if (error.message) {\n      errorArgs.push(error.message);\n    }\n    if (error.stack) {\n      errorArgs.push(error.stack);\n    }\n    if (typeof error === 'string') {\n      errorArgs.push(error);\n    }\n  }\n  console.error(...errorArgs); //eslint-disable-line no-console\n}\n\n/**\n  Finds the name of the substate route if it exists for the given route. A\n  substate route is of the form `route_state`, such as `foo_loading`.\n\n  @private\n  @param {Route} route\n  @param {String} state\n  @return {String}\n*/\nfunction findRouteSubstateName(route, state) {\n  let owner = getOwner(route);\n  (isDevelopingApp() && !(owner) && assert('Route is unexpectedly missing an owner', owner));\n  let {\n    routeName,\n    fullRouteName,\n    _router: router\n  } = route;\n  let substateName = `${routeName}_${state}`;\n  let substateNameFull = `${fullRouteName}_${state}`;\n  return routeHasBeenDefined(owner, router, substateName, substateNameFull) ? substateNameFull : '';\n}\n\n/**\n  Finds the name of the state route if it exists for the given route. A state\n  route is of the form `route.state`, such as `foo.loading`. Properly Handles\n  `application` named routes.\n\n  @private\n  @param {Route} route\n  @param {String} state\n  @return {String}\n*/\nfunction findRouteStateName(route, state) {\n  let owner = getOwner(route);\n  (isDevelopingApp() && !(owner) && assert('Route is unexpectedly missing an owner', owner));\n  let {\n    routeName,\n    fullRouteName,\n    _router: router\n  } = route;\n  let stateName = routeName === 'application' ? state : `${routeName}.${state}`;\n  let stateNameFull = fullRouteName === 'application' ? state : `${fullRouteName}.${state}`;\n  return routeHasBeenDefined(owner, router, stateName, stateNameFull) ? stateNameFull : '';\n}\n\n/**\n  Determines whether or not a route has been defined by checking that the route\n  is in the Router's map and the owner has a registration for that route.\n\n  @private\n  @param {Owner} owner\n  @param {Router} router\n  @param {String} localName\n  @param {String} fullName\n  @return {Boolean}\n*/\nfunction routeHasBeenDefined(owner, router, localName, fullName) {\n  let routerHasRoute = router.hasRoute(fullName);\n  let ownerHasRoute = owner.factoryFor(`template:${localName}`) || owner.factoryFor(`route:${localName}`);\n  return routerHasRoute && ownerHasRoute;\n}\nfunction triggerEvent(routeInfos, ignoreFailure, name, args) {\n  if (!routeInfos) {\n    if (ignoreFailure) {\n      return;\n    }\n    // TODO: update?\n    throw new Error(`Can't trigger action '${name}' because your app hasn't finished transitioning into its first route. To trigger an action on destination routes during a transition, you can call \\`.send()\\` on the \\`Transition\\` object passed to the \\`model/beforeModel/afterModel\\` hooks.`);\n  }\n  let eventWasHandled = false;\n  let routeInfo, handler, actionHandler;\n  for (let i = routeInfos.length - 1; i >= 0; i--) {\n    routeInfo = routeInfos[i];\n    (isDevelopingApp() && !(routeInfo) && assert('[BUG] Missing routeInfo', routeInfo));\n    handler = routeInfo.route;\n    actionHandler = handler && handler.actions && handler.actions[name];\n    if (actionHandler) {\n      if (actionHandler.apply(handler, args) === true) {\n        eventWasHandled = true;\n      } else {\n        // Should only hit here if a non-bubbling error action is triggered on a route.\n        if (name === 'error') {\n          (isDevelopingApp() && !(handler) && assert('[BUG] Missing handler', handler));\n          handler._router._markErrorAsHandled(args[0]);\n        }\n        return;\n      }\n    }\n  }\n  let defaultHandler = defaultActionHandlers[name];\n  if (defaultHandler) {\n    defaultHandler.call(this, routeInfos, ...args);\n    return;\n  }\n  if (!eventWasHandled && !ignoreFailure) {\n    throw new Error(`Nothing handled the action '${name}'. If you did handle the action, this error can be caused by returning true from an action handler in a controller, causing the action to bubble.`);\n  }\n}\nfunction calculatePostTransitionState(emberRouter, leafRouteName, contexts) {\n  let state = emberRouter._routerMicrolib.applyIntent(leafRouteName, contexts);\n  let {\n    routeInfos,\n    params\n  } = state;\n  for (let routeInfo of routeInfos) {\n    // If the routeInfo is not resolved, we serialize the context into params\n    if (!routeInfo.isResolved) {\n      params[routeInfo.name] = routeInfo.serialize(routeInfo.context);\n    } else {\n      params[routeInfo.name] = routeInfo.params;\n    }\n  }\n  return state;\n}\nfunction updatePaths(router) {\n  let infos = router._routerMicrolib.currentRouteInfos;\n  if (infos.length === 0) {\n    return;\n  }\n  let path = EmberRouter._routePath(infos);\n  let info = infos[infos.length - 1];\n  (isDevelopingApp() && !(info) && assert('expected info', info));\n  let currentRouteName = info.name;\n  let location = router.location;\n  (isDevelopingApp() && !(typeof location !== 'string') && assert('expected location to not be a string', typeof location !== 'string'));\n  let currentURL = location.getURL();\n  set(router, 'currentPath', path);\n  set(router, 'currentRouteName', currentRouteName);\n  set(router, 'currentURL', currentURL);\n}\nfunction didBeginTransition(transition, router) {\n  let routerState = new RouterState(router, router._routerMicrolib, transition[STATE_SYMBOL]);\n  if (!router.currentState) {\n    router.set('currentState', routerState);\n  }\n  router.set('targetState', routerState);\n  transition.promise = transition.catch(error => {\n    if (router._isErrorHandled(error)) {\n      router._clearHandledError(error);\n    } else {\n      throw error;\n    }\n  }, 'Transition Error');\n}\nfunction forEachQueryParam(router, routeInfos, queryParams, callback) {\n  let qpCache = router._queryParamsFor(routeInfos);\n  for (let key in queryParams) {\n    if (!Object.prototype.hasOwnProperty.call(queryParams, key)) {\n      continue;\n    }\n    let value = queryParams[key];\n    let qp = qpCache.map[key];\n    callback(key, value, qp);\n  }\n}\nEmberRouter.reopen({\n  didTransition: defaultDidTransition,\n  willTransition: defaultWillTransition,\n  rootURL: '/',\n  location: 'hash',\n  // FIXME: Does this need to be overrideable via extend?\n  url: computed(function () {\n    let location = get(this, 'location');\n    if (typeof location === 'string') {\n      return undefined;\n    }\n    return location.getURL();\n  })\n});\n\nexport { EmberRouter as default, triggerEvent };\n","import '../debug/index.js';\nimport { onErrorTarget } from '../-internals/error-handling/index.js';\nimport '../-internals/meta/lib/meta.js';\nimport '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { I as flushAsyncObservers } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\nimport Backburner from '../../backburner.js/index.js';\nimport { assert } from '../debug/lib/assert.js';\n\nlet currentRunLoop = null;\nfunction _getCurrentRunLoop() {\n  return currentRunLoop;\n}\nfunction onBegin(current) {\n  currentRunLoop = current;\n}\nfunction onEnd(_current, next) {\n  currentRunLoop = next;\n  flushAsyncObservers(schedule);\n}\nfunction flush(queueName, next) {\n  if (queueName === 'render' || queueName === _rsvpErrorQueue) {\n    flushAsyncObservers(schedule);\n  }\n  next();\n}\nconst _rsvpErrorQueue = `${Math.random()}${Date.now()}`.replace('.', '');\n\n/**\n  Array of named queues. This array determines the order in which queues\n  are flushed at the end of the RunLoop. You can define your own queues by\n  simply adding the queue name to this array. Normally you should not need\n  to inspect or modify this property.\n\n  @property queues\n  @type Array\n  @default ['actions', 'destroy']\n  @private\n*/\nconst _queues = ['actions',\n// used in router transitions to prevent unnecessary loading state entry\n// if all context promises resolve on the 'actions' queue first\n'routerTransitions', 'render', 'afterRender', 'destroy',\n// used to re-throw unhandled RSVP rejection errors specifically in this\n// position to avoid breaking anything rendered in the other sections\n_rsvpErrorQueue];\n\n/**\n * @internal\n * @private\n */\nconst _backburner = new Backburner(_queues, {\n  defaultQueue: 'actions',\n  onBegin,\n  onEnd,\n  onErrorTarget,\n  onErrorMethod: 'onerror',\n  flush\n});\n\n/**\n @module @ember/runloop\n*/\n// ..........................................................\n// run - this is ideally the only public API the dev sees\n//\n\n/**\n  Runs the passed target and method inside of a RunLoop, ensuring any\n  deferred actions including bindings and views updates are flushed at the\n  end.\n\n  Normally you should not need to invoke this method yourself. However if\n  you are implementing raw event handlers when interfacing with other\n  libraries or plugins, you should probably wrap all of your code inside this\n  call.\n\n  ```javascript\n  import { run } from '@ember/runloop';\n\n  run(function() {\n    // code to be executed within a RunLoop\n  });\n  ```\n  @method run\n  @for @ember/runloop\n  @static\n  @param {Object} [target] target of method to call\n  @param {Function|String} method Method to invoke.\n    May be a function or a string. If you pass a string\n    then it will be looked up on the passed target.\n  @param {Object} [args*] Any additional arguments you wish to pass to the method.\n  @return {Object} return value from invoking the passed function.\n  @public\n*/\n\nfunction run(...args) {\n  // @ts-expect-error TS doesn't like our spread args\n  return _backburner.run(...args);\n}\n\n/**\n  If no run-loop is present, it creates a new one. If a run loop is\n  present it will queue itself to run on the existing run-loops action\n  queue.\n\n  Please note: This is not for normal usage, and should be used sparingly.\n\n  If invoked when not within a run loop:\n\n  ```javascript\n  import { join } from '@ember/runloop';\n\n  join(function() {\n    // creates a new run-loop\n  });\n  ```\n\n  Alternatively, if called within an existing run loop:\n\n  ```javascript\n  import { run, join } from '@ember/runloop';\n\n  run(function() {\n    // creates a new run-loop\n\n    join(function() {\n      // joins with the existing run-loop, and queues for invocation on\n      // the existing run-loops action queue.\n    });\n  });\n  ```\n\n  @method join\n  @static\n  @for @ember/runloop\n  @param {Object} [target] target of method to call\n  @param {Function|String} method Method to invoke.\n    May be a function or a string. If you pass a string\n    then it will be looked up on the passed target.\n  @param {Object} [args*] Any additional arguments you wish to pass to the method.\n  @return {Object} Return value from invoking the passed function. Please note,\n  when called within an existing loop, no return value is possible.\n  @public\n*/\n\nfunction join(methodOrTarget, methodOrArg, ...additionalArgs) {\n  return _backburner.join(methodOrTarget, methodOrArg, ...additionalArgs);\n}\n\n/**\n  Allows you to specify which context to call the specified function in while\n  adding the execution of that function to the Ember run loop. This ability\n  makes this method a great way to asynchronously integrate third-party libraries\n  into your Ember application.\n\n  `bind` takes two main arguments, the desired context and the function to\n  invoke in that context. Any additional arguments will be supplied as arguments\n  to the function that is passed in.\n\n  Let's use the creation of a TinyMCE component as an example. Currently,\n  TinyMCE provides a setup configuration option we can use to do some processing\n  after the TinyMCE instance is initialized but before it is actually rendered.\n  We can use that setup option to do some additional setup for our component.\n  The component itself could look something like the following:\n\n  ```app/components/rich-text-editor.js\n  import Component from '@ember/component';\n  import { on } from '@ember/object/evented';\n  import { bind } from '@ember/runloop';\n\n  export default Component.extend({\n    initializeTinyMCE: on('didInsertElement', function() {\n      tinymce.init({\n        selector: '#' + this.$().prop('id'),\n        setup: bind(this, this.setupEditor)\n      });\n    }),\n\n    didInsertElement() {\n      tinymce.init({\n        selector: '#' + this.$().prop('id'),\n        setup: bind(this, this.setupEditor)\n      });\n    }\n\n    setupEditor(editor) {\n      this.set('editor', editor);\n\n      editor.on('change', function() {\n        console.log('content changed!');\n      });\n    }\n  });\n  ```\n\n  In this example, we use `bind` to bind the setupEditor method to the\n  context of the RichTextEditor component and to have the invocation of that\n  method be safely handled and executed by the Ember run loop.\n\n  @method bind\n  @static\n  @for @ember/runloop\n  @param {Object} [target] target of method to call\n  @param {Function|String} method Method to invoke.\n    May be a function or a string. If you pass a string\n    then it will be looked up on the passed target.\n  @param {Object} [args*] Any additional arguments you wish to pass to the method.\n  @return {Function} returns a new function that will always have a particular context\n  @since 1.4.0\n  @public\n*/\n\n// This final fallback is the equivalent of the (quite unsafe!) type for `bind`\n// from TS' defs for `Function.prototype.bind`. In general, it means we have a\n// loss of safety if we do not\n\nfunction bind(...curried) {\n  (isDevelopingApp() && !(function (methodOrTarget, methodOrArg) {\n    // Applies the same logic as backburner parseArgs for detecting if a method\n    // is actually being passed.\n    let length = arguments.length;\n    if (length === 0) {\n      return false;\n    } else if (length === 1) {\n      return typeof methodOrTarget === 'function';\n    } else {\n      return typeof methodOrArg === 'function' ||\n      // second argument is a function\n      methodOrTarget !== null && typeof methodOrArg === 'string' && methodOrArg in methodOrTarget ||\n      // second argument is the name of a method in first argument\n      typeof methodOrTarget === 'function' //first argument is a function\n;\n    }\n    // @ts-expect-error TS doesn't like our spread args\n  }(...curried)) && assert('could not find a suitable method to bind', function (methodOrTarget, methodOrArg) {\n    let length = arguments.length;\n    if (length === 0) {\n      return false;\n    } else if (length === 1) {\n      return typeof methodOrTarget === 'function';\n    } else {\n      return typeof methodOrArg === 'function' || methodOrTarget !== null && typeof methodOrArg === 'string' && methodOrArg in methodOrTarget || typeof methodOrTarget === 'function';\n    }\n  }(...curried))); // @ts-expect-error TS doesn't like our spread args\n  return (...args) => join(...curried.concat(args));\n}\n\n/**\n  Begins a new RunLoop. Any deferred actions invoked after the begin will\n  be buffered until you invoke a matching call to `end()`. This is\n  a lower-level way to use a RunLoop instead of using `run()`.\n\n  ```javascript\n  import { begin, end } from '@ember/runloop';\n\n  begin();\n  // code to be executed within a RunLoop\n  end();\n  ```\n\n  @method begin\n  @static\n  @for @ember/runloop\n  @return {void}\n  @public\n*/\nfunction begin() {\n  _backburner.begin();\n}\n\n/**\n  Ends a RunLoop. This must be called sometime after you call\n  `begin()` to flush any deferred actions. This is a lower-level way\n  to use a RunLoop instead of using `run()`.\n\n  ```javascript\n  import { begin, end } from '@ember/runloop';\n\n  begin();\n  // code to be executed within a RunLoop\n  end();\n  ```\n\n  @method end\n  @static\n  @for @ember/runloop\n  @return {void}\n  @public\n*/\nfunction end() {\n  _backburner.end();\n}\n\n/**\n  Adds the passed target/method and any optional arguments to the named\n  queue to be executed at the end of the RunLoop. If you have not already\n  started a RunLoop when calling this method one will be started for you\n  automatically.\n\n  At the end of a RunLoop, any methods scheduled in this way will be invoked.\n  Methods will be invoked in an order matching the named queues defined in\n  the `queues` property.\n\n  ```javascript\n  import { schedule } from '@ember/runloop';\n\n  schedule('afterRender', this, function() {\n    // this will be executed in the 'afterRender' queue\n    console.log('scheduled on afterRender queue');\n  });\n\n  schedule('actions', this, function() {\n    // this will be executed in the 'actions' queue\n    console.log('scheduled on actions queue');\n  });\n\n  // Note the functions will be run in order based on the run queues order.\n  // Output would be:\n  //   scheduled on actions queue\n  //   scheduled on afterRender queue\n  ```\n\n  @method schedule\n  @static\n  @for @ember/runloop\n  @param {String} queue The name of the queue to schedule against. Default queues is 'actions'\n  @param {Object} [target] target object to use as the context when invoking a method.\n  @param {String|Function} method The method to invoke. If you pass a string it\n    will be resolved on the target object at the time the scheduled item is\n    invoked allowing you to change the target function.\n  @param {Object} [arguments*] Optional arguments to be passed to the queued method.\n  @return {*} Timer information for use in canceling, see `cancel`.\n  @public\n*/\n\nfunction schedule(...args) {\n  // @ts-expect-error TS doesn't like the rest args here\n  return _backburner.schedule(...args);\n}\n\n// Used by global test teardown\nfunction _hasScheduledTimers() {\n  return _backburner.hasTimers();\n}\n\n// Used by global test teardown\nfunction _cancelTimers() {\n  _backburner.cancelTimers();\n}\n\n/**\n  Invokes the passed target/method and optional arguments after a specified\n  period of time. The last parameter of this method must always be a number\n  of milliseconds.\n\n  You should use this method whenever you need to run some action after a\n  period of time instead of using `setTimeout()`. This method will ensure that\n  items that expire during the same script execution cycle all execute\n  together, which is often more efficient than using a real setTimeout.\n\n  ```javascript\n  import { later } from '@ember/runloop';\n\n  later(myContext, function() {\n    // code here will execute within a RunLoop in about 500ms with this == myContext\n  }, 500);\n  ```\n\n  @method later\n  @static\n  @for @ember/runloop\n  @param {Object} [target] target of method to invoke\n  @param {Function|String} method The method to invoke.\n    If you pass a string it will be resolved on the\n    target at the time the method is invoked.\n  @param {Object} [args*] Optional arguments to pass to the timeout.\n  @param {Number} wait Number of milliseconds to wait.\n  @return {*} Timer information for use in canceling, see `cancel`.\n  @public\n*/\n\nfunction later(...args) {\n  return _backburner.later(...args);\n}\n\n/**\n Schedule a function to run one time during the current RunLoop. This is equivalent\n  to calling `scheduleOnce` with the \"actions\" queue.\n\n  @method once\n  @static\n  @for @ember/runloop\n  @param {Object} [target] The target of the method to invoke.\n  @param {Function|String} method The method to invoke.\n    If you pass a string it will be resolved on the\n    target at the time the method is invoked.\n  @param {Object} [args*] Optional arguments to pass to the timeout.\n  @return {Object} Timer information for use in canceling, see `cancel`.\n  @public\n*/\n\nfunction once(...args) {\n  // @ts-expect-error TS doesn't like the rest args here\n  return _backburner.scheduleOnce('actions', ...args);\n}\n\n/**\n  Schedules a function to run one time in a given queue of the current RunLoop.\n  Calling this method with the same queue/target/method combination will have\n  no effect (past the initial call).\n\n  Note that although you can pass optional arguments these will not be\n  considered when looking for duplicates. New arguments will replace previous\n  calls.\n\n  ```javascript\n  import { run, scheduleOnce } from '@ember/runloop';\n\n  function sayHi() {\n    console.log('hi');\n  }\n\n  run(function() {\n    scheduleOnce('afterRender', myContext, sayHi);\n    scheduleOnce('afterRender', myContext, sayHi);\n    // sayHi will only be executed once, in the afterRender queue of the RunLoop\n  });\n  ```\n\n  Also note that for `scheduleOnce` to prevent additional calls, you need to\n  pass the same function instance. The following case works as expected:\n\n  ```javascript\n  function log() {\n    console.log('Logging only once');\n  }\n\n  function scheduleIt() {\n    scheduleOnce('actions', myContext, log);\n  }\n\n  scheduleIt();\n  scheduleIt();\n  ```\n\n  But this other case will schedule the function multiple times:\n\n  ```javascript\n  import { scheduleOnce } from '@ember/runloop';\n\n  function scheduleIt() {\n    scheduleOnce('actions', myContext, function() {\n      console.log('Closure');\n    });\n  }\n\n  scheduleIt();\n  scheduleIt();\n\n  // \"Closure\" will print twice, even though we're using `scheduleOnce`,\n  // because the function we pass to it won't match the\n  // previously scheduled operation.\n  ```\n\n  Available queues, and their order, can be found at `queues`\n\n  @method scheduleOnce\n  @static\n  @for @ember/runloop\n  @param {String} [queue] The name of the queue to schedule against. Default queues is 'actions'.\n  @param {Object} [target] The target of the method to invoke.\n  @param {Function|String} method The method to invoke.\n    If you pass a string it will be resolved on the\n    target at the time the method is invoked.\n  @param {Object} [args*] Optional arguments to pass to the timeout.\n  @return {Object} Timer information for use in canceling, see `cancel`.\n  @public\n*/\n\nfunction scheduleOnce(...args) {\n  // @ts-expect-error TS doesn't like the rest args here\n  return _backburner.scheduleOnce(...args);\n}\n\n/**\n  Schedules an item to run from within a separate run loop, after\n  control has been returned to the system. This is equivalent to calling\n  `later` with a wait time of 1ms.\n\n  ```javascript\n  import { next } from '@ember/runloop';\n\n  next(myContext, function() {\n    // code to be executed in the next run loop,\n    // which will be scheduled after the current one\n  });\n  ```\n\n  Multiple operations scheduled with `next` will coalesce\n  into the same later run loop, along with any other operations\n  scheduled by `later` that expire right around the same\n  time that `next` operations will fire.\n\n  Note that there are often alternatives to using `next`.\n  For instance, if you'd like to schedule an operation to happen\n  after all DOM element operations have completed within the current\n  run loop, you can make use of the `afterRender` run loop queue (added\n  by the `ember-views` package, along with the preceding `render` queue\n  where all the DOM element operations happen).\n\n  Example:\n\n  ```app/components/my-component.js\n  import Component from '@ember/component';\n  import { scheduleOnce } from '@ember/runloop';\n\n  export default class MyComponent extends Component {\n    didInsertElement() {\n      super.didInsertElement();\n      scheduleOnce('afterRender', this, 'processChildElements');\n    },\n\n    processChildElements() {\n      // ... do something with component's child component\n      // elements after they've finished rendering, which\n      // can't be done within this component's\n      // `didInsertElement` hook because that gets run\n      // before the child elements have been added to the DOM.\n    }\n  }\n  ```\n\n  One benefit of the above approach compared to using `next` is\n  that you will be able to perform DOM/CSS operations before unprocessed\n  elements are rendered to the screen, which may prevent flickering or\n  other artifacts caused by delaying processing until after rendering.\n\n  The other major benefit to the above approach is that `next`\n  introduces an element of non-determinism, which can make things much\n  harder to test, due to its reliance on `setTimeout`; it's much harder\n  to guarantee the order of scheduled operations when they are scheduled\n  outside of the current run loop, i.e. with `next`.\n\n  @method next\n  @static\n  @for @ember/runloop\n  @param {Object} [target] target of method to invoke\n  @param {Function|String} method The method to invoke.\n    If you pass a string it will be resolved on the\n    target at the time the method is invoked.\n  @param {Object} [args*] Optional arguments to pass to the timeout.\n  @return {Object} Timer information for use in canceling, see `cancel`.\n  @public\n*/\n\nfunction next(...args) {\n  return _backburner.later(...args, 1);\n}\n\n/**\n  Cancels a scheduled item. Must be a value returned by `later()`,\n  `once()`, `scheduleOnce()`, `next()`, `debounce()`, or\n  `throttle()`.\n\n  ```javascript\n  import {\n    next,\n    cancel,\n    later,\n    scheduleOnce,\n    once,\n    throttle,\n    debounce\n  } from '@ember/runloop';\n\n  let runNext = next(myContext, function() {\n    // will not be executed\n  });\n\n  cancel(runNext);\n\n  let runLater = later(myContext, function() {\n    // will not be executed\n  }, 500);\n\n  cancel(runLater);\n\n  let runScheduleOnce = scheduleOnce('afterRender', myContext, function() {\n    // will not be executed\n  });\n\n  cancel(runScheduleOnce);\n\n  let runOnce = once(myContext, function() {\n    // will not be executed\n  });\n\n  cancel(runOnce);\n\n  let throttle = throttle(myContext, function() {\n    // will not be executed\n  }, 1, false);\n\n  cancel(throttle);\n\n  let debounce = debounce(myContext, function() {\n    // will not be executed\n  }, 1);\n\n  cancel(debounce);\n\n  let debounceImmediate = debounce(myContext, function() {\n    // will be executed since we passed in true (immediate)\n  }, 100, true);\n\n  // the 100ms delay until this method can be called again will be canceled\n  cancel(debounceImmediate);\n  ```\n\n  @method cancel\n  @static\n  @for @ember/runloop\n  @param {Object} [timer] Timer object to cancel\n  @return {Boolean} true if canceled or false/undefined if it wasn't found\n  @public\n*/\nfunction cancel(timer) {\n  return _backburner.cancel(timer);\n}\n\n/**\n  Delay calling the target method until the debounce period has elapsed\n  with no additional debounce calls. If `debounce` is called again before\n  the specified time has elapsed, the timer is reset and the entire period\n  must pass again before the target method is called.\n\n  This method should be used when an event may be called multiple times\n  but the action should only be called once when the event is done firing.\n  A common example is for scroll events where you only want updates to\n  happen once scrolling has ceased.\n\n  ```javascript\n  import { debounce } from '@ember/runloop';\n\n  function whoRan() {\n    console.log(this.name + ' ran.');\n  }\n\n  let myContext = { name: 'debounce' };\n\n  debounce(myContext, whoRan, 150);\n\n  // less than 150ms passes\n  debounce(myContext, whoRan, 150);\n\n  // 150ms passes\n  // whoRan is invoked with context myContext\n  // console logs 'debounce ran.' one time.\n  ```\n\n  Immediate allows you to run the function immediately, but debounce\n  other calls for this function until the wait time has elapsed. If\n  `debounce` is called again before the specified time has elapsed,\n  the timer is reset and the entire period must pass again before\n  the method can be called again.\n\n  ```javascript\n  import { debounce } from '@ember/runloop';\n\n  function whoRan() {\n    console.log(this.name + ' ran.');\n  }\n\n  let myContext = { name: 'debounce' };\n\n  debounce(myContext, whoRan, 150, true);\n\n  // console logs 'debounce ran.' one time immediately.\n  // 100ms passes\n  debounce(myContext, whoRan, 150, true);\n\n  // 150ms passes and nothing else is logged to the console and\n  // the debouncee is no longer being watched\n  debounce(myContext, whoRan, 150, true);\n\n  // console logs 'debounce ran.' one time immediately.\n  // 150ms passes and nothing else is logged to the console and\n  // the debouncee is no longer being watched\n  ```\n\n  @method debounce\n  @static\n  @for @ember/runloop\n  @param {Object} [target] target of method to invoke\n  @param {Function|String} method The method to invoke.\n    May be a function or a string. If you pass a string\n    then it will be looked up on the passed target.\n  @param {Object} [args*] Optional arguments to pass to the timeout.\n  @param {Number} wait Number of milliseconds to wait.\n  @param {Boolean} immediate Trigger the function on the leading instead\n    of the trailing edge of the wait interval. Defaults to false.\n  @return {Array} Timer information for use in canceling, see `cancel`.\n  @public\n*/\n\nfunction debounce(...args) {\n  // @ts-expect-error TS doesn't like the rest args here\n  return _backburner.debounce(...args);\n}\n\n/**\n  Ensure that the target method is never called more frequently than\n  the specified spacing period. The target method is called immediately.\n\n  ```javascript\n  import { throttle } from '@ember/runloop';\n\n  function whoRan() {\n    console.log(this.name + ' ran.');\n  }\n\n  let myContext = { name: 'throttle' };\n\n  throttle(myContext, whoRan, 150);\n  // whoRan is invoked with context myContext\n  // console logs 'throttle ran.'\n\n  // 50ms passes\n  throttle(myContext, whoRan, 150);\n\n  // 50ms passes\n  throttle(myContext, whoRan, 150);\n\n  // 150ms passes\n  throttle(myContext, whoRan, 150);\n  // whoRan is invoked with context myContext\n  // console logs 'throttle ran.'\n  ```\n\n  @method throttle\n  @static\n  @for @ember/runloop\n  @param {Object} [target] target of method to invoke\n  @param {Function|String} method The method to invoke.\n    May be a function or a string. If you pass a string\n    then it will be looked up on the passed target.\n  @param {Object} [args*] Optional arguments to pass to the timeout.\n  @param {Number} spacing Number of milliseconds to space out requests.\n  @param {Boolean} immediate Trigger the function on the leading instead\n    of the trailing edge of the wait interval. Defaults to true.\n  @return {Array} Timer information for use in canceling, see `cancel`.\n  @public\n*/\n\nfunction throttle(...args) {\n  // @ts-expect-error TS doesn't like the rest args here\n  return _backburner.throttle(...args);\n}\n\nexport { _backburner, _cancelTimers, _getCurrentRunLoop, _hasScheduledTimers, _queues, _rsvpErrorQueue, begin, bind, cancel, debounce, end, join, later, next, once, run, schedule, scheduleOnce, throttle };\n","import { FrameworkObject } from '../object/-internals.js';\nimport { deprecateUntil, DEPRECATIONS } from '../-internals/deprecations/index.js';\nimport '../-internals/meta/lib/meta.js';\nimport '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport '@embroider/macros';\nimport '../debug/index.js';\nimport '../../@glimmer/destroyable/index.js';\nimport '../../@glimmer/validator/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../@glimmer/global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { p as inject$1 } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\n\n/**\n @module @ember/service\n @public\n */\n\n/**\n  @method inject\n  @static\n  @since 1.10.0\n  @for @ember/service\n  @param {String} name (optional) name of the service to inject, defaults to\n         the property's name\n  @return {ComputedDecorator} injection decorator instance\n  @public\n  @deprecated Please import `service` instead.\n*/\n\nfunction inject(...args) {\n  deprecateUntil('Importing `inject` from `@ember/service` is deprecated. Please import `service` instead.', DEPRECATIONS.DEPRECATE_IMPORT_INJECT);\n  return inject$1('service', ...args);\n}\n\n/**\n  Creates a property that lazily looks up a service in the container. There are\n  no restrictions as to what objects a service can be injected into.\n\n  Example:\n\n  ```app/routes/application.js\n  import Route from '@ember/routing/route';\n  import { service } from '@ember/service';\n\n  export default class ApplicationRoute extends Route {\n    @service('auth') authManager;\n\n    model() {\n      return this.authManager.findCurrentUser();\n    }\n  }\n  ```\n\n  Classic Class Example:\n\n  ```app/routes/application.js\n  import Route from '@ember/routing/route';\n  import { service } from '@ember/service';\n\n  export default class ApplicationRoute extends Route {\n    @service('auth') authManager;\n\n    model() {\n      return this.authManager.findCurrentUser();\n    }\n  }\n  ```\n\n  This example will create an `authManager` property on the application route\n  that looks up the `auth` service in the container, making it easily accessible\n  in the `model` hook.\n\n  @method service\n  @static\n  @since 4.1.0\n  @for @ember/service\n  @param {String} name (optional) name of the service to inject, defaults to\n         the property's name\n  @return {ComputedDecorator} injection decorator instance\n  @public\n*/\n\nfunction service(...args) {\n  return inject$1('service', ...args);\n}\n\n/**\n  @class Service\n  @extends EmberObject\n  @since 1.10.0\n  @public\n*/\nclass Service extends FrameworkObject {\n  static isServiceFactory = true;\n}\n\n/**\n  A type registry for Ember `Service`s. Meant to be declaration-merged so string\n  lookups resolve to the correct type.\n\n  Blueprints should include such a declaration merge for TypeScript:\n\n  ```ts\n  import Service from '@ember/service';\n\n  export default class ExampleService extends Service {\n    // ...\n  }\n\n  declare module '@ember/service' {\n    export interface Registry {\n      example: ExampleService;\n    }\n  }\n  ```\n\n  Then `@service` can check that the service is registered correctly, and APIs\n  like `owner.lookup('service:example')` can return `ExampleService`.\n */\n// NOTE: this cannot be `Record<string, Service | undefined>`, convenient as\n// that would be for end users, because there is no actual contract to that\n// effect with Ember -- and in the future this choice would allow us to have\n// registered services which have no base class.\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\n\nexport { Service as default, inject, service };\n","import { isDevelopingApp } from '@embroider/macros';\n\n// it is emitted as part of Ember's build!), so we define it as having the type\n// which makes that work. However, in practice it is supplied by the build,\n// *for* the build, and will *not* be present at runtime, so the actual value\n// here is `undefined` in prod; in dev it is a function which throws a somewhat\n// nicer error. This is janky, but... here we are.\nlet __emberTemplateCompiler;\nconst compileTemplate = (...args) => {\n  if (!__emberTemplateCompiler) {\n    throw new Error('Attempted to call `compileTemplate` without first loading the runtime template compiler.');\n  }\n  return __emberTemplateCompiler.compile(...args);\n};\nlet precompileTemplate;\nif (isDevelopingApp()) {\n  precompileTemplate = () => {\n    throw new Error('Attempted to call `precompileTemplate` at runtime, but this API is meant to be used at compile time. You should use `compileTemplate` instead.');\n  };\n}\nfunction __registerTemplateCompiler(c) {\n  __emberTemplateCompiler = c;\n}\n\nexport { __emberTemplateCompiler, __registerTemplateCompiler, compileTemplate, precompileTemplate };\n","let registerAsyncHelper;\nlet registerHelper;\nlet registerWaiter;\nlet unregisterHelper;\nlet unregisterWaiter;\nlet _impl;\nlet testingNotAvailableMessage = () => {\n  throw new Error('Attempted to use test utilities, but `ember-testing` was not included');\n};\nregisterAsyncHelper = testingNotAvailableMessage;\nregisterHelper = testingNotAvailableMessage;\nregisterWaiter = testingNotAvailableMessage;\nunregisterHelper = testingNotAvailableMessage;\nunregisterWaiter = testingNotAvailableMessage;\nfunction registerTestImplementation(impl) {\n  let {\n    Test\n  } = impl;\n  registerAsyncHelper = Test.registerAsyncHelper;\n  registerHelper = Test.registerHelper;\n  registerWaiter = Test.registerWaiter;\n  unregisterHelper = Test.unregisterHelper;\n  unregisterWaiter = Test.unregisterWaiter;\n  _impl = impl;\n}\n\nexport { _impl, registerAsyncHelper, registerHelper, registerTestImplementation, registerWaiter, unregisterHelper, unregisterWaiter };\n","import typeOf from './type-of.js';\nimport '../../-internals/runtime/lib/mixins/registry_proxy.js';\nimport '../../-internals/runtime/lib/mixins/container_proxy.js';\nimport Comparable from '../../-internals/runtime/lib/mixins/comparable.js';\nimport '../../-internals/runtime/lib/mixins/action_handler.js';\nimport '../../-internals/runtime/lib/mixins/-proxy.js';\nimport '../../enumerable/mutable.js';\nimport '../../-internals/runtime/lib/mixins/target_action_support.js';\nimport '../../-internals/runtime/lib/ext/rsvp.js';\nimport '../../debug/index.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { assert } from '../../debug/lib/assert.js';\n\nconst TYPE_ORDER = {\n  undefined: 0,\n  null: 1,\n  boolean: 2,\n  number: 3,\n  string: 4,\n  array: 5,\n  object: 6,\n  instance: 7,\n  function: 8,\n  class: 9,\n  date: 10,\n  regexp: 11,\n  filelist: 12,\n  error: 13\n};\n//\n// the spaceship operator\n//\n//                      `. ___\n//                     __,' __`.                _..----....____\n//         __...--.'``;.   ,.   ;``--..__     .'    ,-._    _.-'\n//   _..-''-------'   `'   `'   `'     O ``-''._   (,;') _,'\n// ,'________________                          \\`-._`-','\n//  `._              ```````````------...___   '-.._'-:\n//     ```--.._      ,.                     ````--...__\\-.\n//             `.--. `-` \"INFINITY IS LESS     ____    |  |`\n//               `. `.   THAN BEYOND\"        ,'`````.  ;  ;`\n//                 `._`.        __________   `.      \\'__/`\n//                    `-:._____/______/___/____`.     \\  `\n//                                |       `._    `.    \\\n//                                `._________`-.   `.   `.___\n//                                              SSt  `------'`\nfunction spaceship(a, b) {\n  // SAFETY: `Math.sign` always returns `-1` for negative, `0` for zero, and `1`\n  // for positive numbers. (The extra precision is useful for the way we use\n  // this in the context of `compare`.)\n  return Math.sign(a - b);\n}\n\n/**\n @module @ember/utils\n*/\n\n/**\n Compares two javascript values and returns:\n\n  - -1 if the first is smaller than the second,\n  - 0 if both are equal,\n  - 1 if the first is greater than the second.\n\n  ```javascript\n  import { compare } from '@ember/utils';\n\n  compare('hello', 'hello');  // 0\n  compare('abc', 'dfg');      // -1\n  compare(2, 1);              // 1\n  ```\n\n If the types of the two objects are different precedence occurs in the\n following order, with types earlier in the list considered `<` types\n later in the list:\n\n  - undefined\n  - null\n  - boolean\n  - number\n  - string\n  - array\n  - object\n  - instance\n  - function\n  - class\n  - date\n\n  ```javascript\n  import { compare } from '@ember/utils';\n\n  compare('hello', 50);       // 1\n  compare(50, 'hello');       // -1\n  ```\n\n @method compare\n @for @ember/utils\n @static\n @param {Object} v First value to compare\n @param {Object} w Second value to compare\n @return {Number} -1 if v < w, 0 if v = w and 1 if v > w.\n @public\n*/\nfunction compare(v, w) {\n  if (v === w) {\n    return 0;\n  }\n  let type1 = typeOf(v);\n  let type2 = typeOf(w);\n  if (type1 === 'instance' && isComparable(v) && v.constructor.compare) {\n    return v.constructor.compare(v, w);\n  }\n  if (type2 === 'instance' && isComparable(w) && w.constructor.compare) {\n    // SAFETY: Multiplying by a negative just changes the sign\n    return w.constructor.compare(w, v) * -1;\n  }\n  let res = spaceship(TYPE_ORDER[type1], TYPE_ORDER[type2]);\n  if (res !== 0) {\n    return res;\n  }\n\n  // types are equal - so we have to check values now\n  switch (type1) {\n    case 'boolean':\n      (isDevelopingApp() && !(typeof v === 'boolean' && typeof w === 'boolean') && assert('both are boolean', typeof v === 'boolean' && typeof w === 'boolean'));\n      return spaceship(Number(v), Number(w));\n    case 'number':\n      (isDevelopingApp() && !(typeof v === 'number' && typeof w === 'number') && assert('both are numbers', typeof v === 'number' && typeof w === 'number'));\n      return spaceship(v, w);\n    case 'string':\n      (isDevelopingApp() && !(typeof v === 'string' && typeof w === 'string') && assert('both are strings', typeof v === 'string' && typeof w === 'string'));\n      return spaceship(v.localeCompare(w), 0);\n    case 'array':\n      {\n        (isDevelopingApp() && !(Array.isArray(v) && Array.isArray(w)) && assert('both are arrays', Array.isArray(v) && Array.isArray(w)));\n        let vLen = v.length;\n        let wLen = w.length;\n        let len = Math.min(vLen, wLen);\n        for (let i = 0; i < len; i++) {\n          let r = compare(v[i], w[i]);\n          if (r !== 0) {\n            return r;\n          }\n        }\n\n        // all elements are equal now\n        // shorter array should be ordered first\n        return spaceship(vLen, wLen);\n      }\n    case 'instance':\n      if (isComparable(v) && v.compare) {\n        return v.compare(v, w);\n      }\n      return 0;\n    case 'date':\n      (isDevelopingApp() && !(v instanceof Date && w instanceof Date) && assert('both are dates', v instanceof Date && w instanceof Date));\n      return spaceship(v.getTime(), w.getTime());\n    default:\n      return 0;\n  }\n}\nfunction isComparable(value) {\n  return Comparable.detect(value);\n}\n\nexport { compare as default };\n","/**\n @module @ember/utils\n*/\n/**\n  Compares two objects, returning true if they are equal.\n\n  ```javascript\n  import { isEqual } from '@ember/utils';\n\n  isEqual('hello', 'hello');                   // true\n  isEqual(1, 2);                               // false\n  ```\n\n  `isEqual` is a more specific comparison than a triple equal comparison.\n  It will call the `isEqual` instance method on the objects being\n  compared, allowing finer control over when objects should be considered\n  equal to each other.\n\n  ```javascript\n  import { isEqual } from '@ember/utils';\n  import EmberObject from '@ember/object';\n\n  class Person extends EmberObject {\n    isEqual(other: Person) { return this.ssn == other.ssn; }\n  }\n\n  let personA = Person.create({name: 'Muhammad Ali', ssn: '123-45-6789'});\n  let personB = Person.create({name: 'Cassius Clay', ssn: '123-45-6789'});\n\n  isEqual(personA, personB); // true\n  ```\n\n  Due to the expense of array comparisons, collections will never be equal to\n  each other even if each of their items are equal to each other.\n\n  ```javascript\n  import { isEqual } from '@ember/utils';\n\n  isEqual([4, 2], [4, 2]);                     // false\n  ```\n\n  @method isEqual\n  @for @ember/utils\n  @static\n  @param {Object} a first object to compare\n  @param {Object} b second object to compare\n  @return {Boolean}\n  @public\n*/\nfunction isEqual(a, b) {\n  if (a && typeof a.isEqual === 'function') {\n    return a.isEqual(b);\n  }\n  if (a instanceof Date && b instanceof Date) {\n    return a.getTime() === b.getTime();\n  }\n  return a === b;\n}\n\nexport { isEqual as default };\n","import isEmpty from './is_empty.js';\n\n/**\n @module @ember/utils\n*/\n/**\n  A value is blank if it is empty or a whitespace string.\n\n  ```javascript\n  import { isBlank } from '@ember/utils';\n\n  isBlank(null);            // true\n  isBlank(undefined);       // true\n  isBlank('');              // true\n  isBlank([]);              // true\n  isBlank('\\n\\t');          // true\n  isBlank('  ');            // true\n  isBlank({});              // false\n  isBlank('\\n\\t Hello');    // false\n  isBlank('Hello world');   // false\n  isBlank([1,2,3]);         // false\n  ```\n\n  @method isBlank\n  @static\n  @for @ember/utils\n  @param {Object} obj Value to test\n  @return {Boolean}\n  @since 1.5.0\n  @public\n*/\nfunction isBlank(obj) {\n  return isEmpty(obj) || typeof obj === 'string' && /\\S/.test(obj) === false;\n}\n\nexport { isBlank as default };\n","import '../../object/index.js';\nimport '../../-internals/meta/lib/meta.js';\nimport '../../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport '@embroider/macros';\nimport '../../debug/index.js';\nimport '../../../@glimmer/destroyable/index.js';\nimport '../../../@glimmer/validator/index.js';\nimport '../../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../../../@glimmer/global-context/index.js';\nimport '../../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../../shared-chunks/capabilities-DHiXCCuB.js';\nimport { h as hasUnknownProperty, g as get } from '../../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../../shared-chunks/env-DEd6hPbj.js';\n\n/**\n @module @ember/utils\n*/\n/**\n  Verifies that a value is `null` or `undefined`, an empty string, or an empty\n  array.\n\n  Constrains the rules on `isNone` by returning true for empty strings and\n  empty arrays.\n\n  If the value is an object with a `size` property of type number, it is used\n  to check emptiness.\n\n  ```javascript\n  isEmpty(null);             // true\n  isEmpty(undefined);        // true\n  isEmpty('');               // true\n  isEmpty([]);               // true\n  isEmpty({ size: 0});       // true\n  isEmpty({});               // false\n  isEmpty('Adam Hawkins');   // false\n  isEmpty([0,1,2]);          // false\n  isEmpty('\\n\\t');           // false\n  isEmpty('  ');             // false\n  isEmpty({ size: 1 })       // false\n  isEmpty({ size: () => 0 }) // false\n  ```\n\n  @method isEmpty\n  @static\n  @for @ember/utils\n  @param {Object} obj Value to test\n  @return {Boolean}\n  @public\n*/\nfunction isEmpty(obj) {\n  if (obj === null || obj === undefined) {\n    return true;\n  }\n  if (!hasUnknownProperty(obj) && typeof obj.size === 'number') {\n    return !obj.size;\n  }\n  if (typeof obj === 'object') {\n    let size = get(obj, 'size');\n    if (typeof size === 'number') {\n      return !size;\n    }\n    let length = get(obj, 'length');\n    if (typeof length === 'number') {\n      return !length;\n    }\n  }\n  if (typeof obj.length === 'number' && typeof obj !== 'function') {\n    return !obj.length;\n  }\n  return false;\n}\n\nexport { isEmpty as default };\n","/**\n @module @ember/utils\n*/\n/**\n  Returns true if the passed value is null or undefined. This avoids errors\n  from JSLint complaining about use of ==, which can be technically\n  confusing.\n\n  ```javascript\n  isNone(null);          // true\n  isNone(undefined);     // true\n  isNone('');            // false\n  isNone([]);            // false\n  isNone(function() {}); // false\n  ```\n\n  @method isNone\n  @static\n  @for @ember/utils\n  @param {Object} obj Value to test\n  @return {Boolean}\n  @public\n*/\nfunction isNone(obj) {\n  return obj === null || obj === undefined;\n}\n\nexport { isNone as default };\n","import isBlank from './is_blank.js';\n\n/**\n @module @ember/utils\n*/\n/**\n  A value is present if it not `isBlank`.\n\n  ```javascript\n  isPresent(null);            // false\n  isPresent(undefined);       // false\n  isPresent('');              // false\n  isPresent('  ');            // false\n  isPresent('\\n\\t');          // false\n  isPresent([]);              // false\n  isPresent({ length: 0 });   // false\n  isPresent(false);           // true\n  isPresent(true);            // true\n  isPresent('string');        // true\n  isPresent(0);               // true\n  isPresent(function() {});   // true\n  isPresent({});              // true\n  isPresent('\\n\\t Hello');    // true\n  isPresent([1, 2, 3]);       // true\n  ```\n\n  @method isPresent\n  @static\n  @for @ember/utils\n  @param {Object} obj Value to test\n  @return {Boolean}\n  @since 1.8.0\n  @public\n*/\nfunction isPresent(obj) {\n  return !isBlank(obj);\n}\n\nexport { isPresent as default };\n","import CoreObject from '../../object/core.js';\n\n// ........................................\n// TYPING & ARRAY MESSAGING\n//\nconst TYPE_MAP = {\n  '[object Boolean]': 'boolean',\n  '[object Number]': 'number',\n  '[object String]': 'string',\n  '[object Function]': 'function',\n  '[object AsyncFunction]': 'function',\n  '[object Array]': 'array',\n  '[object Date]': 'date',\n  '[object RegExp]': 'regexp',\n  '[object Object]': 'object',\n  '[object FileList]': 'filelist'\n};\nconst {\n  toString\n} = Object.prototype;\n\n/**\n @module @ember/utils\n*/\n/**\n  Returns a consistent type for the passed object.\n\n  Use this instead of the built-in `typeof` to get the type of an item.\n  It will return the same result across all browsers and includes a bit\n  more detail. Here is what will be returned:\n\n      | Return Value  | Meaning                                              |\n      |---------------|------------------------------------------------------|\n      | 'string'      | String primitive or String object.                   |\n      | 'number'      | Number primitive or Number object.                   |\n      | 'boolean'     | Boolean primitive or Boolean object.                 |\n      | 'null'        | Null value                                           |\n      | 'undefined'   | Undefined value                                      |\n      | 'function'    | A function                                           |\n      | 'array'       | An instance of Array                                 |\n      | 'regexp'      | An instance of RegExp                                |\n      | 'date'        | An instance of Date                                  |\n      | 'filelist'    | An instance of FileList                              |\n      | 'class'       | An Ember class (created using EmberObject.extend())  |\n      | 'instance'    | An Ember object instance                             |\n      | 'error'       | An instance of the Error object                      |\n      | 'object'      | A JavaScript object not inheriting from EmberObject  |\n\n  Examples:\n\n  ```javascript\n  import { A } from '@ember/array';\n  import { typeOf } from '@ember/utils';\n  import EmberObject from '@ember/object';\n\n  typeOf();                       // 'undefined'\n  typeOf(null);                   // 'null'\n  typeOf(undefined);              // 'undefined'\n  typeOf('michael');              // 'string'\n  typeOf(new String('michael'));  // 'string'\n  typeOf(101);                    // 'number'\n  typeOf(new Number(101));        // 'number'\n  typeOf(true);                   // 'boolean'\n  typeOf(new Boolean(true));      // 'boolean'\n  typeOf(A);                      // 'function'\n  typeOf(A());                    // 'array'\n  typeOf([1, 2, 90]);             // 'array'\n  typeOf(/abc/);                  // 'regexp'\n  typeOf(new Date());             // 'date'\n  typeOf(event.target.files);     // 'filelist'\n  typeOf(EmberObject.extend());   // 'class'\n  typeOf(EmberObject.create());   // 'instance'\n  typeOf(new Error('teamocil'));  // 'error'\n\n  // 'normal' JavaScript object\n  typeOf({ a: 'b' });             // 'object'\n  ```\n\n  @method typeOf\n  @for @ember/utils\n  @param item the item to check\n  @return {String} the type\n  @public\n  @static\n*/\nfunction typeOf(item) {\n  if (item === null) {\n    return 'null';\n  }\n  if (item === undefined) {\n    return 'undefined';\n  }\n  let ret = TYPE_MAP[toString.call(item)] || 'object';\n  if (ret === 'function') {\n    if (CoreObject.detect(item)) {\n      ret = 'class';\n    }\n  } else if (ret === 'object') {\n    if (item instanceof Error) {\n      ret = 'error';\n    } else if (item instanceof CoreObject) {\n      ret = 'instance';\n    } else if (item instanceof Date) {\n      ret = 'date';\n    }\n  }\n  return ret;\n}\n\nexport { typeOf as default };\n","import { d as debugToString } from '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { scheduleDestroyed, scheduleDestroy } from '../global-context/index.js';\n\nconst LIVE_STATE = 0;\nconst DESTROYING_STATE = 1;\nconst DESTROYED_STATE = 2;\nlet DESTROYABLE_META = new WeakMap();\nfunction push(collection, newItem) {\n  if (collection === null) {\n    return newItem;\n  } else if (Array.isArray(collection)) {\n    collection.push(newItem);\n    return collection;\n  } else {\n    return [collection, newItem];\n  }\n}\nfunction iterate(collection, fn) {\n  if (Array.isArray(collection)) {\n    collection.forEach(fn);\n  } else if (collection !== null) {\n    fn(collection);\n  }\n}\nfunction remove(collection, item, message) {\n  if (isDevelopingApp()) {\n    let collectionIsItem = collection === item;\n    let collectionContainsItem = Array.isArray(collection) && collection.indexOf(item) !== -1;\n    if (!collectionIsItem && !collectionContainsItem) {\n      throw new Error(String(message));\n    }\n  }\n  if (Array.isArray(collection) && collection.length > 1) {\n    let index = collection.indexOf(item);\n    collection.splice(index, 1);\n    return collection;\n  } else {\n    return null;\n  }\n}\nfunction getDestroyableMeta(destroyable) {\n  let meta = DESTROYABLE_META.get(destroyable);\n  if (meta === undefined) {\n    meta = {\n      parents: null,\n      children: null,\n      eagerDestructors: null,\n      destructors: null,\n      state: LIVE_STATE\n    };\n    if (isDevelopingApp()) {\n      meta.source = destroyable;\n    }\n    DESTROYABLE_META.set(destroyable, meta);\n  }\n  return meta;\n}\nfunction associateDestroyableChild(parent, child) {\n  if (isDevelopingApp() && isDestroying(parent)) {\n    throw new Error('Attempted to associate a destroyable child with an object that is already destroying or destroyed');\n  }\n  let parentMeta = getDestroyableMeta(parent);\n  let childMeta = getDestroyableMeta(child);\n  parentMeta.children = push(parentMeta.children, child);\n  childMeta.parents = push(childMeta.parents, parent);\n  return child;\n}\nfunction registerDestructor(destroyable, destructor, eager = false) {\n  if (isDevelopingApp() && isDestroying(destroyable)) {\n    throw new Error('Attempted to register a destructor with an object that is already destroying or destroyed');\n  }\n  let meta = getDestroyableMeta(destroyable);\n  let destructorsKey = eager ? 'eagerDestructors' : 'destructors';\n  meta[destructorsKey] = push(meta[destructorsKey], destructor);\n  return destructor;\n}\nfunction unregisterDestructor(destroyable, destructor, eager = false) {\n  if (isDevelopingApp() && isDestroying(destroyable)) {\n    throw new Error('Attempted to unregister a destructor with an object that is already destroying or destroyed');\n  }\n  let meta = getDestroyableMeta(destroyable);\n  let destructorsKey = eager ? 'eagerDestructors' : 'destructors';\n  meta[destructorsKey] = remove(meta[destructorsKey], destructor, isDevelopingApp() && 'attempted to remove a destructor that was not registered with the destroyable');\n}\n\n////////////\n\nfunction destroy(destroyable) {\n  let meta = getDestroyableMeta(destroyable);\n  if (meta.state >= DESTROYING_STATE) return;\n  let {\n    parents,\n    children,\n    eagerDestructors,\n    destructors\n  } = meta;\n  meta.state = DESTROYING_STATE;\n  iterate(children, destroy);\n  iterate(eagerDestructors, destructor => {\n    destructor(destroyable);\n  });\n  iterate(destructors, destructor => {\n    scheduleDestroy(destroyable, destructor);\n  });\n  scheduleDestroyed(() => {\n    iterate(parents, parent => {\n      removeChildFromParent(destroyable, parent);\n    });\n    meta.state = DESTROYED_STATE;\n  });\n}\nfunction removeChildFromParent(child, parent) {\n  let parentMeta = getDestroyableMeta(parent);\n  if (parentMeta.state === LIVE_STATE) {\n    parentMeta.children = remove(parentMeta.children, child, isDevelopingApp() && \"attempted to remove child from parent, but the parent's children did not contain the child. This is likely a bug with destructors.\");\n  }\n}\nfunction destroyChildren(destroyable) {\n  let {\n    children\n  } = getDestroyableMeta(destroyable);\n  iterate(children, destroy);\n}\nfunction _hasDestroyableChildren(destroyable) {\n  let meta = DESTROYABLE_META.get(destroyable);\n  return meta === undefined ? false : meta.children !== null;\n}\nfunction isDestroying(destroyable) {\n  let meta = DESTROYABLE_META.get(destroyable);\n  return meta === undefined ? false : meta.state >= DESTROYING_STATE;\n}\nfunction isDestroyed(destroyable) {\n  let meta = DESTROYABLE_META.get(destroyable);\n  return meta === undefined ? false : meta.state >= DESTROYED_STATE;\n}\n\n////////////\n\nlet enableDestroyableTracking;\nlet assertDestroyablesDestroyed;\nif (isDevelopingApp()) {\n  let isTesting = false;\n  enableDestroyableTracking = () => {\n    if (isTesting) {\n      // Reset destroyable meta just in case, before throwing the error\n      DESTROYABLE_META = new WeakMap();\n      throw new Error('Attempted to start destroyable testing, but you did not end the previous destroyable test. Did you forget to call `assertDestroyablesDestroyed()`');\n    }\n    isTesting = true;\n    DESTROYABLE_META = new Map();\n  };\n  assertDestroyablesDestroyed = () => {\n    if (!isTesting) {\n      throw new Error('Attempted to assert destroyables destroyed, but you did not start a destroyable test. Did you forget to call `enableDestroyableTracking()`');\n    }\n    isTesting = false;\n    let map = DESTROYABLE_META;\n    DESTROYABLE_META = new WeakMap();\n    let undestroyed = [];\n    map.forEach(meta => {\n      if (meta.state !== DESTROYED_STATE) {\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n        undestroyed.push(meta.source);\n      }\n    });\n    if (undestroyed.length > 0) {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      let objectsToString = undestroyed.map(debugToString).join('\\n    ');\n      let error = new Error(`Some destroyables were not destroyed during this test:\\n    ${objectsToString}`);\n      error.destroyables = undestroyed;\n      throw error;\n    }\n  };\n}\n\nexport { _hasDestroyableChildren, assertDestroyablesDestroyed, associateDestroyableChild, destroy, destroyChildren, enableDestroyableTracking, isDestroyed, isDestroying, registerDestructor, unregisterDestructor };\n","import { isDevelopingApp } from '@embroider/macros';\n\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * This package contains global context functions for Glimmer. These functions\n * are set by the embedding environment and must be set before initial render.\n *\n * These functions should meet the following criteria:\n *\n * - Must be provided by the embedder, due to having framework specific\n *   behaviors (e.g. interop with classic Ember behaviors that should not be\n *   upstreamed) or to being out of scope for the VM (e.g. scheduling a\n *   revalidation)\n * - Never differ between render roots\n * - Never change over time\n *\n */\n//////////\n/**\n * Interfaces\n *\n * TODO: Move these into @glimmer/interfaces, move @glimmer/interfaces to\n * @glimmer/internal-interfaces.\n */\n//////////\n\n/**\n * Schedules a VM revalidation.\n *\n * Note: this has a default value so that tags can warm themselves when first loaded.\n */\nlet scheduleRevalidate = () => {};\n\n/**\n * Schedules a destructor to run\n *\n * @param destroyable The destroyable being destroyed\n * @param destructor The destructor being scheduled\n */\nlet scheduleDestroy;\n\n/**\n * Finalizes destruction\n *\n * @param finalizer finalizer function\n */\nlet scheduleDestroyed;\n\n/**\n * Hook to provide iterators for `{{each}}` loops\n *\n * @param value The value to create an iterator for\n */\nlet toIterator;\n\n/**\n * Hook to specify truthiness within Glimmer templates\n *\n * @param value The value to convert to a boolean\n */\nlet toBool;\n\n/**\n * Hook for specifying how Glimmer should access properties in cases where it\n * needs to. For instance, accessing an object's values in templates.\n *\n * @param obj The object provided to get a value from\n * @param path The path to get the value from\n */\nlet getProp;\n\n/**\n * Hook for specifying how Glimmer should update props in cases where it needs\n * to. For instance, when updating a template reference (e.g. 2-way-binding)\n *\n * @param obj The object provided to get a value from\n * @param prop The prop to set the value at\n * @param value The value to set the value to\n */\nlet setProp;\n\n/**\n * Hook for specifying how Glimmer should access paths in cases where it needs\n * to. For instance, the `key` value of `{{each}}` loops.\n *\n * @param obj The object provided to get a value from\n * @param path The path to get the value from\n */\nlet getPath;\n\n/**\n * Hook for specifying how Glimmer should update paths in cases where it needs\n * to. For instance, when updating a template reference (e.g. 2-way-binding)\n *\n * @param obj The object provided to get a value from\n * @param path The path to get the value from\n */\nlet setPath;\n\n/**\n * Hook to warn if a style binding string or value was not marked as trusted\n * (e.g. HTMLSafe)\n */\nlet warnIfStyleNotTrusted;\n\n/**\n * Hook to customize assertion messages in the VM. Usages can be stripped out\n * by using the @glimmer/vm-babel-plugins package.\n */\nlet assert;\nfunction debugAssert(test, msg, options) {\n  if (isDevelopingApp() && assert) {\n    assert(test, typeof msg === 'string' ? msg : msg(), options);\n  }\n}\n\n/**\n * Hook to customize deprecation messages in the VM. Usages can be stripped out\n * by using the @glimmer/vm-babel-plugins package.\n */\nlet deprecate;\n\n//////////\n\nlet globalContextWasSet = false;\nfunction setGlobalContext(context) {\n  if (isDevelopingApp()) {\n    if (globalContextWasSet) {\n      throw new Error('Attempted to set the global context twice. This should only be set once.');\n    }\n    globalContextWasSet = true;\n  }\n  scheduleRevalidate = context.scheduleRevalidate;\n  scheduleDestroy = context.scheduleDestroy;\n  scheduleDestroyed = context.scheduleDestroyed;\n  toIterator = context.toIterator;\n  toBool = context.toBool;\n  getProp = context.getProp;\n  setProp = context.setProp;\n  getPath = context.getPath;\n  setPath = context.setPath;\n  warnIfStyleNotTrusted = context.warnIfStyleNotTrusted;\n  assert = context.assert;\n  deprecate = context.deprecate;\n}\nlet assertGlobalContextWasSet;\nlet testOverrideGlobalContext;\nif (isDevelopingApp()) {\n  assertGlobalContextWasSet = () => {\n    if (!globalContextWasSet) {\n      throw new Error('The global context for Glimmer VM was not set. You must set these global context functions to let Glimmer VM know how to accomplish certain operations. You can do this by importing `setGlobalContext` from `@glimmer/global-context`');\n    }\n  };\n  testOverrideGlobalContext = context => {\n    let originalGlobalContext = globalContextWasSet ? {\n      scheduleRevalidate,\n      scheduleDestroy,\n      scheduleDestroyed,\n      toIterator,\n      toBool,\n      getProp,\n      setProp,\n      getPath,\n      setPath,\n      warnIfStyleNotTrusted,\n      assert,\n      deprecate\n    } : null;\n    if (context === null) {\n      globalContextWasSet = false;\n    } else {\n      globalContextWasSet = true;\n    }\n\n    // We use `undefined as any` here to unset the values when resetting the\n    // context at the end of a test.\n    scheduleRevalidate = context?.scheduleRevalidate || undefined;\n    scheduleDestroy = context?.scheduleDestroy || undefined;\n    scheduleDestroyed = context?.scheduleDestroyed || undefined;\n    toIterator = context?.toIterator || undefined;\n    toBool = context?.toBool || undefined;\n    getProp = context?.getProp || undefined;\n    setProp = context?.setProp || undefined;\n    getPath = context?.getPath || undefined;\n    setPath = context?.setPath || undefined;\n    warnIfStyleNotTrusted = context?.warnIfStyleNotTrusted || undefined;\n    assert = context?.assert || undefined;\n    deprecate = context?.deprecate || undefined;\n    return originalGlobalContext;\n  };\n}\n\nexport { assert, assertGlobalContextWasSet, debugAssert, setGlobalContext as default, deprecate, getPath, getProp, scheduleDestroy, scheduleDestroyed, scheduleRevalidate, setPath, setProp, testOverrideGlobalContext, toBool, toIterator, warnIfStyleNotTrusted };\n","export { E as EMPTY_BLOCKS, W as WrappedBuilder, c as compilable, b as compileStatements, I as invokeStaticBlock, d as invokeStaticBlockWithStack, m as meta, a as templateCacheCounters, e as templateCompilationContext, t as templateFactory } from '../../shared-chunks/index-CQkjwqTv.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '@embroider/macros';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport '../global-context/index.js';\nimport '../validator/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nexport { E as EvaluationContextImpl, S as StdLib, c as compileStd } from '../../shared-chunks/program-context-CZJnCFdo.js';\n\nlet debugCompiler;\n\nconst DEFAULT_CAPABILITIES = {\n  dynamicLayout: true,\n  dynamicTag: true,\n  prepareArgs: true,\n  createArgs: true,\n  attributeHook: false,\n  elementHook: false,\n  dynamicScope: true,\n  createCaller: false,\n  updateHook: true,\n  createInstance: true,\n  wrapped: false,\n  willDestroy: false,\n  hasSubOwner: false\n};\nconst MINIMAL_CAPABILITIES = {\n  dynamicLayout: false,\n  dynamicTag: false,\n  prepareArgs: false,\n  createArgs: false,\n  attributeHook: false,\n  elementHook: false,\n  dynamicScope: false,\n  createCaller: false,\n  updateHook: false,\n  createInstance: false,\n  wrapped: false,\n  willDestroy: false,\n  hasSubOwner: false\n};\n\nexport { DEFAULT_CAPABILITIES, MINIMAL_CAPABILITIES, debugCompiler };\n","import '../../shared-chunks/capabilities-DHiXCCuB.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '@embroider/macros';\nimport '../global-context/index.js';\nimport '../validator/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport { C as ConcreteBounds, q as COMMENT_NODE, d as CursorImpl, T as TEXT_NODE, r as ELEMENT_NODE, N as NS_SVG } from '../../shared-chunks/dynamic-CuBsUXX8.js';\nexport { s as CurriedValue, D as DOMChanges, u as DynamicAttribute, v as EMPTY_ARGS, w as EMPTY_NAMED, x as EMPTY_POSITIONAL, m as IDOMChanges, S as SimpleDynamicAttribute, y as TEMPLATE_ONLY_COMPONENT_MANAGER, z as TemplateOnlyComponent, F as TemplateOnlyComponentManager, a as array, j as clear, c as concat, G as createCapturedArgs, H as curry, e as dynamicAttribute, f as fn, g as get, h as hash, i as invokeHelper, I as isWhitespace, K as normalizeProperty, o as on, L as reifyArgs, M as reifyNamed, O as reifyPositional, P as resetDebuggerCallback, Q as setDebuggerCallback, t as templateOnlyComponent } from '../../shared-chunks/dynamic-CuBsUXX8.js';\nexport { D as DynamicScopeImpl, E as EnvironmentImpl, L as LowLevelVM, S as ScopeImpl, U as UpdatingVM, i as inTransaction, r as renderComponent, a as renderMain, b as renderSync, c as runtimeOptions } from '../../shared-chunks/render-DTOhhssy.js';\nexport { destroy, isDestroyed, isDestroying, registerDestructor } from '../destroyable/index.js';\nimport { N as NewTreeBuilder, R as RemoteBlock } from '../../shared-chunks/element-builder-BuVym8EM.js';\nexport { D as DOMTreeConstruction, a as ResettableBlockImpl, c as clientBuilder } from '../../shared-chunks/element-builder-BuVym8EM.js';\nimport { a as assert } from '../../shared-chunks/assert-CUCJBR2C.js';\nimport { e as expect } from '../../shared-chunks/collections-B8me-ZlQ.js';\nimport { a as castToSimple, c as castToBrowser } from '../../shared-chunks/simple-cast-BXTrayoV.js';\n\nconst SERIALIZATION_FIRST_NODE_STRING = '%+b:0%';\nfunction isSerializationFirstNode(node) {\n  return node.nodeValue === SERIALIZATION_FIRST_NODE_STRING;\n}\nclass RehydratingCursor extends CursorImpl {\n  candidate = null;\n  openBlockDepth;\n  injectedOmittedNode = false;\n  constructor(element, nextSibling, startingBlockDepth) {\n    super(element, nextSibling);\n    this.startingBlockDepth = startingBlockDepth;\n    this.openBlockDepth = startingBlockDepth - 1;\n  }\n}\nclass RehydrateTree extends NewTreeBuilder {\n  unmatchedAttributes = null;\n  // Hides property on base class\n  blockDepth = 0;\n  startingBlockOffset;\n  constructor(env, parentNode, nextSibling) {\n    super(env, parentNode, nextSibling);\n    if (nextSibling) throw new Error('Rehydration with nextSibling not supported');\n\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    let node = this.currentCursor.element.firstChild;\n    while (node !== null) {\n      if (isOpenBlock(node)) {\n        break;\n      }\n      node = node.nextSibling;\n    }\n    this.candidate = node;\n    const startingBlockOffset = getBlockDepth(node);\n    if (startingBlockOffset !== 0) {\n      // We are rehydrating from a partial tree and not the root component\n      // We need to add an extra block before the first block to rehydrate correctly\n      // The extra block is needed since the renderComponent API creates a synthetic component invocation which generates the extra block\n      const newBlockDepth = startingBlockOffset - 1;\n      const newCandidate = this.dom.createComment(`%+b:${newBlockDepth}%`);\n\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      node.parentNode.insertBefore(newCandidate, this.candidate);\n      let closingNode = node.nextSibling;\n      while (closingNode !== null) {\n        if (isCloseBlock(closingNode) && getBlockDepth(closingNode) === startingBlockOffset) {\n          break;\n        }\n        closingNode = closingNode.nextSibling;\n      }\n      const newClosingBlock = this.dom.createComment(`%-b:${newBlockDepth}%`);\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      node.parentNode.insertBefore(newClosingBlock, closingNode.nextSibling);\n      this.candidate = newCandidate;\n      this.startingBlockOffset = newBlockDepth;\n    } else {\n      this.startingBlockOffset = 0;\n    }\n  }\n  get currentCursor() {\n    return this.cursors.current;\n  }\n  get candidate() {\n    if (this.currentCursor) {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      return this.currentCursor.candidate;\n    }\n    return null;\n  }\n  set candidate(node) {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    const currentCursor = this.currentCursor;\n    currentCursor.candidate = node;\n  }\n  disableRehydration(nextSibling) {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    const currentCursor = this.currentCursor;\n\n    // rehydration will be disabled until we either:\n    // * hit popElement (and return to using the parent elements cursor)\n    // * hit closeBlock and the next sibling is a close block comment\n    //   matching the expected openBlockDepth\n    currentCursor.candidate = null;\n    currentCursor.nextSibling = nextSibling;\n  }\n  enableRehydration(candidate) {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    const currentCursor = this.currentCursor;\n    currentCursor.candidate = candidate;\n    currentCursor.nextSibling = null;\n  }\n  pushElement(element, nextSibling = null) {\n    const cursor = new RehydratingCursor(element, nextSibling, this.blockDepth || 0);\n\n    /**\n     * <div>   <---------------  currentCursor.element\n     *   <!--%+b:1%--> <-------  would have been removed during openBlock\n     *   <div> <---------------  currentCursor.candidate -> cursor.element\n     *     <!--%+b:2%--> <-----  currentCursor.candidate.firstChild -> cursor.candidate\n     *     Foo\n     *     <!--%-b:2%-->\n     *   </div>\n     *   <!--%-b:1%-->  <------  becomes currentCursor.candidate\n     */\n    if (this.candidate !== null) {\n      cursor.candidate = element.firstChild;\n      this.candidate = element.nextSibling;\n    }\n    this.cursors.push(cursor);\n  }\n\n  // clears until the end of the current container\n  // either the current open block or higher\n  clearMismatch(candidate) {\n    let current = candidate;\n    const currentCursor = this.currentCursor;\n    if (currentCursor !== null) {\n      const openBlockDepth = currentCursor.openBlockDepth;\n      if (openBlockDepth >= currentCursor.startingBlockDepth) {\n        while (current) {\n          if (isCloseBlock(current)) {\n            const closeBlockDepth = getBlockDepthWithOffset(current, this.startingBlockOffset);\n            if (openBlockDepth >= closeBlockDepth) {\n              break;\n            }\n          }\n          current = this.remove(current);\n        }\n      } else {\n        while (current !== null) {\n          current = this.remove(current);\n        }\n      }\n      // current cursor parentNode should be openCandidate if element\n      // or openCandidate.parentNode if comment\n      this.disableRehydration(current);\n    }\n  }\n  __openBlock() {\n    const {\n      currentCursor\n    } = this;\n    if (currentCursor === null) return;\n    const blockDepth = this.blockDepth;\n    this.blockDepth++;\n    const {\n      candidate\n    } = currentCursor;\n    if (candidate === null) return;\n    const {\n      tagName\n    } = currentCursor.element;\n    if (isOpenBlock(candidate) && getBlockDepthWithOffset(candidate, this.startingBlockOffset) === blockDepth) {\n      this.candidate = this.remove(candidate);\n      currentCursor.openBlockDepth = blockDepth;\n    } else if (tagName !== 'TITLE' && tagName !== 'SCRIPT' && tagName !== 'STYLE') {\n      this.clearMismatch(candidate);\n    }\n  }\n  __closeBlock() {\n    const {\n      currentCursor\n    } = this;\n    if (currentCursor === null) return;\n\n    // openBlock is the last rehydrated open block\n    const openBlockDepth = currentCursor.openBlockDepth;\n\n    // this currently is the expected next open block depth\n    this.blockDepth--;\n    const {\n      candidate\n    } = currentCursor;\n    let isRehydrating = false;\n    if (candidate !== null) {\n      isRehydrating = true;\n      //assert(\n      //  openBlockDepth === this.blockDepth,\n      //  'when rehydrating, openBlockDepth should match this.blockDepth here'\n      //);\n\n      if (isCloseBlock(candidate) && getBlockDepthWithOffset(candidate, this.startingBlockOffset) === openBlockDepth) {\n        const nextSibling = this.remove(candidate);\n        this.candidate = nextSibling;\n        currentCursor.openBlockDepth--;\n      } else {\n        // close the block and clear mismatch in parent container\n        // we will be either at the end of the element\n        // or at the end of our containing block\n        this.clearMismatch(candidate);\n        isRehydrating = false;\n      }\n    }\n    if (!isRehydrating) {\n      // check if nextSibling matches our expected close block\n      // if so, we remove the close block comment and\n      // restore rehydration after clearMismatch disabled\n      const nextSibling = currentCursor.nextSibling;\n      if (nextSibling !== null && isCloseBlock(nextSibling) && getBlockDepthWithOffset(nextSibling, this.startingBlockOffset) === this.blockDepth) {\n        // restore rehydration state\n        const candidate = this.remove(nextSibling);\n        this.enableRehydration(candidate);\n        currentCursor.openBlockDepth--;\n      }\n    }\n  }\n  __appendNode(node) {\n    const {\n      candidate\n    } = this;\n\n    // This code path is only used when inserting precisely one node. It needs more\n    // comparison logic, but we can probably lean on the cases where this code path\n    // is actually used.\n    if (candidate) {\n      return candidate;\n    } else {\n      return super.__appendNode(node);\n    }\n  }\n  __appendHTML(html) {\n    const candidateBounds = this.markerBounds();\n    if (candidateBounds) {\n      const first = candidateBounds.firstNode();\n      const last = candidateBounds.lastNode();\n\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      const newBounds = new ConcreteBounds(this.element, first.nextSibling, last.previousSibling);\n      const possibleEmptyMarker = this.remove(first);\n      this.remove(last);\n      if (possibleEmptyMarker !== null && isEmpty(possibleEmptyMarker)) {\n        this.candidate = this.remove(possibleEmptyMarker);\n        if (this.candidate !== null) {\n          this.clearMismatch(this.candidate);\n        }\n      }\n      return newBounds;\n    } else {\n      return super.__appendHTML(html);\n    }\n  }\n  remove(node) {\n    const element = expect(node.parentNode);\n    const next = node.nextSibling;\n    element.removeChild(node);\n    return next;\n  }\n  markerBounds() {\n    const _candidate = this.candidate;\n    if (_candidate && isMarker(_candidate)) {\n      const first = _candidate;\n      let last = expect(first.nextSibling);\n      while (!isMarker(last)) {\n        last = expect(last.nextSibling);\n      }\n      return new ConcreteBounds(this.element, first, last);\n    } else {\n      return null;\n    }\n  }\n  __appendText(string) {\n    const {\n      candidate\n    } = this;\n    if (candidate) {\n      if (isTextNode(candidate)) {\n        if (candidate.nodeValue !== string) {\n          candidate.nodeValue = string;\n        }\n        this.candidate = candidate.nextSibling;\n        return candidate;\n      } else if (isSeparator(candidate)) {\n        this.candidate = this.remove(candidate);\n        return this.__appendText(string);\n      } else if (isEmpty(candidate) && string === '') {\n        this.candidate = this.remove(candidate);\n        return this.__appendText(string);\n      } else {\n        this.clearMismatch(candidate);\n        return super.__appendText(string);\n      }\n    } else {\n      return super.__appendText(string);\n    }\n  }\n  __appendComment(string) {\n    const _candidate = this.candidate;\n    if (_candidate && isComment(_candidate)) {\n      if (_candidate.nodeValue !== string) {\n        _candidate.nodeValue = string;\n      }\n      this.candidate = _candidate.nextSibling;\n      return _candidate;\n    } else if (_candidate) {\n      this.clearMismatch(_candidate);\n    }\n    return super.__appendComment(string);\n  }\n  __openElement(tag) {\n    const _candidate = this.candidate;\n    if (_candidate && isElement(_candidate) && isSameNodeType(_candidate, tag)) {\n      this.unmatchedAttributes = [].slice.call(_candidate.attributes);\n      return _candidate;\n    } else if (_candidate) {\n      if (isElement(_candidate) && _candidate.tagName === 'TBODY') {\n        this.pushElement(_candidate, null);\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n        this.currentCursor.injectedOmittedNode = true;\n        return this.__openElement(tag);\n      }\n      this.clearMismatch(_candidate);\n    }\n    return super.__openElement(tag);\n  }\n  __setAttribute(name, value, namespace) {\n    const unmatched = this.unmatchedAttributes;\n    if (unmatched) {\n      const attr = findByName(unmatched, name);\n      if (attr) {\n        if (attr.value !== value) {\n          attr.value = value;\n        }\n        unmatched.splice(unmatched.indexOf(attr), 1);\n        return;\n      }\n    }\n    return super.__setAttribute(name, value, namespace);\n  }\n  __setProperty(name, value) {\n    const unmatched = this.unmatchedAttributes;\n    if (unmatched) {\n      const attr = findByName(unmatched, name);\n      if (attr) {\n        if (attr.value !== value) {\n          attr.value = value;\n        }\n        unmatched.splice(unmatched.indexOf(attr), 1);\n        return;\n      }\n    }\n    return super.__setProperty(name, value);\n  }\n  __flushElement(parent, constructing) {\n    const {\n      unmatchedAttributes: unmatched\n    } = this;\n    if (unmatched) {\n      for (const attr of unmatched) {\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n        this.constructing.removeAttribute(attr.name);\n      }\n      this.unmatchedAttributes = null;\n    } else {\n      super.__flushElement(parent, constructing);\n    }\n  }\n  willCloseElement() {\n    const {\n      candidate,\n      currentCursor\n    } = this;\n    if (candidate !== null) {\n      this.clearMismatch(candidate);\n    }\n    if (currentCursor && currentCursor.injectedOmittedNode) {\n      this.popElement();\n    }\n    super.willCloseElement();\n  }\n  getMarker(element, guid) {\n    const marker = element.querySelector(`script[glmr=\"${guid}\"]`);\n    if (marker) {\n      return castToSimple(marker);\n    }\n    return null;\n  }\n  __pushRemoteElement(element, cursorId, insertBefore) {\n    const marker = this.getMarker(castToBrowser(element), cursorId);\n    assert(!marker || marker.parentNode === element);\n\n    // when insertBefore is not present, we clear the element\n    if (insertBefore === undefined) {\n      while (element.firstChild !== null && element.firstChild !== marker) {\n        this.remove(element.firstChild);\n      }\n      insertBefore = null;\n    }\n    const cursor = new RehydratingCursor(element, null, this.blockDepth);\n    this.cursors.push(cursor);\n    if (marker === null) {\n      this.disableRehydration(insertBefore);\n    } else {\n      this.candidate = this.remove(marker);\n    }\n    const block = new RemoteBlock(element);\n    return this.pushBlock(block, true);\n  }\n  didAppendBounds(bounds) {\n    super.didAppendBounds(bounds);\n    if (this.candidate) {\n      const last = bounds.lastNode();\n      this.candidate = last.nextSibling;\n    }\n    return bounds;\n  }\n}\nfunction isTextNode(node) {\n  return node.nodeType === TEXT_NODE;\n}\nfunction isComment(node) {\n  return node.nodeType === COMMENT_NODE;\n}\nfunction isOpenBlock(node) {\n  return node.nodeType === COMMENT_NODE && node.nodeValue.lastIndexOf('%+b:', 0) === 0;\n}\nfunction isCloseBlock(node) {\n  return node.nodeType === COMMENT_NODE && node.nodeValue.lastIndexOf('%-b:', 0) === 0;\n}\nfunction getBlockDepth(node) {\n  return parseInt(node.nodeValue.slice(4), 10);\n}\nfunction getBlockDepthWithOffset(node, offset) {\n  return getBlockDepth(node) - offset;\n}\nfunction isElement(node) {\n  return node.nodeType === ELEMENT_NODE;\n}\nfunction isMarker(node) {\n  return node.nodeType === COMMENT_NODE && node.nodeValue === '%glmr%';\n}\nfunction isSeparator(node) {\n  return node.nodeType === COMMENT_NODE && node.nodeValue === '%|%';\n}\nfunction isEmpty(node) {\n  return node.nodeType === COMMENT_NODE && node.nodeValue === '% %';\n}\nfunction isSameNodeType(candidate, tag) {\n  if (candidate.namespaceURI === NS_SVG) {\n    return candidate.tagName === tag;\n  }\n  return candidate.tagName === tag.toUpperCase();\n}\nfunction findByName(array, name) {\n  for (const attr of array) {\n    if (attr.name === name) return attr;\n  }\n  return undefined;\n}\nfunction rehydrationBuilder(env, cursor) {\n  return RehydrateTree.forInitialRender(env, cursor);\n}\n\nexport { ConcreteBounds, CursorImpl, NewTreeBuilder, RehydrateTree, RemoteBlock, SERIALIZATION_FIRST_NODE_STRING, isSerializationFirstNode, rehydrationBuilder };\n","import '../../@ember/-internals/meta/lib/meta.js';\nimport '../../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../../@ember/debug/index.js';\nimport '../destroyable/index.js';\nimport { createCache, getValue } from '../validator/index.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../global-context/index.js';\nimport '../../shared-chunks/reference-B6HMX4y0.js';\nimport '../../shared-chunks/capabilities-DHiXCCuB.js';\nexport { S as tracked } from '../../shared-chunks/observers-DhgQ6ba5.js';\nimport '../../shared-chunks/env-DEd6hPbj.js';\n\n// NOTE: copied from: https://github.com/glimmerjs/glimmer.js/pull/358\n// Both glimmerjs/glimmer.js and emberjs/ember.js have the exact same implementation\n// of @cached, so any changes made to one should also be made to the other\n\nconst cached = (...args) => {\n  const [target, key, descriptor] = args;\n\n  // Error on `@cached()`, `@cached(...args)`, and `@cached propName = value;`\n  if (isDevelopingApp() && target === undefined) throwCachedExtraneousParens();\n  if (isDevelopingApp() && (typeof target !== 'object' || typeof key !== 'string' || typeof descriptor !== 'object' || args.length !== 3)) {\n    throwCachedInvalidArgsError(args);\n  }\n  if (isDevelopingApp() && (!('get' in descriptor) || typeof descriptor.get !== 'function')) {\n    throwCachedGetterOnlyError(key);\n  }\n  const caches = new WeakMap();\n  const getter = descriptor.get;\n  descriptor.get = function () {\n    if (!caches.has(this)) {\n      caches.set(this, createCache(getter.bind(this)));\n    }\n    return getValue(caches.get(this));\n  };\n};\nfunction throwCachedExtraneousParens() {\n  throw new Error('You attempted to use @cached(), which is not necessary nor supported. Remove the parentheses and you will be good to go!');\n}\nfunction throwCachedGetterOnlyError(key) {\n  throw new Error(`The @cached decorator must be applied to getters. '${key}' is not a getter.`);\n}\nfunction throwCachedInvalidArgsError(args = []) {\n  throw new Error(`You attempted to use @cached on with ${args.length > 1 ? 'arguments' : 'an argument'} ( @cached(${args.map(d => `'${d}'`).join(', ')}), which is not supported. Dependencies are automatically tracked, so you can just use ${'`@cached`'}`);\n}\n\nexport { cached };\n","import { e as enumerate } from '../../shared-chunks/array-utils-CZQxrdD3.js';\nexport { E as EMPTY_ARRAY, a as EMPTY_NUMBER_ARRAY, b as EMPTY_STRING_ARRAY, c as emptyArray, i as isEmptyArray, r as reverse, z as zipArrays, d as zipTuples } from '../../shared-chunks/array-utils-CZQxrdD3.js';\nexport { S as Stack, d as dict, i as isDict, a as isIndexable } from '../../shared-chunks/collections-B8me-ZlQ.js';\nimport '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '@embroider/macros';\nexport { a as assign, e as entries, k as keys, v as values } from '../../shared-chunks/object-utils-AijlD-JH.js';\nimport { i as isPresentArray, a as getFirst, g as getLast } from '../../shared-chunks/present-B1rrjAVM.js';\n\n/**\n * This constant exists to make it easier to differentiate normal logs from\n * errant console.logs. LOCAL_LOGGER should only be used inside a\n * LOCAL_TRACE_LOGGING check.\n *\n * It does not alleviate the need to check LOCAL_TRACE_LOGGING, which is used\n * for stripping.\n */\nconst LOCAL_LOGGER = console;\n\n/**\n * This constant exists to make it easier to differentiate normal logs from\n * errant console.logs. LOGGER can be used outside of LOCAL_TRACE_LOGGING checks,\n * and is meant to be used in the rare situation where a console.* call is\n * actually appropriate.\n */\nconst LOGGER = console;\n\n/// <reference types=\"qunit\" />\n\nlet beginTestSteps;\nlet endTestSteps;\nlet verifySteps;\nlet logStep;\n\nfunction clearElement(parent) {\n  let current = parent.firstChild;\n  while (current) {\n    let next = current.nextSibling;\n    parent.removeChild(current);\n    current = next;\n  }\n}\n\n/**\n  Strongly hint runtimes to intern the provided string.\n\n  When do I need to use this function?\n\n  For the most part, never. Pre-mature optimization is bad, and often the\n  runtime does exactly what you need it to, and more often the trade-off isn't\n  worth it.\n\n  Why?\n\n  Runtimes store strings in at least 2 different representations:\n  Ropes and Symbols (interned strings). The Rope provides a memory efficient\n  data-structure for strings created from concatenation or some other string\n  manipulation like splitting.\n\n  Unfortunately checking equality of different ropes can be quite costly as\n  runtimes must resort to clever string comparison algorithms. These\n  algorithms typically cost in proportion to the length of the string.\n  Luckily, this is where the Symbols (interned strings) shine. As Symbols are\n  unique by their string content, equality checks can be done by pointer\n  comparison.\n\n  How do I know if my string is a rope or symbol?\n\n  Typically (warning general sweeping statement, but truthy in runtimes at\n  present) static strings created as part of the JS source are interned.\n  Strings often used for comparisons can be interned at runtime if some\n  criteria are met.  One of these criteria can be the size of the entire rope.\n  For example, in chrome 38 a rope longer then 12 characters will not\n  intern, nor will segments of that rope.\n\n  Some numbers: http://jsperf.com/eval-vs-keys/8\n\n  Known Trick™\n\n  @private\n  @return {String} interned version of the provided string\n*/\nfunction intern(str) {\n  let obj = {};\n  obj[str] = 1;\n  for (let key in obj) {\n    if (key === str) {\n      return key;\n    }\n  }\n  return str;\n}\n\nconst SERIALIZATION_FIRST_NODE_STRING = '%+b:0%';\nfunction isSerializationFirstNode(node) {\n  return node.nodeValue === SERIALIZATION_FIRST_NODE_STRING;\n}\n\nfunction strip(strings, ...args) {\n  let out = '';\n  for (const [i, string] of enumerate(strings)) {\n    // eslint-disable-next-line @typescript-eslint/no-base-to-string -- @fixme\n    let dynamic = args[i] !== undefined ? String(args[i]) : '';\n    out += `${string}${dynamic}`;\n  }\n  let lines = out.split('\\n');\n  while (isPresentArray(lines) && /^\\s*$/u.test(getFirst(lines))) {\n    lines.shift();\n  }\n  while (isPresentArray(lines) && /^\\s*$/u.test(getLast(lines))) {\n    lines.pop();\n  }\n  let min = Infinity;\n  for (let line of lines) {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    let leading = /^\\s*/u.exec(line)[0].length;\n    min = Math.min(min, leading);\n  }\n  let stripped = [];\n  for (let line of lines) {\n    stripped.push(line.slice(min));\n  }\n  return stripped.join('\\n');\n}\n\nfunction assertNever(value, desc = 'unexpected unreachable branch') {\n  LOGGER.log('unreachable', value);\n  LOGGER.log(`${desc} :: ${JSON.stringify(value)} (${value})`);\n  throw new Error(`code reached unreachable`);\n}\n\nexport { LOCAL_LOGGER, LOGGER, SERIALIZATION_FIRST_NODE_STRING, assertNever, beginTestSteps, clearElement, endTestSteps, enumerate, intern, isSerializationFirstNode, logStep, strip, verifySteps };\n","import '../../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport { g as getLast, b as asPresentArray } from '../../shared-chunks/present-B1rrjAVM.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { assert, scheduleRevalidate } from '../global-context/index.js';\n\n/* eslint-disable @typescript-eslint/no-non-null-assertion -- @fixme */\n\nconst debug = {};\nif (isDevelopingApp()) {\n  let CONSUMED_TAGS = null;\n  const TRANSACTION_STACK = [];\n\n  /////////\n\n  const TRANSACTION_ENV = {\n    debugMessage(obj, keyName) {\n      let objName;\n      if (typeof obj === 'function') {\n        objName = obj.name;\n      } else if (typeof obj === 'object' && obj !== null) {\n        let className = obj.constructor.name || '(unknown class)';\n        objName = `(an instance of ${className})`;\n      } else if (obj === undefined) {\n        objName = '(an unknown tag)';\n      } else {\n        // eslint-disable-next-line @typescript-eslint/no-base-to-string\n        objName = String(obj);\n      }\n      let dirtyString = keyName ? `\\`${keyName}\\` on \\`${objName}\\`` : `\\`${objName}\\``;\n      return `You attempted to update ${dirtyString}, but it had already been used previously in the same computation.  Attempting to update a value after using it in a computation can cause logical errors, infinite revalidation bugs, and performance issues, and is not supported.`;\n    }\n  };\n  debug.setTrackingTransactionEnv = env => Object.assign(TRANSACTION_ENV, env);\n  debug.beginTrackingTransaction = _debugLabel => {\n    CONSUMED_TAGS = CONSUMED_TAGS || new WeakMap();\n    let debugLabel = _debugLabel || undefined;\n    let parent = TRANSACTION_STACK[TRANSACTION_STACK.length - 1] ?? null;\n    TRANSACTION_STACK.push({\n      parent,\n      debugLabel\n    });\n  };\n  debug.endTrackingTransaction = () => {\n    if (TRANSACTION_STACK.length === 0) {\n      throw new Error('attempted to close a tracking transaction, but one was not open');\n    }\n    TRANSACTION_STACK.pop();\n    if (TRANSACTION_STACK.length === 0) {\n      CONSUMED_TAGS = null;\n    }\n  };\n  debug.resetTrackingTransaction = () => {\n    let stack = '';\n    if (TRANSACTION_STACK.length > 0) {\n      stack = debug.logTrackingStack(TRANSACTION_STACK[TRANSACTION_STACK.length - 1]);\n    }\n    TRANSACTION_STACK.splice(0, TRANSACTION_STACK.length);\n    CONSUMED_TAGS = null;\n    return stack;\n  };\n\n  /**\n   * Creates a global autotracking transaction. This will prevent any backflow\n   * in any `track` calls within the transaction, even if they are not\n   * externally consumed.\n   *\n   * `runInAutotrackingTransaction` can be called within itself, and it will add\n   * onto the existing transaction if one exists.\n   *\n   * TODO: Only throw an error if the `track` is consumed.\n   */\n  debug.runInTrackingTransaction = (fn, debugLabel) => {\n    debug.beginTrackingTransaction(debugLabel);\n    let didError = true;\n    try {\n      let value = fn();\n      didError = false;\n      return value;\n    } finally {\n      if (!didError) {\n        debug.endTrackingTransaction();\n      }\n\n      // if (id !== TRANSACTION_STACK.length) {\n      //   throw new Error(\n      //     `attempted to close a tracking transaction (${id}), but it was not the last transaction (${TRANSACTION_STACK.length})`\n      //   );\n      // }\n    }\n  };\n  let nthIndex = (str, pattern, n, startingPos = -1) => {\n    let i = startingPos;\n    while (n-- > 0 && i++ < str.length) {\n      i = str.indexOf(pattern, i);\n      if (i < 0) break;\n    }\n    return i;\n  };\n  let makeTrackingErrorMessage = (transaction, obj, keyName) => {\n    let message = [TRANSACTION_ENV.debugMessage(obj, keyName && String(keyName))];\n    message.push(`\\`${String(keyName)}\\` was first used:`);\n    message.push(debug.logTrackingStack(transaction));\n    message.push(`Stack trace for the update:`);\n    return message.join('\\n\\n');\n  };\n  debug.logTrackingStack = transaction => {\n    let trackingStack = [];\n    let current = transaction || TRANSACTION_STACK[TRANSACTION_STACK.length - 1];\n    if (current === undefined) return '';\n    while (current) {\n      if (current.debugLabel) {\n        trackingStack.unshift(current.debugLabel);\n      }\n      current = current.parent;\n    }\n    return trackingStack.map((label, index) => ' '.repeat(2 * index) + label).join('\\n');\n  };\n  debug.markTagAsConsumed = _tag => {\n    if (!CONSUMED_TAGS || CONSUMED_TAGS.has(_tag)) return;\n    CONSUMED_TAGS.set(_tag, getLast(asPresentArray(TRANSACTION_STACK)));\n\n    // We need to mark the tag and all of its subtags as consumed, so we need to\n    // cast it and access its internals. In the future this shouldn't be necessary,\n    // this is only for computed properties.\n    let subtag = _tag.subtag;\n    if (!subtag || !debug.markTagAsConsumed) return;\n    if (Array.isArray(subtag)) {\n      subtag.forEach(debug.markTagAsConsumed);\n    } else {\n      debug.markTagAsConsumed(subtag);\n    }\n  };\n  debug.assertTagNotConsumed = (tag, obj, keyName) => {\n    if (CONSUMED_TAGS === null) return;\n    let transaction = CONSUMED_TAGS.get(tag);\n    if (!transaction) return;\n\n    // This hack makes the assertion message nicer, we can cut off the first\n    // few lines of the stack trace and let users know where the actual error\n    // occurred.\n    try {\n      assert(false, makeTrackingErrorMessage(transaction, obj, keyName));\n    } catch (e) {\n      if (hasStack(e)) {\n        let updateStackBegin = e.stack.indexOf('Stack trace for the update:');\n        if (updateStackBegin !== -1) {\n          let start = nthIndex(e.stack, '\\n', 1, updateStackBegin);\n          let end = nthIndex(e.stack, '\\n', 4, updateStackBegin);\n          e.stack = e.stack.substr(0, start) + e.stack.substr(end);\n        }\n      }\n      throw e;\n    }\n  };\n}\nfunction hasStack(error) {\n  return typeof error === 'object' && error !== null && 'stack' in error && typeof error.stack === 'string';\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\nfunction unwrap(val) {\n  if (val === null || val === undefined) throw new Error(`Expected value to be present`);\n  return val;\n}\n\nconst CONSTANT = 0;\nconst INITIAL = 1;\nconst VOLATILE = NaN;\nlet $REVISION = INITIAL;\nfunction bump() {\n  $REVISION++;\n}\n\n//////////\n\nconst DIRYTABLE_TAG_ID = 0;\nconst UPDATABLE_TAG_ID = 1;\nconst COMBINATOR_TAG_ID = 2;\nconst CONSTANT_TAG_ID = 3;\n\n//////////\n\nconst COMPUTE = Symbol('TAG_COMPUTE');\nReflect.set(globalThis, 'COMPUTE_SYMBOL', COMPUTE);\n\n//////////\n\n/**\n * `value` receives a tag and returns an opaque Revision based on that tag. This\n * snapshot can then later be passed to `validate` with the same tag to\n * determine if the tag has changed at all since the time that `value` was\n * called.\n *\n * @param tag\n */\nfunction valueForTag(tag) {\n  return tag[COMPUTE]();\n}\n\n/**\n * `validate` receives a tag and a snapshot from a previous call to `value` with\n * the same tag, and determines if the tag is still valid compared to the\n * snapshot. If the tag's state has changed at all since then, `validate` will\n * return false, otherwise it will return true. This is used to determine if a\n * calculation related to the tags should be rerun.\n *\n * @param tag\n * @param snapshot\n */\nfunction validateTag(tag, snapshot) {\n  return snapshot >= tag[COMPUTE]();\n}\n\n//////////\n\nconst TYPE = Symbol('TAG_TYPE');\n\n// this is basically a const\nlet ALLOW_CYCLES;\nif (isDevelopingApp()) {\n  ALLOW_CYCLES = new WeakMap();\n}\nfunction allowsCycles(tag) {\n  if (ALLOW_CYCLES === undefined) {\n    return true;\n  } else {\n    return ALLOW_CYCLES.has(tag);\n  }\n}\nclass MonomorphicTagImpl {\n  static combine(tags) {\n    switch (tags.length) {\n      case 0:\n        return CONSTANT_TAG;\n      case 1:\n        return tags[0];\n      default:\n        {\n          let tag = new MonomorphicTagImpl(COMBINATOR_TAG_ID);\n          tag.subtag = tags;\n          return tag;\n        }\n    }\n  }\n  revision = INITIAL;\n  lastChecked = INITIAL;\n  lastValue = INITIAL;\n  isUpdating = false;\n  subtag = null;\n  subtagBufferCache = null;\n  constructor(type) {\n    this[TYPE] = type;\n  }\n  [COMPUTE]() {\n    let {\n      lastChecked\n    } = this;\n    if (this.isUpdating) {\n      if (isDevelopingApp() && !allowsCycles(this)) {\n        throw new Error('Cycles in tags are not allowed');\n      }\n      this.lastChecked = ++$REVISION;\n    } else if (lastChecked !== $REVISION) {\n      this.isUpdating = true;\n      this.lastChecked = $REVISION;\n      try {\n        let {\n          subtag,\n          revision\n        } = this;\n        if (subtag !== null) {\n          if (Array.isArray(subtag)) {\n            for (const tag of subtag) {\n              let value = tag[COMPUTE]();\n              revision = Math.max(value, revision);\n            }\n          } else {\n            let subtagValue = subtag[COMPUTE]();\n            if (subtagValue === this.subtagBufferCache) {\n              revision = Math.max(revision, this.lastValue);\n            } else {\n              // Clear the temporary buffer cache\n              this.subtagBufferCache = null;\n              revision = Math.max(revision, subtagValue);\n            }\n          }\n        }\n        this.lastValue = revision;\n      } finally {\n        this.isUpdating = false;\n      }\n    }\n    return this.lastValue;\n  }\n  static updateTag(_tag, _subtag) {\n    // catch bug by non-TS users\n\n    if (isDevelopingApp() && _tag[TYPE] !== UPDATABLE_TAG_ID) {\n      throw new Error('Attempted to update a tag that was not updatable');\n    }\n\n    // TODO: TS 3.7 should allow us to do this via assertion\n    let tag = _tag;\n    let subtag = _subtag;\n    if (subtag === CONSTANT_TAG) {\n      tag.subtag = null;\n    } else {\n      // There are two different possibilities when updating a subtag:\n      //\n      // 1. subtag[COMPUTE]() <= tag[COMPUTE]();\n      // 2. subtag[COMPUTE]() > tag[COMPUTE]();\n      //\n      // The first possibility is completely fine within our caching model, but\n      // the second possibility presents a problem. If the parent tag has\n      // already been read, then it's value is cached and will not update to\n      // reflect the subtag's greater value. Next time the cache is busted, the\n      // subtag's value _will_ be read, and it's value will be _greater_ than\n      // the saved snapshot of the parent, causing the resulting calculation to\n      // be rerun erroneously.\n      //\n      // In order to prevent this, when we first update to a new subtag we store\n      // its computed value, and then check against that computed value on\n      // subsequent updates. If its value hasn't changed, then we return the\n      // parent's previous value. Once the subtag changes for the first time,\n      // we clear the cache and everything is finally in sync with the parent.\n      tag.subtagBufferCache = subtag[COMPUTE]();\n      tag.subtag = subtag;\n    }\n  }\n  static dirtyTag(tag, disableConsumptionAssertion) {\n    if (isDevelopingApp() &&\n    // catch bug by non-TS users\n\n    !(tag[TYPE] === UPDATABLE_TAG_ID || tag[TYPE] === DIRYTABLE_TAG_ID)) {\n      throw new Error('Attempted to dirty a tag that was not dirtyable');\n    }\n    if (isDevelopingApp() && disableConsumptionAssertion !== true) {\n      // Usually by this point, we've already asserted with better error information,\n      // but this is our last line of defense.\n      unwrap(debug.assertTagNotConsumed)(tag);\n    }\n    tag.revision = ++$REVISION;\n    scheduleRevalidate();\n  }\n}\nconst DIRTY_TAG = MonomorphicTagImpl.dirtyTag;\nconst UPDATE_TAG = MonomorphicTagImpl.updateTag;\n\n//////////\n\nfunction createTag() {\n  return new MonomorphicTagImpl(DIRYTABLE_TAG_ID);\n}\nfunction createUpdatableTag() {\n  return new MonomorphicTagImpl(UPDATABLE_TAG_ID);\n}\n\n//////////\n\nconst CONSTANT_TAG = new MonomorphicTagImpl(CONSTANT_TAG_ID);\nfunction isConstTag(tag) {\n  return tag === CONSTANT_TAG;\n}\n\n//////////\n\nconst VOLATILE_TAG_ID = 100;\nclass VolatileTag {\n  [TYPE] = VOLATILE_TAG_ID;\n  [COMPUTE]() {\n    return VOLATILE;\n  }\n}\nconst VOLATILE_TAG = new VolatileTag();\n\n//////////\n\nconst CURRENT_TAG_ID = 101;\nclass CurrentTag {\n  [TYPE] = CURRENT_TAG_ID;\n  [COMPUTE]() {\n    return $REVISION;\n  }\n}\nconst CURRENT_TAG = new CurrentTag();\n\n//////////\n\nconst combine = MonomorphicTagImpl.combine;\n\n// Warm\n\nlet tag1 = createUpdatableTag();\nlet tag2 = createUpdatableTag();\nlet tag3 = createUpdatableTag();\nvalueForTag(tag1);\nDIRTY_TAG(tag1);\nvalueForTag(tag1);\nUPDATE_TAG(tag1, combine([tag2, tag3]));\nvalueForTag(tag1);\nDIRTY_TAG(tag2);\nvalueForTag(tag1);\nDIRTY_TAG(tag3);\nvalueForTag(tag1);\nUPDATE_TAG(tag1, tag3);\nvalueForTag(tag1);\nDIRTY_TAG(tag3);\nvalueForTag(tag1);\n\nclass Tracker {\n  tags = new Set();\n  last = null;\n  add(tag) {\n    if (tag === CONSTANT_TAG) return;\n    this.tags.add(tag);\n    if (isDevelopingApp()) {\n      unwrap(debug.markTagAsConsumed)(tag);\n    }\n    this.last = tag;\n  }\n  combine() {\n    let {\n      tags\n    } = this;\n    if (tags.size === 0) {\n      return CONSTANT_TAG;\n    } else if (tags.size === 1) {\n      return this.last;\n    } else {\n      return combine(Array.from(this.tags));\n    }\n  }\n}\n\n/**\n * Whenever a tracked computed property is entered, the current tracker is\n * saved off and a new tracker is replaced.\n *\n * Any tracked properties consumed are added to the current tracker.\n *\n * When a tracked computed property is exited, the tracker's tags are\n * combined and added to the parent tracker.\n *\n * The consequence is that each tracked computed property has a tag\n * that corresponds to the tracked properties consumed inside of\n * itself, including child tracked computed properties.\n */\nlet CURRENT_TRACKER = null;\nconst OPEN_TRACK_FRAMES = [];\nfunction beginTrackFrame(debuggingContext) {\n  OPEN_TRACK_FRAMES.push(CURRENT_TRACKER);\n  CURRENT_TRACKER = new Tracker();\n  if (isDevelopingApp()) {\n    unwrap(debug.beginTrackingTransaction)(debuggingContext);\n  }\n}\nfunction endTrackFrame() {\n  let current = CURRENT_TRACKER;\n  if (isDevelopingApp()) {\n    if (OPEN_TRACK_FRAMES.length === 0) {\n      throw new Error('attempted to close a tracking frame, but one was not open');\n    }\n    unwrap(debug.endTrackingTransaction)();\n  }\n  CURRENT_TRACKER = OPEN_TRACK_FRAMES.pop() || null;\n  return unwrap(current).combine();\n}\nfunction beginUntrackFrame() {\n  OPEN_TRACK_FRAMES.push(CURRENT_TRACKER);\n  CURRENT_TRACKER = null;\n}\nfunction endUntrackFrame() {\n  if (isDevelopingApp() && OPEN_TRACK_FRAMES.length === 0) {\n    throw new Error('attempted to close a tracking frame, but one was not open');\n  }\n  CURRENT_TRACKER = OPEN_TRACK_FRAMES.pop() || null;\n}\n\n// This function is only for handling errors and resetting to a valid state\nfunction resetTracking() {\n  while (OPEN_TRACK_FRAMES.length > 0) {\n    OPEN_TRACK_FRAMES.pop();\n  }\n  CURRENT_TRACKER = null;\n  if (isDevelopingApp()) {\n    return unwrap(debug.resetTrackingTransaction)();\n  }\n}\nfunction isTracking() {\n  return CURRENT_TRACKER !== null;\n}\nfunction consumeTag(tag) {\n  if (CURRENT_TRACKER !== null) {\n    CURRENT_TRACKER.add(tag);\n  }\n}\n\n// public interface\n\nconst FN = Symbol('FN');\nconst LAST_VALUE = Symbol('LAST_VALUE');\nconst TAG = Symbol('TAG');\nconst SNAPSHOT = Symbol('SNAPSHOT');\nconst DEBUG_LABEL = Symbol('DEBUG_LABEL');\nfunction createCache(fn, debuggingLabel) {\n  if (isDevelopingApp() && !(typeof fn === 'function')) {\n    throw new Error(`createCache() must be passed a function as its first parameter. Called with: ${String(fn)}`);\n  }\n  let cache = {\n    [FN]: fn,\n    [LAST_VALUE]: undefined,\n    [TAG]: undefined,\n    [SNAPSHOT]: -1\n  };\n  if (isDevelopingApp()) {\n    cache[DEBUG_LABEL] = debuggingLabel;\n  }\n  return cache;\n}\nfunction getValue(cache) {\n  assertCache(cache, 'getValue');\n  let fn = cache[FN];\n  let tag = cache[TAG];\n  let snapshot = cache[SNAPSHOT];\n  if (tag === undefined || !validateTag(tag, snapshot)) {\n    beginTrackFrame();\n    try {\n      cache[LAST_VALUE] = fn();\n    } finally {\n      tag = endTrackFrame();\n      cache[TAG] = tag;\n      cache[SNAPSHOT] = valueForTag(tag);\n      consumeTag(tag);\n    }\n  } else {\n    consumeTag(tag);\n  }\n  return cache[LAST_VALUE];\n}\nfunction isConst(cache) {\n  assertCache(cache, 'isConst');\n  let tag = cache[TAG];\n  assertTag(tag, cache);\n  return isConstTag(tag);\n}\nfunction assertCache(value, fnName) {\n  if (isDevelopingApp() && !(typeof value === 'object' && FN in value)) {\n    throw new Error(`${fnName}() can only be used on an instance of a cache created with createCache(). Called with: ${String(\n    // eslint-disable-next-line @typescript-eslint/no-base-to-string -- @fixme\n    value)}`);\n  }\n}\n\n// replace this with `expect` when we can\nfunction assertTag(tag, cache) {\n  if (isDevelopingApp() && tag === undefined) {\n    throw new Error(`isConst() can only be used on a cache once getValue() has been called at least once. Called with cache function:\\n\\n${String(cache[FN])}`);\n  }\n}\n\n//////////\n\n// Legacy tracking APIs\n\n// track() shouldn't be necessary at all in the VM once the autotracking\n// refactors are merged, and we should generally be moving away from it. It may\n// be necessary in Ember for a while longer, but I think we'll be able to drop\n// it in favor of cache sooner rather than later.\nfunction track(block, debugLabel) {\n  beginTrackFrame(debugLabel);\n  let tag;\n  try {\n    block();\n  } finally {\n    tag = endTrackFrame();\n  }\n  return tag;\n}\n\n// untrack() is currently mainly used to handle places that were previously not\n// tracked, and that tracking now would cause backtracking rerender assertions.\n// I think once we move everyone forward onto modern APIs, we'll probably be\n// able to remove it, but I'm not sure yet.\nfunction untrack(callback) {\n  beginUntrackFrame();\n  try {\n    return callback();\n  } finally {\n    endUntrackFrame();\n  }\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n// Unfortunately, TypeScript's ability to do inference *or* type-checking in a\n// `Proxy`'s body is very limited, so we have to use a number of casts `as any`\n// to make the internal accesses work. The type safety of these is guaranteed at\n// the *call site* instead of within the body: you cannot do `Array.blah` in TS,\n// and it will blow up in JS in exactly the same way, so it is safe to assume\n// that properties within the getter have the correct type in TS.\n\nconst ARRAY_GETTER_METHODS = new Set([Symbol.iterator, 'concat', 'entries', 'every', 'filter', 'find', 'findIndex', 'flat', 'flatMap', 'forEach', 'includes', 'indexOf', 'join', 'keys', 'lastIndexOf', 'map', 'reduce', 'reduceRight', 'slice', 'some', 'values']);\n\n// For these methods, `Array` itself immediately gets the `.length` to return\n// after invoking them.\nconst ARRAY_WRITE_THEN_READ_METHODS = new Set(['fill', 'push', 'unshift']);\nfunction convertToInt(prop) {\n  if (typeof prop === 'symbol') return null;\n  const num = Number(prop);\n  if (isNaN(num)) return null;\n  return num % 1 === 0 ? num : null;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\nclass TrackedArray {\n  #options;\n  constructor(arr, options) {\n    this.#options = options;\n    const clone = arr.slice();\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    const self = this;\n    const boundFns = new Map();\n\n    /**\n      Flag to track whether we have *just* intercepted a call to `.push()` or\n      `.unshift()`, since in those cases (and only those cases!) the `Array`\n      itself checks `.length` to return from the function call.\n     */\n    let nativelyAccessingLengthFromWriteMethod = false;\n    return new Proxy(clone, {\n      get(target, prop /*, _receiver */) {\n        const index = convertToInt(prop);\n        if (index !== null) {\n          self.#readStorageFor(index);\n          consumeTag(self.#collection);\n          return target[index];\n        }\n        if (prop === 'length') {\n          // If we are reading `.length`, it may be a normal user-triggered\n          // read, or it may be a read triggered by Array itself. In the latter\n          // case, it is because we have just done `.push()` or `.unshift()`; in\n          // that case it is safe not to mark this as a *read* operation, since\n          // calling `.push()` or `.unshift()` cannot otherwise be part of a\n          // \"read\" operation safely, and if done during an *existing* read\n          // (e.g. if the user has already checked `.length` *prior* to this),\n          // that will still trigger the mutation-after-consumption assertion.\n          if (nativelyAccessingLengthFromWriteMethod) {\n            nativelyAccessingLengthFromWriteMethod = false;\n          } else {\n            consumeTag(self.#collection);\n          }\n          return target[prop];\n        }\n\n        // Here, track that we are doing a `.push()` or `.unshift()` by setting\n        // the flag to `true` so that when the `.length` is read by `Array` (see\n        // immediately above), it knows not to dirty the collection.\n        if (ARRAY_WRITE_THEN_READ_METHODS.has(prop)) {\n          nativelyAccessingLengthFromWriteMethod = true;\n        }\n        if (ARRAY_GETTER_METHODS.has(prop)) {\n          let fn = boundFns.get(prop);\n          if (fn === undefined) {\n            fn = (...args) => {\n              consumeTag(self.#collection);\n              // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n              return target[prop](...args);\n            };\n            boundFns.set(prop, fn);\n          }\n          return fn;\n        }\n\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access\n        return target[prop];\n      },\n      set(target, prop, value /*, _receiver */) {\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument\n        let isUnchanged = self.#options.equals(target[prop], value);\n        if (isUnchanged) return true;\n\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n        target[prop] = value;\n        const index = convertToInt(prop);\n        if (index !== null) {\n          self.#dirtyStorageFor(index);\n          self.#dirtyCollection();\n        } else if (prop === 'length') {\n          self.#dirtyCollection();\n        }\n        return true;\n      },\n      getPrototypeOf() {\n        return TrackedArray.prototype;\n      }\n    });\n  }\n  #collection = createUpdatableTag();\n  #storages = new Map();\n  #readStorageFor(index) {\n    let storage = this.#storages.get(index);\n    if (storage === undefined) {\n      storage = createUpdatableTag();\n      this.#storages.set(index, storage);\n    }\n    consumeTag(storage);\n  }\n  #dirtyStorageFor(index) {\n    const storage = this.#storages.get(index);\n    if (storage) {\n      DIRTY_TAG(storage);\n    }\n  }\n  #dirtyCollection() {\n    DIRTY_TAG(this.#collection);\n    this.#storages.clear();\n  }\n}\n\n// This rule is correct in the general case, but it doesn't understand\n// declaration merging, which is how we're using the interface here. This says\n// `TrackedArray` acts just like `Array<T>`, but also has the properties\n// declared via the `class` declaration above -- but without the cost of a\n// subclass, which is much slower that the proxied array behavior. That is: a\n// `TrackedArray` *is* an `Array`, just with a proxy in front of accessors and\n// setters, rather than a subclass of an `Array` which would be de-optimized by\n// the browsers.\n//\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\n\n// Ensure instanceof works correctly\nObject.setPrototypeOf(TrackedArray.prototype, Array.prototype);\nfunction trackedArray(data, options) {\n  return new TrackedArray(data ?? [], {\n    equals: options?.equals ?? Object.is,\n    description: options?.description\n  });\n}\n\nclass TrackedMap {\n  #options;\n  #collection = createUpdatableTag();\n  #storages = new Map();\n  #vals;\n  #storageFor(key) {\n    const storages = this.#storages;\n    let storage = storages.get(key);\n    if (storage === undefined) {\n      storage = createUpdatableTag();\n      storages.set(key, storage);\n    }\n    return storage;\n  }\n  #dirtyStorageFor(key) {\n    const storage = this.#storages.get(key);\n    if (storage) {\n      DIRTY_TAG(storage);\n    }\n  }\n  constructor(existing, options) {\n    // TypeScript doesn't correctly resolve the overloads for calling the `Map`\n    // constructor for the no-value constructor. This resolves that.\n    this.#vals = existing instanceof Map ? new Map(existing.entries()) : new Map(existing);\n    this.#options = options;\n  }\n  get(key) {\n    consumeTag(this.#storageFor(key));\n    return this.#vals.get(key);\n  }\n  has(key) {\n    consumeTag(this.#storageFor(key));\n    return this.#vals.has(key);\n  }\n\n  // **** ALL GETTERS ****\n  entries() {\n    consumeTag(this.#collection);\n    return this.#vals.entries();\n  }\n  getOrInsert(key, defaultValue) {\n    consumeTag(this.#storageFor(key));\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore -- older versions of TS don't yet have this method\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call\n    return this.#vals.getOrInsert(key, defaultValue);\n  }\n  getOrInsertComputed(key, creator) {\n    consumeTag(this.#storageFor(key));\n\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore -- older versions of TS don't yet have this method\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call\n    return this.#vals.getOrInsertComputed(key, creator);\n  }\n  keys() {\n    consumeTag(this.#collection);\n    return this.#vals.keys();\n  }\n  values() {\n    consumeTag(this.#collection);\n    return this.#vals.values();\n  }\n  forEach(fn) {\n    consumeTag(this.#collection);\n    this.#vals.forEach(fn);\n  }\n  get size() {\n    consumeTag(this.#collection);\n    return this.#vals.size;\n  }\n\n  /**\n   * When iterating:\n   * - we entangle with the collection (as we iterate over the whole thing\n   * - for each individual item, we entangle with the item as well\n   */\n  [Symbol.iterator]() {\n    let keys = this.keys();\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    let self = this;\n    return {\n      next() {\n        let next = keys.next();\n        let currentKey = next.value;\n        if (next.done) {\n          return {\n            value: [undefined, undefined],\n            done: true\n          };\n        }\n\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n        return {\n          value: [currentKey, self.get(currentKey)],\n          done: false\n        };\n      }\n    };\n  }\n  get [Symbol.toStringTag]() {\n    return this.#vals[Symbol.toStringTag];\n  }\n  set(key, value) {\n    let existing = this.#vals.get(key);\n    if (existing) {\n      let isUnchanged = this.#options.equals(existing, value);\n      if (isUnchanged) {\n        return this;\n      }\n    }\n    this.#dirtyStorageFor(key);\n    if (!existing) {\n      DIRTY_TAG(this.#collection);\n    }\n    this.#vals.set(key, value);\n    return this;\n  }\n  delete(key) {\n    if (!this.#vals.has(key)) return true;\n    this.#dirtyStorageFor(key);\n    DIRTY_TAG(this.#collection);\n    this.#storages.delete(key);\n    return this.#vals.delete(key);\n  }\n  clear() {\n    if (this.#vals.size === 0) return;\n    this.#storages.forEach(s => DIRTY_TAG(s));\n    this.#storages.clear();\n    DIRTY_TAG(this.#collection);\n    this.#vals.clear();\n  }\n}\n\n// So instanceof works\nObject.setPrototypeOf(TrackedMap.prototype, Map.prototype);\nfunction trackedMap(data, options) {\n  return new TrackedMap(data ?? [], {\n    equals: options?.equals ?? Object.is,\n    description: options?.description\n  });\n}\n\nclass TrackedObject {\n  #options;\n  #storages = new Map();\n  #collection = createUpdatableTag();\n  #readStorageFor(key) {\n    let storage = this.#storages.get(key);\n    if (storage === undefined) {\n      storage = createUpdatableTag();\n      this.#storages.set(key, storage);\n    }\n    consumeTag(storage);\n  }\n  #dirtyStorageFor(key) {\n    const storage = this.#storages.get(key);\n    if (storage) {\n      DIRTY_TAG(storage);\n    }\n  }\n  #dirtyCollection() {\n    DIRTY_TAG(this.#collection);\n  }\n\n  /**\n   * This implementation of trackedObject is far too dynamic for TS to be happy with\n   */\n  constructor(obj, options) {\n    this.#options = options;\n\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n    const proto = Object.getPrototypeOf(obj);\n    const descs = Object.getOwnPropertyDescriptors(obj);\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n    const clone = Object.create(proto);\n    for (const prop in descs) {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      Object.defineProperty(clone, prop, descs[prop]);\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    const self = this;\n    return new Proxy(clone, {\n      get(target, prop) {\n        self.#readStorageFor(prop);\n        return target[prop];\n      },\n      has(target, prop) {\n        self.#readStorageFor(prop);\n        return prop in target;\n      },\n      ownKeys(target) {\n        consumeTag(self.#collection);\n        return Reflect.ownKeys(target);\n      },\n      set(target, prop, value) {\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n        let isUnchanged = self.#options.equals(target[prop], value);\n        if (isUnchanged) {\n          return true;\n        }\n\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n        target[prop] = value;\n        self.#dirtyStorageFor(prop);\n        self.#dirtyCollection();\n        return true;\n      },\n      deleteProperty(target, prop) {\n        if (prop in target) {\n          delete target[prop];\n          self.#dirtyStorageFor(prop);\n          self.#storages.delete(prop);\n          self.#dirtyCollection();\n        }\n        return true;\n      },\n      getPrototypeOf() {\n        return TrackedObject.prototype;\n      }\n    });\n  }\n}\nfunction trackedObject(data, options) {\n  return new TrackedObject(data ?? {}, {\n    equals: options?.equals ?? Object.is,\n    description: options?.description\n    /**\n     * SAFETY: we are trying to mimic the same behavior as a plain object, so if anything about\n     *         the object that is returned behaves differently from a native object in a surprising\n     *         way, we should fix that and make the behavior match native objects.\n     */\n  });\n}\n\nclass TrackedSet {\n  #options;\n  #collection = createUpdatableTag();\n  #storages = new Map();\n  #vals;\n  #storageFor(key) {\n    const storages = this.#storages;\n    let storage = storages.get(key);\n    if (storage === undefined) {\n      storage = createUpdatableTag();\n      storages.set(key, storage);\n    }\n    return storage;\n  }\n  #dirtyStorageFor(key) {\n    const storage = this.#storages.get(key);\n    if (storage) {\n      DIRTY_TAG(storage);\n    }\n  }\n  constructor(existing, options) {\n    this.#vals = new Set(existing);\n    this.#options = options;\n  }\n\n  // **** KEY GETTERS ****\n  has(value) {\n    consumeTag(this.#storageFor(value));\n    return this.#vals.has(value);\n  }\n\n  // **** ALL GETTERS ****\n  entries() {\n    consumeTag(this.#collection);\n    return this.#vals.entries();\n  }\n  keys() {\n    consumeTag(this.#collection);\n    return this.#vals.keys();\n  }\n  values() {\n    consumeTag(this.#collection);\n    return this.#vals.values();\n  }\n  union(other) {\n    consumeTag(this.#collection);\n    return this.#vals.union(other);\n  }\n  intersection(other) {\n    consumeTag(this.#collection);\n    return this.#vals.intersection(other);\n  }\n  difference(other) {\n    consumeTag(this.#collection);\n    return this.#vals.difference(other);\n  }\n  symmetricDifference(other) {\n    consumeTag(this.#collection);\n    return this.#vals.symmetricDifference(other);\n  }\n  isSubsetOf(other) {\n    consumeTag(this.#collection);\n    return this.#vals.isSubsetOf(other);\n  }\n  isSupersetOf(other) {\n    consumeTag(this.#collection);\n    return this.#vals.isSupersetOf(other);\n  }\n  isDisjointFrom(other) {\n    consumeTag(this.#collection);\n    return this.#vals.isDisjointFrom(other);\n  }\n  forEach(fn) {\n    consumeTag(this.#collection);\n    this.#vals.forEach(fn);\n  }\n  get size() {\n    consumeTag(this.#collection);\n    return this.#vals.size;\n  }\n  [Symbol.iterator]() {\n    consumeTag(this.#collection);\n    return this.#vals[Symbol.iterator]();\n  }\n  get [Symbol.toStringTag]() {\n    return this.#vals[Symbol.toStringTag];\n  }\n  add(value) {\n    if (this.#vals.has(value)) {\n      let isUnchanged = this.#options.equals(value, value);\n      if (isUnchanged) return this;\n    } else {\n      DIRTY_TAG(this.#collection);\n    }\n    this.#dirtyStorageFor(value);\n    this.#vals.add(value);\n    return this;\n  }\n  delete(value) {\n    if (!this.#vals.has(value)) return true;\n    this.#dirtyStorageFor(value);\n    DIRTY_TAG(this.#collection);\n    this.#storages.delete(value);\n    return this.#vals.delete(value);\n  }\n\n  // **** ALL SETTERS ****\n  clear() {\n    if (this.#vals.size === 0) return;\n    this.#storages.forEach(s => DIRTY_TAG(s));\n    DIRTY_TAG(this.#collection);\n    this.#storages.clear();\n    this.#vals.clear();\n  }\n}\n\n// So instanceof works\nObject.setPrototypeOf(TrackedSet.prototype, Set.prototype);\nfunction trackedSet(data, options) {\n  return new TrackedSet(data ?? [], {\n    equals: options?.equals ?? Object.is,\n    description: options?.description\n  });\n}\n\nclass TrackedWeakMap {\n  #options;\n  #storages = new WeakMap();\n  #vals;\n  #storageFor(key) {\n    let storage = this.#storages.get(key);\n    if (storage === undefined) {\n      storage = createUpdatableTag();\n      this.#storages.set(key, storage);\n    }\n    return storage;\n  }\n  #dirtyStorageFor(key) {\n    const storage = this.#storages.get(key);\n    if (storage) {\n      DIRTY_TAG(storage);\n    }\n  }\n  constructor(existing, options) {\n    /**\n     * SAFETY: note that wehn passing in an existing weak map, we can't\n     *         clone it as it is not iterable and not a supported type of structuredClone\n     */\n    this.#vals = existing instanceof WeakMap ? existing : new WeakMap(existing);\n    this.#options = options;\n  }\n  get(key) {\n    consumeTag(this.#storageFor(key));\n    return this.#vals.get(key);\n  }\n  has(key) {\n    consumeTag(this.#storageFor(key));\n    return this.#vals.has(key);\n  }\n  set(key, value) {\n    let existing = this.#vals.get(key);\n    if (existing) {\n      let isUnchanged = this.#options.equals(existing, value);\n      if (isUnchanged) {\n        return this;\n      }\n    }\n    this.#dirtyStorageFor(key);\n    this.#vals.set(key, value);\n    return this;\n  }\n  delete(key) {\n    if (!this.#vals.has(key)) return true;\n    this.#dirtyStorageFor(key);\n    this.#storages.delete(key);\n    return this.#vals.delete(key);\n  }\n  get [Symbol.toStringTag]() {\n    return this.#vals[Symbol.toStringTag];\n  }\n}\n\n// So instanceof works\nObject.setPrototypeOf(TrackedWeakMap.prototype, WeakMap.prototype);\nfunction trackedWeakMap(data, options) {\n  return new TrackedWeakMap(data ?? [], {\n    equals: options?.equals ?? Object.is,\n    description: options?.description\n  });\n}\n\nclass TrackedWeakSet {\n  #options;\n  #storages = new WeakMap();\n  #vals;\n  #storageFor(key) {\n    let storage = this.#storages.get(key);\n    if (storage === undefined) {\n      storage = createUpdatableTag();\n      this.#storages.set(key, storage);\n    }\n    return storage;\n  }\n  #dirtyStorageFor(key) {\n    const storage = this.#storages.get(key);\n    if (storage) {\n      DIRTY_TAG(storage);\n    }\n  }\n  constructor(values, options) {\n    this.#options = options;\n    this.#vals = new WeakSet(values);\n  }\n  has(value) {\n    consumeTag(this.#storageFor(value));\n    return this.#vals.has(value);\n  }\n  add(value) {\n    /**\n     * In a WeakSet, there is no `.get()`, but if there was,\n     * we could assume it's the same value as what we passed.\n     *\n     * So for a WeakSet, if we try to add something that already exists\n     * we no-op.\n     *\n     * WeakSet already does this internally for us,\n     * but we want the ability for the reactive behavior to reflect the same behavior.\n     *\n     * i.e.: doing weakSet.add(value) should never dirty with the defaults\n     *       if the `value` is already in the weakSet\n     */\n    if (this.#vals.has(value)) {\n      /**\n       * This looks a little silly, where a always will === b,\n       * but see the note above.\n       */\n      let isUnchanged = this.#options.equals(value, value);\n      if (isUnchanged) return this;\n    }\n\n    // Add to vals first to get better error message\n    this.#vals.add(value);\n    this.#dirtyStorageFor(value);\n    return this;\n  }\n  delete(value) {\n    if (!this.#vals.has(value)) return true;\n    this.#dirtyStorageFor(value);\n    this.#storages.delete(value);\n    return this.#vals.delete(value);\n  }\n  get [Symbol.toStringTag]() {\n    return this.#vals[Symbol.toStringTag];\n  }\n}\n\n// So instanceof works\nObject.setPrototypeOf(TrackedWeakSet.prototype, WeakSet.prototype);\n\n/**\n * NOTE: we cannot pass a WeakSet because WeakSets are not iterable\n */\n/**\n * Creates an instanceof WeakSet from an optional list of entries\n *\n */\nfunction trackedWeakSet(data, options) {\n  return new TrackedWeakSet(data ?? [], {\n    equals: options?.equals ?? Object.is,\n    description: options?.description\n  });\n}\n\nfunction isObjectLike(u) {\n  return typeof u === 'object' && u !== null || typeof u === 'function';\n}\n\n///////////\n\nconst TRACKED_TAGS = new WeakMap();\nfunction dirtyTagFor(obj, key, meta) {\n  if (isDevelopingApp() && !isObjectLike(obj)) {\n    throw new Error(`BUG: Can't update a tag for a primitive`);\n  }\n  let tags = meta === undefined ? TRACKED_TAGS.get(obj) : meta;\n\n  // No tags have been setup for this object yet, return\n  if (tags === undefined) return;\n\n  // Dirty the tag for the specific property if it exists\n  let propertyTag = tags.get(key);\n  if (propertyTag !== undefined) {\n    if (isDevelopingApp()) {\n      unwrap(debug.assertTagNotConsumed)(propertyTag, obj, key);\n    }\n    DIRTY_TAG(propertyTag, true);\n  }\n}\nfunction tagMetaFor(obj) {\n  let tags = TRACKED_TAGS.get(obj);\n  if (tags === undefined) {\n    tags = new Map();\n    TRACKED_TAGS.set(obj, tags);\n  }\n  return tags;\n}\nfunction tagFor(obj, key, meta) {\n  let tags = meta === undefined ? tagMetaFor(obj) : meta;\n  let tag = tags.get(key);\n  if (tag === undefined) {\n    tag = createUpdatableTag();\n    tags.set(key, tag);\n  }\n  return tag;\n}\n\nfunction trackedData(key, initializer) {\n  let values = new WeakMap();\n  let hasInitializer = typeof initializer === 'function';\n  function getter(self) {\n    consumeTag(tagFor(self, key));\n    let value;\n\n    // If the field has never been initialized, we should initialize it\n    if (hasInitializer && !values.has(self)) {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      value = initializer.call(self);\n      values.set(self, value);\n    } else {\n      value = values.get(self);\n    }\n    return value;\n  }\n  function setter(self, value) {\n    dirtyTagFor(self, key);\n    values.set(self, value);\n  }\n  return {\n    getter,\n    setter\n  };\n}\n\nconst GLIMMER_VALIDATOR_REGISTRATION = Symbol('GLIMMER_VALIDATOR_REGISTRATION');\nif (Reflect.has(globalThis, GLIMMER_VALIDATOR_REGISTRATION)) {\n  throw new Error('The `@glimmer/validator` library has been included twice in this application. It could be different versions of the package, or the same version included twice by mistake. `@glimmer/validator` depends on having a single copy of the package in use at any time in an application, even if they are the same version. You must dedupe your build to remove the duplicate packages in order to prevent this error.');\n}\nReflect.set(globalThis, GLIMMER_VALIDATOR_REGISTRATION, true);\n\nexport { ALLOW_CYCLES, COMPUTE, CONSTANT, CONSTANT_TAG, CURRENT_TAG, CurrentTag, INITIAL, VOLATILE, VOLATILE_TAG, VolatileTag, beginTrackFrame, beginUntrackFrame, bump, combine, consumeTag, createCache, createTag, createUpdatableTag, debug, DIRTY_TAG as dirtyTag, dirtyTagFor, endTrackFrame, endUntrackFrame, getValue, isConst, isConstTag, isTracking, resetTracking, tagFor, tagMetaFor, track, trackedArray, trackedData, trackedMap, trackedObject, trackedSet, trackedWeakMap, trackedWeakSet, untrack, UPDATE_TAG as updateTag, validateTag, valueForTag };\n","export { A as ARG_SHIFT, I as InternalComponentCapabilities, I as InternalComponentCapability, a as MACHINE_MASK, M as MAX_SIZE, O as OPERAND_LEN_MASK, b as TYPE_MASK, T as TYPE_SIZE } from '../../shared-chunks/flags-BsZlvEeR.js';\nexport { c as $fp, a as $pc, b as $ra, $ as $s0, h as $s1, d as $sp, g as $t0, f as $t1, e as $v0, i as isLowLevelRegister } from '../../shared-chunks/registers-ylirb0dq.js';\n\nconst ContentType = {\n  Component: 0,\n  Helper: 1,\n  String: 2,\n  Empty: 3,\n  SafeString: 4,\n  Fragment: 5,\n  Node: 6,\n  Other: 8\n};\n\nexport { ContentType };\n","const opcodes = {\n  Append: 1,\n  TrustingAppend: 2,\n  Comment: 3,\n  Modifier: 4,\n  StrictModifier: 5,\n  Block: 6,\n  StrictBlock: 7,\n  Component: 8,\n  OpenElement: 10,\n  OpenElementWithSplat: 11,\n  FlushElement: 12,\n  CloseElement: 13,\n  StaticAttr: 14,\n  DynamicAttr: 15,\n  ComponentAttr: 16,\n  AttrSplat: 17,\n  Yield: 18,\n  DynamicArg: 20,\n  StaticArg: 21,\n  TrustingDynamicAttr: 22,\n  TrustingComponentAttr: 23,\n  StaticComponentAttr: 24,\n  Debugger: 26,\n  Undefined: 27,\n  Call: 28,\n  Concat: 29,\n  GetSymbol: 30,\n  GetLexicalSymbol: 32,\n  GetStrictKeyword: 31,\n  GetFreeAsComponentOrHelperHead: 35,\n  GetFreeAsHelperHead: 37,\n  GetFreeAsModifierHead: 38,\n  GetFreeAsComponentHead: 39,\n  InElement: 40,\n  If: 41,\n  Each: 42,\n  Let: 44,\n  WithDynamicVars: 45,\n  InvokeComponent: 46,\n  HasBlock: 48,\n  HasBlockParams: 49,\n  Curry: 50,\n  Not: 51,\n  IfInline: 52,\n  GetDynamicVar: 53,\n  Log: 54\n};\n\nconst resolution = {\n  Strict: 0,\n  ResolveAsComponentOrHelperHead: 1,\n  ResolveAsHelperHead: 5,\n  ResolveAsModifierHead: 6,\n  ResolveAsComponentHead: 7\n};\n\nconst WellKnownAttrNames = {\n  class: 0,\n  id: 1,\n  value: 2,\n  name: 3,\n  type: 4,\n  style: 5,\n  href: 6\n};\nconst WellKnownTagNames = {\n  div: 0,\n  span: 1,\n  p: 2,\n  a: 3\n};\n\nfunction is(variant) {\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  return function (value) {\n    return Array.isArray(value) && value[0] === variant;\n  };\n}\n\n// Statements\nconst isFlushElement = is(opcodes.FlushElement);\nfunction isAttribute(val) {\n  return val[0] === opcodes.StaticAttr || val[0] === opcodes.DynamicAttr || val[0] === opcodes.TrustingDynamicAttr || val[0] === opcodes.ComponentAttr || val[0] === opcodes.StaticComponentAttr || val[0] === opcodes.TrustingComponentAttr || val[0] === opcodes.AttrSplat || val[0] === opcodes.Modifier;\n}\nfunction isStringLiteral(expr) {\n  return typeof expr === 'string';\n}\nfunction getStringFromValue(expr) {\n  return expr;\n}\nfunction isArgument(val) {\n  return val[0] === opcodes.StaticArg || val[0] === opcodes.DynamicArg;\n}\nfunction isHelper(expr) {\n  return Array.isArray(expr) && expr[0] === opcodes.Call;\n}\n\n// Expressions\nconst isGet = is(opcodes.GetSymbol);\n\nexport { opcodes as SexpOpcodes, resolution as VariableResolutionContext, WellKnownAttrNames, WellKnownTagNames, getStringFromValue, is, isArgument, isAttribute, isFlushElement, isGet, isHelper, isStringLiteral };\n","const EMPTY_ATTRS = [];\nfunction indexOfAttribute(attributes, namespaceURI, localName) {\n  for (let i = 0; i < attributes.length; i++) {\n    const attr = attributes[i];\n    if (attr.namespaceURI === namespaceURI && attr.localName === localName) {\n      return i;\n    }\n  }\n  return -1;\n}\nfunction adjustAttrName(namespaceURI, localName) {\n  return namespaceURI === \"http://www.w3.org/1999/xhtml\" /* HTML */ ? localName.toLowerCase() : localName;\n}\nfunction getAttribute(attributes, namespaceURI, localName) {\n  const index = indexOfAttribute(attributes, namespaceURI, localName);\n  return index === -1 ? null : attributes[index].value;\n}\nfunction removeAttribute(attributes, namespaceURI, localName) {\n  const index = indexOfAttribute(attributes, namespaceURI, localName);\n  if (index !== -1) {\n    attributes.splice(index, 1);\n  }\n}\n// https://dom.spec.whatwg.org/#dom-element-setattributens\nfunction setAttribute(element, namespaceURI, prefix, localName, value) {\n  if (typeof value !== 'string') {\n    value = '' + value;\n  }\n  let {\n    attributes\n  } = element;\n  if (attributes === EMPTY_ATTRS) {\n    attributes = element.attributes = [];\n  } else {\n    const index = indexOfAttribute(attributes, namespaceURI, localName);\n    if (index !== -1) {\n      attributes[index].value = value;\n      return;\n    }\n  }\n  attributes.push({\n    localName,\n    name: prefix === null ? localName : prefix + ':' + localName,\n    namespaceURI,\n    prefix,\n    specified: true,\n    value\n  });\n}\nclass ChildNodes {\n  constructor(node) {\n    this.node = node;\n    this.stale = true;\n    this._length = 0;\n  }\n  get length() {\n    if (this.stale) {\n      this.stale = false;\n      let len = 0;\n      let child = this.node.firstChild;\n      for (; child !== null; len++) {\n        this[len] = child;\n        child = child.nextSibling;\n      }\n      const oldLen = this._length;\n      this._length = len;\n      for (; len < oldLen; len++) {\n        delete this[len];\n      }\n    }\n    return this._length;\n  }\n  item(index) {\n    return index < this.length ? this[index] : null;\n  }\n}\nfunction cloneNode(node, deep) {\n  const clone = nodeFrom(node);\n  if (deep) {\n    let child = node.firstChild;\n    let nextChild = child;\n    while (child !== null) {\n      nextChild = child.nextSibling;\n      clone.appendChild(child.cloneNode(true));\n      child = nextChild;\n    }\n  }\n  return clone;\n}\nfunction nodeFrom(node) {\n  let namespaceURI;\n  if (node.nodeType === 1 /* ELEMENT_NODE */) {\n    namespaceURI = node.namespaceURI;\n  }\n  const clone = new SimpleNodeImpl(node.ownerDocument, node.nodeType, node.nodeName, node.nodeValue, namespaceURI);\n  if (node.nodeType === 1 /* ELEMENT_NODE */) {\n    clone.attributes = copyAttrs(node.attributes);\n  }\n  return clone;\n}\nfunction copyAttrs(attrs) {\n  if (attrs === EMPTY_ATTRS) {\n    return EMPTY_ATTRS;\n  }\n  const copy = [];\n  for (let i = 0; i < attrs.length; i++) {\n    const attr = attrs[i];\n    copy.push({\n      localName: attr.localName,\n      name: attr.name,\n      namespaceURI: attr.namespaceURI,\n      prefix: attr.prefix,\n      specified: true,\n      value: attr.value\n    });\n  }\n  return copy;\n}\nfunction insertBefore(parentNode, newChild, refChild) {\n  invalidate(parentNode);\n  insertBetween(parentNode, newChild, refChild === null ? parentNode.lastChild : refChild.previousSibling, refChild);\n}\nfunction removeChild(parentNode, oldChild) {\n  invalidate(parentNode);\n  removeBetween(parentNode, oldChild, oldChild.previousSibling, oldChild.nextSibling);\n}\nfunction invalidate(parentNode) {\n  const childNodes = parentNode._childNodes;\n  if (childNodes !== undefined) {\n    childNodes.stale = true;\n  }\n}\nfunction insertBetween(parentNode, newChild, previousSibling, nextSibling) {\n  if (newChild.nodeType === 11 /* DOCUMENT_FRAGMENT_NODE */) {\n    insertFragment(newChild, parentNode, previousSibling, nextSibling);\n    return;\n  }\n  if (newChild.parentNode !== null) {\n    removeChild(newChild.parentNode, newChild);\n  }\n  newChild.parentNode = parentNode;\n  newChild.previousSibling = previousSibling;\n  newChild.nextSibling = nextSibling;\n  if (previousSibling === null) {\n    parentNode.firstChild = newChild;\n  } else {\n    previousSibling.nextSibling = newChild;\n  }\n  if (nextSibling === null) {\n    parentNode.lastChild = newChild;\n  } else {\n    nextSibling.previousSibling = newChild;\n  }\n}\nfunction removeBetween(parentNode, oldChild, previousSibling, nextSibling) {\n  oldChild.parentNode = null;\n  oldChild.previousSibling = null;\n  oldChild.nextSibling = null;\n  if (previousSibling === null) {\n    parentNode.firstChild = nextSibling;\n  } else {\n    previousSibling.nextSibling = nextSibling;\n  }\n  if (nextSibling === null) {\n    parentNode.lastChild = previousSibling;\n  } else {\n    nextSibling.previousSibling = previousSibling;\n  }\n}\nfunction insertFragment(fragment, parentNode, previousSibling, nextSibling) {\n  const firstChild = fragment.firstChild;\n  if (firstChild === null) {\n    return;\n  }\n  fragment.firstChild = null;\n  fragment.lastChild = null;\n  let lastChild = firstChild;\n  let newChild = firstChild;\n  firstChild.previousSibling = previousSibling;\n  if (previousSibling === null) {\n    parentNode.firstChild = firstChild;\n  } else {\n    previousSibling.nextSibling = firstChild;\n  }\n  while (newChild !== null) {\n    newChild.parentNode = parentNode;\n    lastChild = newChild;\n    newChild = newChild.nextSibling;\n  }\n  lastChild.nextSibling = nextSibling;\n  if (nextSibling === null) {\n    parentNode.lastChild = lastChild;\n  } else {\n    nextSibling.previousSibling = lastChild;\n  }\n}\nfunction parseQualifiedName(qualifiedName) {\n  let localName = qualifiedName;\n  let prefix = null;\n  const i = qualifiedName.indexOf(':');\n  if (i !== -1) {\n    prefix = qualifiedName.slice(0, i);\n    localName = qualifiedName.slice(i + 1);\n  }\n  return [prefix, localName];\n}\nclass SimpleNodeImpl {\n  constructor(ownerDocument, nodeType, nodeName, nodeValue, namespaceURI) {\n    this.ownerDocument = ownerDocument;\n    this.nodeType = nodeType;\n    this.nodeName = nodeName;\n    this.nodeValue = nodeValue;\n    this.namespaceURI = namespaceURI;\n    this.parentNode = null;\n    this.previousSibling = null;\n    this.nextSibling = null;\n    this.firstChild = null;\n    this.lastChild = null;\n    this.attributes = EMPTY_ATTRS;\n    /**\n     * @internal\n     */\n    this._childNodes = undefined;\n  }\n  get tagName() {\n    return this.nodeName;\n  }\n  get childNodes() {\n    let children = this._childNodes;\n    if (children === undefined) {\n      children = this._childNodes = new ChildNodes(this);\n    }\n    return children;\n  }\n  cloneNode(deep) {\n    return cloneNode(this, deep === true);\n  }\n  appendChild(newChild) {\n    insertBefore(this, newChild, null);\n    return newChild;\n  }\n  insertBefore(newChild, refChild) {\n    insertBefore(this, newChild, refChild);\n    return newChild;\n  }\n  removeChild(oldChild) {\n    removeChild(this, oldChild);\n    return oldChild;\n  }\n  insertAdjacentHTML(position, html) {\n    const raw = new SimpleNodeImpl(this.ownerDocument, -1 /* RAW_NODE */, '#raw', html, void 0);\n    let parentNode;\n    let nextSibling;\n    switch (position) {\n      case 'beforebegin':\n        parentNode = this.parentNode;\n        nextSibling = this;\n        break;\n      case 'afterbegin':\n        parentNode = this;\n        nextSibling = this.firstChild;\n        break;\n      case 'beforeend':\n        parentNode = this;\n        nextSibling = null;\n        break;\n      case 'afterend':\n        parentNode = this.parentNode;\n        nextSibling = this.nextSibling;\n        break;\n      default:\n        throw new Error('invalid position');\n    }\n    if (parentNode === null) {\n      throw new Error(`${position} requires a parentNode`);\n    }\n    insertBefore(parentNode, raw, nextSibling);\n  }\n  getAttribute(name) {\n    const localName = adjustAttrName(this.namespaceURI, name);\n    return getAttribute(this.attributes, null, localName);\n  }\n  getAttributeNS(namespaceURI, localName) {\n    return getAttribute(this.attributes, namespaceURI, localName);\n  }\n  setAttribute(name, value) {\n    const localName = adjustAttrName(this.namespaceURI, name);\n    setAttribute(this, null, null, localName, value);\n  }\n  setAttributeNS(namespaceURI, qualifiedName, value) {\n    const [prefix, localName] = parseQualifiedName(qualifiedName);\n    setAttribute(this, namespaceURI, prefix, localName, value);\n  }\n  removeAttribute(name) {\n    const localName = adjustAttrName(this.namespaceURI, name);\n    removeAttribute(this.attributes, null, localName);\n  }\n  removeAttributeNS(namespaceURI, localName) {\n    removeAttribute(this.attributes, namespaceURI, localName);\n  }\n  get doctype() {\n    return this.firstChild;\n  }\n  get documentElement() {\n    return this.lastChild;\n  }\n  get head() {\n    return this.documentElement.firstChild;\n  }\n  get body() {\n    return this.documentElement.lastChild;\n  }\n  createElement(name) {\n    return new SimpleNodeImpl(this, 1 /* ELEMENT_NODE */, name.toUpperCase(), null, \"http://www.w3.org/1999/xhtml\" /* HTML */);\n  }\n  createElementNS(namespace, qualifiedName) {\n    // Node name is case-preserving in XML contexts, but returns canonical uppercase form in HTML contexts\n    // https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-104682815\n    const nodeName = namespace === \"http://www.w3.org/1999/xhtml\" /* HTML */ ? qualifiedName.toUpperCase() : qualifiedName;\n    // we don't care to parse the qualified name because we only support HTML documents\n    // which don't support prefixed elements\n    return new SimpleNodeImpl(this, 1 /* ELEMENT_NODE */, nodeName, null, namespace);\n  }\n  createTextNode(text) {\n    return new SimpleNodeImpl(this, 3 /* TEXT_NODE */, '#text', text, void 0);\n  }\n  createComment(text) {\n    return new SimpleNodeImpl(this, 8 /* COMMENT_NODE */, '#comment', text, void 0);\n  }\n  /**\n   * Backwards compat\n   * @deprecated\n   */\n  createRawHTMLSection(text) {\n    return new SimpleNodeImpl(this, -1 /* RAW_NODE */, '#raw', text, void 0);\n  }\n  createDocumentFragment() {\n    return new SimpleNodeImpl(this, 11 /* DOCUMENT_FRAGMENT_NODE */, '#document-fragment', null, void 0);\n  }\n}\nfunction createHTMLDocument() {\n  // dom.d.ts types ownerDocument as Document but for a document ownerDocument is null\n  const document = new SimpleNodeImpl(null, 9 /* DOCUMENT_NODE */, '#document', null, \"http://www.w3.org/1999/xhtml\" /* HTML */);\n  const doctype = new SimpleNodeImpl(document, 10 /* DOCUMENT_TYPE_NODE */, 'html', null, \"http://www.w3.org/1999/xhtml\" /* HTML */);\n  const html = new SimpleNodeImpl(document, 1 /* ELEMENT_NODE */, 'HTML', null, \"http://www.w3.org/1999/xhtml\" /* HTML */);\n  const head = new SimpleNodeImpl(document, 1 /* ELEMENT_NODE */, 'HEAD', null, \"http://www.w3.org/1999/xhtml\" /* HTML */);\n  const body = new SimpleNodeImpl(document, 1 /* ELEMENT_NODE */, 'BODY', null, \"http://www.w3.org/1999/xhtml\" /* HTML */);\n  html.appendChild(head);\n  html.appendChild(body);\n  document.appendChild(doctype);\n  document.appendChild(html);\n  return document;\n}\n\nexport { createHTMLDocument as default };\n","const SET_TIMEOUT = setTimeout;\nconst NOOP = () => {};\nfunction buildNext(flush) {\n  // Using \"promises first\" here to:\n  //\n  // 1) Ensure more consistent experience on browsers that\n  //    have differently queued microtasks (separate queues for\n  //    MutationObserver vs Promises).\n  // 2) Ensure better debugging experiences (it shows up in Chrome\n  //    call stack as \"Promise.then (async)\") which is more consistent\n  //    with user expectations\n  //\n  // When Promise is unavailable use MutationObserver (mostly so that we\n  // still get microtasks on IE11), and when neither MutationObserver and\n  // Promise are present use a plain old setTimeout.\n  if (typeof Promise === 'function') {\n    const autorunPromise = Promise.resolve();\n    return () => autorunPromise.then(flush);\n  } else if (typeof MutationObserver === 'function') {\n    let iterations = 0;\n    let observer = new MutationObserver(flush);\n    let node = document.createTextNode('');\n    observer.observe(node, {\n      characterData: true\n    });\n    return () => {\n      iterations = ++iterations % 2;\n      node.data = '' + iterations;\n      return iterations;\n    };\n  } else {\n    return () => SET_TIMEOUT(flush, 0);\n  }\n}\nfunction buildPlatform(flush) {\n  let clearNext = NOOP;\n  return {\n    setTimeout(fn, ms) {\n      return setTimeout(fn, ms);\n    },\n    clearTimeout(timerId) {\n      return clearTimeout(timerId);\n    },\n    now() {\n      return Date.now();\n    },\n    next: buildNext(flush),\n    clearNext\n  };\n}\nconst NUMBER = /\\d+/;\nconst TIMERS_OFFSET = 6;\nfunction isCoercableNumber(suspect) {\n  let type = typeof suspect;\n  return type === 'number' && suspect === suspect || type === 'string' && NUMBER.test(suspect);\n}\nfunction getOnError(options) {\n  return options.onError || options.onErrorTarget && options.onErrorTarget[options.onErrorMethod];\n}\nfunction findItem(target, method, collection) {\n  let index = -1;\n  for (let i = 0, l = collection.length; i < l; i += 4) {\n    if (collection[i] === target && collection[i + 1] === method) {\n      index = i;\n      break;\n    }\n  }\n  return index;\n}\nfunction findTimerItem(target, method, collection) {\n  let index = -1;\n  for (let i = 2, l = collection.length; i < l; i += 6) {\n    if (collection[i] === target && collection[i + 1] === method) {\n      index = i - 2;\n      break;\n    }\n  }\n  return index;\n}\nfunction getQueueItems(items, queueItemLength, queueItemPositionOffset = 0) {\n  let queueItems = [];\n  for (let i = 0; i < items.length; i += queueItemLength) {\n    let maybeError = items[i + 3 /* stack */ + queueItemPositionOffset];\n    let queueItem = {\n      target: items[i + 0 /* target */ + queueItemPositionOffset],\n      method: items[i + 1 /* method */ + queueItemPositionOffset],\n      args: items[i + 2 /* args */ + queueItemPositionOffset],\n      stack: maybeError !== undefined && 'stack' in maybeError ? maybeError.stack : ''\n    };\n    queueItems.push(queueItem);\n  }\n  return queueItems;\n}\nfunction binarySearch(time, timers) {\n  let start = 0;\n  let end = timers.length - TIMERS_OFFSET;\n  let middle;\n  let l;\n  while (start < end) {\n    // since timers is an array of pairs 'l' will always\n    // be an integer\n    l = (end - start) / TIMERS_OFFSET;\n    // compensate for the index in case even number\n    // of pairs inside timers\n    middle = start + l - l % TIMERS_OFFSET;\n    if (time >= timers[middle]) {\n      start = middle + TIMERS_OFFSET;\n    } else {\n      end = middle;\n    }\n  }\n  return time >= timers[start] ? start + TIMERS_OFFSET : start;\n}\nconst QUEUE_ITEM_LENGTH = 4;\nclass Queue {\n  constructor(name, options = {}, globalOptions = {}) {\n    this._queueBeingFlushed = [];\n    this.targetQueues = new Map();\n    this.index = 0;\n    this._queue = [];\n    this.name = name;\n    this.options = options;\n    this.globalOptions = globalOptions;\n  }\n  stackFor(index) {\n    if (index < this._queue.length) {\n      let entry = this._queue[index * 3 + QUEUE_ITEM_LENGTH];\n      if (entry) {\n        return entry.stack;\n      } else {\n        return null;\n      }\n    }\n  }\n  flush(sync) {\n    let {\n      before,\n      after\n    } = this.options;\n    let target;\n    let method;\n    let args;\n    let errorRecordedForStack;\n    this.targetQueues.clear();\n    if (this._queueBeingFlushed.length === 0) {\n      this._queueBeingFlushed = this._queue;\n      this._queue = [];\n    }\n    if (before !== undefined) {\n      before();\n    }\n    let invoke;\n    let queueItems = this._queueBeingFlushed;\n    if (queueItems.length > 0) {\n      let onError = getOnError(this.globalOptions);\n      invoke = onError ? this.invokeWithOnError : this.invoke;\n      for (let i = this.index; i < queueItems.length; i += QUEUE_ITEM_LENGTH) {\n        this.index += QUEUE_ITEM_LENGTH;\n        method = queueItems[i + 1];\n        // method could have been nullified / canceled during flush\n        if (method !== null) {\n          //\n          //    ** Attention intrepid developer **\n          //\n          //    To find out the stack of this task when it was scheduled onto\n          //    the run loop, add the following to your app.js:\n          //\n          //    Ember.run.backburner.DEBUG = true; // NOTE: This slows your app, don't leave it on in production.\n          //\n          //    Once that is in place, when you are at a breakpoint and navigate\n          //    here in the stack explorer, you can look at `errorRecordedForStack.stack`,\n          //    which will be the captured stack when this job was scheduled.\n          //\n          //    One possible long-term solution is the following Chrome issue:\n          //       https://bugs.chromium.org/p/chromium/issues/detail?id=332624\n          //\n          target = queueItems[i];\n          args = queueItems[i + 2];\n          errorRecordedForStack = queueItems[i + 3]; // Debugging assistance\n          invoke(target, method, args, onError, errorRecordedForStack);\n        }\n        if (this.index !== this._queueBeingFlushed.length && this.globalOptions.mustYield && this.globalOptions.mustYield()) {\n          return 1 /* Pause */;\n        }\n      }\n    }\n    if (after !== undefined) {\n      after();\n    }\n    this._queueBeingFlushed.length = 0;\n    this.index = 0;\n    if (sync !== false && this._queue.length > 0) {\n      // check if new items have been added\n      this.flush(true);\n    }\n  }\n  hasWork() {\n    return this._queueBeingFlushed.length > 0 || this._queue.length > 0;\n  }\n  cancel({\n    target,\n    method\n  }) {\n    let queue = this._queue;\n    let targetQueueMap = this.targetQueues.get(target);\n    if (targetQueueMap !== undefined) {\n      targetQueueMap.delete(method);\n    }\n    let index = findItem(target, method, queue);\n    if (index > -1) {\n      queue[index + 1] = null;\n      return true;\n    }\n    // if not found in current queue\n    // could be in the queue that is being flushed\n    queue = this._queueBeingFlushed;\n    index = findItem(target, method, queue);\n    if (index > -1) {\n      queue[index + 1] = null;\n      return true;\n    }\n    return false;\n  }\n  push(target, method, args, stack) {\n    this._queue.push(target, method, args, stack);\n    return {\n      queue: this,\n      target,\n      method\n    };\n  }\n  pushUnique(target, method, args, stack) {\n    let localQueueMap = this.targetQueues.get(target);\n    if (localQueueMap === undefined) {\n      localQueueMap = new Map();\n      this.targetQueues.set(target, localQueueMap);\n    }\n    let index = localQueueMap.get(method);\n    if (index === undefined) {\n      let queueIndex = this._queue.push(target, method, args, stack) - QUEUE_ITEM_LENGTH;\n      localQueueMap.set(method, queueIndex);\n    } else {\n      let queue = this._queue;\n      queue[index + 2] = args; // replace args\n      queue[index + 3] = stack; // replace stack\n    }\n    return {\n      queue: this,\n      target,\n      method\n    };\n  }\n  _getDebugInfo(debugEnabled) {\n    if (debugEnabled) {\n      let debugInfo = getQueueItems(this._queue, QUEUE_ITEM_LENGTH);\n      return debugInfo;\n    }\n    return undefined;\n  }\n  invoke(target, method, args /*, onError, errorRecordedForStack */) {\n    if (args === undefined) {\n      method.call(target);\n    } else {\n      method.apply(target, args);\n    }\n  }\n  invokeWithOnError(target, method, args, onError, errorRecordedForStack) {\n    try {\n      if (args === undefined) {\n        method.call(target);\n      } else {\n        method.apply(target, args);\n      }\n    } catch (error) {\n      onError(error, errorRecordedForStack);\n    }\n  }\n}\nclass DeferredActionQueues {\n  constructor(queueNames = [], options) {\n    this.queues = {};\n    this.queueNameIndex = 0;\n    this.queueNames = queueNames;\n    queueNames.reduce(function (queues, queueName) {\n      queues[queueName] = new Queue(queueName, options[queueName], options);\n      return queues;\n    }, this.queues);\n  }\n  /**\n   * @method schedule\n   * @param {String} queueName\n   * @param {Any} target\n   * @param {Any} method\n   * @param {Any} args\n   * @param {Boolean} onceFlag\n   * @param {Any} stack\n   * @return queue\n   */\n  schedule(queueName, target, method, args, onceFlag, stack) {\n    let queues = this.queues;\n    let queue = queues[queueName];\n    if (queue === undefined) {\n      throw new Error(`You attempted to schedule an action in a queue (${queueName}) that doesn\\'t exist`);\n    }\n    if (method === undefined || method === null) {\n      throw new Error(`You attempted to schedule an action in a queue (${queueName}) for a method that doesn\\'t exist`);\n    }\n    this.queueNameIndex = 0;\n    if (onceFlag) {\n      return queue.pushUnique(target, method, args, stack);\n    } else {\n      return queue.push(target, method, args, stack);\n    }\n  }\n  /**\n   * DeferredActionQueues.flush() calls Queue.flush()\n   *\n   * @method flush\n   * @param {Boolean} fromAutorun\n   */\n  flush(fromAutorun = false) {\n    let queue;\n    let queueName;\n    let numberOfQueues = this.queueNames.length;\n    while (this.queueNameIndex < numberOfQueues) {\n      queueName = this.queueNames[this.queueNameIndex];\n      queue = this.queues[queueName];\n      if (queue.hasWork() === false) {\n        this.queueNameIndex++;\n        if (fromAutorun && this.queueNameIndex < numberOfQueues) {\n          return 1 /* Pause */;\n        }\n      } else {\n        if (queue.flush(false /* async */) === 1 /* Pause */) {\n          return 1 /* Pause */;\n        }\n      }\n    }\n  }\n  /**\n   * Returns debug information for the current queues.\n   *\n   * @method _getDebugInfo\n   * @param {Boolean} debugEnabled\n   * @returns {IDebugInfo | undefined}\n   */\n  _getDebugInfo(debugEnabled) {\n    if (debugEnabled) {\n      let debugInfo = {};\n      let queue;\n      let queueName;\n      let numberOfQueues = this.queueNames.length;\n      let i = 0;\n      while (i < numberOfQueues) {\n        queueName = this.queueNames[i];\n        queue = this.queues[queueName];\n        debugInfo[queueName] = queue._getDebugInfo(debugEnabled);\n        i++;\n      }\n      return debugInfo;\n    }\n    return;\n  }\n}\nfunction iteratorDrain(fn) {\n  let iterator = fn();\n  let result = iterator.next();\n  while (result.done === false) {\n    result.value();\n    result = iterator.next();\n  }\n}\nconst noop = function () {};\nconst DISABLE_SCHEDULE = Object.freeze([]);\nfunction parseArgs() {\n  let length = arguments.length;\n  let args;\n  let method;\n  let target;\n  if (length === 0) ;else if (length === 1) {\n    target = null;\n    method = arguments[0];\n  } else {\n    let argsIndex = 2;\n    let methodOrTarget = arguments[0];\n    let methodOrArgs = arguments[1];\n    let type = typeof methodOrArgs;\n    if (type === 'function') {\n      target = methodOrTarget;\n      method = methodOrArgs;\n    } else if (methodOrTarget !== null && type === 'string' && methodOrArgs in methodOrTarget) {\n      target = methodOrTarget;\n      method = target[methodOrArgs];\n    } else if (typeof methodOrTarget === 'function') {\n      argsIndex = 1;\n      target = null;\n      method = methodOrTarget;\n    }\n    if (length > argsIndex) {\n      let len = length - argsIndex;\n      args = new Array(len);\n      for (let i = 0; i < len; i++) {\n        args[i] = arguments[i + argsIndex];\n      }\n    }\n  }\n  return [target, method, args];\n}\nfunction parseTimerArgs() {\n  let [target, method, args] = parseArgs(...arguments);\n  let wait = 0;\n  let length = args !== undefined ? args.length : 0;\n  if (length > 0) {\n    let last = args[length - 1];\n    if (isCoercableNumber(last)) {\n      wait = parseInt(args.pop(), 10);\n    }\n  }\n  return [target, method, args, wait];\n}\nfunction parseDebounceArgs() {\n  let target;\n  let method;\n  let isImmediate;\n  let args;\n  let wait;\n  if (arguments.length === 2) {\n    method = arguments[0];\n    wait = arguments[1];\n    target = null;\n  } else {\n    [target, method, args] = parseArgs(...arguments);\n    if (args === undefined) {\n      wait = 0;\n    } else {\n      wait = args.pop();\n      if (!isCoercableNumber(wait)) {\n        isImmediate = wait === true;\n        wait = args.pop();\n      }\n    }\n  }\n  wait = parseInt(wait, 10);\n  return [target, method, args, wait, isImmediate];\n}\nlet UUID = 0;\nlet beginCount = 0;\nlet endCount = 0;\nlet beginEventCount = 0;\nlet endEventCount = 0;\nlet runCount = 0;\nlet joinCount = 0;\nlet deferCount = 0;\nlet scheduleCount = 0;\nlet scheduleIterableCount = 0;\nlet deferOnceCount = 0;\nlet scheduleOnceCount = 0;\nlet setTimeoutCount = 0;\nlet laterCount = 0;\nlet throttleCount = 0;\nlet debounceCount = 0;\nlet cancelTimersCount = 0;\nlet cancelCount = 0;\nlet autorunsCreatedCount = 0;\nlet autorunsCompletedCount = 0;\nlet deferredActionQueuesCreatedCount = 0;\nlet nestedDeferredActionQueuesCreated = 0;\nclass Backburner {\n  constructor(queueNames, options) {\n    this.DEBUG = false;\n    this.currentInstance = null;\n    this.instanceStack = [];\n    this._eventCallbacks = {\n      end: [],\n      begin: []\n    };\n    this._timerTimeoutId = null;\n    this._timers = [];\n    this._autorun = false;\n    this._autorunStack = null;\n    this.queueNames = queueNames;\n    this.options = options || {};\n    if (typeof this.options.defaultQueue === 'string') {\n      this._defaultQueue = this.options.defaultQueue;\n    } else {\n      this._defaultQueue = this.queueNames[0];\n    }\n    this._onBegin = this.options.onBegin || noop;\n    this._onEnd = this.options.onEnd || noop;\n    this._boundRunExpiredTimers = this._runExpiredTimers.bind(this);\n    this._boundAutorunEnd = () => {\n      autorunsCompletedCount++;\n      // if the autorun was already flushed, do nothing\n      if (this._autorun === false) {\n        return;\n      }\n      this._autorun = false;\n      this._autorunStack = null;\n      this._end(true /* fromAutorun */);\n    };\n    let builder = this.options._buildPlatform || buildPlatform;\n    this._platform = builder(this._boundAutorunEnd);\n  }\n  get counters() {\n    return {\n      begin: beginCount,\n      end: endCount,\n      events: {\n        begin: beginEventCount,\n        end: endEventCount\n      },\n      autoruns: {\n        created: autorunsCreatedCount,\n        completed: autorunsCompletedCount\n      },\n      run: runCount,\n      join: joinCount,\n      defer: deferCount,\n      schedule: scheduleCount,\n      scheduleIterable: scheduleIterableCount,\n      deferOnce: deferOnceCount,\n      scheduleOnce: scheduleOnceCount,\n      setTimeout: setTimeoutCount,\n      later: laterCount,\n      throttle: throttleCount,\n      debounce: debounceCount,\n      cancelTimers: cancelTimersCount,\n      cancel: cancelCount,\n      loops: {\n        total: deferredActionQueuesCreatedCount,\n        nested: nestedDeferredActionQueuesCreated\n      }\n    };\n  }\n  get defaultQueue() {\n    return this._defaultQueue;\n  }\n  /*\n    @method begin\n    @return instantiated class DeferredActionQueues\n  */\n  begin() {\n    beginCount++;\n    let options = this.options;\n    let previousInstance = this.currentInstance;\n    let current;\n    if (this._autorun !== false) {\n      current = previousInstance;\n      this._cancelAutorun();\n    } else {\n      if (previousInstance !== null) {\n        nestedDeferredActionQueuesCreated++;\n        this.instanceStack.push(previousInstance);\n      }\n      deferredActionQueuesCreatedCount++;\n      current = this.currentInstance = new DeferredActionQueues(this.queueNames, options);\n      beginEventCount++;\n      this._trigger('begin', current, previousInstance);\n    }\n    this._onBegin(current, previousInstance);\n    return current;\n  }\n  end() {\n    endCount++;\n    this._end(false);\n  }\n  on(eventName, callback) {\n    if (typeof callback !== 'function') {\n      throw new TypeError(`Callback must be a function`);\n    }\n    let callbacks = this._eventCallbacks[eventName];\n    if (callbacks !== undefined) {\n      callbacks.push(callback);\n    } else {\n      throw new TypeError(`Cannot on() event ${eventName} because it does not exist`);\n    }\n  }\n  off(eventName, callback) {\n    let callbacks = this._eventCallbacks[eventName];\n    if (!eventName || callbacks === undefined) {\n      throw new TypeError(`Cannot off() event ${eventName} because it does not exist`);\n    }\n    let callbackFound = false;\n    if (callback) {\n      for (let i = 0; i < callbacks.length; i++) {\n        if (callbacks[i] === callback) {\n          callbackFound = true;\n          callbacks.splice(i, 1);\n          i--;\n        }\n      }\n    }\n    if (!callbackFound) {\n      throw new TypeError(`Cannot off() callback that does not exist`);\n    }\n  }\n  run() {\n    runCount++;\n    let [target, method, args] = parseArgs(...arguments);\n    return this._run(target, method, args);\n  }\n  join() {\n    joinCount++;\n    let [target, method, args] = parseArgs(...arguments);\n    return this._join(target, method, args);\n  }\n  /**\n   * @deprecated please use schedule instead.\n   */\n  defer(queueName, target, method, ...args) {\n    deferCount++;\n    return this.schedule(queueName, target, method, ...args);\n  }\n  schedule(queueName, ..._args) {\n    scheduleCount++;\n    let [target, method, args] = parseArgs(..._args);\n    let stack = this.DEBUG ? new Error() : undefined;\n    return this._ensureInstance().schedule(queueName, target, method, args, false, stack);\n  }\n  /*\n    Defer the passed iterable of functions to run inside the specified queue.\n       @method scheduleIterable\n    @param {String} queueName\n    @param {Iterable} an iterable of functions to execute\n    @return method result\n  */\n  scheduleIterable(queueName, iterable) {\n    scheduleIterableCount++;\n    let stack = this.DEBUG ? new Error() : undefined;\n    return this._ensureInstance().schedule(queueName, null, iteratorDrain, [iterable], false, stack);\n  }\n  /**\n   * @deprecated please use scheduleOnce instead.\n   */\n  deferOnce(queueName, target, method, ...args) {\n    deferOnceCount++;\n    return this.scheduleOnce(queueName, target, method, ...args);\n  }\n  scheduleOnce(queueName, ..._args) {\n    scheduleOnceCount++;\n    let [target, method, args] = parseArgs(..._args);\n    let stack = this.DEBUG ? new Error() : undefined;\n    return this._ensureInstance().schedule(queueName, target, method, args, true, stack);\n  }\n  setTimeout() {\n    setTimeoutCount++;\n    return this.later(...arguments);\n  }\n  later() {\n    laterCount++;\n    let [target, method, args, wait] = parseTimerArgs(...arguments);\n    return this._later(target, method, args, wait);\n  }\n  throttle() {\n    throttleCount++;\n    let [target, method, args, wait, isImmediate = true] = parseDebounceArgs(...arguments);\n    let index = findTimerItem(target, method, this._timers);\n    let timerId;\n    if (index === -1) {\n      timerId = this._later(target, method, isImmediate ? DISABLE_SCHEDULE : args, wait);\n      if (isImmediate) {\n        this._join(target, method, args);\n      }\n    } else {\n      timerId = this._timers[index + 1];\n      let argIndex = index + 4;\n      if (this._timers[argIndex] !== DISABLE_SCHEDULE) {\n        this._timers[argIndex] = args;\n      }\n    }\n    return timerId;\n  }\n  debounce() {\n    debounceCount++;\n    let [target, method, args, wait, isImmediate = false] = parseDebounceArgs(...arguments);\n    let _timers = this._timers;\n    let index = findTimerItem(target, method, _timers);\n    let timerId;\n    if (index === -1) {\n      timerId = this._later(target, method, isImmediate ? DISABLE_SCHEDULE : args, wait);\n      if (isImmediate) {\n        this._join(target, method, args);\n      }\n    } else {\n      let executeAt = this._platform.now() + wait;\n      let argIndex = index + 4;\n      if (_timers[argIndex] === DISABLE_SCHEDULE) {\n        args = DISABLE_SCHEDULE;\n      }\n      timerId = _timers[index + 1];\n      let i = binarySearch(executeAt, _timers);\n      if (index + TIMERS_OFFSET === i) {\n        _timers[index] = executeAt;\n        _timers[argIndex] = args;\n      } else {\n        let stack = this._timers[index + 5];\n        this._timers.splice(i, 0, executeAt, timerId, target, method, args, stack);\n        this._timers.splice(index, TIMERS_OFFSET);\n      }\n      if (index === 0) {\n        this._reinstallTimerTimeout();\n      }\n    }\n    return timerId;\n  }\n  cancelTimers() {\n    cancelTimersCount++;\n    this._clearTimerTimeout();\n    this._timers = [];\n    this._cancelAutorun();\n  }\n  hasTimers() {\n    return this._timers.length > 0 || this._autorun;\n  }\n  cancel(timer) {\n    cancelCount++;\n    if (timer === null || timer === undefined) {\n      return false;\n    }\n    let timerType = typeof timer;\n    if (timerType === 'number') {\n      // we're cancelling a setTimeout or throttle or debounce\n      return this._cancelLaterTimer(timer);\n    } else if (timerType === 'object' && timer.queue && timer.method) {\n      // we're cancelling a deferOnce\n      return timer.queue.cancel(timer);\n    }\n    return false;\n  }\n  ensureInstance() {\n    this._ensureInstance();\n  }\n  /**\n   * Returns debug information related to the current instance of Backburner\n   *\n   * @method getDebugInfo\n   * @returns {Object | undefined} Will return and Object containing debug information if\n   * the DEBUG flag is set to true on the current instance of Backburner, else undefined.\n   */\n  getDebugInfo() {\n    if (this.DEBUG) {\n      return {\n        autorun: this._autorunStack,\n        counters: this.counters,\n        timers: getQueueItems(this._timers, TIMERS_OFFSET, 2),\n        instanceStack: [this.currentInstance, ...this.instanceStack].map(deferredActionQueue => deferredActionQueue && deferredActionQueue._getDebugInfo(this.DEBUG))\n      };\n    }\n    return undefined;\n  }\n  _end(fromAutorun) {\n    let currentInstance = this.currentInstance;\n    let nextInstance = null;\n    if (currentInstance === null) {\n      throw new Error(`end called without begin`);\n    }\n    // Prevent double-finally bug in Safari 6.0.2 and iOS 6\n    // This bug appears to be resolved in Safari 6.0.5 and iOS 7\n    let finallyAlreadyCalled = false;\n    let result;\n    try {\n      result = currentInstance.flush(fromAutorun);\n    } finally {\n      if (!finallyAlreadyCalled) {\n        finallyAlreadyCalled = true;\n        if (result === 1 /* Pause */) {\n          const plannedNextQueue = this.queueNames[currentInstance.queueNameIndex];\n          this._scheduleAutorun(plannedNextQueue);\n        } else {\n          this.currentInstance = null;\n          if (this.instanceStack.length > 0) {\n            nextInstance = this.instanceStack.pop();\n            this.currentInstance = nextInstance;\n          }\n          this._trigger('end', currentInstance, nextInstance);\n          this._onEnd(currentInstance, nextInstance);\n        }\n      }\n    }\n  }\n  _join(target, method, args) {\n    if (this.currentInstance === null) {\n      return this._run(target, method, args);\n    }\n    if (target === undefined && args === undefined) {\n      return method();\n    } else {\n      return method.apply(target, args);\n    }\n  }\n  _run(target, method, args) {\n    let onError = getOnError(this.options);\n    this.begin();\n    if (onError) {\n      try {\n        return method.apply(target, args);\n      } catch (error) {\n        onError(error);\n      } finally {\n        this.end();\n      }\n    } else {\n      try {\n        return method.apply(target, args);\n      } finally {\n        this.end();\n      }\n    }\n  }\n  _cancelAutorun() {\n    if (this._autorun) {\n      this._platform.clearNext();\n      this._autorun = false;\n      this._autorunStack = null;\n    }\n  }\n  _later(target, method, args, wait) {\n    let stack = this.DEBUG ? new Error() : undefined;\n    let executeAt = this._platform.now() + wait;\n    let id = UUID++;\n    if (this._timers.length === 0) {\n      this._timers.push(executeAt, id, target, method, args, stack);\n      this._installTimerTimeout();\n    } else {\n      // find position to insert\n      let i = binarySearch(executeAt, this._timers);\n      this._timers.splice(i, 0, executeAt, id, target, method, args, stack);\n      // always reinstall since it could be out of sync\n      this._reinstallTimerTimeout();\n    }\n    return id;\n  }\n  _cancelLaterTimer(timer) {\n    for (let i = 1; i < this._timers.length; i += TIMERS_OFFSET) {\n      if (this._timers[i] === timer) {\n        this._timers.splice(i - 1, TIMERS_OFFSET);\n        if (i === 1) {\n          this._reinstallTimerTimeout();\n        }\n        return true;\n      }\n    }\n    return false;\n  }\n  /**\n   Trigger an event. Supports up to two arguments. Designed around\n   triggering transition events from one run loop instance to the\n   next, which requires an argument for the  instance and then\n   an argument for the next instance.\n      @private\n   @method _trigger\n   @param {String} eventName\n   @param {any} arg1\n   @param {any} arg2\n   */\n  _trigger(eventName, arg1, arg2) {\n    let callbacks = this._eventCallbacks[eventName];\n    if (callbacks !== undefined) {\n      for (let i = 0; i < callbacks.length; i++) {\n        callbacks[i](arg1, arg2);\n      }\n    }\n  }\n  _runExpiredTimers() {\n    this._timerTimeoutId = null;\n    if (this._timers.length > 0) {\n      this.begin();\n      this._scheduleExpiredTimers();\n      this.end();\n    }\n  }\n  _scheduleExpiredTimers() {\n    let timers = this._timers;\n    let i = 0;\n    let l = timers.length;\n    let defaultQueue = this._defaultQueue;\n    let n = this._platform.now();\n    for (; i < l; i += TIMERS_OFFSET) {\n      let executeAt = timers[i];\n      if (executeAt > n) {\n        break;\n      }\n      let args = timers[i + 4];\n      if (args !== DISABLE_SCHEDULE) {\n        let target = timers[i + 2];\n        let method = timers[i + 3];\n        let stack = timers[i + 5];\n        this.currentInstance.schedule(defaultQueue, target, method, args, false, stack);\n      }\n    }\n    timers.splice(0, i);\n    this._installTimerTimeout();\n  }\n  _reinstallTimerTimeout() {\n    this._clearTimerTimeout();\n    this._installTimerTimeout();\n  }\n  _clearTimerTimeout() {\n    if (this._timerTimeoutId === null) {\n      return;\n    }\n    this._platform.clearTimeout(this._timerTimeoutId);\n    this._timerTimeoutId = null;\n  }\n  _installTimerTimeout() {\n    if (this._timers.length === 0) {\n      return;\n    }\n    let minExpiresAt = this._timers[0];\n    let n = this._platform.now();\n    let wait = Math.max(0, minExpiresAt - n);\n    this._timerTimeoutId = this._platform.setTimeout(this._boundRunExpiredTimers, wait);\n  }\n  _ensureInstance() {\n    let currentInstance = this.currentInstance;\n    if (currentInstance === null) {\n      this._autorunStack = this.DEBUG ? new Error() : undefined;\n      currentInstance = this.begin();\n      this._scheduleAutorun(this.queueNames[0]);\n    }\n    return currentInstance;\n  }\n  _scheduleAutorun(plannedNextQueue) {\n    autorunsCreatedCount++;\n    const next = this._platform.next;\n    const flush = this.options.flush;\n    if (flush) {\n      flush(plannedNextQueue, next);\n    } else {\n      next();\n    }\n    this._autorun = true;\n  }\n}\nBackburner.Queue = Queue;\nBackburner.buildPlatform = buildPlatform;\nBackburner.buildNext = buildNext;\n\nexport { buildPlatform, Backburner as default };\n","/**\n * A topologically ordered map of key/value pairs with a simple API for adding constraints.\n *\n * Edges can forward reference keys that have not been added yet (the forward reference will\n * map the key to undefined).\n */\nvar DAG = function () {\n  function DAG() {\n    this._vertices = new Vertices();\n  }\n  /**\n   * Adds a key/value pair with dependencies on other key/value pairs.\n   *\n   * @public\n   * @param key    The key of the vertex to be added.\n   * @param value  The value of that vertex.\n   * @param before A key or array of keys of the vertices that must\n   *               be visited before this vertex.\n   * @param after  An string or array of strings with the keys of the\n   *               vertices that must be after this vertex is visited.\n   */\n  DAG.prototype.add = function (key, value, before, after) {\n    if (!key) throw new Error('argument `key` is required');\n    var vertices = this._vertices;\n    var v = vertices.add(key);\n    v.val = value;\n    if (before) {\n      if (typeof before === \"string\") {\n        vertices.addEdge(v, vertices.add(before));\n      } else {\n        for (var i = 0; i < before.length; i++) {\n          vertices.addEdge(v, vertices.add(before[i]));\n        }\n      }\n    }\n    if (after) {\n      if (typeof after === \"string\") {\n        vertices.addEdge(vertices.add(after), v);\n      } else {\n        for (var i = 0; i < after.length; i++) {\n          vertices.addEdge(vertices.add(after[i]), v);\n        }\n      }\n    }\n  };\n  /**\n   * @deprecated please use add.\n   */\n  DAG.prototype.addEdges = function (key, value, before, after) {\n    this.add(key, value, before, after);\n  };\n  /**\n   * Visits key/value pairs in topological order.\n   *\n   * @public\n   * @param callback The function to be invoked with each key/value.\n   */\n  DAG.prototype.each = function (callback) {\n    this._vertices.walk(callback);\n  };\n  /**\n   * @deprecated please use each.\n   */\n  DAG.prototype.topsort = function (callback) {\n    this.each(callback);\n  };\n  return DAG;\n}();\n/** @private */\nvar Vertices = function () {\n  function Vertices() {\n    this.length = 0;\n    this.stack = new IntStack();\n    this.path = new IntStack();\n    this.result = new IntStack();\n  }\n  Vertices.prototype.add = function (key) {\n    if (!key) throw new Error(\"missing key\");\n    var l = this.length | 0;\n    var vertex;\n    for (var i = 0; i < l; i++) {\n      vertex = this[i];\n      if (vertex.key === key) return vertex;\n    }\n    this.length = l + 1;\n    return this[l] = {\n      idx: l,\n      key: key,\n      val: undefined,\n      out: false,\n      flag: false,\n      length: 0\n    };\n  };\n  Vertices.prototype.addEdge = function (v, w) {\n    this.check(v, w.key);\n    var l = w.length | 0;\n    for (var i = 0; i < l; i++) {\n      if (w[i] === v.idx) return;\n    }\n    w.length = l + 1;\n    w[l] = v.idx;\n    v.out = true;\n  };\n  Vertices.prototype.walk = function (cb) {\n    this.reset();\n    for (var i = 0; i < this.length; i++) {\n      var vertex = this[i];\n      if (vertex.out) continue;\n      this.visit(vertex, \"\");\n    }\n    this.each(this.result, cb);\n  };\n  Vertices.prototype.check = function (v, w) {\n    if (v.key === w) {\n      throw new Error(\"cycle detected: \" + w + \" <- \" + w);\n    }\n    // quick check\n    if (v.length === 0) return;\n    // shallow check\n    for (var i = 0; i < v.length; i++) {\n      var key = this[v[i]].key;\n      if (key === w) {\n        throw new Error(\"cycle detected: \" + w + \" <- \" + v.key + \" <- \" + w);\n      }\n    }\n    // deep check\n    this.reset();\n    this.visit(v, w);\n    if (this.path.length > 0) {\n      var msg_1 = \"cycle detected: \" + w;\n      this.each(this.path, function (key) {\n        msg_1 += \" <- \" + key;\n      });\n      throw new Error(msg_1);\n    }\n  };\n  Vertices.prototype.reset = function () {\n    this.stack.length = 0;\n    this.path.length = 0;\n    this.result.length = 0;\n    for (var i = 0, l = this.length; i < l; i++) {\n      this[i].flag = false;\n    }\n  };\n  Vertices.prototype.visit = function (start, search) {\n    var _a = this,\n      stack = _a.stack,\n      path = _a.path,\n      result = _a.result;\n    stack.push(start.idx);\n    while (stack.length) {\n      var index = stack.pop() | 0;\n      if (index >= 0) {\n        // enter\n        var vertex = this[index];\n        if (vertex.flag) continue;\n        vertex.flag = true;\n        path.push(index);\n        if (search === vertex.key) break;\n        // push exit\n        stack.push(~index);\n        this.pushIncoming(vertex);\n      } else {\n        // exit\n        path.pop();\n        result.push(~index);\n      }\n    }\n  };\n  Vertices.prototype.pushIncoming = function (incomming) {\n    var stack = this.stack;\n    for (var i = incomming.length - 1; i >= 0; i--) {\n      var index = incomming[i];\n      if (!this[index].flag) {\n        stack.push(index);\n      }\n    }\n  };\n  Vertices.prototype.each = function (indices, cb) {\n    for (var i = 0, l = indices.length; i < l; i++) {\n      var vertex = this[indices[i]];\n      cb(vertex.key, vertex.val);\n    }\n  };\n  return Vertices;\n}();\n/** @private */\nvar IntStack = function () {\n  function IntStack() {\n    this.length = 0;\n  }\n  IntStack.prototype.push = function (n) {\n    this[this.length++] = n | 0;\n  };\n  IntStack.prototype.pop = function () {\n    return this[--this.length] | 0;\n  };\n  return IntStack;\n}();\n\nexport { DAG as default };\n","import { g as getENV, s as setLookup, a as getLookup } from '../shared-chunks/env-DEd6hPbj.js';\nimport { G as GUID_KEY, a as generateGuid, g as guidFor, u as uuid, w as wrap } from '../shared-chunks/mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { c as canInvoke } from '../shared-chunks/invoke-BjRgvK2V.js';\nimport { C as Cache } from '../shared-chunks/cache-qDyqAcpg.js';\nimport { C as Container, R as Registry } from '../shared-chunks/registry-XY5cfmbH.js';\nimport { instrument, subscribe, reset, unsubscribe } from '../@ember/instrumentation/index.js';\nimport { meta } from '../@ember/-internals/meta/lib/meta.js';\nimport { y as nativeDescDecorator, _ as _getPath, s as setClassicDecorator, S as tracked, l as beginPropertyChanges, T as changeProperties, m as endPropertyChanges, v as hasListeners, O as LIBRARIES, U as isComputed, c as computed, d as defineProperty, g as get, n as notifyPropertyChange, C as ComputedProperty, e as expandProperties, N as on, F as addListener, G as removeListener, k as sendEvent, x as addObserver, w as removeObserver } from '../shared-chunks/observers-DhgQ6ba5.js';\nimport { g as getCachedValueFor } from '../shared-chunks/computed_cache-DmYKevAP.js';\nimport { warn, debug, deprecate, deprecateFunc, runInDebug } from '../@ember/debug/index.js';\nimport { createCache, getValue, isConst } from '../@glimmer/validator/index.js';\nimport { assertDestroyablesDestroyed, associateDestroyableChild, enableDestroyableTracking, isDestroying, isDestroyed, destroy } from '../@glimmer/destroyable/index.js';\nimport '../shared-chunks/debug-to-string-BsFOvUtQ.js';\nimport '../@glimmer/global-context/index.js';\nimport { i as helperCapabilities } from '../shared-chunks/api-CkUl6KyJ.js';\nimport '../shared-chunks/capabilities-DHiXCCuB.js';\nimport { c as componentCapabilities, m as modifierCapabilities, b as setHelperManager, d as setModifierManager } from '../shared-chunks/api-1B_9SjFR.js';\nimport { g as getComponentTemplate, s as setComponentTemplate } from '../shared-chunks/template-CMHIG4cn.js';\nimport '../shared-chunks/reference-B6HMX4y0.js';\nimport { s as set, t as trySet } from '../shared-chunks/property_set-DrZnfGQ7.js';\nimport { g as getProperties, s as setProperties } from '../shared-chunks/set_properties-Dag9Xz6u.js';\nimport { e as setSearchDisabled, i as isSearchDisabled } from '../shared-chunks/namespace_search-ClQOZuFA.js';\nimport { FEATURES, isEnabled } from '../@ember/canary-features/index.js';\nimport Backburner from '../backburner.js/index.js';\nimport Controller, { ControllerMixin, inject } from '../@ember/controller/index.js';\nimport Service, { service } from '../@ember/service/index.js';\nimport EmberObject, { action, observer } from '../@ember/object/index.js';\nimport '../@ember/object/-internals.js';\nimport { dependentKeyCompat } from '../@ember/object/compat.js';\nimport isNone from '../@ember/utils/lib/is_none.js';\nimport isBlank from '../@ember/utils/lib/is_blank.js';\nimport isEmpty from '../@ember/utils/lib/is_empty.js';\nimport isPresent from '../@ember/utils/lib/is_present.js';\nimport isEqual from '../@ember/utils/lib/is-equal.js';\nimport typeOf from '../@ember/utils/lib/type-of.js';\nimport compare from '../@ember/utils/lib/compare.js';\nimport EmberArray, { A, NativeArray, isArray, MutableArray } from '../@ember/array/index.js';\nimport RegistryProxyMixin from '../@ember/-internals/runtime/lib/mixins/registry_proxy.js';\nimport ContainerProxyMixin from '../@ember/-internals/runtime/lib/mixins/container_proxy.js';\nimport Comparable from '../@ember/-internals/runtime/lib/mixins/comparable.js';\nimport ActionHandler from '../@ember/-internals/runtime/lib/mixins/action_handler.js';\nimport ProxyMixin from '../@ember/-internals/runtime/lib/mixins/-proxy.js';\nimport MutableEnumerable from '../@ember/enumerable/mutable.js';\nimport '../@ember/-internals/runtime/lib/mixins/target_action_support.js';\nimport '../@ember/-internals/runtime/lib/ext/rsvp.js';\nimport { t as templateFactory } from '../shared-chunks/index-CQkjwqTv.js';\nimport { I as Input, C as Component, H as Helper } from '../shared-chunks/index-ByyoGpfz.js';\nimport { b as setTemplates, a as getTemplates } from '../shared-chunks/template_registry-DigcUg9m.js';\nimport { t as templateOnlyComponent, i as invokeHelper, h as hash, a as array, c as concat, g as get$1, o as on$1, f as fn } from '../shared-chunks/dynamic-CuBsUXX8.js';\nimport '../shared-chunks/constants-oDhF27qL.js';\nimport { isSerializationFirstNode } from '../@glimmer/runtime/index.js';\nimport { run } from '../@ember/runloop/index.js';\nimport { setComponentManager } from '../@ember/component/index.js';\nimport Version from './version.js';\nimport { isSimpleClick, getViewElement, getViewClientRects, getViewBoundingClientRect, getViewBounds, getRootViews, getElementView, getChildViews } from '../@ember/-internals/views/lib/system/utils.js';\nimport EventDispatcher from '../@ember/-internals/views/lib/system/event_dispatcher.js';\nimport ComponentLookup from '../@ember/-internals/views/lib/component_lookup.js';\nimport '../@ember/-internals/views/lib/views/core_view.js';\nimport '../@ember/-internals/views/lib/mixins/action_support.js';\nimport '../@ember/-internals/views/lib/views/states.js';\nimport ContainerDebugAdapter from '../@ember/debug/container-debug-adapter.js';\nimport DataAdapter from '../@ember/debug/data-adapter.js';\nimport { setOnerror, getOnerror } from '../@ember/-internals/error-handling/index.js';\nimport ArrayProxy from '../@ember/array/proxy.js';\nimport Application, { getOwner, setOwner } from '../@ember/application/index.js';\nimport ApplicationInstance from '../@ember/application/instance.js';\nimport Namespace from '../@ember/application/namespace.js';\nimport Engine from '../@ember/engine/index.js';\nimport EngineInstance from '../@ember/engine/instance.js';\nimport Enumerable from '../@ember/enumerable/index.js';\nimport CoreObject from '../@ember/object/core.js';\nimport Evented from '../@ember/object/evented.js';\nimport Mixin, { mixin } from '../@ember/object/mixin.js';\nimport Observable from '../@ember/object/observable.js';\nimport ObjectProxy from '../@ember/object/proxy.js';\nimport PromiseProxyMixin from '../@ember/object/promise-proxy-mixin.js';\nimport HashLocation from '../@ember/routing/hash-location.js';\nimport HistoryLocation from '../@ember/routing/history-location.js';\nimport NoneLocation from '../@ember/routing/none-location.js';\nimport Route from '../@ember/routing/route.js';\nimport EmberRouter from '../@ember/routing/router.js';\nimport '../route-recognizer/index.js';\nimport { R as RSVP } from '../shared-chunks/rsvp-CnCSY930.js';\nimport '../shared-chunks/unrecognized-url-error-BBMMZhBN.js';\nimport '../@ember/routing/lib/routing-service.js';\nimport generateController, { generateControllerFactory } from '../@ember/routing/lib/generate_controller.js';\nimport DSLImpl from '../@ember/routing/lib/dsl.js';\nimport controllerFor from '../@ember/routing/lib/controller_for.js';\nimport { registerDestructor, unregisterDestructor } from '../@ember/destroyable/index.js';\nimport { _impl } from '../@ember/test/index.js';\nimport { __emberTemplateCompiler, compileTemplate } from '../@ember/template-compilation/index.js';\nimport { onLoad, runLoadHooks } from '../@ember/application/lib/lazy_load.js';\nimport makeArray from '../@ember/array/lib/make-array.js';\nimport captureRenderTree from '../@ember/debug/lib/capture-render-tree.js';\nimport { assert } from '../@ember/debug/lib/assert.js';\nimport inspect from '../@ember/debug/lib/inspect.js';\nimport { registerHandler } from '../@ember/debug/lib/warn.js';\nimport { registerHandler as registerHandler$1 } from '../@ember/debug/lib/deprecate.js';\nimport { setTesting, isTesting } from '../@ember/debug/lib/testing.js';\n\n/**\n@module ember\n*/\n\nlet Ember;\n(function (_Ember) {\n  _Ember.isNamespace = true;\n  function toString() {\n    return 'Ember';\n  }\n  _Ember.toString = toString;\n  _Ember.Container = Container;\n  _Ember.Registry = Registry;\n  // ****@ember/-internals/glimmer****\n  // Partially re-exported from @glimmer/manager\n  _Ember._setComponentManager = setComponentManager;\n  _Ember._componentManagerCapabilities = componentCapabilities;\n  _Ember._modifierManagerCapabilities = modifierCapabilities;\n  _Ember.meta = meta;\n  _Ember._createCache = createCache;\n  _Ember._cacheGetValue = getValue;\n  _Ember._cacheIsConst = isConst;\n  _Ember._descriptor = nativeDescDecorator;\n  _Ember._getPath = _getPath;\n  _Ember._setClassicDecorator = setClassicDecorator;\n  _Ember._tracked = tracked;\n  _Ember.beginPropertyChanges = beginPropertyChanges;\n  _Ember.changeProperties = changeProperties;\n  _Ember.endPropertyChanges = endPropertyChanges;\n  _Ember.hasListeners = hasListeners;\n  _Ember.libraries = LIBRARIES;\n  _Ember._ContainerProxyMixin = ContainerProxyMixin;\n  _Ember._ProxyMixin = ProxyMixin;\n  _Ember._RegistryProxyMixin = RegistryProxyMixin;\n  _Ember.ActionHandler = ActionHandler;\n  _Ember.Comparable = Comparable;\n  // ****@ember/-internals/view****\n  _Ember.ComponentLookup = ComponentLookup;\n  _Ember.EventDispatcher = EventDispatcher;\n  _Ember._Cache = Cache;\n  _Ember.GUID_KEY = GUID_KEY;\n  _Ember.canInvoke = canInvoke;\n  _Ember.generateGuid = generateGuid;\n  _Ember.guidFor = guidFor;\n  _Ember.uuid = uuid;\n  _Ember.wrap = wrap;\n  _Ember.getOwner = getOwner;\n  _Ember.onLoad = onLoad;\n  _Ember.runLoadHooks = runLoadHooks;\n  _Ember.setOwner = setOwner;\n  _Ember.Application = Application;\n  // ****@ember/application/instance****\n  _Ember.ApplicationInstance = ApplicationInstance;\n  // // ****@ember/application/namespace****\n  _Ember.Namespace = Namespace;\n  // ****@ember/array****\n  _Ember.A = A;\n  _Ember.Array = EmberArray;\n  _Ember.NativeArray = NativeArray;\n  _Ember.isArray = isArray;\n  _Ember.makeArray = makeArray;\n  _Ember.MutableArray = MutableArray;\n  // ****@ember/array/proxy****\n  _Ember.ArrayProxy = ArrayProxy;\n  // ****@ember/canary-features****\n  _Ember.FEATURES = {\n    isEnabled,\n    ...FEATURES\n  };\n  _Ember._Input = Input;\n  _Ember.Component = Component;\n  // // ****@ember/component/helper****\n  _Ember.Helper = Helper;\n  // ****@ember/controller****\n  _Ember.Controller = Controller;\n  _Ember.ControllerMixin = ControllerMixin;\n  // ****@ember/debug****\n  _Ember._captureRenderTree = captureRenderTree;\n  _Ember.assert = assert;\n  _Ember.warn = warn;\n  _Ember.debug = debug;\n  _Ember.deprecate = deprecate;\n  _Ember.deprecateFunc = deprecateFunc;\n  _Ember.runInDebug = runInDebug;\n  _Ember.inspect = inspect;\n  _Ember.Debug = {\n    registerDeprecationHandler: registerHandler$1,\n    registerWarnHandler: registerHandler,\n    // ****@ember/-internals/metal****\n    isComputed: isComputed\n  };\n  _Ember.ContainerDebugAdapter = ContainerDebugAdapter;\n  // ****@ember/debug/data-adapter****\n  _Ember.DataAdapter = DataAdapter;\n  // ****@ember/destroyable****\n  _Ember._assertDestroyablesDestroyed = assertDestroyablesDestroyed;\n  _Ember._associateDestroyableChild = associateDestroyableChild;\n  _Ember._enableDestroyableTracking = enableDestroyableTracking;\n  _Ember._isDestroying = isDestroying;\n  _Ember._isDestroyed = isDestroyed;\n  _Ember._registerDestructor = registerDestructor;\n  _Ember._unregisterDestructor = unregisterDestructor;\n  _Ember.destroy = destroy;\n  _Ember.Engine = Engine;\n  // ****@ember/engine/instance****\n  _Ember.EngineInstance = EngineInstance;\n  // ****@ember/enumerable****\n  _Ember.Enumerable = Enumerable;\n  // ****@ember/enumerable/mutable****\n  _Ember.MutableEnumerable = MutableEnumerable;\n  // ****@ember/instrumentation****\n  /** @private */\n  _Ember.instrument = instrument;\n  _Ember.subscribe = subscribe;\n  _Ember.Instrumentation = {\n    instrument: instrument,\n    subscribe: subscribe,\n    unsubscribe: unsubscribe,\n    reset: reset\n  };\n  _Ember.Object = EmberObject;\n  _Ember._action = action;\n  _Ember.computed = computed;\n  _Ember.defineProperty = defineProperty;\n  _Ember.get = get;\n  _Ember.getProperties = getProperties;\n  _Ember.notifyPropertyChange = notifyPropertyChange;\n  _Ember.observer = observer;\n  _Ember.set = set;\n  _Ember.trySet = trySet;\n  _Ember.setProperties = setProperties;\n  _Ember.cacheFor = getCachedValueFor;\n  _Ember._dependentKeyCompat = dependentKeyCompat;\n  _Ember.ComputedProperty = ComputedProperty;\n  _Ember.expandProperties = expandProperties;\n  _Ember.CoreObject = CoreObject;\n  // ****@ember/object/evented****\n  _Ember.Evented = Evented;\n  _Ember.on = on;\n  _Ember.addListener = addListener;\n  _Ember.removeListener = removeListener;\n  _Ember.sendEvent = sendEvent;\n  _Ember.Mixin = Mixin;\n  _Ember.mixin = mixin;\n  _Ember.Observable = Observable;\n  // ****@ember/object/observers****\n  _Ember.addObserver = addObserver;\n  _Ember.removeObserver = removeObserver;\n  _Ember.PromiseProxyMixin = PromiseProxyMixin;\n  // ****@ember/object/proxy****\n  _Ember.ObjectProxy = ObjectProxy;\n  // ****@ember/routing/-internals****\n  _Ember.RouterDSL = DSLImpl;\n  _Ember.controllerFor = controllerFor;\n  _Ember.generateController = generateController;\n  _Ember.generateControllerFactory = generateControllerFactory;\n  _Ember.HashLocation = HashLocation;\n  // ****@ember/routing/history-location****\n  _Ember.HistoryLocation = HistoryLocation;\n  // ****@ember/routing/none-location****\n  _Ember.NoneLocation = NoneLocation;\n  // ****@ember/routing/route****\n  _Ember.Route = Route;\n  // ****@ember/routing/router****\n  _Ember.Router = EmberRouter;\n  // // ****@ember/runloop****\n  _Ember.run = run;\n  _Ember.Service = Service;\n  // ****@ember/utils****\n  _Ember.compare = compare;\n  _Ember.isBlank = isBlank;\n  _Ember.isEmpty = isEmpty;\n  _Ember.isEqual = isEqual;\n  _Ember.isNone = isNone;\n  _Ember.isPresent = isPresent;\n  _Ember.typeOf = typeOf;\n  _Ember.VERSION = Version;\n  _Ember.ViewUtils = {\n    // ****@ember/-internals/views****\n    getChildViews: getChildViews,\n    getElementView: getElementView,\n    getRootViews: getRootViews,\n    getViewBounds: getViewBounds,\n    getViewBoundingClientRect: getViewBoundingClientRect,\n    getViewClientRects: getViewClientRects,\n    getViewElement: getViewElement,\n    isSimpleClick: isSimpleClick,\n    // ****@ember/-internals/glimmer****\n    isSerializationFirstNode\n  };\n  _Ember._getComponentTemplate = getComponentTemplate;\n  _Ember._helperManagerCapabilities = helperCapabilities;\n  _Ember._setComponentTemplate = setComponentTemplate;\n  _Ember._setHelperManager = setHelperManager;\n  _Ember._setModifierManager = setModifierManager;\n  _Ember._templateOnlyComponent = templateOnlyComponent;\n  _Ember._invokeHelper = invokeHelper;\n  _Ember._hash = hash;\n  _Ember._array = array;\n  _Ember._concat = concat;\n  _Ember._get = get$1;\n  _Ember._on = on$1;\n  _Ember._fn = fn;\n  _Ember._Backburner = Backburner;\n  // // ****@ember/controller, @ember/service****\n  /**\n    Namespace for injection helper methods.\n     @class inject\n    @namespace Ember\n    @static\n    @public\n  */\n  function inject$1() {\n    // uses `globalThis` to avoid clobbering with `Ember.Object` in TS namespace\n    (isDevelopingApp() && true && assert(`Injected properties must be created through helpers, see '${globalThis.Object.keys(inject$1).map(k => `'inject.${k}'`).join(' or ')}'`));\n  }\n  _Ember.inject = inject$1;\n  // ****@ember/controller****\n  inject$1.controller = inject;\n  // ****@ember/service****\n  inject$1.service = service;\n  _Ember.__loader = {\n    get require() {\n      return globalThis.require;\n    },\n    get define() {\n      return globalThis.define;\n    },\n    get registry() {\n      let g = globalThis;\n      return g.requirejs?.entries ?? g.require.entries;\n    }\n  };\n\n  // ------------------------------------------------------------------------ //\n  // These properties are assigned to the namespace with getters (and, in some\n  // cases setters) with `Object.defineProperty` below.\n  // ------------------------------------------------------------------------ //\n\n  // ****@ember/-internals/environment****\n\n  /**\n   This should not be needed.\n   You may be able to use an event listener for the error event on window.\n    `window.addEventListener('error', eventHandler);`\n    For promise rejections, you'll want to use the unhandledrejection event.\n   `window.addEventListener('unhandledrejection', eventHandler);`\n    If you really need the original behavior:\n    `import { getOnerror, setOnerror } from '@ember/-internals/error-handling';`\n     @event onerror\n    @for Ember\n    @param {Error} error the error object\n    @public\n  */\n  // ****@ember/-internals/error-handling****\n\n  /**\n    Whether searching on the global for new Namespace instances is enabled.\n     This is only exported here as to not break any addons.  Given the new\n    visit API, you will have issues if you treat this as a indicator of\n    booted.\n     Internally this is only exposing a flag in Namespace.\n     @property BOOTED\n    @for Ember\n    @type Boolean\n    @private\n  */\n\n  /**\n    Global hash of shared templates. This will automatically be populated\n    by the build tools so that you can store your Handlebars templates in\n    separate files that get loaded into JavaScript at buildtime.\n     @property TEMPLATES\n    @for Ember\n    @type Object\n    @private\n  */\n})(Ember || (Ember = {})); // This syntax is not reliably implemented by TypeScript transpilers, but\n// we need to re-export the`RSVP` *namespace* for type compatibility.\n// To achieve this, we use a type-only `declare namespace` block to get the\n// types to behave correctly, and separately set the `RSVP` property on the\n// `Ember` object dynamically. (The types behave correctly because of\n// namespace merging semantics.)\n// eslint-disable-next-line @typescript-eslint/no-namespace\nReflect.set(Ember, 'RSVP', RSVP);\nObject.defineProperty(Ember, 'ENV', {\n  get: getENV,\n  enumerable: false\n});\nObject.defineProperty(Ember, 'lookup', {\n  get: getLookup,\n  set: setLookup,\n  enumerable: false\n});\nObject.defineProperty(Ember, 'onerror', {\n  get: getOnerror,\n  set: setOnerror,\n  enumerable: false\n});\nObject.defineProperty(Ember, 'testing', {\n  get: isTesting,\n  set: setTesting,\n  enumerable: false\n});\nObject.defineProperty(Ember, 'BOOTED', {\n  configurable: false,\n  enumerable: false,\n  get: isSearchDisabled,\n  set: setSearchDisabled\n});\nObject.defineProperty(Ember, 'TEMPLATES', {\n  get: getTemplates,\n  set: setTemplates,\n  configurable: false,\n  enumerable: false\n});\nObject.defineProperty(Ember, 'TEMPLATES', {\n  get: getTemplates,\n  set: setTemplates,\n  configurable: false,\n  enumerable: false\n});\n\n// ****@ember/debug****\nObject.defineProperty(Ember, 'testing', {\n  get: isTesting,\n  set: setTesting,\n  enumerable: false\n});\nrunLoadHooks('Ember.Application', Application);\nlet EmberHandlebars = {\n  template: templateFactory,\n  Utils: {}\n};\nlet EmberHTMLBars = {\n  template: templateFactory\n};\nfunction defineEmberTemplateCompilerLazyLoad(key) {\n  Object.defineProperty(Ember, key, {\n    configurable: true,\n    enumerable: true,\n    get() {\n      if (__emberTemplateCompiler) {\n        EmberHTMLBars.precompile = EmberHandlebars.precompile = __emberTemplateCompiler.precompile;\n        EmberHTMLBars.compile = EmberHandlebars.compile = compileTemplate;\n        Object.defineProperty(Ember, 'HTMLBars', {\n          configurable: true,\n          writable: true,\n          enumerable: true,\n          value: EmberHTMLBars\n        });\n        Object.defineProperty(Ember, 'Handlebars', {\n          configurable: true,\n          writable: true,\n          enumerable: true,\n          value: EmberHandlebars\n        });\n      }\n      return key === 'Handlebars' ? EmberHandlebars : EmberHTMLBars;\n    }\n  });\n}\ndefineEmberTemplateCompilerLazyLoad('HTMLBars');\ndefineEmberTemplateCompilerLazyLoad('Handlebars');\n\n// do this to ensure that Ember.Test is defined properly on the global\n// if it is present.\nfunction defineEmberTestingLazyLoad(key) {\n  Object.defineProperty(Ember, key, {\n    configurable: true,\n    enumerable: true,\n    get() {\n      if (_impl) {\n        let {\n          Test,\n          Adapter,\n          QUnitAdapter,\n          setupForTesting\n        } = _impl;\n\n        // @ts-expect-error We should not do this\n        Test.Adapter = Adapter;\n        // @ts-expect-error We should not do this\n        Test.QUnitAdapter = QUnitAdapter;\n        Object.defineProperty(Ember, 'Test', {\n          configurable: true,\n          writable: true,\n          enumerable: true,\n          value: Test\n        });\n        Object.defineProperty(Ember, 'setupForTesting', {\n          configurable: true,\n          writable: true,\n          enumerable: true,\n          value: setupForTesting\n        });\n        return key === 'Test' ? Test : setupForTesting;\n      }\n      return undefined;\n    }\n  });\n}\ndefineEmberTestingLazyLoad('Test');\ndefineEmberTestingLazyLoad('setupForTesting');\n\n// @ts-expect-error Per types, runLoadHooks requires a second parameter. Should we loosen types?\nrunLoadHooks('Ember');\nconst doNotUseThis = Ember;\n\nexport { doNotUseThis as default };\n","import { deprecateUntil, DEPRECATIONS } from '../@ember/-internals/deprecations/index.js';\nimport doNotUseThis from './barrel.js';\n\nconst index = new Proxy(doNotUseThis, {\n  get(target, key, receiver) {\n    // We don't have symbol exports, so this is probably fine.\n    if (typeof key === 'string') {\n      deprecateUntil(`importing ${key} from the 'ember' barrel file is deprecated.`, DEPRECATIONS.DEPRECATE_IMPORT_EMBER(key));\n    }\n    return Reflect.get(target, key, receiver);\n  },\n  getOwnPropertyDescriptor(target, key) {\n    if (typeof key === 'string') {\n      deprecateUntil(`importing ${key} from the 'ember' barrel file is deprecated.`, DEPRECATIONS.DEPRECATE_IMPORT_EMBER(key));\n    }\n    return Object.getOwnPropertyDescriptor(target, key);\n  }\n});\n\nexport { index as default };\n","// this file gets replaced with the real value during the build\nconst Version = '6.12.0';\n\nexport { Version as default };\n","var createObject = Object.create;\nfunction createMap() {\n  var map = createObject(null);\n  map[\"__\"] = undefined;\n  delete map[\"__\"];\n  return map;\n}\nvar Target = function Target(path, matcher, delegate) {\n  this.path = path;\n  this.matcher = matcher;\n  this.delegate = delegate;\n};\nTarget.prototype.to = function to(target, callback) {\n  var delegate = this.delegate;\n  if (delegate && delegate.willAddRoute) {\n    target = delegate.willAddRoute(this.matcher.target, target);\n  }\n  this.matcher.add(this.path, target);\n  if (callback) {\n    if (callback.length === 0) {\n      throw new Error(\"You must have an argument in the function passed to `to`\");\n    }\n    this.matcher.addChild(this.path, target, callback, this.delegate);\n  }\n};\nvar Matcher = function Matcher(target) {\n  this.routes = createMap();\n  this.children = createMap();\n  this.target = target;\n};\nMatcher.prototype.add = function add(path, target) {\n  this.routes[path] = target;\n};\nMatcher.prototype.addChild = function addChild(path, target, callback, delegate) {\n  var matcher = new Matcher(target);\n  this.children[path] = matcher;\n  var match = generateMatch(path, matcher, delegate);\n  if (delegate && delegate.contextEntered) {\n    delegate.contextEntered(target, match);\n  }\n  callback(match);\n};\nfunction generateMatch(startingPath, matcher, delegate) {\n  function match(path, callback) {\n    var fullPath = startingPath + path;\n    if (callback) {\n      callback(generateMatch(fullPath, matcher, delegate));\n    } else {\n      return new Target(fullPath, matcher, delegate);\n    }\n  }\n  return match;\n}\nfunction addRoute(routeArray, path, handler) {\n  var len = 0;\n  for (var i = 0; i < routeArray.length; i++) {\n    len += routeArray[i].path.length;\n  }\n  path = path.substr(len);\n  var route = {\n    path: path,\n    handler: handler\n  };\n  routeArray.push(route);\n}\nfunction eachRoute(baseRoute, matcher, callback, binding) {\n  var routes = matcher.routes;\n  var paths = Object.keys(routes);\n  for (var i = 0; i < paths.length; i++) {\n    var path = paths[i];\n    var routeArray = baseRoute.slice();\n    addRoute(routeArray, path, routes[path]);\n    var nested = matcher.children[path];\n    if (nested) {\n      eachRoute(routeArray, nested, callback, binding);\n    } else {\n      callback.call(binding, routeArray);\n    }\n  }\n}\nvar map = function (callback, addRouteCallback) {\n  var matcher = new Matcher();\n  callback(generateMatch(\"\", matcher, this.delegate));\n  eachRoute([], matcher, function (routes) {\n    if (addRouteCallback) {\n      addRouteCallback(this, routes);\n    } else {\n      this.add(routes);\n    }\n  }, this);\n};\n\n// Normalizes percent-encoded values in `path` to upper-case and decodes percent-encoded\n// values that are not reserved (i.e., unicode characters, emoji, etc). The reserved\n// chars are \"/\" and \"%\".\n// Safe to call multiple times on the same path.\n// Normalizes percent-encoded values in `path` to upper-case and decodes percent-encoded\nfunction normalizePath(path) {\n  return path.split(\"/\").map(normalizeSegment).join(\"/\");\n}\n// We want to ensure the characters \"%\" and \"/\" remain in percent-encoded\n// form when normalizing paths, so replace them with their encoded form after\n// decoding the rest of the path\nvar SEGMENT_RESERVED_CHARS = /%|\\//g;\nfunction normalizeSegment(segment) {\n  if (segment.length < 3 || segment.indexOf(\"%\") === -1) {\n    return segment;\n  }\n  return decodeURIComponent(segment).replace(SEGMENT_RESERVED_CHARS, encodeURIComponent);\n}\n// We do not want to encode these characters when generating dynamic path segments\n// See https://tools.ietf.org/html/rfc3986#section-3.3\n// sub-delims: \"!\", \"$\", \"&\", \"'\", \"(\", \")\", \"*\", \"+\", \",\", \";\", \"=\"\n// others allowed by RFC 3986: \":\", \"@\"\n//\n// First encode the entire path segment, then decode any of the encoded special chars.\n//\n// The chars \"!\", \"'\", \"(\", \")\", \"*\" do not get changed by `encodeURIComponent`,\n// so the possible encoded chars are:\n// ['%24', '%26', '%2B', '%2C', '%3B', '%3D', '%3A', '%40'].\nvar PATH_SEGMENT_ENCODINGS = /%(?:2(?:4|6|B|C)|3(?:B|D|A)|40)/g;\nfunction encodePathSegment(str) {\n  return encodeURIComponent(str).replace(PATH_SEGMENT_ENCODINGS, decodeURIComponent);\n}\nvar escapeRegex = /(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)/g;\nvar isArray = Array.isArray;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction getParam(params, key) {\n  if (typeof params !== \"object\" || params === null) {\n    throw new Error(\"You must pass an object as the second argument to `generate`.\");\n  }\n  if (!hasOwnProperty.call(params, key)) {\n    throw new Error(\"You must provide param `\" + key + \"` to `generate`.\");\n  }\n  var value = params[key];\n  var str = typeof value === \"string\" ? value : \"\" + value;\n  if (str.length === 0) {\n    throw new Error(\"You must provide a param `\" + key + \"`.\");\n  }\n  return str;\n}\nvar eachChar = [];\neachChar[0 /* Static */] = function (segment, currentState) {\n  var state = currentState;\n  var value = segment.value;\n  for (var i = 0; i < value.length; i++) {\n    var ch = value.charCodeAt(i);\n    state = state.put(ch, false, false);\n  }\n  return state;\n};\neachChar[1 /* Dynamic */] = function (_, currentState) {\n  return currentState.put(47 /* SLASH */, true, true);\n};\neachChar[2 /* Star */] = function (_, currentState) {\n  return currentState.put(-1 /* ANY */, false, true);\n};\neachChar[4 /* Epsilon */] = function (_, currentState) {\n  return currentState;\n};\nvar regex = [];\nregex[0 /* Static */] = function (segment) {\n  return segment.value.replace(escapeRegex, \"\\\\$1\");\n};\nregex[1 /* Dynamic */] = function () {\n  return \"([^/]+)\";\n};\nregex[2 /* Star */] = function () {\n  return \"(.+)\";\n};\nregex[4 /* Epsilon */] = function () {\n  return \"\";\n};\nvar generate = [];\ngenerate[0 /* Static */] = function (segment) {\n  return segment.value;\n};\ngenerate[1 /* Dynamic */] = function (segment, params) {\n  var value = getParam(params, segment.value);\n  if (RouteRecognizer.ENCODE_AND_DECODE_PATH_SEGMENTS) {\n    return encodePathSegment(value);\n  } else {\n    return value;\n  }\n};\ngenerate[2 /* Star */] = function (segment, params) {\n  return getParam(params, segment.value);\n};\ngenerate[4 /* Epsilon */] = function () {\n  return \"\";\n};\nvar EmptyObject = Object.freeze({});\nvar EmptyArray = Object.freeze([]);\n// The `names` will be populated with the paramter name for each dynamic/star\n// segment. `shouldDecodes` will be populated with a boolean for each dyanamic/star\n// segment, indicating whether it should be decoded during recognition.\nfunction parse(segments, route, types) {\n  // normalize route as not starting with a \"/\". Recognition will\n  // also normalize.\n  if (route.length > 0 && route.charCodeAt(0) === 47 /* SLASH */) {\n    route = route.substr(1);\n  }\n  var parts = route.split(\"/\");\n  var names = undefined;\n  var shouldDecodes = undefined;\n  for (var i = 0; i < parts.length; i++) {\n    var part = parts[i];\n    var flags = 0;\n    var type = 0;\n    if (part === \"\") {\n      type = 4 /* Epsilon */;\n    } else if (part.charCodeAt(0) === 58 /* COLON */) {\n      type = 1 /* Dynamic */;\n    } else if (part.charCodeAt(0) === 42 /* STAR */) {\n      type = 2 /* Star */;\n    } else {\n      type = 0 /* Static */;\n    }\n    flags = 2 << type;\n    if (flags & 12 /* Named */) {\n      part = part.slice(1);\n      names = names || [];\n      names.push(part);\n      shouldDecodes = shouldDecodes || [];\n      shouldDecodes.push((flags & 4 /* Decoded */) !== 0);\n    }\n    if (flags & 14 /* Counted */) {\n      types[type]++;\n    }\n    segments.push({\n      type: type,\n      value: normalizeSegment(part)\n    });\n  }\n  return {\n    names: names || EmptyArray,\n    shouldDecodes: shouldDecodes || EmptyArray\n  };\n}\nfunction isEqualCharSpec(spec, char, negate) {\n  return spec.char === char && spec.negate === negate;\n}\n// A State has a character specification and (`charSpec`) and a list of possible\n// subsequent states (`nextStates`).\n//\n// If a State is an accepting state, it will also have several additional\n// properties:\n//\n// * `regex`: A regular expression that is used to extract parameters from paths\n//   that reached this accepting state.\n// * `handlers`: Information on how to convert the list of captures into calls\n//   to registered handlers with the specified parameters\n// * `types`: How many static, dynamic or star segments in this route. Used to\n//   decide which route to use if multiple registered routes match a path.\n//\n// Currently, State is implemented naively by looping over `nextStates` and\n// comparing a character specification against a character. A more efficient\n// implementation would use a hash of keys pointing at one or more next states.\nvar State = function State(states, id, char, negate, repeat) {\n  this.states = states;\n  this.id = id;\n  this.char = char;\n  this.negate = negate;\n  this.nextStates = repeat ? id : null;\n  this.pattern = \"\";\n  this._regex = undefined;\n  this.handlers = undefined;\n  this.types = undefined;\n};\nState.prototype.regex = function regex$1() {\n  if (!this._regex) {\n    this._regex = new RegExp(this.pattern);\n  }\n  return this._regex;\n};\nState.prototype.get = function get(char, negate) {\n  var this$1$1 = this;\n  var nextStates = this.nextStates;\n  if (nextStates === null) {\n    return;\n  }\n  if (isArray(nextStates)) {\n    for (var i = 0; i < nextStates.length; i++) {\n      var child = this$1$1.states[nextStates[i]];\n      if (isEqualCharSpec(child, char, negate)) {\n        return child;\n      }\n    }\n  } else {\n    var child$1 = this.states[nextStates];\n    if (isEqualCharSpec(child$1, char, negate)) {\n      return child$1;\n    }\n  }\n};\nState.prototype.put = function put(char, negate, repeat) {\n  var state;\n  // If the character specification already exists in a child of the current\n  // state, just return that state.\n  if (state = this.get(char, negate)) {\n    return state;\n  }\n  // Make a new state for the character spec\n  var states = this.states;\n  state = new State(states, states.length, char, negate, repeat);\n  states[states.length] = state;\n  // Insert the new state as a child of the current state\n  if (this.nextStates == null) {\n    this.nextStates = state.id;\n  } else if (isArray(this.nextStates)) {\n    this.nextStates.push(state.id);\n  } else {\n    this.nextStates = [this.nextStates, state.id];\n  }\n  // Return the new state\n  return state;\n};\n// Find a list of child states matching the next character\nState.prototype.match = function match(ch) {\n  var this$1$1 = this;\n  var nextStates = this.nextStates;\n  if (!nextStates) {\n    return [];\n  }\n  var returned = [];\n  if (isArray(nextStates)) {\n    for (var i = 0; i < nextStates.length; i++) {\n      var child = this$1$1.states[nextStates[i]];\n      if (isMatch(child, ch)) {\n        returned.push(child);\n      }\n    }\n  } else {\n    var child$1 = this.states[nextStates];\n    if (isMatch(child$1, ch)) {\n      returned.push(child$1);\n    }\n  }\n  return returned;\n};\nfunction isMatch(spec, char) {\n  return spec.negate ? spec.char !== char && spec.char !== -1 /* ANY */ : spec.char === char || spec.char === -1 /* ANY */;\n}\n// This is a somewhat naive strategy, but should work in a lot of cases\n// A better strategy would properly resolve /posts/:id/new and /posts/edit/:id.\n//\n// This strategy generally prefers more static and less dynamic matching.\n// Specifically, it\n//\n//  * prefers fewer stars to more, then\n//  * prefers using stars for less of the match to more, then\n//  * prefers fewer dynamic segments to more, then\n//  * prefers more static segments to more\nfunction sortSolutions(states) {\n  return states.sort(function (a, b) {\n    var ref = a.types || [0, 0, 0];\n    var astatics = ref[0];\n    var adynamics = ref[1];\n    var astars = ref[2];\n    var ref$1 = b.types || [0, 0, 0];\n    var bstatics = ref$1[0];\n    var bdynamics = ref$1[1];\n    var bstars = ref$1[2];\n    if (astars !== bstars) {\n      return astars - bstars;\n    }\n    if (astars) {\n      if (astatics !== bstatics) {\n        return bstatics - astatics;\n      }\n      if (adynamics !== bdynamics) {\n        return bdynamics - adynamics;\n      }\n    }\n    if (adynamics !== bdynamics) {\n      return adynamics - bdynamics;\n    }\n    if (astatics !== bstatics) {\n      return bstatics - astatics;\n    }\n    return 0;\n  });\n}\nfunction recognizeChar(states, ch) {\n  var nextStates = [];\n  for (var i = 0, l = states.length; i < l; i++) {\n    var state = states[i];\n    nextStates = nextStates.concat(state.match(ch));\n  }\n  return nextStates;\n}\nvar RecognizeResults = function RecognizeResults(queryParams) {\n  this.length = 0;\n  this.queryParams = queryParams || {};\n};\nRecognizeResults.prototype.splice = Array.prototype.splice;\nRecognizeResults.prototype.slice = Array.prototype.slice;\nRecognizeResults.prototype.push = Array.prototype.push;\nfunction findHandler(state, originalPath, queryParams) {\n  var handlers = state.handlers;\n  var regex = state.regex();\n  if (!regex || !handlers) {\n    throw new Error(\"state not initialized\");\n  }\n  var captures = originalPath.match(regex);\n  var currentCapture = 1;\n  var result = new RecognizeResults(queryParams);\n  result.length = handlers.length;\n  for (var i = 0; i < handlers.length; i++) {\n    var handler = handlers[i];\n    var names = handler.names;\n    var shouldDecodes = handler.shouldDecodes;\n    var params = EmptyObject;\n    var isDynamic = false;\n    if (names !== EmptyArray && shouldDecodes !== EmptyArray) {\n      for (var j = 0; j < names.length; j++) {\n        isDynamic = true;\n        var name = names[j];\n        var capture = captures && captures[currentCapture++];\n        if (params === EmptyObject) {\n          params = {};\n        }\n        if (RouteRecognizer.ENCODE_AND_DECODE_PATH_SEGMENTS && shouldDecodes[j]) {\n          params[name] = capture && decodeURIComponent(capture);\n        } else {\n          params[name] = capture;\n        }\n      }\n    }\n    result[i] = {\n      handler: handler.handler,\n      params: params,\n      isDynamic: isDynamic\n    };\n  }\n  return result;\n}\nfunction decodeQueryParamPart(part) {\n  // http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1\n  part = part.replace(/\\+/gm, \"%20\");\n  var result;\n  try {\n    result = decodeURIComponent(part);\n  } catch (error) {\n    result = \"\";\n  }\n  return result;\n}\nvar RouteRecognizer = function RouteRecognizer() {\n  this.names = createMap();\n  var states = [];\n  var state = new State(states, 0, -1 /* ANY */, true, false);\n  states[0] = state;\n  this.states = states;\n  this.rootState = state;\n};\nRouteRecognizer.prototype.add = function add(routes, options) {\n  var currentState = this.rootState;\n  var pattern = \"^\";\n  var types = [0, 0, 0];\n  var handlers = new Array(routes.length);\n  var allSegments = [];\n  var isEmpty = true;\n  var j = 0;\n  for (var i = 0; i < routes.length; i++) {\n    var route = routes[i];\n    var ref = parse(allSegments, route.path, types);\n    var names = ref.names;\n    var shouldDecodes = ref.shouldDecodes;\n    // preserve j so it points to the start of newly added segments\n    for (; j < allSegments.length; j++) {\n      var segment = allSegments[j];\n      if (segment.type === 4 /* Epsilon */) {\n        continue;\n      }\n      isEmpty = false;\n      // Add a \"/\" for the new segment\n      currentState = currentState.put(47 /* SLASH */, false, false);\n      pattern += \"/\";\n      // Add a representation of the segment to the NFA and regex\n      currentState = eachChar[segment.type](segment, currentState);\n      pattern += regex[segment.type](segment);\n    }\n    handlers[i] = {\n      handler: route.handler,\n      names: names,\n      shouldDecodes: shouldDecodes\n    };\n  }\n  if (isEmpty) {\n    currentState = currentState.put(47 /* SLASH */, false, false);\n    pattern += \"/\";\n  }\n  currentState.handlers = handlers;\n  currentState.pattern = pattern + \"$\";\n  currentState.types = types;\n  var name;\n  if (typeof options === \"object\" && options !== null && options.as) {\n    name = options.as;\n  }\n  if (name) {\n    // if (this.names[name]) {\n    //   throw new Error(\"You may not add a duplicate route named `\" + name + \"`.\");\n    // }\n    this.names[name] = {\n      segments: allSegments,\n      handlers: handlers\n    };\n  }\n};\nRouteRecognizer.prototype.handlersFor = function handlersFor(name) {\n  var route = this.names[name];\n  if (!route) {\n    throw new Error(\"There is no route named \" + name);\n  }\n  var result = new Array(route.handlers.length);\n  for (var i = 0; i < route.handlers.length; i++) {\n    var handler = route.handlers[i];\n    result[i] = handler;\n  }\n  return result;\n};\nRouteRecognizer.prototype.hasRoute = function hasRoute(name) {\n  return !!this.names[name];\n};\nRouteRecognizer.prototype.generate = function generate$1(name, params) {\n  var route = this.names[name];\n  var output = \"\";\n  if (!route) {\n    throw new Error(\"There is no route named \" + name);\n  }\n  var segments = route.segments;\n  for (var i = 0; i < segments.length; i++) {\n    var segment = segments[i];\n    if (segment.type === 4 /* Epsilon */) {\n      continue;\n    }\n    output += \"/\";\n    output += generate[segment.type](segment, params);\n  }\n  if (output.charAt(0) !== \"/\") {\n    output = \"/\" + output;\n  }\n  if (params && params.queryParams) {\n    output += this.generateQueryString(params.queryParams);\n  }\n  return output;\n};\nRouteRecognizer.prototype.generateQueryString = function generateQueryString(params) {\n  var pairs = [];\n  var keys = Object.keys(params);\n  keys.sort();\n  for (var i = 0; i < keys.length; i++) {\n    var key = keys[i];\n    var value = params[key];\n    if (value == null) {\n      continue;\n    }\n    var pair = encodeURIComponent(key);\n    if (isArray(value)) {\n      for (var j = 0; j < value.length; j++) {\n        var arrayPair = key + \"[]\" + \"=\" + encodeURIComponent(value[j]);\n        pairs.push(arrayPair);\n      }\n    } else {\n      pair += \"=\" + encodeURIComponent(value);\n      pairs.push(pair);\n    }\n  }\n  if (pairs.length === 0) {\n    return \"\";\n  }\n  return \"?\" + pairs.join(\"&\");\n};\nRouteRecognizer.prototype.parseQueryString = function parseQueryString(queryString) {\n  var pairs = queryString.split(\"&\");\n  var queryParams = {};\n  for (var i = 0; i < pairs.length; i++) {\n    var pair = pairs[i].split(\"=\"),\n      key = decodeQueryParamPart(pair[0]),\n      keyLength = key.length,\n      isArray = false,\n      value = void 0;\n    if (pair.length === 1) {\n      value = \"true\";\n    } else {\n      // Handle arrays\n      if (keyLength > 2 && key.slice(keyLength - 2) === \"[]\") {\n        isArray = true;\n        key = key.slice(0, keyLength - 2);\n        if (!queryParams[key]) {\n          queryParams[key] = [];\n        }\n      }\n      value = pair[1] ? decodeQueryParamPart(pair[1]) : \"\";\n    }\n    if (isArray) {\n      queryParams[key].push(value);\n    } else {\n      queryParams[key] = value;\n    }\n  }\n  return queryParams;\n};\nRouteRecognizer.prototype.recognize = function recognize(path) {\n  var results;\n  var states = [this.rootState];\n  var queryParams = {};\n  var isSlashDropped = false;\n  var hashStart = path.indexOf(\"#\");\n  if (hashStart !== -1) {\n    path = path.substr(0, hashStart);\n  }\n  var queryStart = path.indexOf(\"?\");\n  if (queryStart !== -1) {\n    var queryString = path.substr(queryStart + 1, path.length);\n    path = path.substr(0, queryStart);\n    queryParams = this.parseQueryString(queryString);\n  }\n  if (path.charAt(0) !== \"/\") {\n    path = \"/\" + path;\n  }\n  var originalPath = path;\n  if (RouteRecognizer.ENCODE_AND_DECODE_PATH_SEGMENTS) {\n    path = normalizePath(path);\n  } else {\n    path = decodeURI(path);\n    originalPath = decodeURI(originalPath);\n  }\n  var pathLen = path.length;\n  if (pathLen > 1 && path.charAt(pathLen - 1) === \"/\") {\n    path = path.substr(0, pathLen - 1);\n    originalPath = originalPath.substr(0, originalPath.length - 1);\n    isSlashDropped = true;\n  }\n  for (var i = 0; i < path.length; i++) {\n    states = recognizeChar(states, path.charCodeAt(i));\n    if (!states.length) {\n      break;\n    }\n  }\n  var solutions = [];\n  for (var i$1 = 0; i$1 < states.length; i$1++) {\n    if (states[i$1].handlers) {\n      solutions.push(states[i$1]);\n    }\n  }\n  states = sortSolutions(solutions);\n  var state = solutions[0];\n  if (state && state.handlers) {\n    // if a trailing slash was dropped and a star segment is the last segment\n    // specified, put the trailing slash back\n    if (isSlashDropped && state.pattern && state.pattern.slice(-5) === \"(.+)$\") {\n      originalPath = originalPath + \"/\";\n    }\n    results = findHandler(state, originalPath, queryParams);\n  }\n  return results;\n};\nRouteRecognizer.VERSION = \"0.3.4\";\n// Set to false to opt-out of encoding and decoding path segments.\n// See https://github.com/tildeio/route-recognizer/pull/55\nRouteRecognizer.ENCODE_AND_DECODE_PATH_SEGMENTS = true;\nRouteRecognizer.Normalizer = {\n  normalizeSegment: normalizeSegment,\n  normalizePath: normalizePath,\n  encodePathSegment: encodePathSegment\n};\nRouteRecognizer.prototype.map = map;\n\nexport { RouteRecognizer as default };\n","import { meta } from '../@ember/-internals/meta/lib/meta.js';\nimport '../@ember/debug/index.js';\nimport { tagMetaFor, tagFor, untrack, validateTag, updateTag as UPDATE_TAG, valueForTag, consumeTag } from '../@glimmer/validator/index.js';\nimport { i as isElementDescriptor, H as makeComputedDecorator, E as descriptorForDecorator, J as ComputedDescriptor, K as CHAIN_PASS_THROUGH, g as get, L as getChainTagsForKey, M as finishLazyChains, d as defineProperty } from './observers-DhgQ6ba5.js';\nimport { s as set } from './property_set-DrZnfGQ7.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { assert } from '../@ember/debug/lib/assert.js';\nimport inspect from '../@ember/debug/lib/inspect.js';\n\nfunction alias(altKey) {\n  (isDevelopingApp() && !(!isElementDescriptor(Array.prototype.slice.call(arguments))) && assert('You attempted to use @alias as a decorator directly, but it requires a `altKey` parameter', !isElementDescriptor(Array.prototype.slice.call(arguments)))); // SAFETY: We passed in the impl for this class\n  return makeComputedDecorator(new AliasedProperty(altKey), AliasDecoratorImpl);\n}\n\n// TODO: This class can be svelted once `meta` has been deprecated\nclass AliasDecoratorImpl extends Function {\n  readOnly() {\n    descriptorForDecorator(this).readOnly();\n    return this;\n  }\n  oneWay() {\n    descriptorForDecorator(this).oneWay();\n    return this;\n  }\n  meta(meta) {\n    let prop = descriptorForDecorator(this);\n    if (arguments.length === 0) {\n      return prop._meta || {};\n    } else {\n      prop._meta = meta;\n    }\n  }\n}\nclass AliasedProperty extends ComputedDescriptor {\n  altKey;\n  constructor(altKey) {\n    super();\n    this.altKey = altKey;\n  }\n  setup(obj, keyName, propertyDesc, meta) {\n    (isDevelopingApp() && !(this.altKey !== keyName) && assert(`Setting alias '${keyName}' on self`, this.altKey !== keyName));\n    super.setup(obj, keyName, propertyDesc, meta);\n    CHAIN_PASS_THROUGH.add(this);\n  }\n  get(obj, keyName) {\n    let ret;\n    let meta$1 = meta(obj);\n    let tagMeta = tagMetaFor(obj);\n    let propertyTag = tagFor(obj, keyName, tagMeta);\n\n    // We don't use the tag since CPs are not automatic, we just want to avoid\n    // anything tracking while we get the altKey\n    untrack(() => {\n      ret = get(obj, this.altKey);\n    });\n    let lastRevision = meta$1.revisionFor(keyName);\n    if (lastRevision === undefined || !validateTag(propertyTag, lastRevision)) {\n      UPDATE_TAG(propertyTag, getChainTagsForKey(obj, this.altKey, tagMeta, meta$1));\n      meta$1.setRevisionFor(keyName, valueForTag(propertyTag));\n      finishLazyChains(meta$1, keyName, ret);\n    }\n    consumeTag(propertyTag);\n    return ret;\n  }\n  set(obj, _keyName, value) {\n    return set(obj, this.altKey, value);\n  }\n  readOnly() {\n    this.set = AliasedProperty_readOnlySet;\n  }\n  oneWay() {\n    this.set = AliasedProperty_oneWaySet;\n  }\n}\nfunction AliasedProperty_readOnlySet(obj, keyName) {\n  throw new Error(`Cannot set read-only property '${keyName}' on object: ${inspect(obj)}`);\n}\nfunction AliasedProperty_oneWaySet(obj, keyName, value) {\n  defineProperty(obj, keyName, null);\n  return set(obj, keyName, value);\n}\n\nexport { alias as a };\n","import { j as setInternalHelperManager, C as CustomHelperManager, k as setInternalModifierManager, s as setInternalComponentManager } from './api-CkUl6KyJ.js';\nimport { registerDestructor } from '../@glimmer/destroyable/index.js';\nimport { debugAssert } from '../@glimmer/global-context/index.js';\nimport './debug-to-string-BsFOvUtQ.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { untrack, createUpdatableTag } from '../@glimmer/validator/index.js';\nimport { d as createConstRef } from './reference-B6HMX4y0.js';\nimport { a as argsProxyFor } from './args-proxy-B91L3LRK.js';\nimport { b as buildCapabilities, F as FROM_CAPABILITIES } from './capabilities-DHiXCCuB.js';\nimport { c as castToBrowser } from './simple-cast-BXTrayoV.js';\n\nconst CAPABILITIES = {\n  dynamicLayout: false,\n  dynamicTag: false,\n  prepareArgs: false,\n  createArgs: true,\n  attributeHook: false,\n  elementHook: false,\n  createCaller: false,\n  dynamicScope: true,\n  updateHook: true,\n  createInstance: true,\n  wrapped: false,\n  willDestroy: false,\n  hasSubOwner: false\n};\nfunction componentCapabilities(managerAPI, options = {}) {\n  if (isDevelopingApp() && managerAPI !== '3.13') {\n    throw new Error('Invalid component manager compatibility specified');\n  }\n  let updateHook = Boolean(options.updateHook);\n  return buildCapabilities({\n    asyncLifeCycleCallbacks: Boolean(options.asyncLifecycleCallbacks),\n    destructor: Boolean(options.destructor),\n    updateHook\n  });\n}\nfunction hasAsyncLifeCycleCallbacks(delegate) {\n  return delegate.capabilities.asyncLifeCycleCallbacks;\n}\nfunction hasUpdateHook(delegate) {\n  return delegate.capabilities.updateHook;\n}\nfunction hasAsyncUpdateHook(delegate) {\n  return hasAsyncLifeCycleCallbacks(delegate) && hasUpdateHook(delegate);\n}\nfunction hasDestructors(delegate) {\n  return delegate.capabilities.destructor;\n}\n\n/**\n  The CustomComponentManager allows addons to provide custom component\n  implementations that integrate seamlessly into Ember. This is accomplished\n  through a delegate, registered with the custom component manager, which\n  implements a set of hooks that determine component behavior.\n\n  To create a custom component manager, instantiate a new CustomComponentManager\n  class and pass the delegate as the first argument:\n\n  ```js\n  let manager = new CustomComponentManager({\n    // ...delegate implementation...\n  });\n  ```\n\n  ## Delegate Hooks\n\n  Throughout the lifecycle of a component, the component manager will invoke\n  delegate hooks that are responsible for surfacing those lifecycle changes to\n  the end developer.\n\n  * `create()` - invoked when a new instance of a component should be created\n  * `update()` - invoked when the arguments passed to a component change\n  * `getContext()` - returns the object that should be\n*/\nclass CustomComponentManager {\n  componentManagerDelegates = new WeakMap();\n  constructor(factory) {\n    this.factory = factory;\n  }\n  getDelegateFor(owner) {\n    let {\n      componentManagerDelegates\n    } = this;\n    let delegate = componentManagerDelegates.get(owner);\n    if (delegate === undefined) {\n      let {\n        factory\n      } = this;\n      delegate = factory(owner);\n\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      if (isDevelopingApp() && !FROM_CAPABILITIES.has(delegate.capabilities)) {\n        // TODO: This error message should make sense in both Ember and Glimmer https://github.com/glimmerjs/glimmer-vm/issues/1200\n        throw new Error(`Custom component managers must have a \\`capabilities\\` property that is the result of calling the \\`capabilities('3.13')\\` (imported via \\`import { capabilities } from '@ember/component';\\`). Received: \\`${JSON.stringify(delegate.capabilities\n        // eslint-disable-next-line @typescript-eslint/no-base-to-string\n        )}\\` for: \\`${delegate}\\``);\n      }\n      componentManagerDelegates.set(owner, delegate);\n    }\n    return delegate;\n  }\n  create(owner, definition, vmArgs) {\n    let delegate = this.getDelegateFor(owner);\n    let args = argsProxyFor(vmArgs.capture(), 'component');\n    let component = delegate.createComponent(definition, args);\n    return new CustomComponentState(component, delegate, args);\n  }\n  getDebugName(definition) {\n    // eslint-disable-next-line @typescript-eslint/no-base-to-string\n    return typeof definition === 'function' ? definition.name : definition.toString();\n  }\n  update(bucket) {\n    let {\n      delegate\n    } = bucket;\n    if (hasUpdateHook(delegate)) {\n      let {\n        component,\n        args\n      } = bucket;\n      delegate.updateComponent(component, args);\n    }\n  }\n  didCreate({\n    component,\n    delegate\n  }) {\n    if (hasAsyncLifeCycleCallbacks(delegate)) {\n      delegate.didCreateComponent(component);\n    }\n  }\n  didUpdate({\n    component,\n    delegate\n  }) {\n    if (hasAsyncUpdateHook(delegate)) {\n      delegate.didUpdateComponent(component);\n    }\n  }\n  didRenderLayout() {}\n  didUpdateLayout() {}\n  getSelf({\n    component,\n    delegate\n  }) {\n    return createConstRef(delegate.getContext(component), 'this');\n  }\n  getDestroyable(bucket) {\n    const {\n      delegate\n    } = bucket;\n    if (hasDestructors(delegate)) {\n      const {\n        component\n      } = bucket;\n      registerDestructor(bucket, () => delegate.destroyComponent(component));\n      return bucket;\n    }\n    return null;\n  }\n  getCapabilities() {\n    return CAPABILITIES;\n  }\n}\n\n/**\n * Stores internal state about a component instance after it's been created.\n */\nclass CustomComponentState {\n  constructor(component, delegate, args) {\n    this.component = component;\n    this.delegate = delegate;\n    this.args = args;\n  }\n}\n\nfunction modifierCapabilities(managerAPI, optionalFeatures = {}) {\n  debugAssert(managerAPI === '3.22', () => `Invalid modifier manager compatibility specified; you specified ${managerAPI}, but only '3.22' is supported.`);\n  return buildCapabilities({\n    disableAutoTracking: Boolean(optionalFeatures.disableAutoTracking)\n  });\n}\n/**\n  The CustomModifierManager allows addons to provide custom modifier\n  implementations that integrate seamlessly into Ember. This is accomplished\n  through a delegate, registered with the custom modifier manager, which\n  implements a set of hooks that determine modifier behavior.\n  To create a custom modifier manager, instantiate a new CustomModifierManager\n  class and pass the delegate as the first argument:\n\n  ```js\n  let manager = new CustomModifierManager({\n    // ...delegate implementation...\n  });\n  ```\n\n  ## Delegate Hooks\n\n  Throughout the lifecycle of a modifier, the modifier manager will invoke\n  delegate hooks that are responsible for surfacing those lifecycle changes to\n  the end developer.\n  * `createModifier()` - invoked when a new instance of a modifier should be created\n  * `installModifier()` - invoked when the modifier is installed on the element\n  * `updateModifier()` - invoked when the arguments passed to a modifier change\n  * `destroyModifier()` - invoked when the modifier is about to be destroyed\n*/\nclass CustomModifierManager {\n  componentManagerDelegates = new WeakMap();\n  constructor(factory) {\n    this.factory = factory;\n  }\n  getDelegateFor(owner) {\n    let {\n      componentManagerDelegates\n    } = this;\n    let delegate = componentManagerDelegates.get(owner);\n    if (delegate === undefined) {\n      let {\n        factory\n      } = this;\n      delegate = factory(owner);\n\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      if (isDevelopingApp() && !FROM_CAPABILITIES.has(delegate.capabilities)) {\n        // TODO: This error message should make sense in both Ember and Glimmer https://github.com/glimmerjs/glimmer-vm/issues/1200\n        throw new Error(`Custom modifier managers must have a \\`capabilities\\` property that is the result of calling the \\`capabilities('3.22')\\` (imported via \\`import { capabilities } from '@ember/modifier';\\`). Received: \\`${JSON.stringify(delegate.capabilities\n        // eslint-disable-next-line @typescript-eslint/no-base-to-string\n        )}\\` for: \\`${delegate}\\``);\n      }\n      componentManagerDelegates.set(owner, delegate);\n    }\n    return delegate;\n  }\n  create(owner, element, definition, capturedArgs) {\n    let delegate = this.getDelegateFor(owner);\n    let args = argsProxyFor(capturedArgs, 'modifier');\n    let instance = delegate.createModifier(definition, args);\n    let tag = createUpdatableTag();\n    let state;\n    state = {\n      tag,\n      element,\n      delegate,\n      args,\n      modifier: instance\n    };\n    registerDestructor(state, () => delegate.destroyModifier(instance, args));\n    return state;\n  }\n  getDebugName(definition) {\n    if (typeof definition === 'function') {\n      return definition.name || definition.toString();\n    } else {\n      return '<unknown>';\n    }\n  }\n  getDebugInstance({\n    modifier\n  }) {\n    return modifier;\n  }\n  getTag({\n    tag\n  }) {\n    return tag;\n  }\n  install({\n    element,\n    args,\n    modifier,\n    delegate\n  }) {\n    let {\n      capabilities\n    } = delegate;\n    if (capabilities.disableAutoTracking) {\n      untrack(() => delegate.installModifier(modifier, castToBrowser(element, 'ELEMENT'), args));\n    } else {\n      delegate.installModifier(modifier, castToBrowser(element), args);\n    }\n  }\n  update({\n    args,\n    modifier,\n    delegate\n  }) {\n    let {\n      capabilities\n    } = delegate;\n    if (capabilities.disableAutoTracking) {\n      untrack(() => delegate.updateModifier(modifier, args));\n    } else {\n      delegate.updateModifier(modifier, args);\n    }\n  }\n  getDestroyable(state) {\n    return state;\n  }\n}\n\nfunction setComponentManager(factory, obj) {\n  return setInternalComponentManager(new CustomComponentManager(factory), obj);\n}\nfunction setModifierManager(factory, obj) {\n  return setInternalModifierManager(new CustomModifierManager(factory), obj);\n}\nfunction setHelperManager(factory, obj) {\n  return setInternalHelperManager(new CustomHelperManager(factory), obj);\n}\n\nexport { CustomComponentManager as C, CustomModifierManager as a, setHelperManager as b, componentCapabilities as c, setModifierManager as d, modifierCapabilities as m, setComponentManager as s };\n","import '../@glimmer/global-context/index.js';\nimport './debug-to-string-BsFOvUtQ.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { track } from '../@glimmer/validator/index.js';\nimport { v as valueForRef } from './reference-B6HMX4y0.js';\n\nconst CUSTOM_TAG_FOR = new WeakMap();\nfunction getCustomTagFor(obj) {\n  return CUSTOM_TAG_FOR.get(obj);\n}\nfunction setCustomTagFor(obj, customTagFn) {\n  CUSTOM_TAG_FOR.set(obj, customTagFn);\n}\nfunction convertToInt(prop) {\n  if (typeof prop === 'symbol') return null;\n  const num = Number(prop);\n  if (isNaN(num)) return null;\n  return num % 1 === 0 ? num : null;\n}\nfunction tagForNamedArg(namedArgs, key) {\n  return track(() => {\n    if (key in namedArgs) {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      valueForRef(namedArgs[key]);\n    }\n  });\n}\nfunction tagForPositionalArg(positionalArgs, key) {\n  return track(() => {\n    if (key === '[]') {\n      // consume all of the tags in the positional array\n      positionalArgs.forEach(valueForRef);\n    }\n    const parsed = convertToInt(key);\n    if (parsed !== null && parsed < positionalArgs.length) {\n      // consume the tag of the referenced index\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      valueForRef(positionalArgs[parsed]);\n    }\n  });\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type -- @fixme\nclass NamedArgsProxy {\n  // eslint-disable-next-line @typescript-eslint/no-empty-object-type -- @fixme\n\n  constructor(named) {\n    this.named = named;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-empty-object-type -- @fixme\n  get(_target, prop) {\n    const ref = this.named[prop];\n    if (ref !== undefined) {\n      return valueForRef(ref);\n    }\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-empty-object-type -- @fixme\n  has(_target, prop) {\n    return prop in this.named;\n  }\n  ownKeys() {\n    return Object.keys(this.named);\n  }\n  isExtensible() {\n    return false;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-empty-object-type -- @fixme\n  getOwnPropertyDescriptor(_target, prop) {\n    if (isDevelopingApp() && !(prop in this.named)) {\n      throw new Error(`args proxies do not have real property descriptors, so you should never need to call getOwnPropertyDescriptor yourself. This code exists for enumerability, such as in for-in loops and Object.keys(). Attempted to get the descriptor for \\`${String(prop)}\\``);\n    }\n    return {\n      enumerable: true,\n      configurable: true\n    };\n  }\n}\nclass PositionalArgsProxy {\n  constructor(positional) {\n    this.positional = positional;\n  }\n  get(target, prop) {\n    let {\n      positional\n    } = this;\n    if (prop === 'length') {\n      return positional.length;\n    }\n    const parsed = convertToInt(prop);\n    if (parsed !== null && parsed < positional.length) {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      return valueForRef(positional[parsed]);\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access\n    return target[prop];\n  }\n  isExtensible() {\n    return false;\n  }\n  has(_target, prop) {\n    const parsed = convertToInt(prop);\n    return parsed !== null && parsed < this.positional.length;\n  }\n}\nconst argsProxyFor = (capturedArgs, type) => {\n  const {\n    named,\n    positional\n  } = capturedArgs;\n  let getNamedTag = (_obj, key) => tagForNamedArg(named, key);\n  let getPositionalTag = (_obj, key) => tagForPositionalArg(positional, key);\n  const namedHandler = new NamedArgsProxy(named);\n  const positionalHandler = new PositionalArgsProxy(positional);\n\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n  const namedTarget = Object.create(null);\n  const positionalTarget = [];\n  if (isDevelopingApp()) {\n    const setHandler = function (_target, prop) {\n      throw new Error(`You attempted to set ${String(prop)} on the arguments of a component, helper, or modifier. Arguments are immutable and cannot be updated directly; they always represent the values that are passed down. If you want to set default values, you should use a getter and local tracked state instead.`);\n    };\n    const forInDebugHandler = () => {\n      throw new Error(`Object.keys() was called on the positional arguments array for a ${type}, which is not supported. This function is a low-level function that should not need to be called for positional argument arrays. You may be attempting to iterate over the array using for...in instead of for...of.`);\n    };\n    namedHandler.set = setHandler;\n    positionalHandler.set = setHandler;\n    positionalHandler.ownKeys = forInDebugHandler;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n  const namedProxy = new Proxy(namedTarget, namedHandler);\n  const positionalProxy = new Proxy(positionalTarget, positionalHandler);\n\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n  setCustomTagFor(namedProxy, getNamedTag);\n  setCustomTagFor(positionalProxy, getPositionalTag);\n  return {\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n    named: namedProxy,\n    positional: positionalProxy\n  };\n};\n\nexport { argsProxyFor as a, getCustomTagFor as g, setCustomTagFor as s };\n","import '../@ember/debug/index.js';\nimport { peekMeta } from '../@ember/-internals/meta/lib/meta.js';\nimport { k as sendEvent, n as notifyPropertyChange, F as addListener, G as removeListener } from './observers-DhgQ6ba5.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { assert } from '../@ember/debug/lib/assert.js';\n\nfunction arrayContentWillChange(array, startIdx, removeAmt, addAmt) {\n  // if no args are passed assume everything changes\n  if (startIdx === undefined) {\n    startIdx = 0;\n    removeAmt = addAmt = -1;\n  } else {\n    if (removeAmt === undefined) {\n      removeAmt = -1;\n    }\n    if (addAmt === undefined) {\n      addAmt = -1;\n    }\n  }\n  sendEvent(array, '@array:before', [array, startIdx, removeAmt, addAmt]);\n  return array;\n}\nfunction arrayContentDidChange(array, startIdx, removeAmt, addAmt, notify = true) {\n  // if no args are passed assume everything changes\n  if (startIdx === undefined) {\n    startIdx = 0;\n    removeAmt = addAmt = -1;\n  } else {\n    if (removeAmt === undefined) {\n      removeAmt = -1;\n    }\n    if (addAmt === undefined) {\n      addAmt = -1;\n    }\n  }\n  let meta = peekMeta(array);\n  if (notify) {\n    if (addAmt < 0 || removeAmt < 0 || addAmt - removeAmt !== 0) {\n      notifyPropertyChange(array, 'length', meta);\n    }\n    notifyPropertyChange(array, '[]', meta);\n  }\n  sendEvent(array, '@array:change', [array, startIdx, removeAmt, addAmt]);\n  if (meta !== null) {\n    let length = array.length;\n    let addedAmount = addAmt === -1 ? 0 : addAmt;\n    let removedAmount = removeAmt === -1 ? 0 : removeAmt;\n    let delta = addedAmount - removedAmount;\n    let previousLength = length - delta;\n    let normalStartIdx = startIdx < 0 ? previousLength + startIdx : startIdx;\n    if (meta.revisionFor('firstObject') !== undefined && normalStartIdx === 0) {\n      notifyPropertyChange(array, 'firstObject', meta);\n    }\n    if (meta.revisionFor('lastObject') !== undefined) {\n      let previousLastIndex = previousLength - 1;\n      let lastAffectedIndex = normalStartIdx + removedAmount;\n      if (previousLastIndex < lastAffectedIndex) {\n        notifyPropertyChange(array, 'lastObject', meta);\n      }\n    }\n  }\n  return array;\n}\n\nconst EMPTY_ARRAY = Object.freeze([]);\n\n// Ideally, we'd use MutableArray.detect but for unknown reasons this causes\n// the node tests to fail strangely.\nfunction isMutableArray(obj) {\n  return obj != null && typeof obj.replace === 'function';\n}\nfunction replace(array, start, deleteCount, items = EMPTY_ARRAY) {\n  if (isMutableArray(array)) {\n    array.replace(start, deleteCount, items);\n  } else {\n    (isDevelopingApp() && !(Array.isArray(array)) && assert('Can only replace content of a native array or MutableArray', Array.isArray(array)));\n    replaceInNativeArray(array, start, deleteCount, items);\n  }\n}\nconst CHUNK_SIZE = 60000;\n\n// To avoid overflowing the stack, we splice up to CHUNK_SIZE items at a time.\n// See https://code.google.com/p/chromium/issues/detail?id=56588 for more details.\nfunction replaceInNativeArray(array, start, deleteCount, items) {\n  arrayContentWillChange(array, start, deleteCount, items.length);\n  if (items.length <= CHUNK_SIZE) {\n    array.splice(start, deleteCount, ...items);\n  } else {\n    array.splice(start, deleteCount);\n    for (let i = 0; i < items.length; i += CHUNK_SIZE) {\n      let chunk = items.slice(i, i + CHUNK_SIZE);\n      array.splice(start + i, 0, ...chunk);\n    }\n  }\n  arrayContentDidChange(array, start, deleteCount, items.length);\n}\nfunction arrayObserversHelper(obj, target, opts, operation) {\n  let {\n    willChange,\n    didChange\n  } = opts;\n  operation(obj, '@array:before', target, willChange);\n  operation(obj, '@array:change', target, didChange);\n\n  /*\n   * Array proxies have a `_revalidate` method which must be called to set\n   * up their internal array observation systems.\n   */\n  obj._revalidate?.();\n  return obj;\n}\nfunction addArrayObserver(array, target, opts) {\n  return arrayObserversHelper(array, target, opts, addListener);\n}\nfunction removeArrayObserver(array, target, opts) {\n  return arrayObserversHelper(array, target, opts, removeListener);\n}\n\nexport { replace as a, arrayContentWillChange as b, arrayContentDidChange as c, addArrayObserver as d, removeArrayObserver as e, replaceInNativeArray as r };\n","// import Logger from './logger';\n\nfunction assert(test, msg) {\n}\n\n/**\n * This constant exists to make it easier to differentiate normal logs from\n * errant console.logs. LOGGER can be used outside of LOCAL_TRACE_LOGGING checks,\n * and is meant to be used in the rare situation where a console.* call is\n * actually appropriate.\n */\nconst LOGGER = console;\nfunction assertNever(value, desc = 'unexpected unreachable branch') {\n  LOGGER.log('unreachable', value);\n  LOGGER.log(`${desc} :: ${JSON.stringify(value)} (${value})`);\n  throw new Error(`code reached unreachable`);\n}\n\nexport { assert as a, assertNever as b };\n","class Cache {\n  size = 0;\n  misses = 0;\n  hits = 0;\n  constructor(limit, func, store = new Map()) {\n    this.limit = limit;\n    this.func = func;\n    this.store = store;\n  }\n  get(key) {\n    if (this.store.has(key)) {\n      this.hits++;\n      // SAFETY: we know the value is present because `.has(key)` was `true`.\n      return this.store.get(key);\n    } else {\n      this.misses++;\n      return this.set(key, this.func(key));\n    }\n  }\n  set(key, value) {\n    if (this.limit > this.size) {\n      this.size++;\n      this.store.set(key, value);\n    }\n    return value;\n  }\n  purge() {\n    this.store.clear();\n    this.size = 0;\n    this.hits = 0;\n    this.misses = 0;\n  }\n}\n\nexport { Cache as C };\n","import './debug-to-string-BsFOvUtQ.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { e as $v0, f as $t1, g as $t0, h as $s1, $ as $s0, d as $sp, c as $fp, b as $ra, a as $pc } from './registers-ylirb0dq.js';\nimport { b as assertNever } from './assert-CUCJBR2C.js';\nimport '../@glimmer/global-context/index.js';\nimport '../@glimmer/validator/index.js';\nimport './reference-B6HMX4y0.js';\nimport { I as InternalComponentCapabilities } from './flags-BsZlvEeR.js';\n\nconst CURRIED_COMPONENT = 0;\nconst CURRIED_HELPER = 1;\nconst CURRIED_MODIFIER = 2;\n\nconst SIGN_BIT = -536870913;\nconst MAX_INT = ~SIGN_BIT - 1;\nconst MIN_INT = ~MAX_INT;\nfunction isHandle(value) {\n  return value >= 0;\n}\nfunction constants(...values) {\n  return [false, true, null, undefined, ...values];\n}\nfunction isSmallInt(value) {\n  return value % 1 === 0 && value <= MAX_INT && value >= MIN_INT;\n}\nfunction encodeNegative(num) {\n  return num & SIGN_BIT;\n}\nfunction decodeNegative(num) {\n  return num | ~SIGN_BIT;\n}\nfunction encodePositive(num) {\n  return ~num;\n}\nfunction decodePositive(num) {\n  return ~num;\n}\nfunction encodeHandle(num) {\n  return num;\n}\nfunction decodeHandle(num) {\n  return num;\n}\nfunction encodeImmediate(num) {\n  num |= 0;\n  return num < 0 ? encodeNegative(num) : encodePositive(num);\n}\nfunction decodeImmediate(num) {\n  num |= 0;\n  return num > SIGN_BIT ? decodePositive(num) : decodeNegative(num);\n}\n[1, -1].forEach(x => decodeImmediate(encodeImmediate(x)));\n\nconst VM_HELPER_OP = 16;\nconst VM_SET_NAMED_VARIABLES_OP = 17;\nconst VM_SET_BLOCKS_OP = 18;\nconst VM_SET_VARIABLE_OP = 19;\nconst VM_SET_BLOCK_OP = 20;\nconst VM_GET_VARIABLE_OP = 21;\nconst VM_GET_PROPERTY_OP = 22;\nconst VM_GET_BLOCK_OP = 23;\nconst VM_SPREAD_BLOCK_OP = 24;\nconst VM_HAS_BLOCK_OP = 25;\nconst VM_HAS_BLOCK_PARAMS_OP = 26;\nconst VM_CONCAT_OP = 27;\nconst VM_CONSTANT_OP = 28;\nconst VM_CONSTANT_REFERENCE_OP = 29;\nconst VM_PRIMITIVE_OP = 30;\nconst VM_PRIMITIVE_REFERENCE_OP = 31;\nconst VM_DUP_OP = 33;\nconst VM_POP_OP = 34;\nconst VM_LOAD_OP = 35;\nconst VM_FETCH_OP = 36;\nconst VM_ROOT_SCOPE_OP = 37;\nconst VM_VIRTUAL_ROOT_SCOPE_OP = 38;\nconst VM_CHILD_SCOPE_OP = 39;\nconst VM_POP_SCOPE_OP = 40;\nconst VM_TEXT_OP = 41;\nconst VM_COMMENT_OP = 42;\nconst VM_APPEND_HTML_OP = 43;\nconst VM_APPEND_SAFE_HTML_OP = 44;\nconst VM_APPEND_DOCUMENT_FRAGMENT_OP = 45;\nconst VM_APPEND_NODE_OP = 46;\nconst VM_APPEND_TEXT_OP = 47;\nconst VM_OPEN_ELEMENT_OP = 48;\nconst VM_OPEN_DYNAMIC_ELEMENT_OP = 49;\nconst VM_PUSH_REMOTE_ELEMENT_OP = 50;\nconst VM_STATIC_ATTR_OP = 51;\nconst VM_DYNAMIC_ATTR_OP = 52;\nconst VM_COMPONENT_ATTR_OP = 53;\nconst VM_FLUSH_ELEMENT_OP = 54;\nconst VM_CLOSE_ELEMENT_OP = 55;\nconst VM_POP_REMOTE_ELEMENT_OP = 56;\nconst VM_MODIFIER_OP = 57;\nconst VM_BIND_DYNAMIC_SCOPE_OP = 58;\nconst VM_PUSH_DYNAMIC_SCOPE_OP = 59;\nconst VM_POP_DYNAMIC_SCOPE_OP = 60;\nconst VM_COMPILE_BLOCK_OP = 61;\nconst VM_PUSH_BLOCK_SCOPE_OP = 62;\nconst VM_PUSH_SYMBOL_TABLE_OP = 63;\nconst VM_INVOKE_YIELD_OP = 64;\nconst VM_JUMP_IF_OP = 65;\nconst VM_JUMP_UNLESS_OP = 66;\nconst VM_JUMP_EQ_OP = 67;\nconst VM_ASSERT_SAME_OP = 68;\nconst VM_ENTER_OP = 69;\nconst VM_EXIT_OP = 70;\nconst VM_TO_BOOLEAN_OP = 71;\nconst VM_ENTER_LIST_OP = 72;\nconst VM_EXIT_LIST_OP = 73;\nconst VM_ITERATE_OP = 74;\nconst VM_MAIN_OP = 75;\nconst VM_CONTENT_TYPE_OP = 76;\nconst VM_CURRY_OP = 77;\nconst VM_PUSH_COMPONENT_DEFINITION_OP = 78;\nconst VM_PUSH_DYNAMIC_COMPONENT_INSTANCE_OP = 79;\nconst VM_RESOLVE_DYNAMIC_COMPONENT_OP = 80;\nconst VM_RESOLVE_CURRIED_COMPONENT_OP = 81;\nconst VM_PUSH_ARGS_OP = 82;\nconst VM_PUSH_EMPTY_ARGS_OP = 83;\nconst VM_PREPARE_ARGS_OP = 85;\nconst VM_CAPTURE_ARGS_OP = 86;\nconst VM_CREATE_COMPONENT_OP = 87;\nconst VM_REGISTER_COMPONENT_DESTRUCTOR_OP = 88;\nconst VM_PUT_COMPONENT_OPERATIONS_OP = 89;\nconst VM_GET_COMPONENT_SELF_OP = 90;\nconst VM_GET_COMPONENT_TAG_NAME_OP = 91;\nconst VM_GET_COMPONENT_LAYOUT_OP = 92;\nconst VM_POPULATE_LAYOUT_OP = 95;\nconst VM_INVOKE_COMPONENT_LAYOUT_OP = 96;\nconst VM_BEGIN_COMPONENT_TRANSACTION_OP = 97;\nconst VM_COMMIT_COMPONENT_TRANSACTION_OP = 98;\nconst VM_DID_CREATE_ELEMENT_OP = 99;\nconst VM_DID_RENDER_LAYOUT_OP = 100;\nconst VM_DEBUGGER_OP = 103;\nconst VM_STATIC_COMPONENT_ATTR_OP = 105;\nconst VM_DYNAMIC_CONTENT_TYPE_OP = 106;\nconst VM_DYNAMIC_HELPER_OP = 107;\nconst VM_DYNAMIC_MODIFIER_OP = 108;\nconst VM_IF_INLINE_OP = 109;\nconst VM_NOT_OP = 110;\nconst VM_GET_DYNAMIC_VAR_OP = 111;\nconst VM_LOG_OP = 112;\nconst VM_SYSCALL_SIZE = 113;\n\nconst VM_PUSH_FRAME_OP = 0;\nconst VM_POP_FRAME_OP = 1;\nconst VM_INVOKE_VIRTUAL_OP = 2;\nconst VM_INVOKE_STATIC_OP = 3;\nconst VM_JUMP_OP = 4;\nconst VM_RETURN_OP = 5;\nconst VM_RETURN_TO_OP = 6;\nconst VM_MACHINE_SIZE = 7;\nfunction isMachineOp(value) {\n  return value >= 0 && value <= 15;\n}\n\nfunction decodeCurry(curry) {\n  switch (curry) {\n    case CURRIED_COMPONENT:\n      return 'component';\n    case CURRIED_HELPER:\n      return 'helper';\n    case CURRIED_MODIFIER:\n      return 'modifier';\n    default:\n      throw Error(`Unexpected curry value: ${curry}`);\n  }\n}\nfunction decodeRegister(register) {\n  switch (register) {\n    case $pc:\n      return '$pc';\n    case $ra:\n      return '$ra';\n    case $fp:\n      return '$fp';\n    case $sp:\n      return '$sp';\n    case $s0:\n      return '$s0';\n    case $s1:\n      return '$s1';\n    case $t0:\n      return '$t0';\n    case $t1:\n      return '$t1';\n    case $v0:\n      return '$v0';\n    default:\n      return `$bug${register}`;\n  }\n}\nfunction decodePrimitive(primitive, constants) {\n  if (primitive >= 0) {\n    return constants.getValue(decodeHandle(primitive));\n  }\n  return decodeImmediate(primitive);\n}\n\nconst todo = ({\n  label,\n  value\n}) => ['error:operand', value, {\n  label\n}];\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\nclass Disassembler {\n  static build(builder) {\n    return builder(new Disassembler()).#disms;\n  }\n  #disms;\n  constructor() {\n    this.#disms = {};\n  }\n  addNullable(names, dism) {\n    for (const name of names) {\n      this.#disms[name] = dism;\n      this.#disms[`${name}?`] = dism;\n    }\n    return this;\n  }\n  add(names, dism) {\n    const add = (name, dism) => this.#disms[name] = dism;\n    for (const name of names) {\n      add(name, dism);\n    }\n    return this;\n  }\n}\nDisassembler.build(d => {\n  return d.add(['imm/u32', 'imm/i32', 'imm/u32{todo}', 'imm/i32{todo}'], ({\n    value\n  }) => ['number', value]).add(['const/i32[]'], ({\n    value,\n    constants\n  }) => ['array', constants.getArray(value), {\n    kind: Number\n  }]).add(['const/bool'], ({\n    value\n  }) => ['boolean', !!value]).add(['imm/bool'], ({\n    value,\n    constants\n  }) => ['boolean', constants.getValue(decodeHandle(value))]).add(['handle'], ({\n    constants,\n    value\n  }) => ['constant', constants.getValue(value)]).add(['handle/block'], ({\n    value,\n    heap\n  }) => ['instruction', heap.getaddr(value)]).add(['imm/pc'], ({\n    value\n  }) => ['instruction', value]).add(['const/any[]'], ({\n    value,\n    constants\n  }) => ['array', constants.getArray(value)]).add(['const/primitive'], ({\n    value,\n    constants\n  }) => ['primitive', decodePrimitive(value, constants)]).add(['register'], ({\n    value\n  }) => ['register', decodeRegister(value)]).add(['const/any'], ({\n    value,\n    constants\n  }) => ['dynamic', constants.getValue(value)]).add(['variable'], ({\n    value,\n    meta\n  }) => {\n    return ['variable', value, {\n      name: meta?.symbols.lexical?.at(value) ?? null\n    }];\n  }).add(['register/instruction'], ({\n    value\n  }) => ['instruction', value]).add(['imm/enum<curry>'], ({\n    value\n  }) => ['enum<curry>', decodeCurry(value)]).addNullable(['const/str'], ({\n    value,\n    constants\n  }) => ['string', constants.getValue(value)]).addNullable(['const/str[]'], ({\n    value,\n    constants\n  }) => ['array', constants.getArray(value), {\n    kind: String\n  }]).add(['imm/block:handle'], todo).add(['const/definition'], todo).add(['const/fn'], todo).add(['instruction/relative'], ({\n    value,\n    offset\n  }) => ['instruction', offset + value]).add(['register/sN'], todo).add(['register/stack'], todo).add(['register/tN'], todo).add(['register/v0'], todo);\n});\n\n/* This file is generated by build/debug.js */\n\nnew Array(VM_SYSCALL_SIZE).fill(null);\nnew Array(VM_MACHINE_SIZE).fill(null);\n\nconst ANNOTATION_STYLES = ['background-color: oklch(93% 0.03 300); color: oklch(34% 0.18 300)', 'background-color: oklch(93% 0.03 250); color: oklch(34% 0.18 250)', 'background-color: oklch(93% 0.03 200); color: oklch(34% 0.18 200)', 'background-color: oklch(93% 0.03 150); color: oklch(34% 0.18 150)', 'background-color: oklch(93% 0.03 100); color: oklch(34% 0.18 100)', 'background-color: oklch(93% 0.03 50); color: oklch(34% 0.18 50)', 'background-color: oklch(93% 0.03 0); color: oklch(34% 0.18 0)'];\n\n/**\n * The `LogFragmentBuffer` is responsible for collecting the fragments that are logged to the\n * `DebugLogger` so that they can be accumulated during a group and flushed together.\n *\n * This queuing serves two purposes:\n *\n * 1. To allow the individual fragments that make up a single line to append their values to\n *    the current line. To accomplish this, each fragment can append static content and its\n *    formatting specifier (e.g. `%o`) to the accumulated {@link #template} *and* append the\n *    value to format to the {@link #substitutions} array.\n * 2. To allow logs that refer to objects to be represented as footnotes in the current line,\n *    with the footnote to be printed in a later line.\n *\n * This allows a list of fragments, each of which represent formattable values, to be flattened\n * into a single template string and an array of values to format.\n *\n * ## Footnotes\n *\n * An opcode slice containing constant references will be logged like this:\n *\n * ```\n * ...\n * 362. (PushArgs names=[] block-names=[] flags=16)\n * 366. (Helper helper=[0])\n * [0] glimmerHelper()\n * 368. (PopFrame)\n * 369. (Fetch register=$v0)\n * 371. (Primitive constant=\"/index.html\")\n * ...\n * ```\n *\n * The fragment for line `366` includes an `ObjectFragment` for the helper value. When logged,\n * the object will be represented as a footnote and the value will be printed in a later\n * line.\n */\nclass LogFragmentBuffer {\n  /**\n   * The first parameter to the `console.log` family of APIs is a *template* that can use\n   * format specifiers (e.g. `%c`, `%o`, and `%O`) to refer to subsequent parameters.\n   *\n   * When a fragment is appended to a line,\n   */\n  #template = '';\n\n  /**\n   * Each format specified in the {@link #template} corresponds to a value in the\n   * `#substitutions` array.\n   */\n  #substitutions = [];\n\n  /**\n   * The logging options for the buffer, which currently only contains `showSubtle`.\n   *\n   * When fragments call the buffer's {@linkcode append} method, they specify whether the\n   * content to append is subtle or not. If the buffer is not configured to show subtle\n   * content, the content is not appended.\n   *\n   * This allows fragments to append content to the buffer without having to know how the\n   * buffer is configured.\n   */\n  #options;\n\n  /**\n   * A single line can produce multiple queued log entries. This happens when fragments\n   * append *footnotes* to the buffer. A *reference* to the footnote is appended to the\n   * primary line, and a line containing the *value* of the footnote is appended to the\n   * `#queued` array.\n   *\n   * Both the primary line and any queued footnotes are flushed together when the buffer\n   * is flushed.\n   */\n  #footnotes = [];\n  #nextFootnote = 1;\n  #style = 0;\n  constructor(options) {\n    this.#options = options;\n  }\n\n  /**\n   * Add a footnoted value to the current buffer.\n   *\n   * If the `subtle` option is set, the fragment will only be printed if the buffer is configured\n   * to show subtle content.\n   *\n   * This method takes two callbacks: `add` and `append`.\n   *\n   * The `append` callback behaves like {@linkcode append}, but without the `subtle` argument. If\n   * `addFootnoted` is called with `subtle: false`, then the callback will never be called, so\n   * there is no need to pass the `subtle` argument again.\n   *\n   * The `add` callback is responsible for appending the footnote itself to the buffer. The first\n   * parameter to `add` (`useNumber`) specifies whether the caller has used the footnote number\n   * to refer to the footnote.\n   *\n   * This is typically true, but fragments can specify an alternative annotation that should be used\n   * instead of the default footnote number. In that case, the footnote number is not used, and the\n   * next footnote is free to use it.\n   *\n   * The `add` callback also takes a template string and an optional list of substitutions, which\n   * describe the way the footnote itself should be formatted.\n   */\n  addFootnoted(subtle, add) {\n    if (subtle && !this.#options.showSubtle) return;\n    const child = new LogFragmentBuffer(this.#options);\n    const style = ANNOTATION_STYLES[this.#style++ % ANNOTATION_STYLES.length];\n    const usedNumber = add({\n      n: this.#nextFootnote,\n      style\n    }, child);\n    if (usedNumber) {\n      this.#nextFootnote += 1;\n    }\n    this.#footnotes.push({\n      type: 'line',\n      subtle: false,\n      template: child.#template,\n      substitutions: child.#substitutions\n    });\n    this.#footnotes.push(...child.#footnotes);\n  }\n\n  /**\n   * Append a fragment to the current buffer.\n   *\n   * If the `subtle` option is set, the fragment will only be printed if the buffer is configured\n   * to show subtle content.\n   */\n  append(subtle, template, ...substitutions) {\n    if (subtle && !this.#options.showSubtle) return;\n    this.#template += template;\n    this.#substitutions.push(...substitutions);\n  }\n  #mapLine(line) {\n    if (line.subtle && !this.#options.showSubtle) return [];\n    return [{\n      type: 'line',\n      line: [line.template, ...line.substitutions]\n    }];\n  }\n  flush() {\n    return [{\n      type: 'line',\n      line: [this.#template, ...this.#substitutions]\n    }, ...this.#footnotes.flatMap(queued => this.#mapLine(queued))];\n  }\n}\n\n// inspired by https://github.com/ChromeDevTools/devtools-frontend/blob/c2c17396c9e0da3f1ce6514c3a946f88a06b17f2/front_end/ui/legacy/themeColors.css#L65\nconst STYLES = {\n  var: 'color: grey',\n  varReference: 'color: blue; text-decoration: underline',\n  varBinding: 'color: blue;',\n  specialVar: 'color: blue',\n  prop: 'color: grey',\n  specialProp: 'color: red',\n  token: 'color: green',\n  def: 'color: blue',\n  builtin: 'color: blue',\n  punct: 'color: GrayText',\n  kw: 'color: rgb(185 0 99 / 100%);',\n  type: 'color: teal',\n  number: 'color: blue',\n  string: 'color: red',\n  null: 'color: grey',\n  specialString: 'color: darkred',\n  atom: 'color: blue',\n  attrName: 'color: orange',\n  attrValue: 'color: blue',\n  boolean: 'color: blue',\n  comment: 'color: green',\n  meta: 'color: grey',\n  register: 'color: purple',\n  constant: 'color: purple',\n  dim: 'color: grey',\n  internals: 'color: lightgrey; font-style: italic',\n  diffAdd: 'color: Highlight',\n  diffDelete: 'color: SelectedItemText; background-color: SelectedItem',\n  diffChange: 'color: MarkText; background-color: Mark',\n  sublabel: 'font-style: italic; color: grey',\n  error: 'color: red',\n  label: 'text-decoration: underline',\n  errorLabel: 'color: darkred; font-style: italic',\n  errorMessage: 'color: darkred; text-decoration: underline',\n  stack: 'color: grey; font-style: italic',\n  unbold: 'font-weight: normal',\n  pointer: 'background-color: lavender; color: indigo',\n  pointee: 'background-color: lavender; color: indigo',\n  focus: 'font-weight: bold',\n  focusColor: 'background-color: lightred; color: darkred'\n};\nfunction mergeStyle(a, b) {\n  if (a && b) {\n    return `${a}; ${b}`;\n  } else {\n    return a || b;\n  }\n}\n\nfunction intoFormat(format) {\n  if (typeof format === 'string') {\n    return {\n      style: STYLES[format]\n    };\n  } else {\n    return format;\n  }\n}\nfunction formats(...formats) {\n  return formats.map(c => intoFormat(c).style).join('; ');\n}\n\nconst FORMATTERS = {\n  value: '%O',\n  string: '%s',\n  integer: '%d',\n  float: '%f',\n  special: '%o'\n};\n\n/**\n * A leaf fragment that represents an arbitrary value.\n *\n * When the value is a primitive, the fragment is appended to the buffer as if it was an instance of\n * the appropriate leaf fragment type (e.g. strings are appended as if they were `StringFragment`).\n *\n * Otherwise, `ValueFragment` is appended to the current line as a footnote reference and the value\n * itself is appended to a later line that *defines* the footnote using the `%O` format specifier.\n */\n\n/**\n * A leaf fragment that represents a string value.\n *\n * Corresponds to the `%s` format specifier.\n */\n\n/**\n * A leaf fragment that represents an integer value.\n *\n * Corresponds to the `%d` format specifier.\n */\n\n/**\n * A leaf fragment that represents a float value.\n *\n * Corresponds to the `%f` format specifier.\n */\n\n/**\n * A leaf fragment that represents a DOM node.\n *\n * Corresponds to the `%o` format specifier.\n */\n\n/**\n * The list of leaf fragment types correspond exactly to the list of console.log\n * format specifiers.\n */\n\n/**\n * @import { StyleName } from './styles';\n */\n\n/**\n * Fragment is the most fundamental building block of the debug logger.\n *\n */\nclass Fragment {\n  static integer(value, options) {\n    return new Fragment({\n      kind: 'integer',\n      value,\n      ...options\n    });\n  }\n  static float(value, options) {\n    return new Fragment({\n      kind: 'float',\n      value,\n      ...options\n    });\n  }\n  static string(value, options) {\n    return new Fragment({\n      kind: 'string',\n      value,\n      ...options\n    });\n  }\n  static special(value, options) {\n    return new Fragment({\n      kind: 'special',\n      value,\n      ...options\n    });\n  }\n  #type;\n  constructor(type) {\n    this.#type = type;\n  }\n\n  /**\n   * A subtle fragment is only printed if the `showSubtle` option is set.\n   *\n   * Returns true if this fragment is a subtle leaf or is a multi fragment\n   * with all subtle leaves.\n   */\n  isSubtle() {\n    return this.leaves().every(leaf => leaf.#type.subtle);\n  }\n\n  /**\n   * If the current fragment is not empty, apply `ifPresent` to the current\n   * fragment. Otherwise, do nothing.\n   *\n   * If the current fragment is subtle, the result is also subtle.\n   */\n  map(ifPresent) {\n    if (this.isEmpty()) return this;\n    const fragment = ifPresent(this);\n    return this.isSubtle() ? fragment.subtle() : fragment;\n  }\n\n  /**\n   * A fragment is empty if it should not be printed with the provided display options.\n   *\n   * This means that if a fragment is subtle and `showSubtle` is false, the fragment is empty.\n   */\n  isEmpty(options = {\n    showSubtle: true\n  }) {\n    return this.leaves().every(leaf => !leaf.#shouldShow(options));\n  }\n\n  /**\n   * Returns an array of {@linkcode LeafFragment}s that make up the current\n   * fragment.\n   *\n   * This effectively flattens any number of nested multi-fragments into a flat array of leaf\n   * fragments.\n   */\n  leaves() {\n    if (this.#type.kind === 'multi') {\n      return this.#type.value.flatMap(f => f.leaves());\n    } else if (this.#type.kind === 'string' && this.#type.value === '') {\n      return [];\n    } else {\n      return [this];\n    }\n  }\n\n  /**\n   * Returns a fragment with the specified subtle status without mutating the current fragment.\n   *\n   * If `isSubtle` is true, the fragment will also be styled with the `subtle` style.\n   */\n  subtle(isSubtle = true) {\n    if (!this.isSubtle() && !isSubtle) {\n      return this;\n    }\n    const fragment = this.#subtle(isSubtle);\n    return isSubtle ? fragment.styleAll('dim') : fragment;\n  }\n  #subtle(isSubtle) {\n    if (this.#type.kind === 'multi') {\n      return new Fragment({\n        ...this.#type,\n        value: this.leaves().flatMap(f => f.subtle(isSubtle).leaves())\n      });\n    } else {\n      return new Fragment({\n        ...this.#type,\n        subtle: isSubtle\n      });\n    }\n  }\n\n  /**\n   * Apply the specified styles to the current fragment (if it's a leaf) or all\n   * of its children (if it's a multi-fragment).\n   *\n   * Keep in mind that merging styles might be very difficult to undo, so treat\n   * this as a low-level operation, and prefer to use higher-level concepts like\n   * `subtle` if you can instead.\n   */\n  styleAll(...allFormats) {\n    if (allFormats.length === 0) return this;\n    if (this.#type.kind === 'multi') {\n      return new Fragment({\n        ...this.#type,\n        value: this.#type.value.flatMap(f => f.styleAll(...allFormats).leaves())\n      });\n    } else {\n      return new Fragment({\n        ...this.#type,\n        style: mergeStyle(this.#type.style, formats(...allFormats))\n      });\n    }\n  }\n\n  /**\n   * Convert the current fragment into a string with no additional formatting.\n   * The primary purpose for this method is to support converting a fragment\n   * into a string for inclusion in thrown Errors. If you're going to *log*\n   * a fragment, log it using `DebugLogger` and don't convert it to\n   * a string first.\n   */\n  stringify(options) {\n    return this.leaves().filter(leaf => leaf.#shouldShow(options)).map(leaf => {\n      const fragment = leaf.#type;\n      if (fragment.kind === 'value') {\n        return `<object>`;\n      } else {\n        // eslint-disable-next-line @typescript-eslint/no-base-to-string -- @fixme\n        return String(fragment.value);\n      }\n    }).join('');\n  }\n\n  /**\n   * Should the current fragment be printed with the provided display options?\n   *\n   * Importantly, if the current fragment contains subtle content but the `showSubtle` option is\n   * false, `#shouldShow` will return false.\n   *\n   * @see isEmpty\n   */\n  #shouldShow(options) {\n    return this.leaves().some(leaf => {\n      const fragment = leaf.#type;\n      if (fragment.subtle && !options.showSubtle) {\n        return false;\n      } else if (fragment.kind === 'string' && fragment.value === '') {\n        return false;\n      }\n      return true;\n    });\n  }\n\n  /**\n   * Convert this fragment into a Loggable for logging through the `DebugLogger`.\n   */\n  toLoggable(options) {\n    const buffer = new LogFragmentBuffer(options);\n    for (const leaf of this.leaves()) {\n      leaf.appendTo(buffer);\n    }\n    return buffer.flush();\n  }\n\n  /**\n   * Append this fragment to the low-level `LogFragmentBuffer`.\n   */\n  appendTo(buffer) {\n    const fragment = this.#type;\n    const subtle = this.isSubtle();\n\n    // If the fragment is a multi fragment, append each of its leaves to the buffer\n    // and return.\n    if (fragment.kind === 'multi') {\n      for (const f of fragment.value) {\n        f.appendTo(buffer);\n      }\n      return;\n    }\n\n    // If the fragment is a value fragment and the value is a primitive, give it special\n    // treatment since we can trivially serialize it.\n    if (fragment.kind === 'value') {\n      // If the value is a string or number, convert it into a string, float or integer\n      // fragment and append that instead. This means that strings and numbers are\n      // represented the same way in logs whether they are explicitly created as string,\n      // float or integer fragments *or* whether they are the value of a value fragment.\n      if (typeof fragment.value === 'string') {\n        return Fragment.string(JSON.stringify(fragment.value), {\n          style: STYLES.string,\n          subtle\n        }).appendTo(buffer);\n      } else if (typeof fragment.value === 'number') {\n        const f = fragment.value % 1 === 0 ? Fragment.integer : Fragment.float;\n        return f(fragment.value, {\n          style: STYLES.number,\n          subtle\n        }).appendTo(buffer);\n\n        // Alternatively, if the value of a `value` fragment is `null` or `undefined`,\n        // append the string `null` or `undefined`, respectively with the `null` style.\n      } else if (fragment.value === null || fragment.value === undefined) {\n        return Fragment.string('null', {\n          style: STYLES.null,\n          subtle: this.isSubtle()\n        }).appendTo(buffer);\n\n        // Finally, if the value of a `value` fragment is boolean, append the string\n        // `true` or `false` with the `boolean` style.\n      } else if (typeof fragment.value === 'boolean') {\n        return Fragment.string(String(fragment.value), {\n          style: STYLES.boolean,\n          subtle\n        }).appendTo(buffer);\n      }\n\n      // All other values (i.e. objects and functions) are represented as footnotes and\n      // are handled below.\n    }\n    switch (fragment.kind) {\n      // strings are appended using %s\n      case 'string':\n      // integers are appended using %d\n      case 'integer':\n      // floats are appended using %f\n      case 'float':\n        buffer.append(fragment.subtle ?? false, `%c${FORMATTERS[fragment.kind]}`, fragment.style, fragment.value);\n        break;\n      // the remaining value types are represented as footnotes\n      // dom nodes are appended to the footnote line using %o\n      case 'special':\n      // values are appended to the footnote line using %O\n      case 'value':\n        {\n          // If a fragment has an associated annotation, we'll use the annotation as the\n          // footnote rather than the footnote number.\n          const override = fragment.kind === 'value' ? fragment.display : undefined;\n          buffer.addFootnoted(fragment.subtle ?? false, ({\n            n,\n            style\n          }, footnote) => {\n            const appendValueAsFootnote = ref => void footnote.append(subtle, `%c| %c[${ref}]%c ${FORMATTERS[fragment.kind]}`, STYLES.dim, style, '', fragment.value);\n            if (override) {\n              if ('inline' in override) {\n                override.inline.subtle(subtle).appendTo(footnote);\n                return false;\n              }\n              buffer.append(subtle, `%c[${override.ref}]%c`, style, '');\n              if (override.footnote) {\n                frag`${as.dim('| ')}${override.footnote}`.subtle(subtle).appendTo(footnote);\n              } else {\n                appendValueAsFootnote(override.ref);\n              }\n              return false;\n            }\n            buffer.append(subtle, `%c[${n}]%c`, style, '');\n            appendValueAsFootnote(String(n));\n            return true;\n          });\n          break;\n        }\n      default:\n        assertNever(fragment);\n    }\n  }\n}\nfunction intoFragment(value) {\n  const fragments = intoFragments(value);\n  const [first, ...rest] = fragments;\n  if (first !== undefined && rest.length === 0) {\n    return first;\n  }\n  return new Fragment({\n    kind: 'multi',\n    value: fragments\n  });\n}\nfunction intoFragments(value) {\n  if (Array.isArray(value)) {\n    return value.flatMap(intoFragments);\n  } else if (typeof value === 'object' && value !== null) {\n    return value.leaves();\n  } else {\n    return [intoLeafFragment(value)];\n  }\n}\nfunction intoLeafFragment(value) {\n  if (value === null) {\n    return new Fragment({\n      kind: 'value',\n      value: null\n    });\n  } else if (typeof value === 'number') {\n    return new Fragment({\n      kind: 'integer',\n      value\n    });\n  } else if (typeof value === 'string') {\n    // If the string contains only whitespace and punctuation, we can treat it as a\n    // punctuation fragment.\n    if (/^[\\s\\p{P}\\p{Sm}]*$/u.test(value)) {\n      return new Fragment({\n        kind: 'string',\n        value,\n        style: STYLES.punct\n      });\n    } else {\n      return new Fragment({\n        kind: 'string',\n        value\n      });\n    }\n  } else {\n    return value;\n  }\n}\nfunction frag(strings, ...values) {\n  const buffer = [];\n  strings.forEach((string, i) => {\n    buffer.push(...intoFragment(string).leaves());\n    const dynamic = values[i];\n    if (dynamic) {\n      buffer.push(...intoFragment(dynamic).leaves());\n    }\n  });\n  return new Fragment({\n    kind: 'multi',\n    value: buffer\n  });\n}\nconst as = Object.fromEntries(Object.entries(STYLES).map(([k, v]) => [k, value => intoFragment(value).styleAll({\n  style: v\n})]));\n\nconst FROM_CAPABILITIES = isDevelopingApp() ? new WeakSet() : undefined;\nfunction buildCapabilities(capabilities) {\n  if (isDevelopingApp()) {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    FROM_CAPABILITIES.add(capabilities);\n    Object.freeze(capabilities);\n  }\n  return capabilities;\n}\nconst EMPTY = InternalComponentCapabilities.Empty;\n/**\n * Converts a ComponentCapabilities object into a 32-bit integer representation.\n */\nfunction capabilityFlagsFrom(capabilities) {\n  return EMPTY | capability(capabilities, 'dynamicLayout') | capability(capabilities, 'dynamicTag') | capability(capabilities, 'prepareArgs') | capability(capabilities, 'createArgs') | capability(capabilities, 'attributeHook') | capability(capabilities, 'elementHook') | capability(capabilities, 'dynamicScope') | capability(capabilities, 'createCaller') | capability(capabilities, 'updateHook') | capability(capabilities, 'createInstance') | capability(capabilities, 'wrapped') | capability(capabilities, 'willDestroy') | capability(capabilities, 'hasSubOwner');\n}\nfunction capability(capabilities, capability) {\n  return capabilities[capability] ? InternalComponentCapabilities[capability] : EMPTY;\n}\nfunction managerHasCapability(_manager, capabilities, capability) {\n  return !!(capabilities & capability);\n}\nfunction hasCapability(capabilities, capability) {\n  return !!(capabilities & capability);\n}\n\nexport { VM_OPEN_ELEMENT_OP as $, VM_CONSTANT_OP as A, decodeHandle as B, CURRIED_COMPONENT as C, VM_CONSTANT_REFERENCE_OP as D, VM_PRIMITIVE_OP as E, FROM_CAPABILITIES as F, isHandle as G, decodeImmediate as H, VM_PRIMITIVE_REFERENCE_OP as I, VM_DUP_OP as J, VM_POP_OP as K, VM_LOAD_OP as L, VM_FETCH_OP as M, VM_BIND_DYNAMIC_SCOPE_OP as N, VM_ENTER_OP as O, VM_EXIT_OP as P, VM_PUSH_SYMBOL_TABLE_OP as Q, VM_PUSH_BLOCK_SCOPE_OP as R, VM_COMPILE_BLOCK_OP as S, VM_INVOKE_YIELD_OP as T, VM_JUMP_IF_OP as U, VM_MAIN_OP as V, VM_JUMP_UNLESS_OP as W, VM_JUMP_EQ_OP as X, VM_TO_BOOLEAN_OP as Y, VM_TEXT_OP as Z, VM_COMMENT_OP as _, constants as a, VM_OPEN_DYNAMIC_ELEMENT_OP as a0, VM_PUSH_REMOTE_ELEMENT_OP as a1, VM_POP_REMOTE_ELEMENT_OP as a2, VM_FLUSH_ELEMENT_OP as a3, VM_CLOSE_ELEMENT_OP as a4, VM_MODIFIER_OP as a5, VM_DYNAMIC_MODIFIER_OP as a6, VM_STATIC_ATTR_OP as a7, VM_DYNAMIC_ATTR_OP as a8, CURRIED_MODIFIER as a9, VM_HELPER_OP as aA, VM_GET_VARIABLE_OP as aB, VM_SET_VARIABLE_OP as aC, VM_SET_BLOCK_OP as aD, VM_ROOT_SCOPE_OP as aE, VM_GET_PROPERTY_OP as aF, VM_GET_BLOCK_OP as aG, VM_SPREAD_BLOCK_OP as aH, VM_HAS_BLOCK_OP as aI, VM_HAS_BLOCK_PARAMS_OP as aJ, VM_CONCAT_OP as aK, VM_IF_INLINE_OP as aL, VM_NOT_OP as aM, VM_GET_DYNAMIC_VAR_OP as aN, VM_LOG_OP as aO, VM_DYNAMIC_CONTENT_TYPE_OP as aP, VM_DEBUGGER_OP as aQ, VM_ENTER_LIST_OP as aR, VM_EXIT_LIST_OP as aS, VM_ITERATE_OP as aT, encodeHandle as aU, isMachineOp as aV, isSmallInt as aW, encodeImmediate as aX, VM_PUSH_COMPONENT_DEFINITION_OP as aa, VM_RESOLVE_DYNAMIC_COMPONENT_OP as ab, VM_PUSH_ARGS_OP as ac, VM_PUSH_EMPTY_ARGS_OP as ad, VM_CAPTURE_ARGS_OP as ae, VM_PREPARE_ARGS_OP as af, VM_CREATE_COMPONENT_OP as ag, VM_REGISTER_COMPONENT_DESTRUCTOR_OP as ah, VM_BEGIN_COMPONENT_TRANSACTION_OP as ai, VM_PUT_COMPONENT_OPERATIONS_OP as aj, VM_COMPONENT_ATTR_OP as ak, VM_STATIC_COMPONENT_ATTR_OP as al, VM_DID_CREATE_ELEMENT_OP as am, VM_GET_COMPONENT_SELF_OP as an, VM_GET_COMPONENT_TAG_NAME_OP as ao, VM_GET_COMPONENT_LAYOUT_OP as ap, VM_POPULATE_LAYOUT_OP as aq, VM_VIRTUAL_ROOT_SCOPE_OP as ar, VM_SET_NAMED_VARIABLES_OP as as, VM_SET_BLOCKS_OP as at, VM_INVOKE_COMPONENT_LAYOUT_OP as au, VM_DID_RENDER_LAYOUT_OP as av, VM_COMMIT_COMPONENT_TRANSACTION_OP as aw, VM_CURRY_OP as ax, VM_DYNAMIC_HELPER_OP as ay, CURRIED_HELPER as az, buildCapabilities as b, capabilityFlagsFrom as c, VM_CONTENT_TYPE_OP as d, VM_ASSERT_SAME_OP as e, VM_APPEND_HTML_OP as f, VM_APPEND_TEXT_OP as g, hasCapability as h, VM_RESOLVE_CURRIED_COMPONENT_OP as i, VM_PUSH_DYNAMIC_COMPONENT_INSTANCE_OP as j, VM_APPEND_SAFE_HTML_OP as k, VM_APPEND_DOCUMENT_FRAGMENT_OP as l, managerHasCapability as m, VM_APPEND_NODE_OP as n, VM_INVOKE_STATIC_OP as o, VM_RETURN_TO_OP as p, VM_RETURN_OP as q, VM_JUMP_OP as r, VM_INVOKE_VIRTUAL_OP as s, VM_POP_FRAME_OP as t, VM_PUSH_FRAME_OP as u, VM_SYSCALL_SIZE as v, VM_CHILD_SCOPE_OP as w, VM_POP_SCOPE_OP as x, VM_PUSH_DYNAMIC_SCOPE_OP as y, VM_POP_DYNAMIC_SCOPE_OP as z };\n","var __defProp = Object.defineProperty;\nvar __export = (target, all) => {\n  for (var name in all) __defProp(target, name, {\n    get: all[name],\n    enumerable: true\n  });\n};\n\n// src/runtime.ts\nvar runtime_exports = {};\n__export(runtime_exports, {\n  c: () => decorateClass,\n  f: () => decorateFieldV1,\n  g: () => decorateFieldV2,\n  i: () => initializeDeferredDecorator,\n  m: () => decorateMethodV1,\n  n: () => decorateMethodV2,\n  p: () => decoratePOJO\n});\nvar deferred = /* @__PURE__ */new WeakMap();\nfunction deferDecorator(proto, prop, desc) {\n  let map = deferred.get(proto);\n  if (!map) {\n    map = /* @__PURE__ */new Map();\n    deferred.set(proto, map);\n  }\n  map.set(prop, desc);\n}\nfunction findDeferredDecorator(target, prop) {\n  let cursor = target.prototype;\n  while (cursor) {\n    let desc = deferred.get(cursor)?.get(prop);\n    if (desc) {\n      return desc;\n    }\n    cursor = cursor.prototype;\n  }\n}\nfunction decorateFieldV1(target, prop, decorators, initializer) {\n  return decorateFieldV2(target.prototype, prop, decorators, initializer);\n}\nfunction decorateFieldV2(prototype, prop, decorators, initializer) {\n  let desc = {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: null\n  };\n  if (initializer) {\n    desc.initializer = initializer;\n  }\n  for (let decorator of decorators) {\n    desc = decorator(prototype, prop, desc) || desc;\n  }\n  if (desc.initializer === void 0) {\n    Object.defineProperty(prototype, prop, desc);\n  } else {\n    deferDecorator(prototype, prop, desc);\n  }\n}\nfunction decorateMethodV1({\n  prototype\n}, prop, decorators) {\n  return decorateMethodV2(prototype, prop, decorators);\n}\nfunction decorateMethodV2(prototype, prop, decorators) {\n  const origDesc = Object.getOwnPropertyDescriptor(prototype, prop);\n  let desc = {\n    ...origDesc\n  };\n  for (let decorator of decorators) {\n    desc = decorator(prototype, prop, desc) || desc;\n  }\n  if (desc.initializer !== void 0) {\n    desc.value = desc.initializer ? desc.initializer.call(prototype) : void 0;\n    desc.initializer = void 0;\n  }\n  Object.defineProperty(prototype, prop, desc);\n}\nfunction initializeDeferredDecorator(target, prop) {\n  let desc = findDeferredDecorator(target.constructor, prop);\n  if (desc) {\n    Object.defineProperty(target, prop, {\n      enumerable: desc.enumerable,\n      configurable: desc.configurable,\n      writable: desc.writable,\n      value: desc.initializer ? desc.initializer.call(target) : void 0\n    });\n  }\n}\nfunction decorateClass(target, decorators) {\n  return decorators.reduce((accum, decorator) => decorator(accum) || accum, target);\n}\nfunction decoratePOJO(pojo, decorated) {\n  for (let [type, prop, decorators] of decorated) {\n    if (type === \"field\") {\n      decoratePojoField(pojo, prop, decorators);\n    } else {\n      decorateMethodV2(pojo, prop, decorators);\n    }\n  }\n  return pojo;\n}\nfunction decoratePojoField(pojo, prop, decorators) {\n  let desc = {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: () => Object.getOwnPropertyDescriptor(pojo, prop)?.value\n  };\n  for (let decorator of decorators) {\n    desc = decorator(pojo, prop, desc) || desc;\n  }\n  if (desc.initializer) {\n    desc.value = desc.initializer.call(pojo);\n    delete desc.initializer;\n  }\n  Object.defineProperty(pojo, prop, desc);\n}\n\nexport { decorateMethodV2 as a, decorateFieldV2 as d, initializeDeferredDecorator as i };\n","import './debug-to-string-BsFOvUtQ.js';\nimport { g as getLast } from './present-B1rrjAVM.js';\nimport '@embroider/macros';\n\nfunction unwrap(val) {\n  return val;\n}\nfunction expect(val, message) {\n  return val;\n}\nfunction exhausted(value) {\n}\n\nfunction dict() {\n  return Object.create(null);\n}\nfunction isDict(u) {\n  return u !== null && u !== undefined;\n}\nfunction isIndexable(u) {\n  return typeof u === 'function' || typeof u === 'object' && u !== null;\n}\nclass StackImpl {\n  stack;\n  current = null;\n  constructor(values = []) {\n    this.stack = values;\n  }\n  get size() {\n    return this.stack.length;\n  }\n  push(item) {\n    this.current = item;\n    this.stack.push(item);\n  }\n  pop() {\n    let item = this.stack.pop();\n    this.current = getLast(this.stack) ?? null;\n    return item === undefined ? null : item;\n  }\n  nth(from) {\n    let len = this.stack.length;\n    return len < from ? null : unwrap(this.stack[len - from]);\n  }\n  isEmpty() {\n    return this.stack.length === 0;\n  }\n  snapshot() {\n    return [...this.stack];\n  }\n  toArray() {\n    return this.stack;\n  }\n}\n\nexport { StackImpl as S, isIndexable as a, exhausted as b, dict as d, expect as e, isDict as i, unwrap as u };\n","import { peekMeta } from '../@ember/-internals/meta/lib/meta.js';\n\nfunction getCachedValueFor(obj, key) {\n  let meta = peekMeta(obj);\n  if (meta) {\n    return meta.valueFor(key);\n  } else {\n    return undefined;\n  }\n}\n\nexport { getCachedValueFor as g };\n","import { a as constants, c as capabilityFlagsFrom, m as managerHasCapability } from './capabilities-DHiXCCuB.js';\nimport './debug-to-string-BsFOvUtQ.js';\nimport { e as expect } from './collections-B8me-ZlQ.js';\nimport '@embroider/macros';\nimport { a as getInternalHelperManager, b as getInternalModifierManager, g as getInternalComponentManager } from './api-CkUl6KyJ.js';\nimport '../@glimmer/destroyable/index.js';\nimport '../@glimmer/global-context/index.js';\nimport { e as enumerate } from './array-utils-CZQxrdD3.js';\nimport '../@glimmer/validator/index.js';\nimport './reference-B6HMX4y0.js';\nimport { g as getComponentTemplate } from './template-CMHIG4cn.js';\nimport { I as InternalComponentCapabilities } from './flags-BsZlvEeR.js';\nimport { t as templateFactory } from './index-CQkjwqTv.js';\nimport { SexpOpcodes as opcodes } from '../@glimmer/wire-format/index.js';\n\nfunction unwrapHandle(handle) {\n  if (typeof handle === 'number') {\n    return handle;\n  } else {\n    let error = handle.errors[0];\n    throw new Error(`Compile Error: ${error.problem} @ ${error.span.start}..${error.span.end}`);\n  }\n}\nfunction unwrapTemplate(template) {\n  if (template.result === 'error') {\n    throw new Error(`Compile Error: ${template.problem} @ ${template.span.start}..${template.span.end}`);\n  }\n  return template;\n}\n\n/**\n * Default component template, which is a plain yield\n */\nconst DEFAULT_TEMPLATE_BLOCK = [[[opcodes.Yield, 1, null]], ['&default'], []];\nconst DEFAULT_TEMPLATE = {\n  // random uuid\n  id: '1b32f5c2-7623-43d6-a0ad-9672898920a1',\n  moduleName: '__default__.hbs',\n  block: JSON.stringify(DEFAULT_TEMPLATE_BLOCK),\n  scope: null,\n  isStrictMode: true\n};\n\nconst WELL_KNOWN_EMPTY_ARRAY = Object.freeze([]);\nconst STARTER_CONSTANTS = constants(WELL_KNOWN_EMPTY_ARRAY);\nconst WELL_KNOWN_EMPTY_ARRAY_POSITION = STARTER_CONSTANTS.indexOf(WELL_KNOWN_EMPTY_ARRAY);\nclass ConstantsImpl {\n  reifiedArrs = {\n    [WELL_KNOWN_EMPTY_ARRAY_POSITION]: WELL_KNOWN_EMPTY_ARRAY\n  };\n  defaultTemplate = templateFactory(DEFAULT_TEMPLATE)();\n\n  // Used for tests and debugging purposes, and to be able to analyze large apps\n  // This is why it's enabled even in production\n  helperDefinitionCount = 0;\n  modifierDefinitionCount = 0;\n  componentDefinitionCount = 0;\n  values = STARTER_CONSTANTS.slice();\n  indexMap = new Map(this.values.map((value, index) => [value, index]));\n  helperDefinitionCache = new WeakMap();\n  modifierDefinitionCache = new WeakMap();\n  componentDefinitionCache = new WeakMap();\n  value(value) {\n    let indexMap = this.indexMap;\n    let index = indexMap.get(value);\n    if (index === undefined) {\n      index = this.values.push(value) - 1;\n      indexMap.set(value, index);\n    }\n    return index;\n  }\n  array(values) {\n    if (values.length === 0) {\n      return WELL_KNOWN_EMPTY_ARRAY_POSITION;\n    }\n    let handles = new Array(values.length);\n    for (let i = 0; i < values.length; i++) {\n      handles[i] = this.value(values[i]);\n    }\n    return this.value(handles);\n  }\n  toPool() {\n    return this.values;\n  }\n  hasHandle(handle) {\n    return this.values.length > handle;\n  }\n  helper(definitionState,\n  // TODO: Add a way to expose resolved name for debugging\n  _resolvedName = null, isOptional) {\n    let handle = this.helperDefinitionCache.get(definitionState);\n    if (handle === undefined) {\n      let managerOrHelper = getInternalHelperManager(definitionState, isOptional);\n      if (managerOrHelper === null) {\n        this.helperDefinitionCache.set(definitionState, null);\n        return null;\n      }\n      let helper = typeof managerOrHelper === 'function' ? managerOrHelper : managerOrHelper.getHelper(definitionState);\n      handle = this.value(helper);\n      this.helperDefinitionCache.set(definitionState, handle);\n      this.helperDefinitionCount++;\n    }\n    return handle;\n  }\n  modifier(definitionState, resolvedName = null, isOptional) {\n    let handle = this.modifierDefinitionCache.get(definitionState);\n    if (handle === undefined) {\n      let manager = getInternalModifierManager(definitionState, isOptional);\n      if (manager === null) {\n        this.modifierDefinitionCache.set(definitionState, null);\n        return null;\n      }\n      let definition = {\n        resolvedName,\n        manager,\n        state: definitionState\n      };\n      handle = this.value(definition);\n      this.modifierDefinitionCache.set(definitionState, handle);\n      this.modifierDefinitionCount++;\n    }\n    return handle;\n  }\n  component(definitionState, owner, isOptional, debugName) {\n    let definition = this.componentDefinitionCache.get(definitionState);\n    if (definition === undefined) {\n      let manager = getInternalComponentManager(definitionState, isOptional);\n      if (manager === null) {\n        this.componentDefinitionCache.set(definitionState, null);\n        return null;\n      }\n      let capabilities = capabilityFlagsFrom(manager.getCapabilities(definitionState));\n      let templateFactory = getComponentTemplate(definitionState);\n      let compilable = null;\n      let template;\n      if (!managerHasCapability(manager, capabilities, InternalComponentCapabilities.dynamicLayout)) {\n        template = templateFactory?.(owner) ?? this.defaultTemplate;\n      } else {\n        template = templateFactory?.(owner);\n      }\n      if (template !== undefined) {\n        template = unwrapTemplate(template);\n        compilable = managerHasCapability(manager, capabilities, InternalComponentCapabilities.wrapped) ? template.asWrappedLayout() : template.asLayout();\n      }\n      definition = {\n        resolvedName: null,\n        handle: -1,\n        // replaced momentarily\n        manager,\n        capabilities,\n        state: definitionState,\n        compilable\n      };\n      definition.handle = this.value(definition);\n      if (debugName) {\n        definition.debugName = debugName;\n      }\n      this.componentDefinitionCache.set(definitionState, definition);\n      this.componentDefinitionCount++;\n    }\n    return definition;\n  }\n  resolvedComponent(resolvedDefinition, resolvedName) {\n    let definition = this.componentDefinitionCache.get(resolvedDefinition);\n    if (definition === undefined) {\n      let {\n        manager,\n        state,\n        template\n      } = resolvedDefinition;\n      let capabilities = capabilityFlagsFrom(manager.getCapabilities(resolvedDefinition));\n      let compilable = null;\n      if (!managerHasCapability(manager, capabilities, InternalComponentCapabilities.dynamicLayout)) {\n        template = template ?? this.defaultTemplate;\n      }\n      if (template !== null) {\n        template = unwrapTemplate(template);\n        compilable = managerHasCapability(manager, capabilities, InternalComponentCapabilities.wrapped) ? template.asWrappedLayout() : template.asLayout();\n      }\n      definition = {\n        resolvedName,\n        handle: -1,\n        // replaced momentarily\n        manager,\n        capabilities,\n        state,\n        compilable\n      };\n      definition.handle = this.value(definition);\n      this.componentDefinitionCache.set(resolvedDefinition, definition);\n      this.componentDefinitionCount++;\n    }\n    return expect(definition);\n  }\n  getValue(index) {\n    return this.values[index];\n  }\n  getArray(index) {\n    let reifiedArrs = this.reifiedArrs;\n    let reified = reifiedArrs[index];\n    if (reified === undefined) {\n      let names = this.getValue(index);\n      reified = new Array(names.length);\n      for (const [i, name] of enumerate(names)) {\n        reified[i] = this.getValue(name);\n      }\n      reifiedArrs[index] = reified;\n    }\n    return reified;\n  }\n}\n\nexport { ConstantsImpl as C, unwrapTemplate as a, unwrapHandle as u };\n","/**\n * An object branded with a local debug type has special local trace logging\n * behavior.\n *\n * If `LOCAL_DEBUG` is `false`, this function does nothing (and is removed\n * by the minifier in builder).\n */\n\nfunction setLocalDebugType(type, ...brand) {\n}\n\nexport { setLocalDebugType as s };\n","import { isDevelopingApp } from '@embroider/macros';\n\nlet debugToString;\nif (isDevelopingApp()) {\n  let getFunctionName = fn => {\n    let functionName = fn.name;\n    if (functionName === '') {\n      let match = /function (\\w+)\\s*\\(/u.exec(String(fn));\n      functionName = match && match[1] || '';\n    }\n    return functionName.replace(/^bound /u, '');\n  };\n  let getObjectName = obj => {\n    let name;\n    let className;\n    if (typeof obj.constructor === 'function') {\n      className = getFunctionName(obj.constructor);\n    }\n    if ('toString' in obj && obj.toString !== Object.prototype.toString && obj.toString !== Function.prototype.toString) {\n      // eslint-disable-next-line @typescript-eslint/no-base-to-string\n      name = obj.toString();\n    }\n\n    // If the class has a decent looking name, and the `toString` is one of the\n    // default Ember toStrings, replace the constructor portion of the toString\n    // with the class name. We check the length of the class name to prevent doing\n    // this when the value is minified.\n    if (name && /<.*:ember\\d+>/u.test(name) && className && className[0] !== '_' && className.length > 2 && className !== 'Class') {\n      return name.replace(/<.*:/u, `<${className}:`);\n    }\n    return name || className;\n  };\n\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  let getPrimitiveName = value => {\n    return String(value);\n  };\n  debugToString = value => {\n    if (typeof value === 'function') {\n      return getFunctionName(value) || `(unknown function)`;\n    } else if (typeof value === 'object' && value !== null) {\n      return getObjectName(value) || `(unknown object)`;\n    } else {\n      return getPrimitiveName(value);\n    }\n  };\n}\nconst debugToString$1 = debugToString;\n\nexport { debugToString$1 as d };\n","// the delete is meant to hint at runtimes that this object should remain in\n// dictionary mode. This is clearly a runtime specific hack, but currently it\n// appears worthwhile in some usecases. Please note, these deletes do increase\n// the cost of creation dramatically over a plain Object.create. And as this\n// only makes sense for long-lived dictionaries that aren't instantiated often.\nfunction makeDictionary(parent) {\n  let dict = Object.create(parent);\n  dict['_dict'] = null;\n  delete dict['_dict'];\n  return dict;\n}\n\nexport { makeDictionary as m };\n","import { v as VM_SYSCALL_SIZE, C as CURRIED_COMPONENT, w as VM_CHILD_SCOPE_OP, x as VM_POP_SCOPE_OP, y as VM_PUSH_DYNAMIC_SCOPE_OP, z as VM_POP_DYNAMIC_SCOPE_OP, A as VM_CONSTANT_OP, B as decodeHandle, D as VM_CONSTANT_REFERENCE_OP, E as VM_PRIMITIVE_OP, G as isHandle, H as decodeImmediate, I as VM_PRIMITIVE_REFERENCE_OP, J as VM_DUP_OP, K as VM_POP_OP, L as VM_LOAD_OP, M as VM_FETCH_OP, N as VM_BIND_DYNAMIC_SCOPE_OP, O as VM_ENTER_OP, P as VM_EXIT_OP, Q as VM_PUSH_SYMBOL_TABLE_OP, R as VM_PUSH_BLOCK_SCOPE_OP, S as VM_COMPILE_BLOCK_OP, T as VM_INVOKE_YIELD_OP, U as VM_JUMP_IF_OP, W as VM_JUMP_UNLESS_OP, X as VM_JUMP_EQ_OP, e as VM_ASSERT_SAME_OP, Y as VM_TO_BOOLEAN_OP, Z as VM_TEXT_OP, _ as VM_COMMENT_OP, $ as VM_OPEN_ELEMENT_OP, a0 as VM_OPEN_DYNAMIC_ELEMENT_OP, a1 as VM_PUSH_REMOTE_ELEMENT_OP, a2 as VM_POP_REMOTE_ELEMENT_OP, a3 as VM_FLUSH_ELEMENT_OP, a4 as VM_CLOSE_ELEMENT_OP, a5 as VM_MODIFIER_OP, a6 as VM_DYNAMIC_MODIFIER_OP, a7 as VM_STATIC_ATTR_OP, a8 as VM_DYNAMIC_ATTR_OP, a9 as CURRIED_MODIFIER, aa as VM_PUSH_COMPONENT_DEFINITION_OP, ab as VM_RESOLVE_DYNAMIC_COMPONENT_OP, i as VM_RESOLVE_CURRIED_COMPONENT_OP, j as VM_PUSH_DYNAMIC_COMPONENT_INSTANCE_OP, ac as VM_PUSH_ARGS_OP, ad as VM_PUSH_EMPTY_ARGS_OP, ae as VM_CAPTURE_ARGS_OP, af as VM_PREPARE_ARGS_OP, m as managerHasCapability, ag as VM_CREATE_COMPONENT_OP, ah as VM_REGISTER_COMPONENT_DESTRUCTOR_OP, ai as VM_BEGIN_COMPONENT_TRANSACTION_OP, aj as VM_PUT_COMPONENT_OPERATIONS_OP, ak as VM_COMPONENT_ATTR_OP, al as VM_STATIC_COMPONENT_ATTR_OP, am as VM_DID_CREATE_ELEMENT_OP, an as VM_GET_COMPONENT_SELF_OP, ao as VM_GET_COMPONENT_TAG_NAME_OP, ap as VM_GET_COMPONENT_LAYOUT_OP, V as VM_MAIN_OP, aq as VM_POPULATE_LAYOUT_OP, ar as VM_VIRTUAL_ROOT_SCOPE_OP, as as VM_SET_NAMED_VARIABLES_OP, at as VM_SET_BLOCKS_OP, au as VM_INVOKE_COMPONENT_LAYOUT_OP, av as VM_DID_RENDER_LAYOUT_OP, aw as VM_COMMIT_COMPONENT_TRANSACTION_OP, ax as VM_CURRY_OP, ay as VM_DYNAMIC_HELPER_OP, az as CURRIED_HELPER, aA as VM_HELPER_OP, aB as VM_GET_VARIABLE_OP, aC as VM_SET_VARIABLE_OP, aD as VM_SET_BLOCK_OP, aE as VM_ROOT_SCOPE_OP, aF as VM_GET_PROPERTY_OP, aG as VM_GET_BLOCK_OP, aH as VM_SPREAD_BLOCK_OP, aI as VM_HAS_BLOCK_OP, aJ as VM_HAS_BLOCK_PARAMS_OP, aK as VM_CONCAT_OP, aL as VM_IF_INLINE_OP, aM as VM_NOT_OP, aN as VM_GET_DYNAMIC_VAR_OP, aO as VM_LOG_OP, d as VM_CONTENT_TYPE_OP, aP as VM_DYNAMIC_CONTENT_TYPE_OP, f as VM_APPEND_HTML_OP, k as VM_APPEND_SAFE_HTML_OP, g as VM_APPEND_TEXT_OP, l as VM_APPEND_DOCUMENT_FRAGMENT_OP, n as VM_APPEND_NODE_OP, aQ as VM_DEBUGGER_OP, aR as VM_ENTER_LIST_OP, aS as VM_EXIT_LIST_OP, aT as VM_ITERATE_OP } from './capabilities-DHiXCCuB.js';\nimport { d as debugToString } from './debug-to-string-BsFOvUtQ.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { u as unwrap, e as expect, a as isIndexable$1, S as StackImpl, d as dict, i as isDict } from './collections-B8me-ZlQ.js';\nimport { a as assign } from './object-utils-AijlD-JH.js';\nimport { toBool, debugAssert, setPath, getPath, warnIfStyleNotTrusted } from '../@glimmer/global-context/index.js';\nimport { CONSTANT_TAG, INITIAL, validateTag, consumeTag, valueForTag, beginTrackFrame, endTrackFrame, CURRENT_TAG, createCache, getValue, createUpdatableTag } from '../@glimmer/validator/index.js';\nimport { b as createComputeRef, v as valueForRef, d as createConstRef, g as createPrimitiveRef, j as isConstRef, U as UNDEFINED_REFERENCE, N as NULL_REFERENCE, T as TRUE_REFERENCE, F as FALSE_REFERENCE, R as REFERENCE, e as createDebugAliasRef, c as childRefFor, k as isInvokableRef, u as updateRef } from './reference-B6HMX4y0.js';\nimport { e as $v0, f as $t1, g as $t0, a as $pc, b as $ra, c as $fp, d as $sp, h as $s1, $ as $s0 } from './registers-ylirb0dq.js';\nimport { registerDestructor, destroy, associateDestroyableChild, _hasDestroyableChildren, isDestroying, isDestroyed } from '../@glimmer/destroyable/index.js';\nimport { b as getInternalModifierManager, a as getInternalHelperManager, c as hasInternalComponentManager, d as hasInternalHelperManager, s as setInternalComponentManager, j as setInternalHelperManager, f as hasValue, h as hasDestroyable, k as setInternalModifierManager } from './api-CkUl6KyJ.js';\nimport { ContentType } from '../@glimmer/vm/index.js';\nimport { a as createIteratorRef } from './iterable-BKS7az3P.js';\nimport { getOwner } from '../@glimmer/owner/index.js';\nimport { a as assert } from './assert-CUCJBR2C.js';\nimport { s as setLocalDebugType } from './debug-brand-B1TWjOCH.js';\nimport { b as EMPTY_STRING_ARRAY, e as enumerate, c as emptyArray } from './array-utils-CZQxrdD3.js';\nimport { a as unwrapTemplate } from './constants-oDhF27qL.js';\nimport { I as InternalComponentCapabilities } from './flags-BsZlvEeR.js';\nimport { c as castToBrowser } from './simple-cast-BXTrayoV.js';\n\n/* eslint-disable @typescript-eslint/no-empty-object-type */\nfunction buildUntouchableThis(source) {\n  let context = null;\n  if (isDevelopingApp()) {\n    let assertOnProperty = property => {\n      let access = typeof property === 'symbol' || typeof property === 'number' ? `[${String(property)}]` : `.${property}`;\n      throw new Error(`You accessed \\`this${access}\\` from a function passed to the ${source}, but the function itself was not bound to a valid \\`this\\` context. Consider updating to use a bound function (for instance, use an arrow function, \\`() => {}\\`).`);\n    };\n    context = new Proxy({}, {\n      get(_target, property) {\n        assertOnProperty(property);\n      },\n      set(_target, property) {\n        assertOnProperty(property);\n        return false;\n      },\n      has(_target, property) {\n        assertOnProperty(property);\n        return false;\n      }\n    });\n  }\n  return context;\n}\n\nconst ELEMENT_NODE = 1;\nconst TEXT_NODE = 3;\nconst COMMENT_NODE = 8;\nconst NS_MATHML = 'http://www.w3.org/1998/Math/MathML';\nconst NS_SVG = 'http://www.w3.org/2000/svg';\nconst INSERT_BEFORE_BEGIN = 'beforebegin';\nconst INSERT_BEFORE_END = 'beforeend';\n\nfunction CheckInstanceof(Class) {\n}\nconst CheckRegister = new class {\n  validate(value) {\n    switch (value) {\n      case $s0:\n      case $s1:\n      case $sp:\n      case $fp:\n      case $ra:\n      case $pc:\n      case $t0:\n      case $t1:\n      case $v0:\n        return true;\n      default:\n        return false;\n    }\n  }\n  expected() {\n    return `Register`;\n  }\n}();\n\n/*@__NO_SIDE_EFFECTS__*/\n\nfunction check(value, checker, message) {\n  {\n    return value;\n  }\n}\n\nclass AppendOpcodes {\n  // This code is intentionally putting unsafe `null`s into the array that it\n  // will intentionally overwrite before anyone can see them.\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n  evaluateOpcode = new Array(VM_SYSCALL_SIZE).fill(null);\n  constructor() {\n  }\n  add(name, evaluate, kind = 'syscall') {\n    this.evaluateOpcode[name] = {\n      syscall: kind !== 'machine',\n      evaluate\n    };\n  }\n  evaluate(vm, opcode, type) {\n    let operation = unwrap(this.evaluateOpcode[type]);\n    if (operation.syscall) {\n      assert(!opcode.isMachine, `BUG: Mismatch between operation.syscall (${operation.syscall}) and opcode.isMachine (${opcode.isMachine}) for ${opcode.type}`);\n      operation.evaluate(vm, opcode);\n    } else {\n      assert(opcode.isMachine, `BUG: Mismatch between operation.syscall (${operation.syscall}) and opcode.isMachine (${opcode.isMachine}) for ${opcode.type}`);\n      operation.evaluate(vm.lowlevel, opcode);\n    }\n  }\n}\nfunction externs(vm) {\n  return undefined;\n}\nconst APPEND_OPCODES = new AppendOpcodes();\n\nconst TYPE = Symbol('TYPE');\nconst INNER = Symbol('INNER');\nconst OWNER = Symbol('OWNER');\nconst ARGS = Symbol('ARGS');\nconst RESOLVED = Symbol('RESOLVED');\nconst CURRIED_VALUES = new WeakSet();\nfunction isCurriedValue(value) {\n  return CURRIED_VALUES.has(value);\n}\nfunction isCurriedType(value, type) {\n  return isCurriedValue(value) && value[TYPE] === type;\n}\nclass CurriedValue {\n  [TYPE];\n  [INNER];\n  [OWNER];\n  [ARGS];\n  [RESOLVED];\n\n  /** @internal */\n  constructor(type, inner, owner, args, resolved = false) {\n    CURRIED_VALUES.add(this);\n    this[TYPE] = type;\n    this[INNER] = inner;\n    this[OWNER] = owner;\n    this[ARGS] = args;\n    this[RESOLVED] = resolved;\n  }\n}\nfunction resolveCurriedValue(curriedValue) {\n  let currentWrapper = curriedValue;\n  let positional;\n  let named;\n  let definition, owner, resolved;\n  while (true) {\n    let {\n      [ARGS]: curriedArgs,\n      [INNER]: inner\n    } = currentWrapper;\n    if (curriedArgs !== null) {\n      let {\n        named: curriedNamed,\n        positional: curriedPositional\n      } = curriedArgs;\n      if (curriedPositional.length > 0) {\n        positional = positional === undefined ? curriedPositional : curriedPositional.concat(positional);\n      }\n      if (named === undefined) {\n        named = [];\n      }\n      named.unshift(curriedNamed);\n    }\n    if (!isCurriedValue(inner)) {\n      // Save off the owner that this helper was curried with. Later on,\n      // we'll fetch the value of this register and set it as the owner on the\n      // new root scope.\n      definition = inner;\n      owner = currentWrapper[OWNER];\n      resolved = currentWrapper[RESOLVED];\n      break;\n    }\n    currentWrapper = inner;\n  }\n  return {\n    definition,\n    owner,\n    resolved,\n    positional,\n    named\n  };\n}\nfunction curry(type, spec, owner, args, resolved = false) {\n  return new CurriedValue(type, spec, owner, args, resolved);\n}\n\nfunction createCurryRef(type, inner, owner, args, resolver, isStrict) {\n  let lastValue, curriedDefinition;\n  return createComputeRef(() => {\n    let value = valueForRef(inner);\n    if (value === lastValue) {\n      return curriedDefinition;\n    }\n    if (isCurriedType(value, type)) {\n      curriedDefinition = args ? curry(type, value, owner, args) : args;\n    } else if (type === CURRIED_COMPONENT && typeof value === 'string' && value) {\n      // Only components should enter this path, as helpers and modifiers do not\n      // support string based resolution\n\n      if (isDevelopingApp()) {\n        if (isStrict) {\n          throw new Error(`Attempted to resolve a dynamic component with a string definition, \\`${value}\\` in a strict mode template. In strict mode, using strings to resolve component definitions is prohibited. You can instead import the component definition and use it directly.`);\n        }\n        let resolvedDefinition = expect(resolver).lookupComponent?.(value, owner) ?? null;\n        if (!resolvedDefinition) {\n          throw new Error(`Attempted to resolve \\`${value}\\`, which was expected to be a component, but nothing was found.`);\n        }\n      }\n      curriedDefinition = curry(type, value, owner, args);\n    } else if (isIndexable$1(value)) {\n      curriedDefinition = curry(type, value, owner, args);\n    } else {\n      curriedDefinition = null;\n    }\n    lastValue = value;\n    return curriedDefinition;\n  });\n}\n\nclass CursorImpl {\n  constructor(element, nextSibling) {\n    this.element = element;\n    this.nextSibling = nextSibling;\n    setLocalDebugType('cursor', this);\n  }\n}\nclass ConcreteBounds {\n  constructor(parentNode, first, last) {\n    this.parentNode = parentNode;\n    this.first = first;\n    this.last = last;\n  }\n  parentElement() {\n    return this.parentNode;\n  }\n  firstNode() {\n    return this.first;\n  }\n  lastNode() {\n    return this.last;\n  }\n}\nfunction move(bounds, reference) {\n  let parent = bounds.parentElement();\n  let first = bounds.firstNode();\n  let last = bounds.lastNode();\n  let current = first;\n  while (true) {\n    let next = current.nextSibling;\n    parent.insertBefore(current, reference);\n    if (current === last) {\n      return next;\n    }\n    current = expect(next);\n  }\n}\nfunction clear(bounds) {\n  let parent = bounds.parentElement();\n  let first = bounds.firstNode();\n  let last = bounds.lastNode();\n  let current = first;\n  while (true) {\n    let next = current.nextSibling;\n    parent.removeChild(current);\n    if (current === last) {\n      return next;\n    }\n    current = expect(next);\n  }\n}\n\n/** @internal */\nfunction hasCustomDebugRenderTreeLifecycle(manager) {\n  return 'getDebugCustomRenderTree' in manager;\n}\n\nfunction resolveComponent(resolver, constants, name, owner) {\n  let definition = resolver?.lookupComponent?.(name, expect(owner)) ?? null;\n  if (isDevelopingApp() && !definition) {\n    throw new Error(`Attempted to resolve \\`${name}\\`, which was expected to be a component, but nothing was found.`);\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n  return constants.resolvedComponent(definition, name);\n}\n\nlet GUID = 0;\nclass Ref {\n  id = GUID++;\n  value;\n  constructor(value) {\n    this.value = value;\n  }\n  get() {\n    return this.value;\n  }\n  release() {\n    if (isDevelopingApp() && this.value === null) {\n      throw new Error('BUG: double release?');\n    }\n    this.value = null;\n  }\n  toString() {\n    let label = `Ref ${this.id}`;\n    if (this.value === null) {\n      return `${label} (released)`;\n    } else {\n      try {\n        // eslint-disable-next-line @typescript-eslint/no-base-to-string\n        return `${label}: ${this.value}`;\n      } catch {\n        return label;\n      }\n    }\n  }\n}\nclass DebugRenderTreeImpl {\n  stack = new StackImpl();\n  refs = new WeakMap();\n  roots = new Set();\n  nodes = new WeakMap();\n  begin() {\n    this.reset();\n  }\n  create(state, node) {\n    let internalNode = assign({}, node, {\n      bounds: null,\n      refs: new Set()\n    });\n    this.nodes.set(state, internalNode);\n    this.appendChild(internalNode, state);\n    this.enter(state);\n  }\n  update(state) {\n    this.enter(state);\n  }\n  didRender(state, bounds) {\n    if (isDevelopingApp() && this.stack.current !== state) {\n      // eslint-disable-next-line @typescript-eslint/no-base-to-string\n      throw new Error(`BUG: expecting ${this.stack.current}, got ${state}`);\n    }\n    this.nodeFor(state).bounds = bounds;\n    this.exit();\n  }\n  willDestroy(state) {\n    expect(this.refs.get(state)).release();\n  }\n  commit() {\n    this.reset();\n  }\n  capture() {\n    return this.captureRefs(this.roots);\n  }\n  reset() {\n    if (this.stack.size !== 0) {\n      // We probably encountered an error during the rendering loop. This will\n      // likely trigger undefined behavior and memory leaks as the error left\n      // things in an inconsistent state. It is recommended that the user\n      // refresh the page.\n\n      // TODO: We could warn here? But this happens all the time in our tests?\n\n      // Clean up the root reference to prevent errors from happening if we\n      // attempt to capture the render tree (Ember Inspector may do this)\n      let root = expect(this.stack.toArray()[0]);\n      let ref = this.refs.get(root);\n      if (ref !== undefined) {\n        this.roots.delete(ref);\n      }\n      while (!this.stack.isEmpty()) {\n        this.stack.pop();\n      }\n    }\n  }\n  enter(state) {\n    this.stack.push(state);\n  }\n  exit() {\n    if (isDevelopingApp() && this.stack.size === 0) {\n      throw new Error('BUG: unbalanced pop');\n    }\n    this.stack.pop();\n  }\n  nodeFor(state) {\n    return expect(this.nodes.get(state));\n  }\n  appendChild(node, state) {\n    if (isDevelopingApp() && this.refs.has(state)) {\n      throw new Error('BUG: child already appended');\n    }\n    let parent = this.stack.current;\n    let ref = new Ref(state);\n    this.refs.set(state, ref);\n    if (parent) {\n      let parentNode = this.nodeFor(parent);\n      parentNode.refs.add(ref);\n      node.parent = parentNode;\n    } else {\n      this.roots.add(ref);\n    }\n  }\n  captureRefs(refs) {\n    let captured = [];\n    refs.forEach(ref => {\n      let state = ref.get();\n      if (state) {\n        captured.push(this.captureNode(`render-node:${ref.id}`, state));\n      } else {\n        refs.delete(ref);\n      }\n    });\n    return captured;\n  }\n  captureNode(id, state) {\n    let node = this.nodeFor(state);\n    let {\n      type,\n      name,\n      args,\n      instance,\n      refs\n    } = node;\n    let template = this.captureTemplate(node);\n    let bounds = this.captureBounds(node);\n    let children = this.captureRefs(refs);\n    return {\n      id,\n      type,\n      name,\n      args: reifyArgsDebug(args),\n      instance,\n      template,\n      bounds,\n      children\n    };\n  }\n  captureTemplate({\n    template\n  }) {\n    return template || null;\n  }\n  captureBounds(node) {\n    let bounds = expect(node.bounds);\n    let parentElement = bounds.parentElement();\n    let firstNode = bounds.firstNode();\n    let lastNode = bounds.lastNode();\n    return {\n      parentElement,\n      firstNode,\n      lastNode\n    };\n  }\n}\nfunction getDebugName(definition, manager = definition.manager) {\n  return definition.resolvedName ?? definition.debugName ?? manager.getDebugName(definition.state);\n}\n\nfunction normalizeStringValue(value) {\n  if (isEmpty$1(value)) {\n    return '';\n  }\n  return String(value);\n}\nfunction shouldCoerce(value) {\n  return isString(value) || isEmpty$1(value) || typeof value === 'boolean' || typeof value === 'number';\n}\nfunction isEmpty$1(value) {\n  return value === null || value === undefined || typeof value.toString !== 'function';\n}\nfunction isIndexable(value) {\n  return value !== null && typeof value === 'object';\n}\nfunction isSafeString(value) {\n  return isIndexable(value) && typeof value['toHTML'] === 'function';\n}\nfunction isNode(value) {\n  return isIndexable(value) && typeof value['nodeType'] === 'number';\n}\nfunction isFragment(value) {\n  return isIndexable(value) && value['nodeType'] === 11;\n}\nfunction isString(value) {\n  return typeof value === 'string';\n}\n\nfunction createClassListRef(list) {\n  return createComputeRef(() => {\n    let ret = [];\n    for (const ref of list) {\n      let value = normalizeStringValue(typeof ref === 'string' ? ref : valueForRef(ref));\n      if (value) ret.push(value);\n    }\n    return ret.length === 0 ? null : ret.join(' ');\n  });\n}\n\nAPPEND_OPCODES.add(VM_CHILD_SCOPE_OP, vm => vm.pushChildScope());\nAPPEND_OPCODES.add(VM_POP_SCOPE_OP, vm => vm.popScope());\nAPPEND_OPCODES.add(VM_PUSH_DYNAMIC_SCOPE_OP, vm => vm.pushDynamicScope());\nAPPEND_OPCODES.add(VM_POP_DYNAMIC_SCOPE_OP, vm => vm.popDynamicScope());\nAPPEND_OPCODES.add(VM_CONSTANT_OP, (vm, {\n  op1: other\n}) => {\n  vm.stack.push(vm.constants.getValue(decodeHandle(other)));\n});\nAPPEND_OPCODES.add(VM_CONSTANT_REFERENCE_OP, (vm, {\n  op1: other\n}) => {\n  vm.stack.push(createConstRef(vm.constants.getValue(decodeHandle(other)), false));\n});\nAPPEND_OPCODES.add(VM_PRIMITIVE_OP, (vm, {\n  op1: primitive\n}) => {\n  let stack = vm.stack;\n  if (isHandle(primitive)) {\n    // it is a handle which does not already exist on the stack\n    let value = vm.constants.getValue(decodeHandle(primitive));\n    stack.push(value);\n  } else {\n    // is already an encoded immediate or primitive handle\n    stack.push(decodeImmediate(primitive));\n  }\n});\nAPPEND_OPCODES.add(VM_PRIMITIVE_REFERENCE_OP, vm => {\n  let stack = vm.stack;\n  let value = check(stack.pop());\n  let ref;\n  if (value === undefined) {\n    ref = UNDEFINED_REFERENCE;\n  } else if (value === null) {\n    ref = NULL_REFERENCE;\n  } else if (value === true) {\n    ref = TRUE_REFERENCE;\n  } else if (value === false) {\n    ref = FALSE_REFERENCE;\n  } else {\n    ref = createPrimitiveRef(value);\n  }\n  stack.push(ref);\n});\nAPPEND_OPCODES.add(VM_DUP_OP, (vm, {\n  op1: register,\n  op2: offset\n}) => {\n  let position = check(vm.fetchValue(check(register, CheckRegister))) - offset;\n  vm.stack.dup(position);\n});\nAPPEND_OPCODES.add(VM_POP_OP, (vm, {\n  op1: count\n}) => {\n  vm.stack.pop(count);\n});\nAPPEND_OPCODES.add(VM_LOAD_OP, (vm, {\n  op1: register\n}) => {\n  vm.load(check(register));\n});\nAPPEND_OPCODES.add(VM_FETCH_OP, (vm, {\n  op1: register\n}) => {\n  vm.fetch(check(register));\n});\nAPPEND_OPCODES.add(VM_BIND_DYNAMIC_SCOPE_OP, (vm, {\n  op1: _names\n}) => {\n  let names = vm.constants.getArray(_names);\n  vm.bindDynamicScope(names);\n});\nAPPEND_OPCODES.add(VM_ENTER_OP, (vm, {\n  op1: args\n}) => {\n  vm.enter(args);\n});\nAPPEND_OPCODES.add(VM_EXIT_OP, vm => {\n  vm.exit();\n});\nAPPEND_OPCODES.add(VM_PUSH_SYMBOL_TABLE_OP, (vm, {\n  op1: _table\n}) => {\n  let stack = vm.stack;\n  stack.push(vm.constants.getValue(_table));\n});\nAPPEND_OPCODES.add(VM_PUSH_BLOCK_SCOPE_OP, vm => {\n  let stack = vm.stack;\n  stack.push(vm.scope());\n});\nAPPEND_OPCODES.add(VM_COMPILE_BLOCK_OP, vm => {\n  let stack = vm.stack;\n  let block = stack.pop();\n  if (block) {\n    stack.push(vm.compile(block));\n  } else {\n    stack.push(null);\n  }\n});\nAPPEND_OPCODES.add(VM_INVOKE_YIELD_OP, vm => {\n  let {\n    stack\n  } = vm;\n  let handle = check(stack.pop());\n  let scope = check(stack.pop());\n  let table = check(stack.pop());\n  let args = check(stack.pop());\n  if (table === null || handle === null) {\n    // To balance the pop{Frame,Scope}\n    vm.lowlevel.pushFrame();\n    vm.pushScope(scope ?? vm.scope());\n    return;\n  }\n  let invokingScope = expect(scope);\n\n  // If necessary, create a child scope\n  {\n    let locals = table.parameters;\n    let localsCount = locals.length;\n    if (localsCount > 0) {\n      invokingScope = invokingScope.child();\n      for (let i = 0; i < localsCount; i++) {\n        invokingScope.bindSymbol(unwrap(locals[i]), args.at(i));\n      }\n    }\n  }\n  vm.lowlevel.pushFrame();\n  vm.pushScope(invokingScope);\n  vm.call(handle);\n});\nAPPEND_OPCODES.add(VM_JUMP_IF_OP, (vm, {\n  op1: target\n}) => {\n  let reference = check(vm.stack.pop());\n  let value = Boolean(valueForRef(reference));\n  if (isConstRef(reference)) {\n    if (value) {\n      vm.lowlevel.goto(target);\n    }\n  } else {\n    if (value) {\n      vm.lowlevel.goto(target);\n    }\n    vm.updateWith(new Assert(reference));\n  }\n});\nAPPEND_OPCODES.add(VM_JUMP_UNLESS_OP, (vm, {\n  op1: target\n}) => {\n  let reference = check(vm.stack.pop());\n  let value = Boolean(valueForRef(reference));\n  if (isConstRef(reference)) {\n    if (!value) {\n      vm.lowlevel.goto(target);\n    }\n  } else {\n    if (!value) {\n      vm.lowlevel.goto(target);\n    }\n    vm.updateWith(new Assert(reference));\n  }\n});\nAPPEND_OPCODES.add(VM_JUMP_EQ_OP, (vm, {\n  op1: target,\n  op2: comparison\n}) => {\n  let other = check(vm.stack.peek());\n  if (other === comparison) {\n    vm.lowlevel.goto(target);\n  }\n});\nAPPEND_OPCODES.add(VM_ASSERT_SAME_OP, vm => {\n  let reference = check(vm.stack.peek());\n  if (!isConstRef(reference)) {\n    vm.updateWith(new Assert(reference));\n  }\n});\nAPPEND_OPCODES.add(VM_TO_BOOLEAN_OP, vm => {\n  let {\n    stack\n  } = vm;\n  let valueRef = check(stack.pop());\n  stack.push(createComputeRef(() => toBool(valueForRef(valueRef))));\n});\nclass Assert {\n  last;\n  constructor(ref) {\n    this.ref = ref;\n    this.last = valueForRef(ref);\n  }\n  evaluate(vm) {\n    let {\n      last,\n      ref\n    } = this;\n    let current = valueForRef(ref);\n    if (last !== current) {\n      vm.throw();\n    }\n  }\n}\nclass AssertFilter {\n  last;\n  constructor(ref, filter) {\n    this.ref = ref;\n    this.filter = filter;\n    this.last = filter(valueForRef(ref));\n  }\n  evaluate(vm) {\n    let {\n      last,\n      ref,\n      filter\n    } = this;\n    let current = filter(valueForRef(ref));\n    if (last !== current) {\n      vm.throw();\n    }\n  }\n}\nclass JumpIfNotModifiedOpcode {\n  tag = CONSTANT_TAG;\n  lastRevision = INITIAL;\n  target;\n  finalize(tag, target) {\n    this.target = target;\n    this.didModify(tag);\n  }\n  evaluate(vm) {\n    let {\n      tag,\n      target,\n      lastRevision\n    } = this;\n    if (!vm.alwaysRevalidate && validateTag(tag, lastRevision)) {\n      consumeTag(tag);\n      vm.goto(expect(target));\n    }\n  }\n  didModify(tag) {\n    this.tag = tag;\n    this.lastRevision = valueForTag(this.tag);\n    consumeTag(tag);\n  }\n}\nclass BeginTrackFrameOpcode {\n  constructor(debugLabel) {\n    this.debugLabel = debugLabel;\n  }\n  evaluate() {\n    beginTrackFrame(this.debugLabel);\n  }\n}\nclass EndTrackFrameOpcode {\n  constructor(target) {\n    this.target = target;\n  }\n  evaluate() {\n    let tag = endTrackFrame();\n    this.target.didModify(tag);\n  }\n}\n\nAPPEND_OPCODES.add(VM_TEXT_OP, (vm, {\n  op1: text\n}) => {\n  vm.tree().appendText(vm.constants.getValue(text));\n});\nAPPEND_OPCODES.add(VM_COMMENT_OP, (vm, {\n  op1: text\n}) => {\n  vm.tree().appendComment(vm.constants.getValue(text));\n});\nAPPEND_OPCODES.add(VM_OPEN_ELEMENT_OP, (vm, {\n  op1: tag\n}) => {\n  vm.tree().openElement(vm.constants.getValue(tag));\n});\nAPPEND_OPCODES.add(VM_OPEN_DYNAMIC_ELEMENT_OP, vm => {\n  let tagName = check(valueForRef(check(vm.stack.pop(), CheckReference)));\n  vm.tree().openElement(tagName);\n});\nAPPEND_OPCODES.add(VM_PUSH_REMOTE_ELEMENT_OP, vm => {\n  let elementRef = check(vm.stack.pop());\n  let insertBeforeRef = check(vm.stack.pop());\n  let guidRef = check(vm.stack.pop());\n  let element = check(valueForRef(elementRef));\n  let insertBefore = check(valueForRef(insertBeforeRef));\n  let guid = valueForRef(guidRef);\n  if (!isConstRef(elementRef)) {\n    vm.updateWith(new Assert(elementRef));\n  }\n  if (insertBefore !== undefined && !isConstRef(insertBeforeRef)) {\n    vm.updateWith(new Assert(insertBeforeRef));\n  }\n  let block = vm.tree().pushRemoteElement(element, guid, insertBefore);\n  vm.associateDestroyable(block);\n  if (vm.env.debugRenderTree !== undefined) {\n    // Note that there is nothing to update – when the args for an\n    // {{#in-element}} changes it gets torn down and a new one is\n    // re-created/rendered in its place (see the `Assert`s above)\n    let args = createCapturedArgs(insertBefore === undefined ? {} : {\n      insertBefore: insertBeforeRef\n    }, [elementRef]);\n    vm.env.debugRenderTree.create(block, {\n      type: 'keyword',\n      name: 'in-element',\n      args,\n      instance: null\n    });\n    registerDestructor(block, () => {\n      vm.env.debugRenderTree?.willDestroy(block);\n    });\n  }\n});\nAPPEND_OPCODES.add(VM_POP_REMOTE_ELEMENT_OP, vm => {\n  let bounds = vm.tree().popRemoteElement();\n  if (vm.env.debugRenderTree !== undefined) {\n    // The RemoteBlock is also its bounds\n    vm.env.debugRenderTree.didRender(bounds, bounds);\n  }\n});\nAPPEND_OPCODES.add(VM_FLUSH_ELEMENT_OP, vm => {\n  let operations = check(vm.fetchValue($t0));\n  let modifiers = null;\n  if (operations) {\n    modifiers = operations.flush(vm);\n    vm.loadValue($t0, null);\n  }\n  vm.tree().flushElement(modifiers);\n});\nAPPEND_OPCODES.add(VM_CLOSE_ELEMENT_OP, vm => {\n  let modifiers = vm.tree().closeElement();\n  if (modifiers !== null) {\n    modifiers.forEach(modifier => {\n      vm.env.scheduleInstallModifier(modifier);\n      const d = modifier.manager.getDestroyable(modifier.state);\n      if (d !== null) {\n        vm.associateDestroyable(d);\n      }\n    });\n  }\n});\nAPPEND_OPCODES.add(VM_MODIFIER_OP, (vm, {\n  op1: handle\n}) => {\n  let args = check(vm.stack.pop());\n  if (!vm.env.isInteractive) {\n    return;\n  }\n  let owner = vm.getOwner();\n  let definition = vm.constants.getValue(handle);\n  let {\n    manager\n  } = definition;\n  let {\n    constructing\n  } = vm.tree();\n  let capturedArgs = args.capture();\n  let state = manager.create(owner, expect(constructing), definition.state, capturedArgs);\n  let instance = {\n    manager,\n    state,\n    definition\n  };\n  let operations = expect(check(vm.fetchValue($t0)));\n  operations.addModifier(vm, instance, capturedArgs);\n  let tag = manager.getTag(state);\n  if (tag !== null) {\n    consumeTag(tag);\n    return vm.updateWith(new UpdateModifierOpcode(tag, instance));\n  }\n});\nAPPEND_OPCODES.add(VM_DYNAMIC_MODIFIER_OP, vm => {\n  let {\n    stack\n  } = vm;\n  let ref = check(stack.pop());\n  let args = check(stack.pop());\n  if (!vm.env.isInteractive) {\n    return;\n  }\n  let capturedArgs = args.capture();\n  let {\n    positional: outerPositional,\n    named: outerNamed\n  } = capturedArgs;\n  let {\n    constructing\n  } = vm.tree();\n  let initialOwner = vm.getOwner();\n  let instanceRef = createComputeRef(() => {\n    let value = valueForRef(ref);\n    let owner;\n    if (!isIndexable$1(value)) {\n      return;\n    }\n    let hostDefinition;\n    if (isCurriedType(value, CURRIED_MODIFIER)) {\n      let {\n        definition: resolvedDefinition,\n        owner: curriedOwner,\n        positional,\n        named\n      } = resolveCurriedValue(value);\n      hostDefinition = resolvedDefinition;\n      owner = curriedOwner;\n      if (positional !== undefined) {\n        capturedArgs.positional = positional.concat(outerPositional);\n      }\n      if (named !== undefined) {\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n        capturedArgs.named = Object.assign({}, ...named, outerNamed);\n      }\n    } else {\n      hostDefinition = value;\n      owner = initialOwner;\n    }\n    let manager = getInternalModifierManager(hostDefinition, true);\n    if (manager === null) {\n      if (isDevelopingApp()) {\n        throw new Error(`Expected a dynamic modifier definition, but received an object or function that did not have a modifier manager associated with it. The dynamic invocation was \\`{{${ref.debugLabel}}}\\`, and the incorrect definition is the value at the path \\`${ref.debugLabel}\\`, which was: ${debugToString?.(hostDefinition)}`);\n      } else {\n        throw new Error('BUG: modifier manager expected');\n      }\n    }\n    let definition = {\n      resolvedName: null,\n      manager,\n      state: hostDefinition\n    };\n    let state = manager.create(owner, expect(constructing), definition.state, capturedArgs);\n    return {\n      manager,\n      state,\n      definition\n    };\n  });\n  let instance = valueForRef(instanceRef);\n  let tag = null;\n  if (instance !== undefined) {\n    let operations = expect(check(vm.fetchValue($t0)));\n    operations.addModifier(vm, instance, capturedArgs);\n    tag = instance.manager.getTag(instance.state);\n    if (tag !== null) {\n      consumeTag(tag);\n    }\n  }\n  if (!isConstRef(ref) || tag) {\n    return vm.updateWith(new UpdateDynamicModifierOpcode(tag, instance, instanceRef));\n  }\n});\nclass UpdateModifierOpcode {\n  lastUpdated;\n  constructor(tag, modifier) {\n    this.tag = tag;\n    this.modifier = modifier;\n    this.lastUpdated = valueForTag(tag);\n  }\n  evaluate(vm) {\n    let {\n      modifier,\n      tag,\n      lastUpdated\n    } = this;\n    consumeTag(tag);\n    if (!validateTag(tag, lastUpdated)) {\n      vm.env.scheduleUpdateModifier(modifier);\n      this.lastUpdated = valueForTag(tag);\n    }\n  }\n}\nclass UpdateDynamicModifierOpcode {\n  lastUpdated;\n  constructor(tag, instance, instanceRef) {\n    this.tag = tag;\n    this.instance = instance;\n    this.instanceRef = instanceRef;\n    this.lastUpdated = valueForTag(tag ?? CURRENT_TAG);\n  }\n  evaluate(vm) {\n    let {\n      tag,\n      lastUpdated,\n      instance,\n      instanceRef\n    } = this;\n    let newInstance = valueForRef(instanceRef);\n    if (newInstance !== instance) {\n      if (instance !== undefined) {\n        let destroyable = instance.manager.getDestroyable(instance.state);\n        if (destroyable !== null) {\n          destroy(destroyable);\n        }\n      }\n      if (newInstance !== undefined) {\n        let {\n          manager,\n          state\n        } = newInstance;\n        let destroyable = manager.getDestroyable(state);\n        if (destroyable !== null) {\n          associateDestroyableChild(this, destroyable);\n        }\n        tag = manager.getTag(state);\n        if (tag !== null) {\n          this.lastUpdated = valueForTag(tag);\n        }\n        this.tag = tag;\n        vm.env.scheduleInstallModifier(newInstance);\n      }\n      this.instance = newInstance;\n    } else if (tag !== null && !validateTag(tag, lastUpdated)) {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      vm.env.scheduleUpdateModifier(instance);\n      this.lastUpdated = valueForTag(tag);\n    }\n    if (tag !== null) {\n      consumeTag(tag);\n    }\n  }\n}\nAPPEND_OPCODES.add(VM_STATIC_ATTR_OP, (vm, {\n  op1: _name,\n  op2: _value,\n  op3: _namespace\n}) => {\n  let name = vm.constants.getValue(_name);\n  let value = vm.constants.getValue(_value);\n  let namespace = _namespace ? vm.constants.getValue(_namespace) : null;\n  vm.tree().setStaticAttribute(name, value, namespace);\n});\nAPPEND_OPCODES.add(VM_DYNAMIC_ATTR_OP, (vm, {\n  op1: _name,\n  op2: _trusting,\n  op3: _namespace\n}) => {\n  let name = vm.constants.getValue(_name);\n  let trusting = vm.constants.getValue(_trusting);\n  let reference = check(vm.stack.pop());\n  let value = valueForRef(reference);\n  let namespace = _namespace ? vm.constants.getValue(_namespace) : null;\n  let attribute = vm.tree().setDynamicAttribute(name, value, trusting, namespace);\n  if (!isConstRef(reference)) {\n    vm.updateWith(new UpdateDynamicAttributeOpcode(reference, attribute, vm.env));\n  }\n});\nclass UpdateDynamicAttributeOpcode {\n  updateRef;\n  constructor(reference, attribute, env) {\n    let initialized = false;\n    this.updateRef = createComputeRef(() => {\n      let value = valueForRef(reference);\n      if (initialized) {\n        attribute.update(value, env);\n      } else {\n        initialized = true;\n      }\n    });\n    valueForRef(this.updateRef);\n  }\n  evaluate() {\n    valueForRef(this.updateRef);\n  }\n}\n\nAPPEND_OPCODES.add(VM_PUSH_COMPONENT_DEFINITION_OP, (vm, {\n  op1: handle\n}) => {\n  let definition = vm.constants.getValue(handle);\n  let {\n    manager,\n    capabilities\n  } = definition;\n  let instance = {\n    definition,\n    manager,\n    capabilities,\n    state: null,\n    handle: null,\n    table: null,\n    lookup: null\n  };\n  vm.stack.push(instance);\n});\nAPPEND_OPCODES.add(VM_RESOLVE_DYNAMIC_COMPONENT_OP, (vm, {\n  op1: _isStrict\n}) => {\n  let stack = vm.stack;\n  let component = check(valueForRef(check(stack.pop(), CheckReference)));\n  let constants = vm.constants;\n  let owner = vm.getOwner();\n  let isStrict = constants.getValue(_isStrict);\n  vm.loadValue($t1, null); // Clear the temp register\n\n  let definition;\n  if (typeof component === 'string') {\n    if (isDevelopingApp() && isStrict) {\n      throw new Error(`Attempted to resolve a dynamic component with a string definition, \\`${component}\\` in a strict mode template. In strict mode, using strings to resolve component definitions is prohibited. You can instead import the component definition and use it directly.`);\n    }\n    let resolvedDefinition = resolveComponent(vm.context.resolver, constants, component, owner);\n    definition = expect(resolvedDefinition);\n  } else if (isCurriedValue(component)) {\n    definition = component;\n  } else {\n    definition = constants.component(component, owner);\n  }\n  stack.push(definition);\n});\nAPPEND_OPCODES.add(VM_RESOLVE_CURRIED_COMPONENT_OP, vm => {\n  let stack = vm.stack;\n  let ref = check(stack.pop());\n  let value = valueForRef(ref);\n  let constants = vm.constants;\n  let definition;\n  if (isDevelopingApp() && !(typeof value === 'function' || typeof value === 'object' && value !== null)) {\n    throw new Error(`Expected a component definition, but received ${value}. You may have accidentally done <${ref.debugLabel}>, where \"${ref.debugLabel}\" was a string instead of a curried component definition. You must either use the component definition directly, or use the {{component}} helper to create a curried component definition when invoking dynamically.`);\n  }\n  if (isCurriedValue(value)) {\n    definition = value;\n  } else {\n    definition = constants.component(value, vm.getOwner(), true);\n    if (isDevelopingApp() && definition === null) {\n      throw new Error(`Expected a dynamic component definition, but received an object or function that did not have a component manager associated with it. The dynamic invocation was \\`<${ref.debugLabel}>\\` or \\`{{${ref.debugLabel}}}\\`, and the incorrect definition is the value at the path \\`${ref.debugLabel}\\`, which was: ${debugToString?.(value) ?? value}`);\n    }\n  }\n  stack.push(definition);\n});\nAPPEND_OPCODES.add(VM_PUSH_DYNAMIC_COMPONENT_INSTANCE_OP, vm => {\n  let {\n    stack\n  } = vm;\n  let definition = stack.pop();\n  let capabilities, manager;\n  if (isCurriedValue(definition)) {\n    manager = capabilities = null;\n  } else {\n    manager = definition.manager;\n    capabilities = definition.capabilities;\n  }\n  stack.push({\n    definition,\n    capabilities,\n    manager,\n    state: null,\n    handle: null,\n    table: null\n  });\n});\nAPPEND_OPCODES.add(VM_PUSH_ARGS_OP, (vm, {\n  op1: _names,\n  op2: _blockNames,\n  op3: flags\n}) => {\n  let stack = vm.stack;\n  let names = vm.constants.getArray(_names);\n  let positionalCount = flags >> 4;\n  let atNames = flags & 0b1000;\n  let blockNames = flags & 0b0111 ? vm.constants.getArray(_blockNames) : EMPTY_STRING_ARRAY;\n  vm.args.setup(stack, names, blockNames, positionalCount, !!atNames);\n  stack.push(vm.args);\n});\nAPPEND_OPCODES.add(VM_PUSH_EMPTY_ARGS_OP, vm => {\n  let {\n    stack\n  } = vm;\n  stack.push(vm.args.empty(stack));\n});\nAPPEND_OPCODES.add(VM_CAPTURE_ARGS_OP, vm => {\n  let stack = vm.stack;\n  let args = check(stack.pop());\n  let capturedArgs = args.capture();\n  stack.push(capturedArgs);\n});\nAPPEND_OPCODES.add(VM_PREPARE_ARGS_OP, (vm, {\n  op1: register\n}) => {\n  let stack = vm.stack;\n  let instance = vm.fetchValue(check(register));\n  let args = check(stack.pop());\n  let {\n    definition\n  } = instance;\n  if (isCurriedType(definition, CURRIED_COMPONENT)) {\n    assert(!definition.manager);\n    let constants = vm.constants;\n    let {\n      definition: resolvedDefinition,\n      owner,\n      resolved,\n      positional,\n      named\n    } = resolveCurriedValue(definition);\n    if (resolved) {\n      definition = resolvedDefinition;\n    } else if (typeof resolvedDefinition === 'string') {\n      let resolvedValue = vm.context.resolver?.lookupComponent?.(resolvedDefinition, owner) ?? null;\n      definition = constants.resolvedComponent(expect(resolvedValue), resolvedDefinition);\n    } else {\n      definition = constants.component(resolvedDefinition, owner);\n    }\n    if (named !== undefined) {\n      // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n      args.named.merge(assign({}, ...named));\n    }\n    if (positional !== undefined) {\n      args.realloc(positional.length);\n      args.positional.prepend(positional);\n    }\n    let {\n      manager\n    } = definition;\n    instance.definition = definition;\n    instance.manager = manager;\n    instance.capabilities = definition.capabilities;\n\n    // Save off the owner that this component was curried with. Later on,\n    // we'll fetch the value of this register and set it as the owner on the\n    // new root scope.\n    vm.loadValue($t1, owner);\n  }\n  let {\n    manager,\n    state\n  } = definition;\n  let capabilities = instance.capabilities;\n  if (!managerHasCapability(manager, capabilities, InternalComponentCapabilities.prepareArgs)) {\n    stack.push(args);\n    return;\n  }\n  let blocks = args.blocks.values;\n  let blockNames = args.blocks.names;\n  let preparedArgs = manager.prepareArgs(state, args);\n  if (preparedArgs) {\n    args.clear();\n    for (let i = 0; i < blocks.length; i++) {\n      stack.push(blocks[i]);\n    }\n    let {\n      positional,\n      named\n    } = preparedArgs;\n    let positionalCount = positional.length;\n    for (let i = 0; i < positionalCount; i++) {\n      stack.push(positional[i]);\n    }\n    let names = Object.keys(named);\n    for (let i = 0; i < names.length; i++) {\n      stack.push(named[unwrap(names[i])]);\n    }\n    args.setup(stack, names, blockNames, positionalCount, false);\n  }\n  stack.push(args);\n});\nAPPEND_OPCODES.add(VM_CREATE_COMPONENT_OP, (vm, {\n  op1: flags\n}) => {\n  let instance = check(vm.fetchValue($s0));\n  let {\n    definition,\n    manager,\n    capabilities\n  } = instance;\n  if (!managerHasCapability(manager, capabilities, InternalComponentCapabilities.createInstance)) {\n    // TODO: Closure and Main components are always invoked dynamically, so this\n    // opcode may run even if this capability is not enabled. In the future we\n    // should handle this in a better way.\n    return;\n  }\n  let dynamicScope = null;\n  if (managerHasCapability(manager, capabilities, InternalComponentCapabilities.dynamicScope)) {\n    dynamicScope = vm.dynamicScope();\n  }\n  let hasDefaultBlock = flags & 1;\n  let args = null;\n  if (managerHasCapability(manager, capabilities, InternalComponentCapabilities.createArgs)) {\n    args = check(vm.stack.peek());\n  }\n  let self = null;\n  if (managerHasCapability(manager, capabilities, InternalComponentCapabilities.createCaller)) {\n    self = vm.getSelf();\n  }\n  let state = manager.create(vm.getOwner(), definition.state, args, vm.env, dynamicScope, self, !!hasDefaultBlock);\n\n  // We want to reuse the `state` POJO here, because we know that the opcodes\n  // only transition at exactly one place.\n  instance.state = state;\n  if (managerHasCapability(manager, capabilities, InternalComponentCapabilities.updateHook)) {\n    vm.updateWith(new UpdateComponentOpcode(state, manager, dynamicScope));\n  }\n});\nAPPEND_OPCODES.add(VM_REGISTER_COMPONENT_DESTRUCTOR_OP, (vm, {\n  op1: register\n}) => {\n  let {\n    manager,\n    state,\n    capabilities\n  } = check(vm.fetchValue(check(register, CheckRegister)));\n  let d = manager.getDestroyable(state);\n  if (isDevelopingApp() && !managerHasCapability(manager, capabilities, InternalComponentCapabilities.willDestroy) && d !== null && \"string\" in d) {\n    throw new Error('BUG: Destructor has willDestroy, but the willDestroy capability was not enabled for this component. Pre-destruction hooks must be explicitly opted into');\n  }\n  if (d) vm.associateDestroyable(d);\n});\nAPPEND_OPCODES.add(VM_BEGIN_COMPONENT_TRANSACTION_OP, (vm, {\n  op1: register\n}) => {\n  let name;\n  if (isDevelopingApp()) {\n    let {\n      definition,\n      manager\n    } = check(vm.fetchValue(check(register, CheckRegister)));\n    name = getDebugName(definition, manager);\n  }\n  vm.beginCacheGroup(name);\n  vm.tree().pushAppendingBlock();\n});\nAPPEND_OPCODES.add(VM_PUT_COMPONENT_OPERATIONS_OP, vm => {\n  vm.loadValue($t0, new ComponentElementOperations());\n});\nAPPEND_OPCODES.add(VM_COMPONENT_ATTR_OP, (vm, {\n  op1: _name,\n  op2: _trusting,\n  op3: _namespace\n}) => {\n  let name = vm.constants.getValue(_name);\n  let trusting = vm.constants.getValue(_trusting);\n  let reference = check(vm.stack.pop());\n  let namespace = _namespace ? vm.constants.getValue(_namespace) : null;\n  check(vm.fetchValue($t0), CheckInstanceof(ComponentElementOperations)).setAttribute(name, reference, trusting, namespace);\n});\nAPPEND_OPCODES.add(VM_STATIC_COMPONENT_ATTR_OP, (vm, {\n  op1: _name,\n  op2: _value,\n  op3: _namespace\n}) => {\n  let name = vm.constants.getValue(_name);\n  let value = vm.constants.getValue(_value);\n  let namespace = _namespace ? vm.constants.getValue(_namespace) : null;\n  check(vm.fetchValue($t0), CheckInstanceof(ComponentElementOperations)).setStaticAttribute(name, value, namespace);\n});\nclass ComponentElementOperations {\n  attributes = dict();\n  classes = [];\n  modifiers = [];\n  setAttribute(name, value, trusting, namespace) {\n    let deferred = {\n      value,\n      namespace,\n      trusting\n    };\n    if (name === 'class') {\n      this.classes.push(value);\n    }\n    this.attributes[name] = deferred;\n  }\n  setStaticAttribute(name, value, namespace) {\n    let deferred = {\n      value,\n      namespace\n    };\n    if (name === 'class') {\n      this.classes.push(value);\n    }\n    this.attributes[name] = deferred;\n  }\n  addModifier(vm, modifier, capturedArgs) {\n    this.modifiers.push(modifier);\n    if (vm.env.debugRenderTree !== undefined) {\n      const {\n        manager,\n        definition,\n        state\n      } = modifier;\n\n      // TODO: we need a stable object for the debugRenderTree as the key, add support for\n      // the case where the state is a primitive, or if in practice we always have/require\n      // an object, then change the internal types to reflect that\n      if (state === null || typeof state !== 'object' && typeof state !== 'function') {\n        return;\n      }\n      let {\n        element,\n        constructing\n      } = vm.tree();\n      let name = definition.resolvedName ?? manager.getDebugName(definition.state);\n      let instance = manager.getDebugInstance(state);\n      let bounds = new ConcreteBounds(element, constructing, constructing);\n      vm.env.debugRenderTree.create(state, {\n        type: 'modifier',\n        name,\n        args: capturedArgs,\n        instance\n      });\n      vm.env.debugRenderTree.didRender(state, bounds);\n\n      // For tearing down the debugRenderTree\n      vm.associateDestroyable(state);\n      vm.updateWith(new DebugRenderTreeUpdateOpcode(state));\n      vm.updateWith(new DebugRenderTreeDidRenderOpcode(state, bounds));\n      registerDestructor(state, () => {\n        vm.env.debugRenderTree?.willDestroy(state);\n      });\n    }\n  }\n  flush(vm) {\n    let type;\n    let attributes = this.attributes;\n    for (let name in this.attributes) {\n      if (name === 'type') {\n        type = attributes[name];\n        continue;\n      }\n      let attr = unwrap(this.attributes[name]);\n      if (name === 'class') {\n        setDeferredAttr(vm, 'class', mergeClasses(this.classes), attr.namespace, attr.trusting);\n      } else {\n        setDeferredAttr(vm, name, attr.value, attr.namespace, attr.trusting);\n      }\n    }\n    if (type !== undefined) {\n      setDeferredAttr(vm, 'type', type.value, type.namespace, type.trusting);\n    }\n    return this.modifiers;\n  }\n}\nfunction mergeClasses(classes) {\n  if (classes.length === 0) {\n    return '';\n  }\n  if (classes.length === 1) {\n    return unwrap(classes[0]);\n  }\n  if (allStringClasses(classes)) {\n    return classes.join(' ');\n  }\n  return createClassListRef(classes);\n}\nfunction allStringClasses(classes) {\n  return classes.every(c => typeof c === 'string');\n}\nfunction setDeferredAttr(vm, name, value, namespace, trusting = false) {\n  if (typeof value === 'string') {\n    vm.tree().setStaticAttribute(name, value, namespace);\n  } else {\n    let attribute = vm.tree().setDynamicAttribute(name, valueForRef(value), trusting, namespace);\n    if (!isConstRef(value)) {\n      vm.updateWith(new UpdateDynamicAttributeOpcode(value, attribute, vm.env));\n    }\n  }\n}\nAPPEND_OPCODES.add(VM_DID_CREATE_ELEMENT_OP, (vm, {\n  op1: register\n}) => {\n  let {\n    definition,\n    state\n  } = check(vm.fetchValue(check(register, CheckRegister)));\n  let {\n    manager\n  } = definition;\n  let operations = check(vm.fetchValue($t0));\n  manager.didCreateElement(state, expect(vm.tree().constructing), operations);\n});\nAPPEND_OPCODES.add(VM_GET_COMPONENT_SELF_OP, (vm, {\n  op1: register,\n  op2: _names\n}) => {\n  let instance = check(vm.fetchValue(check(register, CheckRegister)));\n  let {\n    definition,\n    state\n  } = instance;\n  let {\n    manager\n  } = definition;\n  let selfRef = manager.getSelf(state);\n  if (vm.env.debugRenderTree !== undefined) {\n    let instance = check(vm.fetchValue(check(register, CheckRegister)));\n    let {\n      definition,\n      manager\n    } = instance;\n    let args;\n    if (vm.stack.peek() === vm.args) {\n      args = vm.args.capture();\n    } else {\n      let names = vm.constants.getArray(_names);\n      vm.args.setup(vm.stack, names, [], 0, true);\n      args = vm.args.capture();\n    }\n    let moduleName;\n    let compilable = definition.compilable;\n    if (compilable === null) {\n      assert(managerHasCapability(manager, instance.capabilities, InternalComponentCapabilities.dynamicLayout));\n      let resolver = vm.context.resolver;\n      compilable = resolver === null ? null : manager.getDynamicLayout(state, resolver);\n      if (compilable !== null) {\n        moduleName = compilable.moduleName;\n      } else {\n        moduleName = '__default__.hbs';\n      }\n    } else {\n      moduleName = compilable.moduleName;\n    }\n\n    // For tearing down the debugRenderTree\n    vm.associateDestroyable(instance);\n    if (hasCustomDebugRenderTreeLifecycle(manager)) {\n      let nodes = manager.getDebugCustomRenderTree(instance.definition.state, instance.state, args, moduleName);\n      nodes.forEach(node => {\n        let {\n          bucket\n        } = node;\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n        vm.env.debugRenderTree.create(bucket, node);\n        registerDestructor(instance, () => {\n          vm.env.debugRenderTree?.willDestroy(bucket);\n        });\n        vm.updateWith(new DebugRenderTreeUpdateOpcode(bucket));\n      });\n    } else {\n      let name = getDebugName(definition, manager);\n      vm.env.debugRenderTree.create(instance, {\n        type: 'component',\n        name,\n        args,\n        template: moduleName,\n        instance: valueForRef(selfRef)\n      });\n      registerDestructor(instance, () => {\n        vm.env.debugRenderTree?.willDestroy(instance);\n      });\n      vm.updateWith(new DebugRenderTreeUpdateOpcode(instance));\n    }\n  }\n  vm.stack.push(selfRef);\n});\nAPPEND_OPCODES.add(VM_GET_COMPONENT_TAG_NAME_OP, (vm, {\n  op1: register\n}) => {\n  let {\n    definition,\n    state\n  } = check(vm.fetchValue(check(register, CheckRegister)));\n  let {\n    manager\n  } = definition;\n  let tagName = manager.getTagName(state);\n\n  // User provided value from JS, so we don't bother to encode\n  vm.stack.push(tagName);\n});\n\n// Dynamic Invocation Only\nAPPEND_OPCODES.add(VM_GET_COMPONENT_LAYOUT_OP, (vm, {\n  op1: register\n}) => {\n  let instance = check(vm.fetchValue(check(register, CheckRegister)));\n  let {\n    manager,\n    definition\n  } = instance;\n  let {\n    stack\n  } = vm;\n  let {\n    compilable\n  } = definition;\n  if (compilable === null) {\n    let {\n      capabilities\n    } = instance;\n    assert(managerHasCapability(manager, capabilities, InternalComponentCapabilities.dynamicLayout));\n    let resolver = vm.context.resolver;\n    compilable = resolver === null ? null : manager.getDynamicLayout(instance.state, resolver);\n    if (compilable === null) {\n      if (managerHasCapability(manager, capabilities, InternalComponentCapabilities.wrapped)) {\n        compilable = unwrapTemplate(vm.constants.defaultTemplate).asWrappedLayout();\n      } else {\n        compilable = unwrapTemplate(vm.constants.defaultTemplate).asLayout();\n      }\n    }\n  }\n  let handle = compilable.compile(vm.context);\n  stack.push(compilable.symbolTable);\n  stack.push(handle);\n});\nAPPEND_OPCODES.add(VM_MAIN_OP, (vm, {\n  op1: register\n}) => {\n  let definition = check(vm.stack.pop());\n  let invocation = check(vm.stack.pop());\n  let {\n    manager,\n    capabilities\n  } = definition;\n  let state = {\n    definition,\n    manager,\n    capabilities,\n    state: null,\n    handle: invocation.handle,\n    table: invocation.symbolTable,\n    lookup: null\n  };\n  vm.loadValue(check(register), state);\n});\nAPPEND_OPCODES.add(VM_POPULATE_LAYOUT_OP, (vm, {\n  op1: register\n}) => {\n  let {\n    stack\n  } = vm;\n\n  // In import.meta.env.DEV handles could be ErrHandle objects\n  let handle = check(stack.pop());\n  let table = check(stack.pop());\n  let state = check(vm.fetchValue(check(register, CheckRegister)));\n  state.handle = handle;\n  state.table = table;\n});\nAPPEND_OPCODES.add(VM_VIRTUAL_ROOT_SCOPE_OP, (vm, {\n  op1: register\n}) => {\n  let {\n    table,\n    manager,\n    capabilities,\n    state\n  } = check(vm.fetchValue(check(register, CheckRegister)));\n  let owner;\n  if (managerHasCapability(manager, capabilities, InternalComponentCapabilities.hasSubOwner)) {\n    owner = manager.getOwner(state);\n    vm.loadValue($t1, null); // Clear the temp register\n  } else {\n    // Check the temp register to see if an owner was resolved from currying\n    owner = vm.fetchValue($t1);\n    if (owner === null) {\n      // If an owner wasn't found, default to using the current owner. This\n      // will happen for normal dynamic component invocation,\n      // e.g. <SomeClassicEmberComponent/>\n      owner = vm.getOwner();\n    } else {\n      // Else the owner was found, so clear the temp register. This will happen\n      // if we are loading a curried component, e.g. <@someCurriedComponent/>\n      vm.loadValue($t1, null);\n    }\n  }\n  vm.pushRootScope(table.symbols.length + 1, owner);\n});\nAPPEND_OPCODES.add(VM_SET_NAMED_VARIABLES_OP, (vm, {\n  op1: register\n}) => {\n  let state = check(vm.fetchValue(check(register, CheckRegister)));\n  let scope = vm.scope();\n  let args = check(vm.stack.peek());\n  let callerNames = args.named.atNames;\n  for (let i = callerNames.length - 1; i >= 0; i--) {\n    let atName = unwrap(callerNames[i]);\n    let symbol = state.table.symbols.indexOf(atName);\n    let value = args.named.get(atName, true);\n    if (symbol !== -1) scope.bindSymbol(symbol + 1, value);\n    if (state.lookup) state.lookup[atName] = value;\n  }\n});\nfunction bindBlock(symbolName, blockName, state, blocks, vm) {\n  let symbol = state.table.symbols.indexOf(symbolName);\n  let block = blocks.get(blockName);\n  if (symbol !== -1) vm.scope().bindBlock(symbol + 1, block);\n  if (state.lookup) state.lookup[symbolName] = block;\n}\nAPPEND_OPCODES.add(VM_SET_BLOCKS_OP, (vm, {\n  op1: register\n}) => {\n  let state = check(vm.fetchValue(check(register, CheckRegister)));\n  let {\n    blocks\n  } = check(vm.stack.peek());\n  for (const [i] of enumerate(blocks.names)) {\n    bindBlock(unwrap(blocks.symbolNames[i]), unwrap(blocks.names[i]), state, blocks, vm);\n  }\n});\n\n// Dynamic Invocation Only\nAPPEND_OPCODES.add(VM_INVOKE_COMPONENT_LAYOUT_OP, (vm, {\n  op1: register\n}) => {\n  let state = check(vm.fetchValue(check(register, CheckRegister)));\n  vm.call(state.handle);\n});\nAPPEND_OPCODES.add(VM_DID_RENDER_LAYOUT_OP, (vm, {\n  op1: register\n}) => {\n  let instance = check(vm.fetchValue(check(register, CheckRegister)));\n  let {\n    manager,\n    state,\n    capabilities\n  } = instance;\n  let bounds = vm.tree().popBlock();\n  if (vm.env.debugRenderTree !== undefined) {\n    if (hasCustomDebugRenderTreeLifecycle(manager)) {\n      let nodes = manager.getDebugCustomRenderTree(instance.definition.state, state, EMPTY_ARGS);\n      nodes.reverse().forEach(node => {\n        let {\n          bucket\n        } = node;\n\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n        vm.env.debugRenderTree.didRender(bucket, bounds);\n        vm.updateWith(new DebugRenderTreeDidRenderOpcode(bucket, bounds));\n      });\n    } else {\n      vm.env.debugRenderTree.didRender(instance, bounds);\n      vm.updateWith(new DebugRenderTreeDidRenderOpcode(instance, bounds));\n    }\n  }\n  if (managerHasCapability(manager, capabilities, InternalComponentCapabilities.createInstance)) {\n    let mgr = check(manager);\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-call -- @fixme\n    mgr.didRenderLayout(state, bounds);\n    vm.env.didCreate(instance);\n    vm.updateWith(new DidUpdateLayoutOpcode(instance, bounds));\n  }\n});\nAPPEND_OPCODES.add(VM_COMMIT_COMPONENT_TRANSACTION_OP, vm => {\n  vm.commitCacheGroup();\n});\nclass UpdateComponentOpcode {\n  constructor(component, manager, dynamicScope) {\n    this.component = component;\n    this.manager = manager;\n    this.dynamicScope = dynamicScope;\n  }\n  evaluate(_vm) {\n    let {\n      component,\n      manager,\n      dynamicScope\n    } = this;\n    manager.update(component, dynamicScope);\n  }\n}\nclass DidUpdateLayoutOpcode {\n  constructor(component, bounds) {\n    this.component = component;\n    this.bounds = bounds;\n  }\n  evaluate(vm) {\n    let {\n      component,\n      bounds\n    } = this;\n    let {\n      manager,\n      state\n    } = component;\n    manager.didUpdateLayout(state, bounds);\n    vm.env.didUpdate(component);\n  }\n}\nclass DebugRenderTreeUpdateOpcode {\n  constructor(bucket) {\n    this.bucket = bucket;\n  }\n  evaluate(vm) {\n    vm.env.debugRenderTree?.update(this.bucket);\n  }\n}\nclass DebugRenderTreeDidRenderOpcode {\n  constructor(bucket, bounds) {\n    this.bucket = bucket;\n    this.bounds = bounds;\n  }\n  evaluate(vm) {\n    vm.env.debugRenderTree?.didRender(this.bucket, this.bounds);\n  }\n}\n\nclass ReferenceChecker {\n  validate(value) {\n    return typeof value === 'object' && value !== null && REFERENCE in value;\n  }\n  expected() {\n    return `Reference`;\n  }\n}\nconst CheckReference = new ReferenceChecker();\n\nclass VMArgumentsImpl {\n  stack = null;\n  positional = new PositionalArgumentsImpl();\n  named = new NamedArgumentsImpl();\n  blocks = new BlockArgumentsImpl();\n  constructor() {\n    setLocalDebugType('args', this);\n  }\n  empty(stack) {\n    let base = stack.registers[$sp] + 1;\n    this.named.empty(stack, base);\n    this.positional.empty(stack, base);\n    this.blocks.empty(stack, base);\n    return this;\n  }\n  setup(stack, names, blockNames, positionalCount, atNames) {\n    this.stack = stack;\n\n    /*\n           | ... | blocks      | positional  | named |\n           | ... | b0    b1    | p0 p1 p2 p3 | n0 n1 |\n     index | ... | 4/5/6 7/8/9 | 10 11 12 13 | 14 15 |\n                   ^             ^             ^  ^\n                 bbase         pbase       nbase  sp\n    */\n\n    let named = this.named;\n    let namedCount = names.length;\n    let namedBase = stack.registers[$sp] - namedCount + 1;\n    named.setup(stack, namedBase, namedCount, names, atNames);\n    let positional = this.positional;\n    let positionalBase = namedBase - positionalCount;\n    positional.setup(stack, positionalBase, positionalCount);\n    let blocks = this.blocks;\n    let blocksCount = blockNames.length;\n    let blocksBase = positionalBase - blocksCount * 3;\n    blocks.setup(stack, blocksBase, blocksCount, blockNames);\n  }\n  get base() {\n    return this.blocks.base;\n  }\n  get length() {\n    return this.positional.length + this.named.length + this.blocks.length * 3;\n  }\n  at(pos) {\n    return this.positional.at(pos);\n  }\n  realloc(offset) {\n    let {\n      stack\n    } = this;\n    if (offset > 0 && stack !== null) {\n      let {\n        positional,\n        named\n      } = this;\n      let newBase = positional.base + offset;\n      let length = positional.length + named.length;\n      for (let i = length - 1; i >= 0; i--) {\n        stack.copy(i + positional.base, i + newBase);\n      }\n      positional.base += offset;\n      named.base += offset;\n      stack.registers[$sp] += offset;\n    }\n  }\n  capture() {\n    let positional = this.positional.length === 0 ? EMPTY_POSITIONAL : this.positional.capture();\n    let named = this.named.length === 0 ? EMPTY_NAMED : this.named.capture();\n    return {\n      named,\n      positional\n    };\n  }\n  clear() {\n    let {\n      stack,\n      length\n    } = this;\n    if (length > 0 && stack !== null) stack.pop(length);\n  }\n}\nconst EMPTY_REFERENCES = emptyArray();\nclass PositionalArgumentsImpl {\n  base = 0;\n  length = 0;\n  stack = null;\n  _references = null;\n  constructor() {\n    setLocalDebugType('args:positional', this);\n  }\n  empty(stack, base) {\n    this.stack = stack;\n    this.base = base;\n    this.length = 0;\n    this._references = EMPTY_REFERENCES;\n  }\n  setup(stack, base, length) {\n    this.stack = stack;\n    this.base = base;\n    this.length = length;\n    if (length === 0) {\n      this._references = EMPTY_REFERENCES;\n    } else {\n      this._references = null;\n    }\n  }\n  at(position) {\n    let {\n      base,\n      length,\n      stack\n    } = this;\n    if (position < 0 || position >= length) {\n      return UNDEFINED_REFERENCE;\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    return check(stack.get(position, base));\n  }\n  capture() {\n    return this.references;\n  }\n  prepend(other) {\n    let additions = other.length;\n    if (additions > 0) {\n      let {\n        base,\n        length,\n        stack\n      } = this;\n      this.base = base = base - additions;\n      this.length = length + additions;\n      for (let i = 0; i < additions; i++) {\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n        stack.set(other[i], i, base);\n      }\n      this._references = null;\n    }\n  }\n  get references() {\n    let references = this._references;\n    if (!references) {\n      let {\n        stack,\n        base,\n        length\n      } = this;\n\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      references = this._references = stack.slice(base, base + length);\n    }\n    return references;\n  }\n}\nclass NamedArgumentsImpl {\n  base = 0;\n  length = 0;\n  _references = null;\n  _names = EMPTY_STRING_ARRAY;\n  _atNames = EMPTY_STRING_ARRAY;\n  constructor() {\n    setLocalDebugType('args:named', this);\n  }\n  empty(stack, base) {\n    this.stack = stack;\n    this.base = base;\n    this.length = 0;\n    this._references = EMPTY_REFERENCES;\n    this._names = EMPTY_STRING_ARRAY;\n    this._atNames = EMPTY_STRING_ARRAY;\n  }\n  setup(stack, base, length, names, atNames) {\n    this.stack = stack;\n    this.base = base;\n    this.length = length;\n    if (length === 0) {\n      this._references = EMPTY_REFERENCES;\n      this._names = EMPTY_STRING_ARRAY;\n      this._atNames = EMPTY_STRING_ARRAY;\n    } else {\n      this._references = null;\n      if (atNames) {\n        this._names = null;\n        this._atNames = names;\n      } else {\n        this._names = names;\n        this._atNames = null;\n      }\n    }\n  }\n  get names() {\n    let names = this._names;\n    if (!names) {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      names = this._names = this._atNames.map(this.toSyntheticName);\n    }\n    return names;\n  }\n  get atNames() {\n    let atNames = this._atNames;\n    if (!atNames) {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      atNames = this._atNames = this._names.map(this.toAtName);\n    }\n    return atNames;\n  }\n  has(name) {\n    return this.names.indexOf(name) !== -1;\n  }\n  get(name, atNames = false) {\n    let {\n      base,\n      stack\n    } = this;\n    let names = atNames ? this.atNames : this.names;\n    let idx = names.indexOf(name);\n    if (idx === -1) {\n      return UNDEFINED_REFERENCE;\n    }\n    let ref = stack.get(idx, base);\n    if (isDevelopingApp()) {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      return createDebugAliasRef(atNames ? name : `@${name}`, ref);\n    } else {\n      return ref;\n    }\n  }\n  capture() {\n    let {\n      names,\n      references\n    } = this;\n    let map = dict();\n    for (const [i, name] of enumerate(names)) {\n      if (isDevelopingApp()) {\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n        map[name] = createDebugAliasRef(`@${name}`, unwrap(references[i]));\n      } else {\n        map[name] = unwrap(references[i]);\n      }\n    }\n    return map;\n  }\n  merge(other) {\n    let keys = Object.keys(other);\n    if (keys.length > 0) {\n      let {\n        names,\n        length,\n        stack\n      } = this;\n      let newNames = names.slice();\n      for (const name of keys) {\n        let idx = newNames.indexOf(name);\n        if (idx === -1) {\n          length = newNames.push(name);\n          stack.push(other[name]);\n        }\n      }\n      this.length = length;\n      this._references = null;\n      this._names = newNames;\n      this._atNames = null;\n    }\n  }\n  get references() {\n    let references = this._references;\n    if (!references) {\n      let {\n        base,\n        length,\n        stack\n      } = this;\n      references = this._references = stack.slice(base, base + length);\n    }\n    return references;\n  }\n  toSyntheticName(name) {\n    return name.slice(1);\n  }\n  toAtName(name) {\n    return `@${name}`;\n  }\n}\nfunction toSymbolName(name) {\n  return `&${name}`;\n}\nconst EMPTY_BLOCK_VALUES = emptyArray();\nclass BlockArgumentsImpl {\n  internalValues = null;\n  _symbolNames = null;\n  internalTag = null;\n  names = EMPTY_STRING_ARRAY;\n  length = 0;\n  base = 0;\n  constructor() {\n    setLocalDebugType('args:blocks', this);\n  }\n  empty(stack, base) {\n    this.stack = stack;\n    this.names = EMPTY_STRING_ARRAY;\n    this.base = base;\n    this.length = 0;\n    this._symbolNames = null;\n    this.internalTag = CONSTANT_TAG;\n    this.internalValues = EMPTY_BLOCK_VALUES;\n  }\n  setup(stack, base, length, names) {\n    this.stack = stack;\n    this.names = names;\n    this.base = base;\n    this.length = length;\n    this._symbolNames = null;\n    if (length === 0) {\n      this.internalTag = CONSTANT_TAG;\n      this.internalValues = EMPTY_BLOCK_VALUES;\n    } else {\n      this.internalTag = null;\n      this.internalValues = null;\n    }\n  }\n  get values() {\n    let values = this.internalValues;\n    if (!values) {\n      let {\n        base,\n        length,\n        stack\n      } = this;\n      values = this.internalValues = stack.slice(base, base + length * 3);\n    }\n    return values;\n  }\n  has(name) {\n    return this.names.indexOf(name) !== -1;\n  }\n  get(name) {\n    let idx = this.names.indexOf(name);\n    if (idx === -1) {\n      return null;\n    }\n    let {\n      base,\n      stack\n    } = this;\n    let table = check(stack.get(idx * 3, base));\n    let scope = check(stack.get(idx * 3 + 1, base));\n    let handle = check(stack.get(idx * 3 + 2, base));\n    return handle === null ? null : [handle, scope, table];\n  }\n  capture() {\n    return new CapturedBlockArgumentsImpl(this.names, this.values);\n  }\n  get symbolNames() {\n    let symbolNames = this._symbolNames;\n    if (symbolNames === null) {\n      symbolNames = this._symbolNames = this.names.map(toSymbolName);\n    }\n    return symbolNames;\n  }\n}\nclass CapturedBlockArgumentsImpl {\n  length;\n  constructor(names, values) {\n    this.names = names;\n    this.values = values;\n    this.length = names.length;\n  }\n  has(name) {\n    return this.names.indexOf(name) !== -1;\n  }\n  get(name) {\n    let idx = this.names.indexOf(name);\n    if (idx === -1) return null;\n    return [this.values[idx * 3 + 2], this.values[idx * 3 + 1], this.values[idx * 3]];\n  }\n}\nfunction createCapturedArgs(named, positional) {\n  return {\n    named,\n    positional\n  };\n}\nfunction reifyNamed(named) {\n  let reified = dict();\n  for (const [key, value] of Object.entries(named)) {\n    reified[key] = valueForRef(value);\n  }\n  return reified;\n}\nfunction reifyPositional(positional) {\n  return positional.map(valueForRef);\n}\nfunction reifyArgs(args) {\n  return {\n    named: reifyNamed(args.named),\n    positional: reifyPositional(args.positional)\n  };\n}\nconst ARGUMENT_ERROR = Symbol('ARGUMENT_ERROR');\nfunction isArgumentError(arg) {\n  return arg !== null && typeof arg === 'object' && arg[ARGUMENT_ERROR];\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction ArgumentErrorImpl(error) {\n  return {\n    [ARGUMENT_ERROR]: true,\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n    error\n  };\n}\nfunction reifyNamedDebug(named) {\n  let reified = dict();\n  for (const [key, value] of Object.entries(named)) {\n    try {\n      reified[key] = valueForRef(value);\n    } catch (e) {\n      reified[key] = ArgumentErrorImpl(e);\n    }\n  }\n  return reified;\n}\nfunction reifyPositionalDebug(positional) {\n  return positional.map(p => {\n    try {\n      return valueForRef(p);\n    } catch (e) {\n      return ArgumentErrorImpl(e);\n    }\n  });\n}\nfunction reifyArgsDebug(args) {\n  let named = reifyNamedDebug(args.named);\n  let positional = reifyPositionalDebug(args.positional);\n  return {\n    named,\n    positional\n  };\n}\nconst EMPTY_NAMED = Object.freeze(Object.create(null));\nconst EMPTY_POSITIONAL = EMPTY_REFERENCES;\nconst EMPTY_ARGS = createCapturedArgs(EMPTY_NAMED, EMPTY_POSITIONAL);\n\nfunction createConcatRef(partsRefs) {\n  return createComputeRef(() => {\n    const parts = [];\n    for (const ref of partsRefs) {\n      const value = valueForRef(ref);\n      if (value !== null && value !== undefined) {\n        parts.push(castToString(value));\n      }\n    }\n    if (parts.length > 0) {\n      return parts.join('');\n    }\n    return null;\n  });\n}\nfunction castToString(value) {\n  if (typeof value === 'string') {\n    return value;\n  } else if (typeof value.toString !== 'function') {\n    return '';\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-base-to-string -- @fixme\n  return String(value);\n}\n\nAPPEND_OPCODES.add(VM_CURRY_OP, (vm, {\n  op1: type,\n  op2: _isStrict\n}) => {\n  let stack = vm.stack;\n  let definition = check(stack.pop());\n  let capturedArgs = check(stack.pop());\n  let owner = vm.getOwner();\n  let resolver = vm.context.resolver;\n  let isStrict = false;\n  if (isDevelopingApp()) {\n    // strict check only happens in import.meta.env.DEV builds, no reason to load it otherwise\n    isStrict = vm.constants.getValue(decodeHandle(_isStrict));\n  }\n  vm.loadValue($v0, createCurryRef(type, definition, owner, capturedArgs, resolver, isStrict));\n});\nAPPEND_OPCODES.add(VM_DYNAMIC_HELPER_OP, vm => {\n  let stack = vm.stack;\n  let ref = check(stack.pop());\n  let args = check(stack.pop()).capture();\n  let helperRef;\n  let initialOwner = vm.getOwner();\n  let helperInstanceRef = createComputeRef(() => {\n    if (helperRef !== undefined) {\n      destroy(helperRef);\n    }\n    let definition = valueForRef(ref);\n    if (isCurriedType(definition, CURRIED_HELPER)) {\n      let {\n        definition: resolvedDef,\n        owner,\n        positional,\n        named\n      } = resolveCurriedValue(definition);\n      let helper = resolveHelper(resolvedDef, ref);\n      if (named !== undefined) {\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n        args.named = assign({}, ...named, args.named);\n      }\n      if (positional !== undefined) {\n        args.positional = positional.concat(args.positional);\n      }\n      helperRef = helper(args, owner);\n      associateDestroyableChild(helperInstanceRef, helperRef);\n    } else if (isIndexable$1(definition)) {\n      let helper = resolveHelper(definition, ref);\n      helperRef = helper(args, initialOwner);\n      if (_hasDestroyableChildren(helperRef)) {\n        associateDestroyableChild(helperInstanceRef, helperRef);\n      }\n    } else {\n      helperRef = UNDEFINED_REFERENCE;\n    }\n  });\n  let helperValueRef = createComputeRef(() => {\n    valueForRef(helperInstanceRef);\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    return valueForRef(helperRef);\n  });\n  vm.associateDestroyable(helperInstanceRef);\n  vm.loadValue($v0, helperValueRef);\n});\nfunction resolveHelper(definition, ref) {\n  let managerOrHelper = getInternalHelperManager(definition, true);\n  let helper;\n  if (managerOrHelper === null) {\n    helper = null;\n  } else {\n    helper = typeof managerOrHelper === 'function' ? managerOrHelper : managerOrHelper.getHelper(definition);\n  }\n  debugAssert(helper !== null, () => `Expected a dynamic helper definition, but received an object or function that did not have a helper manager associated with it. The dynamic invocation was \\`{{${ref.debugLabel}}}\\` or \\`(${ref.debugLabel})\\`, and the incorrect definition is the value at the path \\`${ref.debugLabel}\\`, which was: ${debugToString?.(definition)}`);\n  return helper;\n}\nAPPEND_OPCODES.add(VM_HELPER_OP, (vm, {\n  op1: handle\n}) => {\n  let stack = vm.stack;\n  let helper = check(vm.constants.getValue(handle));\n  let args = check(stack.pop());\n  let value = helper(args.capture(), vm.getOwner(), vm.dynamicScope());\n  if (_hasDestroyableChildren(value)) {\n    vm.associateDestroyable(value);\n  }\n  vm.loadValue($v0, value);\n});\nAPPEND_OPCODES.add(VM_GET_VARIABLE_OP, (vm, {\n  op1: symbol\n}) => {\n  let expr = vm.referenceForSymbol(symbol);\n  vm.stack.push(expr);\n});\nAPPEND_OPCODES.add(VM_SET_VARIABLE_OP, (vm, {\n  op1: symbol\n}) => {\n  let expr = check(vm.stack.pop());\n  vm.scope().bindSymbol(symbol, expr);\n});\nAPPEND_OPCODES.add(VM_SET_BLOCK_OP, (vm, {\n  op1: symbol\n}) => {\n  let handle = check(vm.stack.pop());\n  let scope = check(vm.stack.pop());\n  let table = check(vm.stack.pop());\n  vm.scope().bindBlock(symbol, [handle, scope, table]);\n});\nAPPEND_OPCODES.add(VM_ROOT_SCOPE_OP, (vm, {\n  op1: size\n}) => {\n  vm.pushRootScope(size, vm.getOwner());\n});\nAPPEND_OPCODES.add(VM_GET_PROPERTY_OP, (vm, {\n  op1: _key\n}) => {\n  let key = vm.constants.getValue(_key);\n  let expr = check(vm.stack.pop());\n  vm.stack.push(childRefFor(expr, key));\n});\nAPPEND_OPCODES.add(VM_GET_BLOCK_OP, (vm, {\n  op1: _block\n}) => {\n  let {\n    stack\n  } = vm;\n  let block = vm.scope().getBlock(_block);\n  stack.push(block);\n});\nAPPEND_OPCODES.add(VM_SPREAD_BLOCK_OP, vm => {\n  let {\n    stack\n  } = vm;\n  let block = check(stack.pop());\n  if (block && !isUndefinedReference(block)) {\n    let [handleOrCompilable, scope, table] = block;\n    stack.push(table);\n    stack.push(scope);\n    stack.push(handleOrCompilable);\n  } else {\n    stack.push(null);\n    stack.push(null);\n    stack.push(null);\n  }\n});\nfunction isUndefinedReference(input) {\n  return input === UNDEFINED_REFERENCE;\n}\nAPPEND_OPCODES.add(VM_HAS_BLOCK_OP, vm => {\n  let {\n    stack\n  } = vm;\n  let block = check(stack.pop());\n  if (block && !isUndefinedReference(block)) {\n    stack.push(TRUE_REFERENCE);\n  } else {\n    stack.push(FALSE_REFERENCE);\n  }\n});\nAPPEND_OPCODES.add(VM_HAS_BLOCK_PARAMS_OP, vm => {\n  // FIXME(mmun): should only need to push the symbol table\n  vm.stack.pop();\n  vm.stack.pop();\n  let table = check(vm.stack.pop());\n  let hasBlockParams = table && table.parameters.length;\n  vm.stack.push(hasBlockParams ? TRUE_REFERENCE : FALSE_REFERENCE);\n});\nAPPEND_OPCODES.add(VM_CONCAT_OP, (vm, {\n  op1: count\n}) => {\n  let out = new Array(count);\n  for (let i = count; i > 0; i--) {\n    let offset = i - 1;\n    out[offset] = check(vm.stack.pop());\n  }\n  vm.stack.push(createConcatRef(out));\n});\nAPPEND_OPCODES.add(VM_IF_INLINE_OP, vm => {\n  let condition = check(vm.stack.pop());\n  let truthy = check(vm.stack.pop());\n  let falsy = check(vm.stack.pop());\n  vm.stack.push(createComputeRef(() => {\n    if (toBool(valueForRef(condition))) {\n      return valueForRef(truthy);\n    } else {\n      return valueForRef(falsy);\n    }\n  }));\n});\nAPPEND_OPCODES.add(VM_NOT_OP, vm => {\n  let ref = check(vm.stack.pop());\n  vm.stack.push(createComputeRef(() => {\n    return !toBool(valueForRef(ref));\n  }));\n});\nAPPEND_OPCODES.add(VM_GET_DYNAMIC_VAR_OP, vm => {\n  let scope = vm.dynamicScope();\n  let stack = vm.stack;\n  let nameRef = check(stack.pop());\n  stack.push(createComputeRef(() => {\n    let name = String(valueForRef(nameRef));\n    return valueForRef(scope.get(name));\n  }));\n});\nAPPEND_OPCODES.add(VM_LOG_OP, vm => {\n  let {\n    positional\n  } = check(vm.stack.pop()).capture();\n  vm.loadValue($v0, createComputeRef(() => {\n    // eslint-disable-next-line no-console\n    console.log(...reifyPositional(positional));\n  }));\n});\n\nclass DynamicTextContent {\n  constructor(node, reference, lastValue) {\n    this.node = node;\n    this.reference = reference;\n    this.lastValue = lastValue;\n  }\n  evaluate() {\n    let value = valueForRef(this.reference);\n    let {\n      lastValue\n    } = this;\n    if (value === lastValue) return;\n    let normalized;\n    if (isEmpty$1(value)) {\n      normalized = '';\n    } else if (isString(value)) {\n      normalized = value;\n    } else {\n      normalized = String(value);\n    }\n    if (normalized !== lastValue) {\n      let textNode = this.node;\n      textNode.nodeValue = this.lastValue = normalized;\n    }\n  }\n}\n\nfunction toContentType(value) {\n  if (shouldCoerce(value)) {\n    return ContentType.String;\n  } else if (isCurriedType(value, CURRIED_COMPONENT) || hasInternalComponentManager(value)) {\n    return ContentType.Component;\n  } else if (isCurriedType(value, CURRIED_HELPER) || hasInternalHelperManager(value)) {\n    return ContentType.Helper;\n  } else if (isSafeString(value)) {\n    return ContentType.SafeString;\n  } else if (isFragment(value)) {\n    return ContentType.Fragment;\n  } else if (isNode(value)) {\n    return ContentType.Node;\n  } else {\n    return ContentType.String;\n  }\n}\nfunction toDynamicContentType(value) {\n  if (!isIndexable$1(value)) {\n    return ContentType.String;\n  }\n  if (isCurriedType(value, CURRIED_COMPONENT) || hasInternalComponentManager(value)) {\n    return ContentType.Component;\n  } else {\n    if (isDevelopingApp() && !isCurriedType(value, CURRIED_HELPER) && !hasInternalHelperManager(value)) {\n      throw new Error(\n      // eslint-disable-next-line @typescript-eslint/no-base-to-string -- @fixme\n      `Attempted use a dynamic value as a component or helper, but that value did not have an associated component or helper manager. The value was: ${value}`);\n    }\n    return ContentType.Helper;\n  }\n}\nAPPEND_OPCODES.add(VM_CONTENT_TYPE_OP, vm => {\n  let reference = check(vm.stack.peek());\n  vm.stack.push(toContentType(valueForRef(reference)));\n  if (!isConstRef(reference)) {\n    vm.updateWith(new AssertFilter(reference, toContentType));\n  }\n});\nAPPEND_OPCODES.add(VM_DYNAMIC_CONTENT_TYPE_OP, vm => {\n  let reference = check(vm.stack.peek());\n  vm.stack.push(toDynamicContentType(valueForRef(reference)));\n  if (!isConstRef(reference)) {\n    vm.updateWith(new AssertFilter(reference, toDynamicContentType));\n  }\n});\nAPPEND_OPCODES.add(VM_APPEND_HTML_OP, vm => {\n  let reference = check(vm.stack.pop());\n  let rawValue = valueForRef(reference);\n  let value = isEmpty$1(rawValue) ? '' : String(rawValue);\n  vm.tree().appendDynamicHTML(value);\n});\nAPPEND_OPCODES.add(VM_APPEND_SAFE_HTML_OP, vm => {\n  let reference = check(vm.stack.pop());\n  let rawValue = check(valueForRef(reference)).toHTML();\n  let value = isEmpty$1(rawValue) ? '' : check(rawValue);\n  vm.tree().appendDynamicHTML(value);\n});\nAPPEND_OPCODES.add(VM_APPEND_TEXT_OP, vm => {\n  let reference = check(vm.stack.pop());\n  let rawValue = valueForRef(reference);\n  let value = isEmpty$1(rawValue) ? '' : String(rawValue);\n  let node = vm.tree().appendDynamicText(value);\n  if (!isConstRef(reference)) {\n    vm.updateWith(new DynamicTextContent(node, reference, value));\n  }\n});\nAPPEND_OPCODES.add(VM_APPEND_DOCUMENT_FRAGMENT_OP, vm => {\n  let reference = check(vm.stack.pop());\n  let value = check(valueForRef(reference));\n  vm.tree().appendDynamicFragment(value);\n});\nAPPEND_OPCODES.add(VM_APPEND_NODE_OP, vm => {\n  let reference = check(vm.stack.pop());\n  let value = check(valueForRef(reference));\n  vm.tree().appendDynamicNode(value);\n});\n\n// Allow the contents of `debugCallback` without extra annotations\n/* eslint-disable @typescript-eslint/no-unused-expressions */\n\nfunction debugCallback(context, get) {\n  // eslint-disable-next-line no-console\n  console.info('Use `context`, and `get(<path>)` to debug this template.');\n\n  // for example...\n  context === get('this');\n\n  // eslint-disable-next-line no-debugger\n  debugger;\n}\nlet callback = debugCallback;\n\n// For testing purposes\nfunction setDebuggerCallback(cb) {\n  callback = cb;\n}\nfunction resetDebuggerCallback() {\n  callback = debugCallback;\n}\nclass ScopeInspector {\n  #symbols;\n  constructor(scope, symbols) {\n    this.scope = scope;\n    this.#symbols = symbols;\n  }\n  get(path) {\n    let {\n      scope\n    } = this;\n    let symbols = this.#symbols;\n    let parts = path.split('.');\n    let [head, ...tail] = path.split('.');\n    let ref;\n    if (head === 'this') {\n      ref = scope.getSelf();\n    } else if (symbols.locals[head]) {\n      ref = unwrap(scope.getSymbol(symbols.locals[head]));\n    } else {\n      ref = this.scope.getSelf();\n      tail = parts;\n    }\n    return tail.reduce((r, part) => childRefFor(r, part), ref);\n  }\n}\nAPPEND_OPCODES.add(VM_DEBUGGER_OP, (vm, {\n  op1: _debugInfo\n}) => {\n  let debuggerInfo = vm.constants.getValue(decodeHandle(_debugInfo));\n  let inspector = new ScopeInspector(vm.scope(), debuggerInfo);\n  callback(valueForRef(vm.getSelf()), path => valueForRef(inspector.get(path)));\n});\n\nAPPEND_OPCODES.add(VM_ENTER_LIST_OP, (vm, {\n  op1: relativeStart,\n  op2: elseTarget\n}) => {\n  let stack = vm.stack;\n  let listRef = check(stack.pop());\n  let keyRef = check(stack.pop());\n  let keyValue = valueForRef(keyRef);\n  // eslint-disable-next-line @typescript-eslint/no-base-to-string -- @fixme\n  let key = keyValue === null ? '@identity' : String(keyValue);\n  let iteratorRef = createIteratorRef(listRef, key);\n  let iterator = valueForRef(iteratorRef);\n  vm.updateWith(new AssertFilter(iteratorRef, iterator => iterator.isEmpty()));\n  if (iterator.isEmpty()) {\n    // TODO: Fix this offset, should be accurate\n    vm.lowlevel.goto(elseTarget + 1);\n  } else {\n    vm.enterList(iteratorRef, relativeStart);\n    vm.stack.push(iterator);\n  }\n});\nAPPEND_OPCODES.add(VM_EXIT_LIST_OP, vm => {\n  vm.exitList();\n});\nAPPEND_OPCODES.add(VM_ITERATE_OP, (vm, {\n  op1: breaks\n}) => {\n  let stack = vm.stack;\n  let iterator = check(stack.peek());\n  let item = iterator.next();\n  if (item !== null) {\n    vm.registerItem(vm.enterItem(item));\n  } else {\n    vm.lowlevel.goto(breaks);\n  }\n});\n\nconst CAPABILITIES = {\n  dynamicLayout: false,\n  dynamicTag: false,\n  prepareArgs: false,\n  createArgs: false,\n  attributeHook: false,\n  elementHook: false,\n  createCaller: false,\n  dynamicScope: false,\n  updateHook: false,\n  createInstance: false,\n  wrapped: false,\n  willDestroy: false,\n  hasSubOwner: false\n};\nclass TemplateOnlyComponentManager {\n  getCapabilities() {\n    return CAPABILITIES;\n  }\n  getDebugName({\n    name\n  }) {\n    return name;\n  }\n  getSelf() {\n    return NULL_REFERENCE;\n  }\n  getDestroyable() {\n    return null;\n  }\n}\nconst TEMPLATE_ONLY_COMPONENT_MANAGER = new TemplateOnlyComponentManager();\n\n// This is only exported for types, don't use this class directly\nclass TemplateOnlyComponentDefinition {\n  constructor(moduleName = '@glimmer/component/template-only', name = '(unknown template-only component)') {\n    this.moduleName = moduleName;\n    this.name = name;\n  }\n  toString() {\n    return this.moduleName;\n  }\n}\nsetInternalComponentManager(TEMPLATE_ONLY_COMPONENT_MANAGER, TemplateOnlyComponentDefinition.prototype);\n\n/**\n  This utility function is used to declare a given component has no backing class. When the rendering engine detects this it\n  is able to perform a number of optimizations. Templates that are associated with `templateOnly()` will be rendered _as is_\n  without adding a wrapping `<div>` (or any of the other element customization behaviors of [@ember/component](/ember/release/classes/Component)).\n  Specifically, this means that the template will be rendered as \"outer HTML\".\n\n  In general, this method will be used by build time tooling and would not be directly written in an application. However,\n  at times it may be useful to use directly to leverage the \"outer HTML\" semantics mentioned above. For example, if an addon would like\n  to use these semantics for its templates but cannot be certain it will only be consumed by applications that have enabled the\n  `template-only-glimmer-components` optional feature.\n\n  @example\n\n  ```js\n  import { templateOnlyComponent } from '@glimmer/runtime';\n\n  export default templateOnlyComponent();\n  ```\n\n  @public\n  @method templateOnly\n  @param {String} moduleName the module name that the template only component represents, this will be used for debugging purposes\n  @category EMBER_GLIMMER_SET_COMPONENT_TEMPLATE\n*/\n\nfunction templateOnlyComponent(moduleName, name) {\n  return new TemplateOnlyComponentDefinition(moduleName, name);\n}\n\n// http://www.w3.org/TR/html/syntax.html#html-integration-point\nconst SVG_INTEGRATION_POINTS = {\n  foreignObject: 1,\n  desc: 1,\n  title: 1\n};\n\n// http://www.w3.org/TR/html/syntax.html#adjust-svg-attributes\n// TODO: Adjust SVG attributes\n\n// http://www.w3.org/TR/html/syntax.html#parsing-main-inforeign\n// TODO: Adjust SVG elements\n\n// http://www.w3.org/TR/html/syntax.html#parsing-main-inforeign\nconst BLACKLIST_TABLE = Object.create(null);\nclass DOMOperations {\n  // Set by this.setupUselessElement() in constructor\n\n  constructor(document) {\n    this.document = document;\n    this.setupUselessElement();\n  }\n\n  // split into separate method so that NodeDOMTreeConstruction\n  // can override it.\n  setupUselessElement() {\n    this.uselessElement = this.document.createElement('div');\n  }\n  createElement(tag, context) {\n    let isElementInSVGNamespace, isHTMLIntegrationPoint, isElementInMathMlNamespace, ns;\n    if (context) {\n      isElementInSVGNamespace = context.namespaceURI === NS_SVG || tag === 'svg';\n      isElementInMathMlNamespace = context.namespaceURI === NS_MATHML || tag === 'math';\n      isHTMLIntegrationPoint = !!SVG_INTEGRATION_POINTS[context.tagName];\n    } else {\n      isElementInSVGNamespace = tag === 'svg';\n      isElementInMathMlNamespace = tag === 'math';\n      isHTMLIntegrationPoint = false;\n    }\n    if ((isElementInMathMlNamespace || isElementInSVGNamespace) && !isHTMLIntegrationPoint) {\n      // FIXME: This does not properly handle <font> with color, face, or\n      // size attributes, which is also disallowed by the spec. We should fix\n      // this.\n      if (BLACKLIST_TABLE[tag]) {\n        throw new Error(`Cannot create a ${tag} inside an SVG context`);\n      }\n      if (isElementInMathMlNamespace) {\n        ns = NS_MATHML;\n      } else {\n        ns = NS_SVG;\n      }\n      return this.document.createElementNS(ns, tag);\n    } else {\n      return this.document.createElement(tag);\n    }\n  }\n  insertBefore(parent, node, reference) {\n    parent.insertBefore(node, reference);\n  }\n  insertHTMLBefore(parent, nextSibling, html) {\n    if (html === '') {\n      const comment = this.createComment('');\n      parent.insertBefore(comment, nextSibling);\n      return new ConcreteBounds(parent, comment, comment);\n    }\n    const prev = nextSibling ? nextSibling.previousSibling : parent.lastChild;\n    let last;\n    if (nextSibling === null) {\n      parent.insertAdjacentHTML(INSERT_BEFORE_END, html);\n      last = expect(parent.lastChild);\n    } else if (nextSibling instanceof HTMLElement) {\n      nextSibling.insertAdjacentHTML('beforebegin', html);\n      last = expect(nextSibling.previousSibling);\n    } else {\n      // Non-element nodes do not support insertAdjacentHTML, so add an\n      // element and call it on that element. Then remove the element.\n      const {\n        uselessElement\n      } = this;\n      parent.insertBefore(uselessElement, nextSibling);\n      uselessElement.insertAdjacentHTML(INSERT_BEFORE_BEGIN, html);\n      last = expect(uselessElement.previousSibling);\n      parent.removeChild(uselessElement);\n    }\n    const first = expect(prev ? prev.nextSibling : parent.firstChild);\n    return new ConcreteBounds(parent, first, last);\n  }\n  createTextNode(text) {\n    return this.document.createTextNode(text);\n  }\n  createComment(data) {\n    return this.document.createComment(data);\n  }\n}\n\n['b', 'big', 'blockquote', 'body', 'br', 'center', 'code', 'dd', 'div', 'dl', 'dt', 'em', 'embed', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'i', 'img', 'li', 'listing', 'main', 'meta', 'nobr', 'ol', 'p', 'pre', 'ruby', 's', 'small', 'span', 'strong', 'strike', 'sub', 'sup', 'table', 'tt', 'u', 'ul', 'var'].forEach(tag => BLACKLIST_TABLE[tag] = 1);\nconst WHITESPACE = /[\\t\\n\\v\\f\\r \\xa0\\u{1680}\\u{180e}\\u{2000}-\\u{200a}\\u{2028}\\u{2029}\\u{202f}\\u{205f}\\u{3000}\\u{feff}]/u;\nfunction isWhitespace(string) {\n  return WHITESPACE.test(string);\n}\nclass DOMChangesImpl extends DOMOperations {\n  namespace;\n  constructor(document) {\n    super(document);\n    this.document = document;\n    this.namespace = null;\n  }\n  setAttribute(element, name, value) {\n    element.setAttribute(name, value);\n  }\n  removeAttribute(element, name) {\n    element.removeAttribute(name);\n  }\n  insertAfter(element, node, reference) {\n    this.insertBefore(element, node, reference.nextSibling);\n  }\n}\nconst DOMChanges = DOMChangesImpl;\n\n/*\n * @method normalizeProperty\n * @param element {HTMLElement}\n * @param slotName {String}\n * @returns {Object} { name, type }\n */\nfunction normalizeProperty(element, slotName) {\n  let type, normalized;\n  if (slotName in element) {\n    normalized = slotName;\n    type = 'prop';\n  } else {\n    let lower = slotName.toLowerCase();\n    if (lower in element) {\n      type = 'prop';\n      normalized = lower;\n    } else {\n      type = 'attr';\n      normalized = slotName;\n    }\n  }\n  if (type === 'prop' && (normalized.toLowerCase() === 'style' || preferAttr(element.tagName, normalized))) {\n    type = 'attr';\n  }\n  return {\n    normalized,\n    type\n  };\n}\n\n// properties that MUST be set as attributes, due to:\n// * browser bug\n// * strange spec outlier\nconst ATTR_OVERRIDES = {\n  INPUT: {\n    form: true,\n    // Chrome 46.0.2464.0: 'autocorrect' in document.createElement('input') === false\n    // Safari 8.0.7: 'autocorrect' in document.createElement('input') === false\n    // Mobile Safari (iOS 8.4 simulator): 'autocorrect' in document.createElement('input') === true\n    autocorrect: true,\n    // Chrome 54.0.2840.98: 'list' in document.createElement('input') === true\n    // Safari 9.1.3: 'list' in document.createElement('input') === false\n    list: true\n  },\n  // element.form is actually a legitimate readOnly property, that is to be\n  // mutated, but must be mutated by setAttribute...\n  SELECT: {\n    form: true\n  },\n  OPTION: {\n    form: true\n  },\n  TEXTAREA: {\n    form: true\n  },\n  LABEL: {\n    form: true\n  },\n  FIELDSET: {\n    form: true\n  },\n  LEGEND: {\n    form: true\n  },\n  OBJECT: {\n    form: true\n  },\n  OUTPUT: {\n    form: true\n  },\n  BUTTON: {\n    form: true\n  }\n};\nfunction preferAttr(tagName, propName) {\n  let tag = ATTR_OVERRIDES[tagName.toUpperCase()];\n  return !!(tag && tag[propName.toLowerCase()]);\n}\n\nfunction internalHelper(helper) {\n  return setInternalHelperManager(helper, {});\n}\n\n/**\n   Use the `{{array}}` helper to create an array to pass as an option to your\n   components.\n\n   ```handlebars\n   <MyComponent @people={{array\n     'Tom Dale'\n     'Yehuda Katz'\n     this.myOtherPerson}}\n   />\n   ```\n    or\n   ```handlebars\n   {{my-component people=(array\n     'Tom Dale'\n     'Yehuda Katz'\n     this.myOtherPerson)\n   }}\n   ```\n\n   Would result in an object such as:\n\n   ```js\n   ['Tom Dale', 'Yehuda Katz', this.get('myOtherPerson')]\n   ```\n\n   Where the 3rd item in the array is bound to updates of the `myOtherPerson` property.\n\n   @method array\n   @param {Array} options\n   @return {Array} Array\n   @public\n */\n\nconst array = internalHelper(({\n  positional\n}) => {\n  return createComputeRef(() => reifyPositional(positional), null, 'array');\n});\n\nconst isEmpty = value => {\n  return value === null || value === undefined || typeof value.toString !== 'function';\n};\nconst normalizeTextValue = value => {\n  if (isEmpty(value)) {\n    return '';\n  }\n  return String(value);\n};\n\n/**\n  Concatenates the given arguments into a string.\n\n  Example:\n\n  ```handlebars\n  {{some-component name=(concat firstName \" \" lastName)}}\n\n  {{! would pass name=\"<first name value> <last name value>\" to the component}}\n  ```\n\n  or for angle bracket invocation, you actually don't need concat at all.\n\n  ```handlebars\n  <SomeComponent @name=\"{{firstName}} {{lastName}}\" />\n  ```\n\n  @public\n  @method concat\n*/\nconst concat = internalHelper(({\n  positional\n}) => {\n  return createComputeRef(() => reifyPositional(positional).map(normalizeTextValue).join(''), null, 'concat');\n});\n\nconst context = buildUntouchableThis('`fn` helper');\n\n/**\n  The `fn` helper allows you to ensure a function that you are passing off\n  to another component, helper, or modifier has access to arguments that are\n  available in the template.\n\n  For example, if you have an `each` helper looping over a number of items, you\n  may need to pass a function that expects to receive the item as an argument\n  to a component invoked within the loop. Here's how you could use the `fn`\n  helper to pass both the function and its arguments together:\n\n    ```app/templates/components/items-listing.hbs\n  {{#each @items as |item|}}\n    <DisplayItem @item=item @select={{fn this.handleSelected item}} />\n  {{/each}}\n  ```\n\n  ```app/components/items-list.js\n  import Component from '@glimmer/component';\n  import { action } from '@ember/object';\n\n  export default class ItemsList extends Component {\n    handleSelected = (item) => {\n      // ...snip...\n    }\n  }\n  ```\n\n  In this case the `display-item` component will receive a normal function\n  that it can invoke. When it invokes the function, the `handleSelected`\n  function will receive the `item` and any arguments passed, thanks to the\n  `fn` helper.\n\n  Let's take look at what that means in a couple circumstances:\n\n  - When invoked as `this.args.select()` the `handleSelected` function will\n    receive the `item` from the loop as its first and only argument.\n  - When invoked as `this.args.select('foo')` the `handleSelected` function\n    will receive the `item` from the loop as its first argument and the\n    string `'foo'` as its second argument.\n\n  In the example above, we used an arrow function to ensure that\n  `handleSelected` is properly bound to the `items-list`, but let's explore what\n  happens if we left out the arrow function:\n\n  ```app/components/items-list.js\n  import Component from '@glimmer/component';\n\n  export default class ItemsList extends Component {\n    handleSelected(item) {\n      // ...snip...\n    }\n  }\n  ```\n\n  In this example, when `handleSelected` is invoked inside the `display-item`\n  component, it will **not** have access to the component instance. In other\n  words, it will have no `this` context, so please make sure your functions\n  are bound (via an arrow function or other means) before passing into `fn`!\n\n  See also [partial application](https://en.wikipedia.org/wiki/Partial_application).\n\n  @method fn\n  @public\n*/\nconst fn = internalHelper(({\n  positional\n}) => {\n  let callbackRef = check(positional[0]);\n  return createComputeRef(() => {\n    return (...invocationArgs) => {\n      let [fn, ...args] = reifyPositional(positional);\n      if (isDevelopingApp()) assertCallbackIsFn(callbackRef);\n      if (isInvokableRef(callbackRef)) {\n        let value = args.length > 0 ? args[0] : invocationArgs[0];\n        return void updateRef(callbackRef, value);\n      } else {\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-return -- @fixme\n        return fn.call(context, ...args, ...invocationArgs);\n      }\n    };\n  }, null, 'fn');\n});\nfunction assertCallbackIsFn(callbackRef) {\n  if (!(callbackRef && (isInvokableRef(callbackRef) || typeof valueForRef(callbackRef) === 'function'))) {\n    throw new Error(`You must pass a function as the \\`fn\\` helper's first argument, you passed ${callbackRef ? valueForRef(callbackRef) : callbackRef}. While rendering:\\n\\n${callbackRef?.debugLabel}`);\n  }\n}\n\n/**\n  Dynamically look up a property on an object. The second argument to `{{get}}`\n  should have a string value, although it can be bound.\n\n  For example, these two usages are equivalent:\n\n  ```app/components/developer-detail.js\n  import Component from '@glimmer/component';\n  import { tracked } from '@glimmer/tracking';\n\n  export default class extends Component {\n    @tracked developer = {\n      name: \"Sandi Metz\",\n      language: \"Ruby\"\n    }\n  }\n  ```\n\n  ```handlebars\n  {{this.developer.name}}\n  {{get this.developer \"name\"}}\n  ```\n\n  If there were several facts about a person, the `{{get}}` helper can dynamically\n  pick one:\n\n  ```app/templates/application.hbs\n  <DeveloperDetail @factName=\"language\" />\n  ```\n\n  ```handlebars\n  {{get this.developer @factName}}\n  ```\n\n  For a more complex example, this template would allow the user to switch\n  between showing the user's height and weight with a click:\n\n  ```app/components/developer-detail.js\n  import Component from '@glimmer/component';\n  import { tracked } from '@glimmer/tracking';\n\n  export default class extends Component {\n    @tracked developer = {\n      name: \"Sandi Metz\",\n      language: \"Ruby\"\n    }\n\n    @tracked currentFact = 'name'\n\n    showFact = (fact) => {\n      this.currentFact = fact;\n    }\n  }\n  ```\n\n  ```app/components/developer-detail.js\n  {{get this.developer this.currentFact}}\n\n  <button {{on 'click' (fn this.showFact \"name\")}}>Show name</button>\n  <button {{on 'click' (fn this.showFact \"language\")}}>Show language</button>\n  ```\n\n  The `{{get}}` helper can also respect mutable values itself. For example:\n\n  ```app/components/developer-detail.js\n  <Input @value={{mut (get this.person this.currentFact)}} />\n\n  <button {{on 'click' (fn this.showFact \"name\")}}>Show name</button>\n  <button {{on 'click' (fn this.showFact \"language\")}}>Show language</button>\n  ```\n\n  Would allow the user to swap what fact is being displayed, and also edit\n  that fact via a two-way mutable binding.\n\n  @public\n  @method get\n */\nconst get = internalHelper(({\n  positional\n}) => {\n  let sourceRef = positional[0] ?? UNDEFINED_REFERENCE;\n  let pathRef = positional[1] ?? UNDEFINED_REFERENCE;\n  return createComputeRef(() => {\n    let source = valueForRef(sourceRef);\n    if (isDict(source)) {\n      return getPath(source, String(valueForRef(pathRef)));\n    }\n  }, value => {\n    let source = valueForRef(sourceRef);\n    if (isDict(source)) {\n      return setPath(source, String(valueForRef(pathRef)), value);\n    }\n  }, 'get');\n});\n\n/**\n   Use the `{{hash}}` helper to create a hash to pass as an option to your\n   components. This is specially useful for contextual components where you can\n   just yield a hash:\n\n   ```handlebars\n   {{yield (hash\n      name='Sarah'\n      title=office\n   )}}\n   ```\n\n   Would result in an object such as:\n\n   ```js\n   { name: 'Sarah', title: this.get('office') }\n   ```\n\n   Where the `title` is bound to updates of the `office` property.\n\n   Note that the hash is an empty object with no prototype chain, therefore\n   common methods like `toString` are not available in the resulting hash.\n   If you need to use such a method, you can use the `call` or `apply`\n   approach:\n\n   ```js\n   function toString(obj) {\n     return Object.prototype.toString.apply(obj);\n   }\n   ```\n\n   @method hash\n   @param {Object} options\n   @return {Object} Hash\n   @public\n */\nconst hash = internalHelper(({\n  named\n}) => {\n  let ref = createComputeRef(() => {\n    return reifyNamed(named);\n  }, null, 'hash');\n\n  // Setup the children so that templates can bypass getting the value of\n  // the reference and treat children lazily\n  let children = new Map();\n  for (let name in named) {\n    children.set(name, named[name]);\n  }\n  ref.children = children;\n  return ref;\n});\n\nlet ARGS_CACHES = isDevelopingApp() ? new WeakMap() : undefined;\nfunction getArgs(proxy) {\n  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n  return getValue(isDevelopingApp() ? ARGS_CACHES.get(proxy) : proxy.argsCache);\n}\nclass SimpleArgsProxy {\n  argsCache;\n  constructor(context, computeArgs = () => EMPTY_ARGS) {\n    let argsCache = createCache(() => computeArgs(context));\n    if (isDevelopingApp()) {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      ARGS_CACHES.set(this, argsCache);\n      Object.freeze(this);\n    } else {\n      this.argsCache = argsCache;\n    }\n  }\n  get named() {\n    return getArgs(this).named || EMPTY_NAMED;\n  }\n  get positional() {\n    return getArgs(this).positional || EMPTY_POSITIONAL;\n  }\n}\n\n////////////\n\nfunction invokeHelper(context, definition, computeArgs) {\n  if (isDevelopingApp() && (typeof context !== 'object' || context === null)) {\n    throw new Error(`Expected a context object to be passed as the first parameter to invokeHelper, got ${context}`);\n  }\n  const owner = getOwner(context);\n  const internalManager = getInternalHelperManager(definition);\n  if (isDevelopingApp() && typeof internalManager === 'function') {\n    throw new Error('Found a helper manager, but it was an internal built-in helper manager. `invokeHelper` does not support internal helpers yet.');\n  }\n  const manager = internalManager.getDelegateFor(owner);\n  let args = new SimpleArgsProxy(context, computeArgs);\n  let bucket = manager.createHelper(definition, args);\n  let cache;\n  if (hasValue(manager)) {\n    cache = createCache(() => {\n      if (isDevelopingApp() && (isDestroying(cache) || isDestroyed(cache))) {\n        throw new Error(`You attempted to get the value of a helper after the helper was destroyed, which is not allowed`);\n      }\n      return manager.getValue(bucket);\n    });\n    associateDestroyableChild(context, cache);\n  } else {\n    throw new Error('TODO: unreachable, to be implemented with hasScheduledEffect');\n  }\n  if (hasDestroyable(manager)) {\n    let destroyable = manager.getDestroyable(bucket);\n    associateDestroyableChild(cache, destroyable);\n  }\n  return cache;\n}\n\nconst untouchableContext = buildUntouchableThis('`on` modifier');\nclass OnModifierState {\n  tag = createUpdatableTag();\n  element;\n  args;\n  listener = null;\n  constructor(element, args) {\n    this.element = element;\n    this.args = args;\n    registerDestructor(this, () => {\n      let {\n        element,\n        listener\n      } = this;\n      if (listener) {\n        let {\n          eventName,\n          callback,\n          options\n        } = listener;\n        removeEventListener(element, eventName, callback, options);\n      }\n    });\n  }\n\n  // Update this.listener if needed\n  updateListener() {\n    let {\n      element,\n      args,\n      listener\n    } = this;\n    assert(args.positional[0]);\n    let eventName = check(valueForRef(args.positional[0]));\n    let arg1 = args.positional[1];\n    let userProvidedCallback = check(arg1 ? valueForRef(arg1) : undefined);\n    assert(typeof userProvidedCallback === 'function', `You must pass a function as the second argument to the \\`on\\` modifier; you passed ${userProvidedCallback === null ? 'null' : typeof userProvidedCallback}. While rendering:\\n\\n${args.positional[1]?.debugLabel ?? `{unlabeled value}`}`);\n    if (isDevelopingApp() && args.positional.length !== 2) {\n      throw new Error(`You can only pass two positional arguments (event name and callback) to the \\`on\\` modifier, but you provided ${args.positional.length}. Consider using the \\`fn\\` helper to provide additional arguments to the \\`on\\` callback.`);\n    }\n    let once = undefined;\n    let passive = undefined;\n    let capture = undefined;\n    if (isDevelopingApp()) {\n      let {\n        once: _once,\n        passive: _passive,\n        capture: _capture,\n        ...extra\n      } = reifyNamed(args.named);\n      once = check(_once);\n      passive = check(_passive);\n      capture = check(_capture);\n      if (Object.keys(extra).length > 0) {\n        throw new Error(`You can only \\`once\\`, \\`passive\\` or \\`capture\\` named arguments to the \\`on\\` modifier, but you provided ${Object.keys(extra).join(', ')}.`);\n      }\n    } else {\n      let {\n        once: _once,\n        passive: _passive,\n        capture: _capture\n      } = args.named;\n      if (_once) {\n        once = valueForRef(_once);\n      }\n      if (_passive) {\n        passive = valueForRef(_passive);\n      }\n      if (_capture) {\n        capture = valueForRef(_capture);\n      }\n    }\n    let shouldUpdate = false;\n    if (listener === null) {\n      shouldUpdate = true;\n    } else {\n      shouldUpdate = eventName !== listener.eventName || userProvidedCallback !== listener.userProvidedCallback || once !== listener.once || passive !== listener.passive || capture !== listener.capture;\n    }\n    let options = undefined;\n\n    // we want to handle both `true` and `false` because both have a meaning:\n    // https://bugs.chromium.org/p/chromium/issues/detail?id=770208\n    if (shouldUpdate) {\n      if (once !== undefined || passive !== undefined || capture !== undefined) {\n        options = {\n          once,\n          passive,\n          capture\n        };\n      }\n    }\n    if (shouldUpdate) {\n      let callback = userProvidedCallback;\n      if (isDevelopingApp()) {\n        callback = userProvidedCallback.bind(untouchableContext);\n        if (passive) {\n          let _callback = callback;\n          callback = event => {\n            event.preventDefault = () => {\n              throw new Error(`You marked this listener as 'passive', meaning that you must not call 'event.preventDefault()': \\n\\n${userProvidedCallback.name || `{anonymous function}`}`);\n            };\n            return _callback(event);\n          };\n        }\n      }\n      this.listener = {\n        eventName,\n        callback,\n        userProvidedCallback,\n        once,\n        passive,\n        capture,\n        options\n      };\n      if (listener) {\n        removeEventListener(element, listener.eventName, listener.callback, listener.options);\n      }\n      addEventListener(element, eventName, callback, options);\n    }\n  }\n}\nlet adds = 0;\nlet removes = 0;\nfunction removeEventListener(element, eventName, callback, options) {\n  removes++;\n  element.removeEventListener(eventName, callback, options);\n}\nfunction addEventListener(element, eventName, callback, options) {\n  adds++;\n  element.addEventListener(eventName, callback, options);\n}\n\n/**\n  The `{{on}}` modifier lets you easily add event listeners (it uses\n  [EventTarget.addEventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)\n  internally).\n\n  For example, if you'd like to run a function on your component when a `<button>`\n  in the components template is clicked you might do something like:\n\n  ```app/components/like-post.hbs\n  <button {{on 'click' this.saveLike}}>Like this post!</button>\n  ```\n\n  ```app/components/like-post.js\n  import Component from '@glimmer/component';\n  import { action } from '@ember/object';\n\n  export default class LikePostComponent extends Component {\n    saveLike = () => {\n      // someone likes your post!\n      // better send a request off to your server...\n    }\n  }\n  ```\n\n  ### Arguments\n\n  `{{on}}` accepts two positional arguments, and a few named arguments.\n\n  The positional arguments are:\n\n  - `event` -- the name to use when calling `addEventListener`\n  - `callback` -- the function to be passed to `addEventListener`\n\n  The named arguments are:\n\n  - capture -- a `true` value indicates that events of this type will be dispatched\n    to the registered listener before being dispatched to any EventTarget beneath it\n    in the DOM tree.\n  - once -- indicates that the listener should be invoked at most once after being\n    added. If true, the listener would be automatically removed when invoked.\n  - passive -- if `true`, indicates that the function specified by listener will never\n    call preventDefault(). If a passive listener does call preventDefault(), the user\n    agent will do nothing other than generate a console warning. See\n    [Improving scrolling performance with passive listeners](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Improving_scrolling_performance_with_passive_listeners)\n    to learn more.\n\n  The callback function passed to `{{on}}` will receive any arguments that are passed\n  to the event handler. Most commonly this would be the `event` itself.\n\n  If you would like to pass additional arguments to the function you should use\n  the `{{fn}}` helper.\n\n  For example, in our example case above if you'd like to pass in the post that\n  was being liked when the button is clicked you could do something like:\n\n  ```app/components/like-post.hbs\n  <button {{on 'click' (fn this.saveLike @post)}}>Like this post!</button>\n  ```\n\n  In this case, the `saveLike` function will receive two arguments: the click event\n  and the value of `@post`.\n\n  ### Function Context\n\n  In the example above, we used an arrow function to ensure that `likePost` is\n  properly bound to the `items-list`, but let's explore what happens if we\n  left out the arrow function:\n\n  ```app/components/like-post.js\n  import Component from '@glimmer/component';\n\n  export default class LikePostComponent extends Component {\n    saveLike() {\n      // ...snip...\n    }\n  }\n  ```\n\n  In this example, when the button is clicked `saveLike` will be invoked,\n  it will **not** have access to the component instance. In other\n  words, it will have no `this` context, so please make sure your functions\n  are bound (via an arrow function or other means) before passing into `on`!\n\n  @method on\n  @public\n*/\nclass OnModifierManager {\n  getDebugName() {\n    return 'on';\n  }\n  getDebugInstance() {\n    return null;\n  }\n  get counters() {\n    return {\n      adds,\n      removes\n    };\n  }\n  create(_owner, element, _state, args) {\n    return new OnModifierState(element, args);\n  }\n  getTag({\n    tag\n  }) {\n    return tag;\n  }\n  install(state) {\n    state.updateListener();\n  }\n  update(state) {\n    state.updateListener();\n  }\n  getDestroyable(state) {\n    return state;\n  }\n}\nconst on = setInternalModifierManager(new OnModifierManager(), {});\n\nconst badProtocols = ['javascript:', 'vbscript:'];\nconst badTags = ['A', 'BODY', 'LINK', 'IMG', 'IFRAME', 'BASE', 'FORM'];\nconst badTagsForDataURI = ['EMBED'];\nconst badAttributes = ['href', 'src', 'background', 'action'];\nconst badAttributesForDataURI = ['src'];\nfunction has(array, item) {\n  return array.indexOf(item) !== -1;\n}\nfunction checkURI(tagName, attribute) {\n  return (tagName === null || has(badTags, tagName)) && has(badAttributes, attribute);\n}\nfunction checkDataURI(tagName, attribute) {\n  if (tagName === null) return false;\n  return has(badTagsForDataURI, tagName) && has(badAttributesForDataURI, attribute);\n}\nfunction requiresSanitization(tagName, attribute) {\n  return checkURI(tagName, attribute) || checkDataURI(tagName, attribute);\n}\nfunction findProtocolForURL() {\n  const weirdURL = URL;\n  if (typeof weirdURL === 'object' && weirdURL !== null &&\n  // this is super annoying, TS thinks that URL **must** be a function so `URL.parse` check\n  // thinks it is `never` without this `as unknown as any`\n\n  typeof weirdURL.parse === 'function') {\n    // In Ember-land the `fastboot` package sets the `URL` global to `require('url')`\n    // ultimately, this should be changed (so that we can either rely on the natural `URL` global\n    // that exists) but for now we have to detect the specific `FastBoot` case first\n    //\n    // a future version of `fastboot` will detect if this legacy URL setup is required (by\n    // inspecting Ember version) and if new enough, it will avoid shadowing the `URL` global\n    // constructor with `require('url')`.\n    let nodeURL = weirdURL;\n    return url => {\n      let protocol = null;\n      if (typeof url === 'string') {\n        protocol = nodeURL.parse(url).protocol;\n      }\n      return protocol === null ? ':' : protocol;\n    };\n  } else if (typeof weirdURL === 'function') {\n    return _url => {\n      try {\n        let url = new weirdURL(_url);\n        return url.protocol;\n      } catch {\n        // any non-fully qualified url string will trigger an error (because there is no\n        // baseURI that we can provide; in that case we **know** that the protocol is\n        // \"safe\" because it isn't specifically one of the `badProtocols` listed above\n        // (and those protocols can never be the default baseURI)\n        return ':';\n      }\n    };\n  } else {\n    throw new Error(`@glimmer/runtime needs a valid \"globalThis.URL\"`);\n  }\n}\nlet _protocolForUrlImplementation;\nfunction protocolForUrl(url) {\n  if (!_protocolForUrlImplementation) {\n    _protocolForUrlImplementation = findProtocolForURL();\n  }\n  return _protocolForUrlImplementation(url);\n}\nfunction sanitizeAttributeValue(element, attribute, value) {\n  if (value === null || value === undefined) {\n    return value;\n  }\n  if (isSafeString(value)) {\n    return value.toHTML();\n  }\n  const tagName = element.tagName.toUpperCase();\n  let str = normalizeStringValue(value);\n  if (checkURI(tagName, attribute)) {\n    let protocol = protocolForUrl(str);\n    if (has(badProtocols, protocol)) {\n      return `unsafe:${str}`;\n    }\n  }\n  if (checkDataURI(tagName, attribute)) {\n    return `unsafe:${str}`;\n  }\n  return str;\n}\n\nfunction dynamicAttribute(element, attr, namespace, isTrusting = false) {\n  const {\n    tagName,\n    namespaceURI\n  } = element;\n  const attribute = {\n    element,\n    name: attr,\n    namespace\n  };\n  if (isDevelopingApp() && attr === 'style' && !isTrusting) {\n    return new DebugStyleAttributeManager(attribute);\n  }\n  if (namespaceURI === NS_SVG) {\n    return buildDynamicAttribute(tagName, attr, attribute);\n  }\n  const {\n    type,\n    normalized\n  } = normalizeProperty(element, attr);\n  if (type === 'attr') {\n    return buildDynamicAttribute(tagName, normalized, attribute);\n  } else {\n    return buildDynamicProperty(tagName, normalized, attribute);\n  }\n}\nfunction buildDynamicAttribute(tagName, name, attribute) {\n  if (requiresSanitization(tagName, name)) {\n    return new SafeDynamicAttribute(attribute);\n  } else {\n    return new SimpleDynamicAttribute(attribute);\n  }\n}\nfunction buildDynamicProperty(tagName, name, attribute) {\n  if (requiresSanitization(tagName, name)) {\n    return new SafeDynamicProperty(name, attribute);\n  }\n  if (isUserInputValue(tagName, name)) {\n    return new InputValueDynamicAttribute(name, attribute);\n  }\n  if (isOptionSelected(tagName, name)) {\n    return new OptionSelectedDynamicAttribute(name, attribute);\n  }\n  return new DefaultDynamicProperty(name, attribute);\n}\nclass DynamicAttribute {\n  constructor(attribute) {\n    this.attribute = attribute;\n  }\n}\nclass SimpleDynamicAttribute extends DynamicAttribute {\n  set(dom, value, _env) {\n    const normalizedValue = normalizeValue(value);\n    if (normalizedValue !== null) {\n      const {\n        name,\n        namespace\n      } = this.attribute;\n      dom.__setAttribute(name, normalizedValue, namespace);\n    }\n  }\n  update(value, _env) {\n    const normalizedValue = normalizeValue(value);\n    const {\n      element,\n      name\n    } = this.attribute;\n    if (normalizedValue === null) {\n      element.removeAttribute(name);\n    } else {\n      element.setAttribute(name, normalizedValue);\n    }\n  }\n}\nclass DefaultDynamicProperty extends DynamicAttribute {\n  constructor(normalizedName, attribute) {\n    super(attribute);\n    this.normalizedName = normalizedName;\n  }\n  value;\n  set(dom, value, _env) {\n    if (value !== null && value !== undefined) {\n      this.value = value;\n      dom.__setProperty(this.normalizedName, value);\n    }\n  }\n  update(value, _env) {\n    const {\n      element\n    } = this.attribute;\n    if (this.value !== value) {\n      element[this.normalizedName] = this.value = value;\n      if (value === null || value === undefined) {\n        this.removeAttribute();\n      }\n    }\n  }\n  removeAttribute() {\n    // TODO this sucks but to preserve properties first and to meet current\n    // semantics we must do this.\n    const {\n      element,\n      namespace\n    } = this.attribute;\n    if (namespace) {\n      element.removeAttributeNS(namespace, this.normalizedName);\n    } else {\n      element.removeAttribute(this.normalizedName);\n    }\n  }\n}\nclass SafeDynamicProperty extends DefaultDynamicProperty {\n  set(dom, value, env) {\n    const {\n      element,\n      name\n    } = this.attribute;\n    const sanitized = sanitizeAttributeValue(element, name, value);\n    super.set(dom, sanitized, env);\n  }\n  update(value, env) {\n    const {\n      element,\n      name\n    } = this.attribute;\n    const sanitized = sanitizeAttributeValue(element, name, value);\n    super.update(sanitized, env);\n  }\n}\nclass SafeDynamicAttribute extends SimpleDynamicAttribute {\n  set(dom, value, env) {\n    const {\n      element,\n      name\n    } = this.attribute;\n    const sanitized = sanitizeAttributeValue(element, name, value);\n    super.set(dom, sanitized, env);\n  }\n  update(value, env) {\n    const {\n      element,\n      name\n    } = this.attribute;\n    const sanitized = sanitizeAttributeValue(element, name, value);\n    super.update(sanitized, env);\n  }\n}\nclass InputValueDynamicAttribute extends DefaultDynamicProperty {\n  set(dom, value) {\n    dom.__setProperty('value', normalizeStringValue(value));\n  }\n  update(value) {\n    const input = castToBrowser(this.attribute.element);\n    const currentValue = input.value;\n    const normalizedValue = normalizeStringValue(value);\n    if (currentValue !== normalizedValue) {\n      input.value = normalizedValue;\n    }\n  }\n}\nclass OptionSelectedDynamicAttribute extends DefaultDynamicProperty {\n  set(dom, value) {\n    if (value !== null && value !== undefined && value !== false) {\n      dom.__setProperty('selected', true);\n    }\n  }\n  update(value) {\n    const option = castToBrowser(this.attribute.element);\n    if (value) {\n      option.selected = true;\n    } else {\n      option.selected = false;\n    }\n  }\n}\nfunction isOptionSelected(tagName, attribute) {\n  return tagName === 'OPTION' && attribute === 'selected';\n}\nfunction isUserInputValue(tagName, attribute) {\n  return (tagName === 'INPUT' || tagName === 'TEXTAREA') && attribute === 'value';\n}\nfunction normalizeValue(value) {\n  if (value === false || value === undefined || value === null || typeof value.toString === 'undefined') {\n    return null;\n  }\n  if (value === true) {\n    return '';\n  }\n  // onclick function etc in SSR\n  if (typeof value === 'function') {\n    return null;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-base-to-string -- @fixme\n  return String(value);\n}\nlet DebugStyleAttributeManager;\nif (isDevelopingApp()) {\n  DebugStyleAttributeManager = class extends SimpleDynamicAttribute {\n    set(dom, value, env) {\n      warnIfStyleNotTrusted(value);\n      super.set(dom, value, env);\n    }\n    update(value, env) {\n      warnIfStyleNotTrusted(value);\n      super.update(value, env);\n    }\n  };\n}\n\nexport { APPEND_OPCODES as A, BeginTrackFrameOpcode as B, ConcreteBounds as C, DOMChanges as D, EndTrackFrameOpcode as E, TemplateOnlyComponentManager as F, createCapturedArgs as G, curry as H, isWhitespace as I, JumpIfNotModifiedOpcode as J, normalizeProperty as K, reifyArgs as L, reifyNamed as M, NS_SVG as N, reifyPositional as O, resetDebuggerCallback as P, setDebuggerCallback as Q, SimpleDynamicAttribute as S, TEXT_NODE as T, VMArgumentsImpl as V, array as a, DOMOperations as b, concat as c, CursorImpl as d, dynamicAttribute as e, fn as f, get as g, hash as h, invokeHelper as i, clear as j, DebugRenderTreeImpl as k, isArgumentError as l, DOMChangesImpl as m, move as n, on as o, externs as p, COMMENT_NODE as q, ELEMENT_NODE as r, CurriedValue as s, templateOnlyComponent as t, DynamicAttribute as u, EMPTY_ARGS as v, EMPTY_NAMED as w, EMPTY_POSITIONAL as x, TEMPLATE_ONLY_COMPONENT_MANAGER as y, TemplateOnlyComponentDefinition as z };\n","import { b as DOMOperations, d as CursorImpl, C as ConcreteBounds, e as dynamicAttribute, j as clear } from './dynamic-CuBsUXX8.js';\nimport { a as assert } from './assert-CUCJBR2C.js';\nimport { s as setLocalDebugType } from './debug-brand-B1TWjOCH.js';\nimport './debug-to-string-BsFOvUtQ.js';\nimport { S as StackImpl, e as expect } from './collections-B8me-ZlQ.js';\nimport '@embroider/macros';\nimport { destroy, registerDestructor } from '../@glimmer/destroyable/index.js';\n\nclass TreeConstruction extends DOMOperations {\n  createElementNS(namespace, tag) {\n    return this.document.createElementNS(namespace, tag);\n  }\n  setAttribute(element, name, value, namespace = null) {\n    if (namespace) {\n      element.setAttributeNS(namespace, name, value);\n    } else {\n      element.setAttribute(name, value);\n    }\n  }\n}\nconst DOMTreeConstruction = TreeConstruction;\n\nclass First {\n  constructor(node) {\n    this.node = node;\n  }\n  firstNode() {\n    return this.node;\n  }\n}\nclass Last {\n  constructor(node) {\n    this.node = node;\n  }\n  lastNode() {\n    return this.node;\n  }\n}\nclass NewTreeBuilder {\n  dom;\n  updateOperations;\n  constructing = null;\n  operations = null;\n  env;\n  cursors = new StackImpl();\n  modifierStack = new StackImpl();\n  blockStack = new StackImpl();\n  static forInitialRender(env, cursor) {\n    return new this(env, cursor.element, cursor.nextSibling).initialize();\n  }\n  static resume(env, block) {\n    let parentNode = block.parentElement();\n    let nextSibling = block.reset(env);\n    let stack = new this(env, parentNode, nextSibling).initialize();\n    stack.pushBlock(block);\n    return stack;\n  }\n  constructor(env, parentNode, nextSibling) {\n    this.pushElement(parentNode, nextSibling);\n    this.env = env;\n    this.dom = env.getAppendOperations();\n    this.updateOperations = env.getDOM();\n  }\n  initialize() {\n    this.pushAppendingBlock();\n    return this;\n  }\n  debugBlocks() {\n    return this.blockStack.toArray();\n  }\n  get element() {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    return this.cursors.current.element;\n  }\n  get nextSibling() {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    return this.cursors.current.nextSibling;\n  }\n  get hasBlocks() {\n    return this.blockStack.size > 0;\n  }\n  block() {\n    return expect(this.blockStack.current);\n  }\n  popElement() {\n    this.cursors.pop();\n    expect(this.cursors.current);\n  }\n  pushAppendingBlock() {\n    return this.pushBlock(new AppendingBlockImpl(this.element));\n  }\n  pushResettableBlock() {\n    return this.pushBlock(new ResettableBlockImpl(this.element));\n  }\n  pushBlockList(list) {\n    return this.pushBlock(new AppendingBlockList(this.element, list));\n  }\n  pushBlock(block, isRemote = false) {\n    let current = this.blockStack.current;\n    if (current !== null) {\n      if (!isRemote) {\n        current.didAppendBounds(block);\n      }\n    }\n    this.__openBlock();\n    this.blockStack.push(block);\n    return block;\n  }\n  popBlock() {\n    this.block().finalize(this);\n    this.__closeBlock();\n    return expect(this.blockStack.pop());\n  }\n  __openBlock() {}\n  __closeBlock() {}\n\n  // todo return seems unused\n  openElement(tag) {\n    let element = this.__openElement(tag);\n    this.constructing = element;\n    return element;\n  }\n  __openElement(tag) {\n    return this.dom.createElement(tag, this.element);\n  }\n  flushElement(modifiers) {\n    let parent = this.element;\n    let element = expect(this.constructing);\n    this.__flushElement(parent, element);\n    this.constructing = null;\n    this.operations = null;\n    this.pushModifiers(modifiers);\n    this.pushElement(element, null);\n    this.didOpenElement(element);\n  }\n  __flushElement(parent, constructing) {\n    this.dom.insertBefore(parent, constructing, this.nextSibling);\n  }\n  closeElement() {\n    this.willCloseElement();\n    this.popElement();\n    return this.popModifiers();\n  }\n  pushRemoteElement(element, guid, insertBefore) {\n    return this.__pushRemoteElement(element, guid, insertBefore);\n  }\n  __pushRemoteElement(element, _guid, insertBefore) {\n    this.pushElement(element, insertBefore);\n    if (insertBefore === undefined) {\n      while (element.lastChild) {\n        element.removeChild(element.lastChild);\n      }\n    }\n    let block = new RemoteBlock(element);\n    return this.pushBlock(block, true);\n  }\n  popRemoteElement() {\n    const block = this.popBlock();\n    this.popElement();\n    return block;\n  }\n  pushElement(element, nextSibling = null) {\n    this.cursors.push(new CursorImpl(element, nextSibling));\n  }\n  pushModifiers(modifiers) {\n    this.modifierStack.push(modifiers);\n  }\n  popModifiers() {\n    return this.modifierStack.pop();\n  }\n  didAppendBounds(bounds) {\n    this.block().didAppendBounds(bounds);\n    return bounds;\n  }\n  didAppendNode(node) {\n    this.block().didAppendNode(node);\n    return node;\n  }\n  didOpenElement(element) {\n    this.block().openElement(element);\n    return element;\n  }\n  willCloseElement() {\n    this.block().closeElement();\n  }\n  appendText(string) {\n    return this.didAppendNode(this.__appendText(string));\n  }\n  __appendText(text) {\n    let {\n      dom,\n      element,\n      nextSibling\n    } = this;\n    let node = dom.createTextNode(text);\n    dom.insertBefore(element, node, nextSibling);\n    return node;\n  }\n  __appendNode(node) {\n    this.dom.insertBefore(this.element, node, this.nextSibling);\n    return node;\n  }\n  __appendFragment(fragment) {\n    let first = fragment.firstChild;\n    if (first) {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      let ret = new ConcreteBounds(this.element, first, fragment.lastChild);\n      this.dom.insertBefore(this.element, fragment, this.nextSibling);\n      return ret;\n    } else {\n      const comment = this.__appendComment('');\n      return new ConcreteBounds(this.element, comment, comment);\n    }\n  }\n  __appendHTML(html) {\n    return this.dom.insertHTMLBefore(this.element, this.nextSibling, html);\n  }\n  appendDynamicHTML(value) {\n    let bounds = this.trustedContent(value);\n    this.didAppendBounds(bounds);\n  }\n  appendDynamicText(value) {\n    let node = this.untrustedContent(value);\n    this.didAppendNode(node);\n    return node;\n  }\n  appendDynamicFragment(value) {\n    let bounds = this.__appendFragment(value);\n    this.didAppendBounds(bounds);\n  }\n  appendDynamicNode(value) {\n    let node = this.__appendNode(value);\n    let bounds = new ConcreteBounds(this.element, node, node);\n    this.didAppendBounds(bounds);\n  }\n  trustedContent(value) {\n    return this.__appendHTML(value);\n  }\n  untrustedContent(value) {\n    return this.__appendText(value);\n  }\n  appendComment(string) {\n    return this.didAppendNode(this.__appendComment(string));\n  }\n  __appendComment(string) {\n    let {\n      dom,\n      element,\n      nextSibling\n    } = this;\n    let node = dom.createComment(string);\n    dom.insertBefore(element, node, nextSibling);\n    return node;\n  }\n  __setAttribute(name, value, namespace) {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    this.dom.setAttribute(this.constructing, name, value, namespace);\n  }\n  __setProperty(name, value) {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    this.constructing[name] = value;\n  }\n  setStaticAttribute(name, value, namespace) {\n    this.__setAttribute(name, value, namespace);\n  }\n  setDynamicAttribute(name, value, trusting, namespace) {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    let element = this.constructing;\n    let attribute = dynamicAttribute(element, name, namespace, trusting);\n    attribute.set(this, value, this.env);\n    return attribute;\n  }\n}\nclass AppendingBlockImpl {\n  first = null;\n  last = null;\n  nesting = 0;\n  constructor(parent) {\n    this.parent = parent;\n    setLocalDebugType('block:simple', this);\n  }\n  parentElement() {\n    return this.parent;\n  }\n  firstNode() {\n    let first = expect(this.first);\n    return first.firstNode();\n  }\n  lastNode() {\n    let last = expect(this.last);\n    return last.lastNode();\n  }\n  openElement(element) {\n    this.didAppendNode(element);\n    this.nesting++;\n  }\n  closeElement() {\n    this.nesting--;\n  }\n  didAppendNode(node) {\n    if (this.nesting !== 0) return;\n    if (!this.first) {\n      this.first = new First(node);\n    }\n    this.last = new Last(node);\n  }\n  didAppendBounds(bounds) {\n    if (this.nesting !== 0) return;\n    if (!this.first) {\n      this.first = bounds;\n    }\n    this.last = bounds;\n  }\n  finalize(stack) {\n    if (this.first === null) {\n      stack.appendComment('');\n    }\n  }\n}\nclass RemoteBlock extends AppendingBlockImpl {\n  constructor(parent) {\n    super(parent);\n    setLocalDebugType('block:remote', this);\n    registerDestructor(this, () => {\n      // In general, you only need to clear the root of a hierarchy, and should never\n      // need to clear any child nodes. This is an important constraint that gives us\n      // a strong guarantee that clearing a subtree is a single DOM operation.\n      //\n      // Because remote blocks are not normally physically nested inside of the tree\n      // that they are logically nested inside, we manually clear remote blocks when\n      // a logical parent is cleared.\n      //\n      // HOWEVER, it is currently possible for a remote block to be physically nested\n      // inside of the block it is logically contained inside of. This happens when\n      // the remote block is appended to the end of the application's entire element.\n      //\n      // The problem with that scenario is that Glimmer believes that it owns more of\n      // the DOM than it actually does. The code is attempting to write past the end\n      // of the Glimmer-managed root, but Glimmer isn't aware of that.\n      //\n      // The correct solution to that problem is for Glimmer to be aware of the end\n      // of the bounds that it owns, and once we make that change, this check could\n      // be removed.\n      //\n      // For now, a more targeted fix is to check whether the node was already removed\n      // and avoid clearing the node if it was. In most cases this shouldn't happen,\n      // so this might hide bugs where the code clears nested nodes unnecessarily,\n      // so we should eventually try to do the correct fix.\n      if (this.parentElement() === this.firstNode().parentNode) {\n        clear(this);\n      }\n    });\n  }\n}\nclass ResettableBlockImpl extends AppendingBlockImpl {\n  constructor(parent) {\n    super(parent);\n    setLocalDebugType('block:resettable', this);\n  }\n  reset() {\n    destroy(this);\n    let nextSibling = clear(this);\n    this.first = null;\n    this.last = null;\n    this.nesting = 0;\n    return nextSibling;\n  }\n}\n\n// FIXME: All the noops in here indicate a modelling problem\nclass AppendingBlockList {\n  constructor(parent, boundList) {\n    this.parent = parent;\n    this.boundList = boundList;\n    this.parent = parent;\n    this.boundList = boundList;\n  }\n  parentElement() {\n    return this.parent;\n  }\n  firstNode() {\n    let head = expect(this.boundList[0]);\n    return head.firstNode();\n  }\n  lastNode() {\n    let boundList = this.boundList;\n    let tail = expect(boundList[boundList.length - 1]);\n    return tail.lastNode();\n  }\n  openElement(_element) {\n  }\n  closeElement() {\n  }\n  didAppendNode(_node) {\n  }\n  didAppendBounds(_bounds) {}\n  finalize(_stack) {\n    assert(this.boundList.length > 0);\n  }\n}\nfunction clientBuilder(env, cursor) {\n  return NewTreeBuilder.forInitialRender(env, cursor);\n}\n\nexport { DOMTreeConstruction as D, NewTreeBuilder as N, RemoteBlock as R, ResettableBlockImpl as a, clientBuilder as c };\n","import { T as TYPE_SIZE, M as MAX_SIZE, A as ARG_SHIFT } from './flags-BsZlvEeR.js';\nimport { isDevelopingApp } from '@embroider/macros';\n\nclass InstructionEncoderImpl {\n  constructor(buffer) {\n    this.buffer = buffer;\n  }\n  size = 0;\n  encode(type, machine, ...args) {\n    if (type > TYPE_SIZE) {\n      throw new Error(`Opcode type over 8-bits. Got ${type}.`);\n    }\n    let first = type | machine | arguments.length - 2 << ARG_SHIFT;\n    this.buffer.push(first);\n    for (const op of args) {\n      if (isDevelopingApp() && typeof op === 'number' && op > MAX_SIZE) {\n        throw new Error(`Operand over 32-bits. Got ${op}.`);\n      }\n      this.buffer.push(op);\n    }\n    this.size = this.buffer.length;\n  }\n  patch(position, target) {\n    if (this.buffer[position + 1] === -1) {\n      this.buffer[position + 1] = target;\n    } else {\n      throw new Error('Trying to patch operand in populated slot instead of a reserved slot.');\n    }\n  }\n}\n\nexport { InstructionEncoderImpl as I };\n","import { isDevelopingApp } from '@embroider/macros';\n\n/* globals window, self */\n\n// from lodash to catch fake globals\nfunction checkGlobal(value) {\n  return value && value.Object === Object ? value : undefined;\n}\n\n// element ids can ruin global miss checks\nfunction checkElementIdShadowing(value) {\n  return value && value.nodeType === undefined ? value : undefined;\n}\n// export real global\nconst global$1 = checkGlobal(checkElementIdShadowing(typeof global === 'object' && global)) || checkGlobal(typeof self === 'object' && self) || checkGlobal(typeof window === 'object' && window) || typeof mainContext !== 'undefined' && mainContext ||\n// set before strict mode in Ember loader/wrapper\nnew Function('return this')(); // eval outside of strict mode\n\n// legacy imports/exports/lookup stuff (should we keep this??)\nconst context = function (global, Ember) {\n  return Ember === undefined ? {\n    imports: global,\n    exports: global,\n    lookup: global\n  } : {\n    // import jQuery\n    imports: Ember.imports || global,\n    // export Ember\n    exports: Ember.exports || global,\n    // search for Namespaces\n    lookup: Ember.lookup || global\n  };\n}(global$1, global$1.Ember);\nfunction getLookup() {\n  return context.lookup;\n}\nfunction setLookup(value) {\n  context.lookup = value;\n}\n\nconst ENV = {\n  ENABLE_OPTIONAL_FEATURES: false,\n  /**\n    Determines whether Ember should add to `Array`\n    native object prototypes, a few extra methods in order to provide a more\n    friendly API.\n     The behavior from setting this option to `true` was deprecated in Ember 5.10.\n     @property EXTEND_PROTOTYPES\n    @type Boolean\n    @default true\n    @for EmberENV\n    @private\n    @deprecated in v5.10\n  */\n  EXTEND_PROTOTYPES: {\n    Array: false\n  },\n  /**\n    The `LOG_STACKTRACE_ON_DEPRECATION` property, when true, tells Ember to log\n    a full stack trace during deprecation warnings.\n     @property LOG_STACKTRACE_ON_DEPRECATION\n    @type Boolean\n    @default true\n    @for EmberENV\n    @public\n  */\n  LOG_STACKTRACE_ON_DEPRECATION: true,\n  /**\n    The `LOG_VERSION` property, when true, tells Ember to log versions of all\n    dependent libraries in use.\n     @property LOG_VERSION\n    @type Boolean\n    @default true\n    @for EmberENV\n    @public\n  */\n  LOG_VERSION: true,\n  RAISE_ON_DEPRECATION: false,\n  STRUCTURED_PROFILE: false,\n  /**\n    Whether to perform extra bookkeeping needed to make the `captureRenderTree`\n    API work.\n     This has to be set before the ember JavaScript code is evaluated. This is\n    usually done by setting `window.EmberENV = { _DEBUG_RENDER_TREE: true };`\n    before the \"vendor\" `<script>` tag in `index.html`.\n     Setting the flag after Ember is already loaded will not work correctly. It\n    may appear to work somewhat, but fundamentally broken.\n     This is not intended to be set directly. Ember Inspector will enable the\n    flag on behalf of the user as needed.\n     This flag is always on in development mode.\n     The flag is off by default in production mode, due to the cost associated\n    with the the bookkeeping work.\n     The expected flow is that Ember Inspector will ask the user to refresh the\n    page after enabling the feature. It could also offer a feature where the\n    user add some domains to the \"always on\" list. In either case, Ember\n    Inspector will inject the code on the page to set the flag if needed.\n     @property _DEBUG_RENDER_TREE\n    @for EmberENV\n    @type Boolean\n    @default false\n    @private\n  */\n  _DEBUG_RENDER_TREE: isDevelopingApp(),\n  /**\n   Whether to force all deprecations to be enabled. This is used internally by\n   Ember to enable deprecations in tests. It is not intended to be set in\n   projects.\n    @property _ALL_DEPRECATIONS_ENABLED\n   @for EmberENV\n   @type Boolean\n   @default false\n   @private\n   */\n  _ALL_DEPRECATIONS_ENABLED: false,\n  /**\n   Override the version of ember-source used to determine when deprecations \"break\".\n   This is used internally by Ember to test with deprecated features \"removed\".\n   This is never intended to be set by projects.\n   @property _OVERRIDE_DEPRECATION_VERSION\n   @for EmberENV\n   @type string | null\n   @default null\n   @private\n   */\n  _OVERRIDE_DEPRECATION_VERSION: null,\n  /**\n    Whether the app defaults to using async observers.\n     This is not intended to be set directly, as the implementation may change in\n    the future. Use `@ember/optional-features` instead.\n     @property _DEFAULT_ASYNC_OBSERVERS\n    @for EmberENV\n    @type Boolean\n    @default false\n    @private\n  */\n  _DEFAULT_ASYNC_OBSERVERS: false,\n  /**\n    Controls the maximum number of scheduled rerenders without \"settling\". In general,\n    applications should not need to modify this environment variable, but please\n    open an issue so that we can determine if a better default value is needed.\n     @property _RERENDER_LOOP_LIMIT\n    @for EmberENV\n    @type number\n    @default 1000\n    @private\n   */\n  _RERENDER_LOOP_LIMIT: 1000,\n  EMBER_LOAD_HOOKS: {},\n  FEATURES: {}\n};\n(EmberENV => {\n  if (typeof EmberENV !== 'object' || EmberENV === null) return;\n  for (let flag in EmberENV) {\n    if (!Object.prototype.hasOwnProperty.call(EmberENV, flag) || flag === 'EXTEND_PROTOTYPES' || flag === 'EMBER_LOAD_HOOKS') continue;\n    let defaultValue = ENV[flag];\n    if (defaultValue === true) {\n      ENV[flag] = EmberENV[flag] !== false;\n    } else if (defaultValue === false) {\n      ENV[flag] = EmberENV[flag] === true;\n    } else {\n      ENV[flag] = EmberENV[flag];\n    }\n  }\n\n  // TODO this does not seem to be used by anything,\n  //      can we remove it? do we need to deprecate it?\n  let {\n    EMBER_LOAD_HOOKS\n  } = EmberENV;\n  if (typeof EMBER_LOAD_HOOKS === 'object' && EMBER_LOAD_HOOKS !== null) {\n    for (let hookName in EMBER_LOAD_HOOKS) {\n      if (!Object.prototype.hasOwnProperty.call(EMBER_LOAD_HOOKS, hookName)) continue;\n      let hooks = EMBER_LOAD_HOOKS[hookName];\n      if (Array.isArray(hooks)) {\n        ENV.EMBER_LOAD_HOOKS[hookName] = hooks.filter(hook => typeof hook === 'function');\n      }\n    }\n  }\n  let {\n    FEATURES\n  } = EmberENV;\n  if (typeof FEATURES === 'object' && FEATURES !== null) {\n    for (let feature in FEATURES) {\n      if (!Object.prototype.hasOwnProperty.call(FEATURES, feature)) continue;\n      ENV.FEATURES[feature] = FEATURES[feature] === true;\n    }\n  }\n  if (isDevelopingApp()) {\n    ENV._DEBUG_RENDER_TREE = true;\n  }\n})(global$1.EmberENV);\nfunction getENV() {\n  return ENV;\n}\n\nexport { ENV as E, getLookup as a, global$1 as b, context as c, getENV as g, setLookup as s };\n","const InternalComponentCapabilities = {\n  Empty: 0,\n  dynamicLayout: 0b0000000000001,\n  dynamicTag: 0b0000000000010,\n  prepareArgs: 0b0000000000100,\n  createArgs: 0b0000000001000,\n  attributeHook: 0b0000000010000,\n  elementHook: 0b0000000100000,\n  dynamicScope: 0b0000001000000,\n  createCaller: 0b0000010000000,\n  updateHook: 0b0000100000000,\n  createInstance: 0b0001000000000,\n  wrapped: 0b0010000000000,\n  willDestroy: 0b0100000000000,\n  hasSubOwner: 0b1000000000000\n};\nconst ARG_SHIFT = 8;\nconst MAX_SIZE = 0x7fffffff;\nconst TYPE_SIZE = 0b11111111;\nconst TYPE_MASK = 0b00000000000000000000000011111111;\nconst OPERAND_LEN_MASK = 0b00000000000000000000001100000000;\nconst MACHINE_MASK = 0b00000000000000000000010000000000;\n\nexport { ARG_SHIFT as A, InternalComponentCapabilities as I, MAX_SIZE as M, OPERAND_LEN_MASK as O, TYPE_SIZE as T, MACHINE_MASK as a, TYPE_MASK as b };\n","import { C as ConstantsImpl } from './constants-oDhF27qL.js';\nimport { P as ProgramHeapImpl } from './program-CcLlGnAU.js';\n\nfunction artifacts() {\n  return {\n    constants: new ConstantsImpl(),\n    heap: new ProgramHeapImpl()\n  };\n}\n\nexport { artifacts as a };\n","// check if window exists and actually is the global\nconst hasDOM = typeof self === 'object' && self !== null && self.Object === Object && typeof Window !== 'undefined' && self.constructor === Window && typeof document === 'object' && document !== null && self.document === document && typeof location === 'object' && location !== null && self.location === location && typeof history === 'object' && history !== null && self.history === history && typeof navigator === 'object' && navigator !== null && self.navigator === navigator && typeof navigator.userAgent === 'string';\n\nconst window = hasDOM ? self : null;\nconst location$1 = hasDOM ? self.location : null;\nconst history$1 = hasDOM ? self.history : null;\nconst userAgent = hasDOM ? self.navigator.userAgent : 'Lynx (textmode)';\nconst isChrome = hasDOM ? typeof chrome === 'object' && !(typeof opera === 'object') : false;\nconst isFirefox = hasDOM ? /Firefox|FxiOS/.test(userAgent) : false;\n\nconst environment = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({\n  __proto__: null,\n  hasDOM,\n  history: history$1,\n  isChrome,\n  isFirefox,\n  location: location$1,\n  userAgent,\n  window\n}, Symbol.toStringTag, { value: 'Module' }));\n\nexport { isChrome as a, history$1 as b, environment as e, hasDOM as h, isFirefox as i, location$1 as l, userAgent as u, window as w };\n","import { c as capabilityFlagsFrom } from './capabilities-DHiXCCuB.js';\nimport './debug-to-string-BsFOvUtQ.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport setGlobalContext from '../@glimmer/global-context/index.js';\nimport { untrack, consumeTag, tagFor, createCache, getValue, valueForTag, beginUntrackFrame, endUntrackFrame, beginTrackFrame, endTrackFrame, validateTag, createTag, dirtyTag as DIRTY_TAG$1, CONSTANT_TAG, isTracking, debug, CURRENT_TAG } from '../@glimmer/validator/index.js';\nimport { v as valueForRef, j as isConstRef, d as createConstRef, l as isUpdatableRef, u as updateRef, b as createComputeRef, g as createPrimitiveRef, c as childRefFor, a as childRefFromParts, U as UNDEFINED_REFERENCE, f as createInvokableRef, h as createReadOnlyRef, i as createUnboundRef, e as createDebugAliasRef } from './reference-B6HMX4y0.js';\nimport { t as templateFactory } from './index-CQkjwqTv.js';\nimport { registerDestructor, associateDestroyableChild, isDestroyed, destroy, isDestroying } from '../@glimmer/destroyable/index.js';\nimport { g as getFactoryFor, p as privatize } from './registry-XY5cfmbH.js';\nimport { warn, debugFreeze, deprecate } from '../@ember/debug/index.js';\nimport { O as reifyPositional, K as normalizeProperty, v as EMPTY_ARGS, G as createCapturedArgs, x as EMPTY_POSITIONAL, H as curry, h as hash, g as get$1, f as fn, c as concat, a as array, o as on$1, y as TEMPLATE_ONLY_COMPONENT_MANAGER, t as templateOnlyComponent } from './dynamic-CuBsUXX8.js';\nimport './constants-oDhF27qL.js';\nimport { join, schedule, _backburner, _getCurrentRunLoop } from '../@ember/runloop/index.js';\nimport { h as hasDOM } from './index-BGP1rw3B.js';\nimport { action } from '../@ember/object/index.js';\nimport { on } from '../@ember/modifier/on.js';\nimport '../@ember/-internals/meta/lib/meta.js';\nimport { g as guidFor, b as getDebugName, d as isObject } from './mandatory-setter-DLKyVs4Q.js';\nimport { S as tracked, g as get, b as descriptorForProperty, Q as PROPERTY_DID_CHANGE, y as nativeDescDecorator, t as tagForObject, o as objectAt, a as tagForProperty, Z as _getProp } from './observers-DhgQ6ba5.js';\nimport { E as ENV } from './env-DEd6hPbj.js';\nimport { setOwner, getOwner, isFactory } from '../@ember/-internals/owner/index.js';\nimport { s as setInternalComponentManager, a as getInternalHelperManager, i as helperCapabilities, j as setInternalHelperManager, c as hasInternalComponentManager, g as getInternalComponentManager } from './api-CkUl6KyJ.js';\nimport { s as setComponentTemplate, g as getComponentTemplate } from './template-CMHIG4cn.js';\nimport { assert } from '../@ember/debug/lib/assert.js';\nimport { d as decorateFieldV2, i as initializeDeferredDecorator, a as decorateMethodV2 } from './chunk-3SQBS3Y5-Cj4eryg1.js';\nimport { isSimpleClick, getViewElement, clearElementView, clearViewElement, addChildView, setViewElement, setElementView, getChildViews, constructStyleDeprecationMessage, getViewId } from '../@ember/-internals/views/lib/system/utils.js';\nimport CoreView from '../@ember/-internals/views/lib/views/core_view.js';\nimport ActionSupport from '../@ember/-internals/views/lib/mixins/action_support.js';\nimport '../@ember/-internals/views/lib/views/states.js';\nimport { getEngineParent } from '../@ember/engine/lib/engine-parent.js';\nimport { flaggedInstrument, _instrumentStart } from '../@ember/instrumentation/index.js';\nimport { service } from '../@ember/service/index.js';\nimport inspect from '../@ember/debug/lib/inspect.js';\nimport '../@ember/-internals/runtime/lib/mixins/registry_proxy.js';\nimport '../@ember/-internals/runtime/lib/mixins/container_proxy.js';\nimport '../@ember/-internals/runtime/lib/mixins/comparable.js';\nimport '../@ember/-internals/runtime/lib/mixins/action_handler.js';\nimport { contentFor } from '../@ember/-internals/runtime/lib/mixins/-proxy.js';\nimport '../@ember/enumerable/mutable.js';\nimport TargetActionSupport from '../@ember/-internals/runtime/lib/mixins/target_action_support.js';\nimport '../@ember/-internals/runtime/lib/ext/rsvp.js';\nimport EventDispatcher from '../@ember/-internals/views/lib/system/event_dispatcher.js';\nimport { e as enumerableSymbol } from './to-string-CqD7_vQ4.js';\nimport { E as EMPTY_ARRAY$2 } from './array-utils-CZQxrdD3.js';\nimport { dasherize } from '../@ember/-internals/string/index.js';\nimport { MUTABLE_CELL } from '../@ember/-internals/views/lib/compat/attrs.js';\nimport { FrameworkObject } from '../@ember/object/-internals.js';\nimport { b as setHelperManager } from './api-1B_9SjFR.js';\nimport { d as dict } from './collections-B8me-ZlQ.js';\nimport { a as artifacts } from './helpers-C1rIkuSd.js';\nimport { R as RuntimeOpImpl } from './program-CcLlGnAU.js';\nimport { c as runtimeOptions, i as inTransaction, r as renderComponent$1, a as renderMain } from './render-DTOhhssy.js';\nimport { c as clientBuilder } from './element-builder-BuVym8EM.js';\nimport { a as RSVP } from './rsvp-CnCSY930.js';\nimport EngineInstance from '../@ember/engine/instance.js';\nimport { _ as _setProp, s as set } from './property_set-DrZnfGQ7.js';\nimport { isEmberArray } from '../@ember/array/-internals.js';\nimport { i as isProxy } from './is_proxy-C2q5rUMp.js';\nimport { isArray } from '../@ember/array/index.js';\nimport '../route-recognizer/index.js';\nimport './unrecognized-url-error-BBMMZhBN.js';\nimport '../@ember/routing/lib/routing-service.js';\nimport { generateControllerFactory } from '../@ember/routing/lib/generate_controller.js';\nimport { E as EvaluationContextImpl } from './program-context-CZJnCFdo.js';\n\nconst RootTemplate = templateFactory(\n/*\n  {{component this}}\n*/\n{\n  \"id\": null,\n  \"block\": \"[[[46,[30,0],null,null,null]],[],[\\\"component\\\"]]\",\n  \"moduleName\": \"packages/@ember/-internals/glimmer/lib/templates/root.hbs\",\n  \"isStrictMode\": true\n});\n\nconst InputTemplate = templateFactory(\n/*\n  <input\n  {{!-- for compatibility --}}\n  id={{this.id}}\n  class={{this.class}}\n\n  ...attributes\n\n  type={{this.type}}\n  checked={{this.checked}}\n  value={{this.value}}\n\n  {{on \"change\" this.change}}\n  {{on \"input\" this.input}}\n  {{on \"keyup\" this.keyUp}}\n  {{on \"paste\" this.valueDidChange}}\n  {{on \"cut\" this.valueDidChange}}\n/>\n*/\n{\n  \"id\": null,\n  \"block\": \"[[[11,\\\"input\\\"],[16,1,[30,0,[\\\"id\\\"]]],[16,0,[30,0,[\\\"class\\\"]]],[17,1],[16,4,[30,0,[\\\"type\\\"]]],[16,\\\"checked\\\",[30,0,[\\\"checked\\\"]]],[16,2,[30,0,[\\\"value\\\"]]],[4,[32,0],[\\\"change\\\",[30,0,[\\\"change\\\"]]],null],[4,[32,0],[\\\"input\\\",[30,0,[\\\"input\\\"]]],null],[4,[32,0],[\\\"keyup\\\",[30,0,[\\\"keyUp\\\"]]],null],[4,[32,0],[\\\"paste\\\",[30,0,[\\\"valueDidChange\\\"]]],null],[4,[32,0],[\\\"cut\\\",[30,0,[\\\"valueDidChange\\\"]]],null],[12],[13]],[\\\"&attrs\\\"],[]]\",\n  \"moduleName\": \"packages/@ember/-internals/glimmer/lib/templates/input.hbs\",\n  \"scope\": () => [on],\n  \"isStrictMode\": true\n});\n\nfunction NOOP$1() {}\nclass InternalComponent {\n  // Override this\n  static toString() {\n    return 'internal component';\n  }\n  constructor(owner, args, caller) {\n    this.owner = owner;\n    this.args = args;\n    this.caller = caller;\n    setOwner(this, owner);\n  }\n\n  /**\n   * The default HTML id attribute. We don't really _need_ one, this is just\n   * added for compatibility as it's hard to tell if people rely on it being\n   * present, and it doens't really hurt.\n   *\n   * However, don't rely on this internally, like passing it to `getElementId`.\n   * This can be (and often is) overriden by passing an `id` attribute on the\n   * invocation, which shadows this default id via `...attributes`.\n   */\n  get id() {\n    return guidFor(this);\n  }\n\n  /**\n   * The default HTML class attribute. Similar to the above, we don't _need_\n   * them, they are just added for compatibility as it's similarly hard to tell\n   * if people rely on it in their CSS etc, and it doens't really hurt.\n   */\n  get class() {\n    return 'ember-view';\n  }\n  validateArguments() {\n    for (let name of Object.keys(this.args.named)) {\n      if (!this.isSupportedArgument(name)) {\n        this.onUnsupportedArgument(name);\n      }\n    }\n  }\n  named(name) {\n    let ref = this.args.named[name];\n    return ref ? valueForRef(ref) : undefined;\n  }\n  positional(index) {\n    let ref = this.args.positional[index];\n    return ref ? valueForRef(ref) : undefined;\n  }\n  listenerFor(name) {\n    let listener = this.named(name);\n    if (listener) {\n      (isDevelopingApp() && !(typeof listener === 'function') && assert(`The \\`@${name}\\` argument to the <${this.constructor}> component must be a function`, typeof listener === 'function'));\n      return listener;\n    } else {\n      return NOOP$1;\n    }\n  }\n  isSupportedArgument(_name) {\n    return false;\n  }\n  onUnsupportedArgument(_name) {}\n  toString() {\n    return `<${this.constructor}:${guidFor(this)}>`;\n  }\n}\nconst OPAQUE_CONSTRUCTOR_MAP = new WeakMap();\nfunction opaquify(constructor, template) {\n  let _opaque = {\n    // Factory interface\n    create() {\n      throw assert('Use constructor instead of create');\n    },\n    toString() {\n      return constructor.toString();\n    }\n  };\n  let opaque = _opaque;\n  OPAQUE_CONSTRUCTOR_MAP.set(opaque, constructor);\n  setInternalComponentManager(INTERNAL_COMPONENT_MANAGER, opaque);\n  setComponentTemplate(template, opaque);\n  return opaque;\n}\nfunction deopaquify(opaque) {\n  let constructor = OPAQUE_CONSTRUCTOR_MAP.get(opaque);\n  (isDevelopingApp() && !(constructor) && assert(`[BUG] Invalid internal component constructor: ${opaque}`, constructor));\n  return constructor;\n}\nconst CAPABILITIES$3 = {\n  dynamicLayout: false,\n  dynamicTag: false,\n  prepareArgs: false,\n  createArgs: true,\n  attributeHook: false,\n  elementHook: false,\n  createCaller: true,\n  dynamicScope: false,\n  updateHook: false,\n  createInstance: true,\n  wrapped: false,\n  willDestroy: false,\n  hasSubOwner: false\n};\nclass InternalManager {\n  getCapabilities() {\n    return CAPABILITIES$3;\n  }\n  create(owner, definition, args, _env, _dynamicScope, caller) {\n    (isDevelopingApp() && !(isConstRef(caller)) && assert('caller must be const', isConstRef(caller)));\n    let ComponentClass = deopaquify(definition);\n    let instance = new ComponentClass(owner, args.capture(), valueForRef(caller));\n    untrack(instance['validateArguments'].bind(instance));\n    return instance;\n  }\n  didCreate() {}\n  didUpdate() {}\n  didRenderLayout() {}\n  didUpdateLayout() {}\n  getDebugName(definition) {\n    return definition.toString();\n  }\n  getSelf(instance) {\n    return createConstRef(instance, 'this');\n  }\n  getDestroyable(instance) {\n    return instance;\n  }\n}\nconst INTERNAL_COMPONENT_MANAGER = new InternalManager();\n\nconst UNINITIALIZED = Object.freeze({});\nfunction elementForEvent(event) {\n  (isDevelopingApp() && !(event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement) && assert('[BUG] event target must be an <input> or <textarea> element', event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement));\n  return event.target;\n}\nfunction valueForEvent(event) {\n  return elementForEvent(event).value;\n}\nfunction devirtualize(callback) {\n  return event => callback(valueForEvent(event), event);\n}\nfunction valueFrom(reference) {\n  if (reference === undefined) {\n    return new LocalValue(undefined);\n  } else if (isConstRef(reference)) {\n    return new LocalValue(valueForRef(reference));\n  } else if (isUpdatableRef(reference)) {\n    return new UpstreamValue(reference);\n  } else {\n    return new ForkedValue(reference);\n  }\n}\nclass LocalValue {\n  static {\n    decorateFieldV2(this.prototype, \"value\", [tracked]);\n  }\n  #value = (initializeDeferredDecorator(this, \"value\"), void 0);\n  constructor(value) {\n    this.value = value;\n  }\n  get() {\n    return this.value;\n  }\n  set(value) {\n    this.value = value;\n  }\n}\nclass UpstreamValue {\n  constructor(reference) {\n    this.reference = reference;\n  }\n  get() {\n    return valueForRef(this.reference);\n  }\n  set(value) {\n    updateRef(this.reference, value);\n  }\n}\nclass ForkedValue {\n  local;\n  upstream;\n  lastUpstreamValue = UNINITIALIZED;\n  constructor(reference) {\n    this.upstream = new UpstreamValue(reference);\n  }\n  get() {\n    let upstreamValue = this.upstream.get();\n    if (upstreamValue !== this.lastUpstreamValue) {\n      this.lastUpstreamValue = upstreamValue;\n      this.local = new LocalValue(upstreamValue);\n    }\n    (isDevelopingApp() && !(this.local) && assert('[BUG] this.local must have been initialized at this point', this.local));\n    return this.local.get();\n  }\n  set(value) {\n    (isDevelopingApp() && !(this.local) && assert('[BUG] this.local must have been initialized at this point', this.local));\n    this.local.set(value);\n  }\n}\nclass AbstractInput extends InternalComponent {\n  validateArguments() {\n    (isDevelopingApp() && !(this.args.positional.length === 0) && assert(`The ${this.constructor} component does not take any positional arguments`, this.args.positional.length === 0));\n    super.validateArguments();\n  }\n  _value = valueFrom(this.args.named['value']);\n  get value() {\n    return this._value.get();\n  }\n  set value(value) {\n    this._value.set(value);\n  }\n  valueDidChange(event) {\n    this.value = valueForEvent(event);\n  }\n\n  /**\n   * The `change` and `input` actions need to be overridden in the `Input`\n   * subclass. Unfortunately, some ember-source builds currently uses babel\n   * loose mode to transpile its classes. Having the `@action` decorator on the\n   * super class creates a getter on the prototype, and when the subclass\n   * overrides the method, the loose mode transpilation would emit something\n   * like `Subclass.prototype['change'] = function change() { ... }`, which\n   * fails because `prototype['change']` is getter-only/readonly. The correct\n   * solution is to use `Object.defineProperty(prototype, 'change', ...)` but\n   * that requires disabling loose mode. For now, the workaround is to add the\n   * decorator only on the subclass. This is more of a configuration issue on\n   * our own builds and doesn't really affect apps.\n   */\n\n  /* @action */\n  static {\n    decorateMethodV2(this.prototype, \"valueDidChange\", [action]);\n  }\n  change(event) {\n    this.valueDidChange(event);\n  }\n\n  /* @action */\n  input(event) {\n    this.valueDidChange(event);\n  }\n  keyUp(event) {\n    switch (event.key) {\n      case 'Enter':\n        this.listenerFor('enter')(event);\n        this.listenerFor('insert-newline')(event);\n        break;\n      case 'Escape':\n        this.listenerFor('escape-press')(event);\n        break;\n    }\n  }\n  static {\n    decorateMethodV2(this.prototype, \"keyUp\", [action]);\n  }\n  listenerFor(name) {\n    let listener = super.listenerFor(name);\n    if (this.isVirtualEventListener(name, listener)) {\n      return devirtualize(listener);\n    } else {\n      return listener;\n    }\n  }\n  isVirtualEventListener(name, _listener) {\n    let virtualEvents = ['enter', 'insert-newline', 'escape-press'];\n    return virtualEvents.indexOf(name) !== -1;\n  }\n}\n\n/**\n@module @ember/component\n*/\nlet isValidInputType;\nif (hasDOM) {\n  const INPUT_TYPES = Object.create(null);\n  const INPUT_ELEMENT = document.createElement('input');\n  INPUT_TYPES[''] = false;\n  INPUT_TYPES['text'] = true;\n  INPUT_TYPES['checkbox'] = true;\n  isValidInputType = type => {\n    let isValid = INPUT_TYPES[type];\n    if (isValid === undefined) {\n      try {\n        INPUT_ELEMENT.type = type;\n        isValid = INPUT_ELEMENT.type === type;\n      } catch (_e) {\n        isValid = false;\n      } finally {\n        INPUT_ELEMENT.type = 'text';\n      }\n      INPUT_TYPES[type] = isValid;\n    }\n    return isValid;\n  };\n} else {\n  isValidInputType = type => type !== '';\n}\n\n/**\n  See [Ember.Templates.components.Input](/ember/release/classes/Ember.Templates.components/methods/Input?anchor=Input).\n\n  @method input\n  @for Ember.Templates.helpers\n  @param {Hash} options\n  @public\n  */\n\n/**\n  An opaque interface which can be imported and used in strict-mode\n  templates to call <Input>.\n\n  See [Ember.Templates.components.Input](/ember/release/classes/Ember.Templates.components/methods/Input?anchor=Input).\n\n  @for @ember/component\n  @method Input\n  @see {Ember.Templates.components.Input}\n  @public\n**/\n\n/**\n  The `Input` component lets you create an HTML `<input>` element.\n\n  ```handlebars\n  <Input @value=\"987\" />\n  ```\n\n  creates an `<input>` element with `type=\"text\"` and value set to 987.\n\n  ### Text field\n\n  If no `type` argument is specified, a default of type 'text' is used.\n\n  ```handlebars\n  Search:\n  <Input @value={{this.searchWord}} />\n  ```\n\n  In this example, the initial value in the `<input>` will be set to the value of\n  `this.searchWord`. If the user changes the text, the value of `this.searchWord` will also be\n  updated.\n\n  ### Actions\n\n  The `Input` component takes a number of arguments with callbacks that are invoked in response to\n  user events.\n\n  * `enter`\n  * `insert-newline`\n  * `escape-press`\n  * `focus-in`\n  * `focus-out`\n  * `key-down`\n  * `key-press`\n  * `key-up`\n\n  These callbacks are passed to `Input` like this:\n\n  ```handlebars\n  <Input @value={{this.searchWord}} @enter={{this.query}} />\n  ```\n\n  Starting with Ember Octane, we recommend using the `{{on}}` modifier to call actions\n  on specific events, such as the input event.\n\n  ```handlebars\n  <label for=\"input-name\">Name:</label>\n  <Input\n    @id=\"input-name\"\n    @value={{this.name}}\n    {{on \"input\" this.validateName}}\n  />\n  ```\n\n  The event name (e.g. `focusout`, `input`, `keydown`) always follows the casing\n  that the HTML standard uses.\n\n  ### `<input>` HTML Attributes to Avoid\n\n  In most cases, if you want to pass an attribute to the underlying HTML `<input>` element, you\n  can pass the attribute directly, just like any other Ember component.\n\n  ```handlebars\n  <Input @type=\"text\" size=\"10\" />\n  ```\n\n  In this example, the `size` attribute will be applied to the underlying `<input>` element in the\n  outputted HTML.\n\n  However, there are a few attributes where you **must** use the `@` version.\n\n  * `@type`: This argument is used to control which Ember component is used under the hood\n  * `@value`: The `@value` argument installs a two-way binding onto the element. If you wanted a\n    one-way binding, use `<input>` with the `value` property and the `input` event instead.\n  * `@checked` (for checkboxes): like `@value`, the `@checked` argument installs a two-way binding\n    onto the element. If you wanted a one-way binding, use `<input type=\"checkbox\">` with\n    `checked` and the `input` event instead.\n\n  ### Checkbox\n\n  To create an `<input type=\"checkbox\">`:\n\n  ```handlebars\n  Emberize Everything:\n  <Input @type=\"checkbox\" @checked={{this.isEmberized}} name=\"isEmberized\" />\n  ```\n\n  This will bind the checked state of this checkbox to the value of `isEmberized` -- if either one\n  changes, it will be reflected in the other.\n\n  @method Input\n  @for Ember.Templates.components\n  @param {Hash} options\n  @public\n*/\nclass _Input extends AbstractInput {\n  static toString() {\n    return 'Input';\n  }\n\n  /**\n   * The HTML class attribute.\n   */\n  get class() {\n    if (this.isCheckbox) {\n      return 'ember-checkbox ember-view';\n    } else {\n      return 'ember-text-field ember-view';\n    }\n  }\n\n  /**\n   * The HTML type attribute.\n   */\n  get type() {\n    let type = this.named('type');\n    if (type === null || type === undefined) {\n      return 'text';\n    }\n    (isDevelopingApp() && !(typeof type === 'string') && assert('The `@type` argument to the <Input> component must be a string', typeof type === 'string'));\n    return isValidInputType(type) ? type : 'text';\n  }\n  get isCheckbox() {\n    return this.named('type') === 'checkbox';\n  }\n  _checked = valueFrom(this.args.named['checked']);\n  get checked() {\n    if (this.isCheckbox) {\n      (isDevelopingApp() && warn('`<Input @type=\"checkbox\" />` reflects its checked state via the `@checked` argument. ' + 'You wrote `<Input @type=\"checkbox\" @value={{...}} />` which is likely not what you intended. ' + 'Did you mean `<Input @type=\"checkbox\" @checked={{...}} />`?', untrack(() => this.args.named['checked'] !== undefined || this.args.named['value'] === undefined || typeof valueForRef(this.args.named['value']) === 'string'), {\n        id: 'ember.built-in-components.input-checkbox-value'\n      }));\n      return this._checked.get();\n    } else {\n      return undefined;\n    }\n  }\n  set checked(checked) {\n    (isDevelopingApp() && warn('`<Input @type=\"checkbox\" />` reflects its checked state via the `@checked` argument. ' + 'You wrote `<Input @type=\"checkbox\" @value={{...}} />` which is likely not what you intended. ' + 'Did you mean `<Input @type=\"checkbox\" @checked={{...}} />`?', untrack(() => this.args.named['checked'] !== undefined || this.args.named['value'] === undefined || typeof valueForRef(this.args.named['value']) === 'string'), {\n      id: 'ember.built-in-components.input-checkbox-value'\n    }));\n    this._checked.set(checked);\n  }\n  change(event) {\n    if (this.isCheckbox) {\n      this.checkedDidChange(event);\n    } else {\n      super.change(event);\n    }\n  }\n  static {\n    decorateMethodV2(this.prototype, \"change\", [action]);\n  }\n  input(event) {\n    if (!this.isCheckbox) {\n      super.input(event);\n    }\n  }\n  static {\n    decorateMethodV2(this.prototype, \"input\", [action]);\n  }\n  checkedDidChange(event) {\n    let element = event.target;\n    (isDevelopingApp() && !(element instanceof HTMLInputElement) && assert('[BUG] element must be an <input>', element instanceof HTMLInputElement));\n    this.checked = element.checked;\n  }\n  static {\n    decorateMethodV2(this.prototype, \"checkedDidChange\", [action]);\n  }\n  isSupportedArgument(name) {\n    let supportedArguments = ['type', 'value', 'checked', 'enter', 'insert-newline', 'escape-press'];\n    return supportedArguments.indexOf(name) !== -1 || super.isSupportedArgument(name);\n  }\n}\nconst Input = opaquify(_Input, InputTemplate);\n\nconst LinkToTemplate = templateFactory(\n/*\n  <a\n  {{!-- for compatibility --}}\n  id={{this.id}}\n  class={{this.class}}\n\n  {{!-- deprecated attribute bindings --}}\n  role={{this.role}}\n  title={{this.title}}\n  rel={{this.rel}}\n  tabindex={{this.tabindex}}\n  target={{this.target}}\n\n  ...attributes\n\n  href={{this.href}}\n\n  {{on 'click' this.click}}\n>{{yield}}</a>\n*/\n{\n  \"id\": null,\n  \"block\": \"[[[11,3],[16,1,[30,0,[\\\"id\\\"]]],[16,0,[30,0,[\\\"class\\\"]]],[16,\\\"role\\\",[30,0,[\\\"role\\\"]]],[16,\\\"title\\\",[30,0,[\\\"title\\\"]]],[16,\\\"rel\\\",[30,0,[\\\"rel\\\"]]],[16,\\\"tabindex\\\",[30,0,[\\\"tabindex\\\"]]],[16,\\\"target\\\",[30,0,[\\\"target\\\"]]],[17,1],[16,6,[30,0,[\\\"href\\\"]]],[4,[32,0],[\\\"click\\\",[30,0,[\\\"click\\\"]]],null],[12],[18,2,null],[13]],[\\\"&attrs\\\",\\\"&default\\\"],[\\\"yield\\\"]]\",\n  \"moduleName\": \"packages/@ember/-internals/glimmer/lib/templates/link-to.hbs\",\n  \"scope\": () => [on],\n  \"isStrictMode\": true\n});\n\nconst EMPTY_ARRAY$1 = [];\nconst EMPTY_QUERY_PARAMS = {};\ndebugFreeze(EMPTY_ARRAY$1);\ndebugFreeze(EMPTY_QUERY_PARAMS);\nfunction isMissing(value) {\n  return value === null || value === undefined;\n}\nfunction isPresent(value) {\n  return !isMissing(value);\n}\nfunction isQueryParams(value) {\n  return typeof value === 'object' && value !== null && value['isQueryParams'] === true;\n}\n\n/**\n  The `LinkTo` component renders a link to the supplied `routeName` passing an optionally\n  supplied model to the route as its `model` context of the route. The block for `LinkTo`\n  becomes the contents of the rendered element:\n\n  ```handlebars\n  <LinkTo @route='photoGallery'>\n    Great Hamster Photos\n  </LinkTo>\n  ```\n\n  This will result in:\n\n  ```html\n  <a href=\"/hamster-photos\">\n    Great Hamster Photos\n  </a>\n  ```\n\n  ### Disabling the `LinkTo` component\n\n  The `LinkTo` component can be disabled by using the `disabled` argument. A disabled link\n  doesn't result in a transition when activated, and adds the `disabled` class to the `<a>`\n  element.\n\n  (The class name to apply to the element can be overridden by using the `disabledClass`\n  argument)\n\n  ```handlebars\n  <LinkTo @route='photoGallery' @disabled={{true}}>\n    Great Hamster Photos\n  </LinkTo>\n  ```\n\n  ### Handling `href`\n\n  `<LinkTo>` will use your application's Router to fill the element's `href` property with a URL\n  that matches the path to the supplied `routeName`.\n\n  ### Handling current route\n\n  The `LinkTo` component will apply a CSS class name of 'active' when the application's current\n  route matches the supplied routeName. For example, if the application's current route is\n  'photoGallery.recent', then the following invocation of `LinkTo`:\n\n  ```handlebars\n  <LinkTo @route='photoGallery.recent'>\n    Great Hamster Photos\n  </LinkTo>\n  ```\n\n  will result in\n\n  ```html\n  <a href=\"/hamster-photos/this-week\" class=\"active\">\n    Great Hamster Photos\n  </a>\n  ```\n\n  The CSS class used for active classes can be customized by passing an `activeClass` argument:\n\n  ```handlebars\n  <LinkTo @route='photoGallery.recent' @activeClass=\"current-url\">\n    Great Hamster Photos\n  </LinkTo>\n  ```\n\n  ```html\n  <a href=\"/hamster-photos/this-week\" class=\"current-url\">\n    Great Hamster Photos\n  </a>\n  ```\n\n  ### Keeping a link active for other routes\n\n  If you need a link to be 'active' even when it doesn't match the current route, you can use the\n  `current-when` argument.\n\n  ```handlebars\n  <LinkTo @route='photoGallery' @current-when='photos'>\n    Photo Gallery\n  </LinkTo>\n  ```\n\n  This may be helpful for keeping links active for:\n\n  * non-nested routes that are logically related\n  * some secondary menu approaches\n  * 'top navigation' with 'sub navigation' scenarios\n\n  A link will be active if `current-when` is `true` or the current\n  route is the route this link would transition to.\n\n  To match multiple routes 'space-separate' the routes:\n\n  ```handlebars\n  <LinkTo @route='gallery' @current-when='photos drawings paintings'>\n    Art Gallery\n  </LinkTo>\n  ```\n\n  ### Supplying a model\n\n  An optional `model` argument can be used for routes whose\n  paths contain dynamic segments. This argument will become\n  the model context of the linked route:\n\n  ```javascript\n  Router.map(function() {\n    this.route(\"photoGallery\", {path: \"hamster-photos/:photo_id\"});\n  });\n  ```\n\n  ```handlebars\n  <LinkTo @route='photoGallery' @model={{this.aPhoto}}>\n    {{aPhoto.title}}\n  </LinkTo>\n  ```\n\n  ```html\n  <a href=\"/hamster-photos/42\">\n    Tomster\n  </a>\n  ```\n\n  ### Supplying multiple models\n\n  For deep-linking to route paths that contain multiple\n  dynamic segments, the `models` argument can be used.\n\n  As the router transitions through the route path, each\n  supplied model argument will become the context for the\n  route with the dynamic segments:\n\n  ```javascript\n  Router.map(function() {\n    this.route(\"photoGallery\", { path: \"hamster-photos/:photo_id\" }, function() {\n      this.route(\"comment\", {path: \"comments/:comment_id\"});\n    });\n  });\n  ```\n\n  This argument will become the model context of the linked route:\n\n  ```handlebars\n  <LinkTo @route='photoGallery.comment' @models={{array this.aPhoto this.comment}}>\n    {{comment.body}}\n  </LinkTo>\n  ```\n\n  ```html\n  <a href=\"/hamster-photos/42/comments/718\">\n    A+++ would snuggle again.\n  </a>\n  ```\n\n  ### Supplying an explicit dynamic segment value\n\n  If you don't have a model object available to pass to `LinkTo`,\n  an optional string or integer argument can be passed for routes whose\n  paths contain dynamic segments. This argument will become the value\n  of the dynamic segment:\n\n  ```javascript\n  Router.map(function() {\n    this.route(\"photoGallery\", { path: \"hamster-photos/:photo_id\" });\n  });\n  ```\n\n  ```handlebars\n  <LinkTo @route='photoGallery' @model={{aPhotoId}}>\n    {{this.aPhoto.title}}\n  </LinkTo>\n  ```\n\n  ```html\n  <a href=\"/hamster-photos/42\">\n    Tomster\n  </a>\n  ```\n\n  When transitioning into the linked route, the `model` hook will\n  be triggered with parameters including this passed identifier.\n\n  ### Supplying query parameters\n\n  If you need to add optional key-value pairs that appear to the right of the ? in a URL,\n  you can use the `query` argument.\n\n  ```handlebars\n  <LinkTo @route='photoGallery' @query={{hash page=1 per_page=20}}>\n    Great Hamster Photos\n  </LinkTo>\n  ```\n\n  This will result in:\n\n  ```html\n  <a href=\"/hamster-photos?page=1&per_page=20\">\n    Great Hamster Photos\n  </a>\n  ```\n\n  @for Ember.Templates.components\n  @method LinkTo\n  @public\n*/\n\n/**\n  @module @ember/routing\n*/\n\n/**\n  See [Ember.Templates.components.LinkTo](/ember/release/classes/Ember.Templates.components/methods/input?anchor=LinkTo).\n\n  @for Ember.Templates.helpers\n  @method link-to\n  @see {Ember.Templates.components.LinkTo}\n  @public\n**/\n\n/**\n  An opaque interface which can be imported and used in strict-mode\n  templates to call <LinkTo>.\n\n  See [Ember.Templates.components.LinkTo](/ember/release/classes/Ember.Templates.components/methods/input?anchor=LinkTo).\n\n  @for @ember/routing\n  @method LinkTo\n  @see {Ember.Templates.components.LinkTo}\n  @public\n**/\n\nclass _LinkTo extends InternalComponent {\n  static toString() {\n    return 'LinkTo';\n  }\n  static {\n    decorateFieldV2(this.prototype, \"routing\", [service('-routing')]);\n  }\n  #routing = (initializeDeferredDecorator(this, \"routing\"), void 0);\n  validateArguments() {\n    (isDevelopingApp() && !(!this.isEngine || this.engineMountPoint !== undefined) && assert('You attempted to use the <LinkTo> component within a routeless engine, this is not supported. ' + 'If you are using the ember-engines addon, use the <LinkToExternal> component instead. ' + 'See https://github.com/ember-engines/ember-engines for more info.', !this.isEngine || this.engineMountPoint !== undefined));\n    (isDevelopingApp() && !('route' in this.args.named || 'model' in this.args.named || 'models' in this.args.named || 'query' in this.args.named) && assert('You must provide at least one of the `@route`, `@model`, `@models` or `@query` arguments to `<LinkTo>`.', 'route' in this.args.named || 'model' in this.args.named || 'models' in this.args.named || 'query' in this.args.named));\n    (isDevelopingApp() && !(!('model' in this.args.named && 'models' in this.args.named)) && assert('You cannot provide both the `@model` and `@models` arguments to the <LinkTo> component.', !('model' in this.args.named && 'models' in this.args.named)));\n    super.validateArguments();\n  }\n  get class() {\n    let classes = 'ember-view';\n    if (this.isActive) {\n      classes += this.classFor('active');\n      if (this.willBeActive === false) {\n        classes += ' ember-transitioning-out';\n      }\n    } else if (this.willBeActive) {\n      classes += ' ember-transitioning-in';\n    }\n    if (this.isLoading) {\n      classes += this.classFor('loading');\n    }\n    if (this.isDisabled) {\n      classes += this.classFor('disabled');\n    }\n    return classes;\n  }\n  get href() {\n    if (this.isLoading) {\n      return '#';\n    }\n    let {\n      routing,\n      route,\n      models,\n      query\n    } = this;\n    (isDevelopingApp() && !(isPresent(route)) && assert('[BUG] route can only be missing if isLoading is true', isPresent(route))); // consume the current router state so we invalidate when QP changes\n    // TODO: can we narrow this down to QP changes only?\n    consumeTag(tagFor(routing, 'currentState'));\n    if (isDevelopingApp()) {\n      try {\n        return routing.generateURL(route, models, query);\n      } catch (e) {\n        let details = e instanceof Error ? e.message : inspect(e);\n        let message = `While generating link to route \"${route}\": ${details}`;\n        if (e instanceof Error) {\n          e.message = message;\n          throw e;\n        } else {\n          throw message;\n        }\n      }\n    } else {\n      return routing.generateURL(route, models, query);\n    }\n  }\n  click(event) {\n    if (!isSimpleClick(event)) {\n      return;\n    }\n    let element = event.currentTarget;\n    (isDevelopingApp() && !(element instanceof HTMLAnchorElement) && assert('[BUG] must be an <a> element', element instanceof HTMLAnchorElement));\n    let isSelf = element.target === '' || element.target === '_self';\n    if (isSelf) {\n      this.preventDefault(event);\n    } else {\n      return;\n    }\n    if (this.isDisabled) {\n      return;\n    }\n    if (this.isLoading) {\n      (isDevelopingApp() && warn('This link is in an inactive loading state because at least one of its models ' + 'currently has a null/undefined value, or the provided route name is invalid.', false, {\n        id: 'ember-glimmer.link-to.inactive-loading-state'\n      }));\n      return;\n    }\n    let {\n      routing,\n      route,\n      models,\n      query,\n      replace\n    } = this;\n    let payload = {\n      transition: undefined\n    };\n    flaggedInstrument('interaction.link-to', payload, () => {\n      (isDevelopingApp() && !(isPresent(route)) && assert('[BUG] route can only be missing if isLoading is true', isPresent(route)));\n      payload.transition = routing.transitionTo(route, models, query, replace);\n    });\n  }\n  static {\n    decorateMethodV2(this.prototype, \"click\", [action]);\n  }\n  get route() {\n    if ('route' in this.args.named) {\n      let route = this.named('route');\n      (isDevelopingApp() && !(isMissing(route) || typeof route === 'string') && assert('The `@route` argument to the <LinkTo> component must be a string', isMissing(route) || typeof route === 'string'));\n      return route && this.namespaceRoute(route);\n    } else {\n      return this.currentRoute;\n    }\n  }\n\n  // GH #17963\n  currentRouteCache = createCache(() => {\n    consumeTag(tagFor(this.routing, 'currentState'));\n    return untrack(() => this.routing.currentRouteName);\n  });\n  get currentRoute() {\n    return getValue(this.currentRouteCache);\n  }\n\n  // TODO: not sure why generateURL takes {}[] instead of unknown[]\n  // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n  get models() {\n    if ('models' in this.args.named) {\n      let models = this.named('models');\n      (isDevelopingApp() && !(Array.isArray(models)) && assert('The `@models` argument to the <LinkTo> component must be an array.', Array.isArray(models)));\n      return models;\n    } else if ('model' in this.args.named) {\n      // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n      return [this.named('model')];\n    } else {\n      return EMPTY_ARRAY$1;\n    }\n  }\n  get query() {\n    if ('query' in this.args.named) {\n      let query = this.named('query');\n      (isDevelopingApp() && !(query !== null && typeof query === 'object') && assert('The `@query` argument to the <LinkTo> component must be an object.', query !== null && typeof query === 'object'));\n      return {\n        ...query\n      };\n    } else {\n      return EMPTY_QUERY_PARAMS;\n    }\n  }\n  get replace() {\n    return this.named('replace') === true;\n  }\n  get isActive() {\n    return this.isActiveForState(this.routing.currentState);\n  }\n  get willBeActive() {\n    let current = this.routing.currentState;\n    let target = this.routing.targetState;\n    if (current === target) {\n      return null;\n    } else {\n      return this.isActiveForState(target);\n    }\n  }\n  get isLoading() {\n    return isMissing(this.route) || this.models.some(model => isMissing(model));\n  }\n  get isDisabled() {\n    return Boolean(this.named('disabled'));\n  }\n  get isEngine() {\n    let owner = this.owner;\n    return getEngineParent(owner) !== undefined;\n  }\n  get engineMountPoint() {\n    let owner = this.owner;\n    return owner.mountPoint;\n  }\n  classFor(state) {\n    let className = this.named(`${state}Class`);\n    (isDevelopingApp() && !(isMissing(className) || typeof className === 'string' || typeof className === 'boolean') && assert(`The \\`@${state}Class\\` argument to the <LinkTo> component must be a string or boolean`, isMissing(className) || typeof className === 'string' || typeof className === 'boolean'));\n    if (className === true || isMissing(className)) {\n      return ` ${state}`;\n    } else if (className) {\n      return ` ${className}`;\n    } else {\n      return '';\n    }\n  }\n  namespaceRoute(route) {\n    let {\n      engineMountPoint\n    } = this;\n    if (engineMountPoint === undefined) {\n      return route;\n    } else if (route === 'application') {\n      return engineMountPoint;\n    } else {\n      return `${engineMountPoint}.${route}`;\n    }\n  }\n  isActiveForState(state) {\n    if (!isPresent(state)) {\n      return false;\n    }\n    if (this.isLoading) {\n      return false;\n    }\n    let currentWhen = this.named('current-when');\n    if (typeof currentWhen === 'boolean') {\n      return currentWhen;\n    } else if (typeof currentWhen === 'string') {\n      let {\n        models,\n        routing\n      } = this;\n      return currentWhen.split(' ').some(route => routing.isActiveForRoute(models, undefined, this.namespaceRoute(route), state));\n    } else {\n      let {\n        route,\n        models,\n        query,\n        routing\n      } = this;\n      (isDevelopingApp() && !(isPresent(route)) && assert('[BUG] route can only be missing if isLoading is true', isPresent(route)));\n      return routing.isActiveForRoute(models, query, route, state);\n    }\n  }\n  preventDefault(event) {\n    event.preventDefault();\n  }\n  isSupportedArgument(name) {\n    let supportedArguments = ['route', 'model', 'models', 'query', 'replace', 'disabled', 'current-when', 'activeClass', 'loadingClass', 'disabledClass'];\n    return supportedArguments.indexOf(name) !== -1 || super.isSupportedArgument(name);\n  }\n}\nlet {\n  prototype\n} = _LinkTo;\nlet descriptorFor = (target, property) => {\n  if (target) {\n    return Object.getOwnPropertyDescriptor(target, property) || descriptorFor(Object.getPrototypeOf(target), property);\n  } else {\n    return null;\n  }\n};\n\n// @href\n{\n  let superOnUnsupportedArgument = prototype['onUnsupportedArgument'];\n  Object.defineProperty(prototype, 'onUnsupportedArgument', {\n    configurable: true,\n    enumerable: false,\n    value: function onUnsupportedArgument(name) {\n      if (name === 'href') {\n        (isDevelopingApp() && true && assert(`Passing the \\`@href\\` argument to <LinkTo> is not supported.`));\n      } else {\n        superOnUnsupportedArgument.call(this, name);\n      }\n    }\n  });\n}\n\n// QP\n{\n  let superModelsDescriptor = descriptorFor(prototype, 'models');\n  (isDevelopingApp() && !(superModelsDescriptor && typeof superModelsDescriptor.get === 'function') && assert(`[BUG] expecting models to be a getter on <LinkTo>`, superModelsDescriptor && typeof superModelsDescriptor.get === 'function')); // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n  let superModelsGetter = superModelsDescriptor.get;\n  Object.defineProperty(prototype, 'models', {\n    configurable: true,\n    enumerable: false,\n    // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n    get: function models() {\n      let models = superModelsGetter.call(this);\n      if (models.length > 0 && !('query' in this.args.named)) {\n        if (isQueryParams(models[models.length - 1])) {\n          models = models.slice(0, -1);\n        }\n      }\n      return models;\n    }\n  });\n  let superQueryDescriptor = descriptorFor(prototype, 'query');\n  (isDevelopingApp() && !(superQueryDescriptor && typeof superQueryDescriptor.get === 'function') && assert(`[BUG] expecting query to be a getter on <LinkTo>`, superQueryDescriptor && typeof superQueryDescriptor.get === 'function')); // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n  let superQueryGetter = superQueryDescriptor.get;\n  Object.defineProperty(prototype, 'query', {\n    configurable: true,\n    enumerable: false,\n    // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n    get: function query() {\n      if ('query' in this.args.named) {\n        let qp = superQueryGetter.call(this);\n        if (isQueryParams(qp)) {\n          return qp.values ?? EMPTY_QUERY_PARAMS;\n        } else {\n          return qp;\n        }\n      } else {\n        let models = superModelsGetter.call(this);\n        if (models.length > 0) {\n          let qp = models[models.length - 1];\n          if (isQueryParams(qp) && qp.values !== null) {\n            return qp.values;\n          }\n        }\n        return EMPTY_QUERY_PARAMS;\n      }\n    }\n  });\n}\n\n// Positional Arguments\n{\n  let superOnUnsupportedArgument = prototype['onUnsupportedArgument'];\n  Object.defineProperty(prototype, 'onUnsupportedArgument', {\n    configurable: true,\n    enumerable: false,\n    value: function onUnsupportedArgument(name) {\n      if (name !== 'params') {\n        superOnUnsupportedArgument.call(this, name);\n      }\n    }\n  });\n}\nconst LinkTo = opaquify(_LinkTo, LinkToTemplate);\n\nconst TextareaTemplate = templateFactory(\n/*\n  <textarea\n  {{!-- for compatibility --}}\n  id={{this.id}}\n  class={{this.class}}\n\n  ...attributes\n\n  value={{this.value}}\n\n  {{on \"change\" this.change}}\n  {{on \"input\" this.input}}\n  {{on \"keyup\" this.keyUp}}\n  {{on \"paste\" this.valueDidChange}}\n  {{on \"cut\" this.valueDidChange}}\n/>\n*/\n{\n  \"id\": null,\n  \"block\": \"[[[11,\\\"textarea\\\"],[16,1,[30,0,[\\\"id\\\"]]],[16,0,[30,0,[\\\"class\\\"]]],[17,1],[16,2,[30,0,[\\\"value\\\"]]],[4,[32,0],[\\\"change\\\",[30,0,[\\\"change\\\"]]],null],[4,[32,0],[\\\"input\\\",[30,0,[\\\"input\\\"]]],null],[4,[32,0],[\\\"keyup\\\",[30,0,[\\\"keyUp\\\"]]],null],[4,[32,0],[\\\"paste\\\",[30,0,[\\\"valueDidChange\\\"]]],null],[4,[32,0],[\\\"cut\\\",[30,0,[\\\"valueDidChange\\\"]]],null],[12],[13]],[\\\"&attrs\\\"],[]]\",\n  \"moduleName\": \"packages/@ember/-internals/glimmer/lib/templates/textarea.hbs\",\n  \"scope\": () => [on],\n  \"isStrictMode\": true\n});\n\n/**\n@module @ember/component\n*/\n\nclass _Textarea extends AbstractInput {\n  static toString() {\n    return 'Textarea';\n  }\n  get class() {\n    return 'ember-text-area ember-view';\n  }\n\n  // See abstract-input.ts for why these are needed\n\n  change(event) {\n    super.change(event);\n  }\n  static {\n    decorateMethodV2(this.prototype, \"change\", [action]);\n  }\n  input(event) {\n    super.input(event);\n  }\n  static {\n    decorateMethodV2(this.prototype, \"input\", [action]);\n  }\n  isSupportedArgument(name) {\n    let supportedArguments = ['type', 'value', 'enter', 'insert-newline', 'escape-press'];\n    return supportedArguments.indexOf(name) !== -1 || super.isSupportedArgument(name);\n  }\n}\nconst Textarea = opaquify(_Textarea, TextareaTemplate);\n\n/**\n * @deprecated\n */\nfunction unwrapTemplate(template) {\n  if (template.result === 'error') {\n    throw new Error(`Compile Error: ${template.problem} @ ${template.span.start}..${template.span.end}`);\n  }\n  return template;\n}\n\nfunction isTemplateFactory(template) {\n  return typeof template === 'function';\n}\n\nfunction referenceForParts(rootRef, parts) {\n  let isAttrs = parts[0] === 'attrs';\n\n  // TODO deprecate this\n  if (isAttrs) {\n    parts.shift();\n    if (parts.length === 1) {\n      return childRefFor(rootRef, parts[0]);\n    }\n  }\n  return childRefFromParts(rootRef, parts);\n}\nfunction parseAttributeBinding(microsyntax) {\n  let colonIndex = microsyntax.indexOf(':');\n  if (colonIndex === -1) {\n    (isDevelopingApp() && !(microsyntax !== 'class') && assert('You cannot use class as an attributeBinding, use classNameBindings instead.', microsyntax !== 'class'));\n    return [microsyntax, microsyntax, true];\n  } else {\n    let prop = microsyntax.substring(0, colonIndex);\n    let attribute = microsyntax.substring(colonIndex + 1);\n    (isDevelopingApp() && !(attribute !== 'class') && assert('You cannot use class as an attributeBinding, use classNameBindings instead.', attribute !== 'class'));\n    return [prop, attribute, false];\n  }\n}\nfunction installAttributeBinding(component, rootRef, parsed, operations) {\n  let [prop, attribute, isSimple] = parsed;\n  if (attribute === 'id') {\n    // SAFETY: `get` could not infer the type of `prop` and just gave us `unknown`.\n    //         we may want to throw an error in the future if the value isn't string or null/undefined.\n    let elementId = get(component, prop);\n    if (elementId === undefined || elementId === null) {\n      elementId = component.elementId;\n    }\n    let elementIdRef = createPrimitiveRef(elementId);\n    operations.setAttribute('id', elementIdRef, true, null);\n    return;\n  }\n  let isPath = prop.indexOf('.') > -1;\n  let reference = isPath ? referenceForParts(rootRef, prop.split('.')) : childRefFor(rootRef, prop);\n  (isDevelopingApp() && !(!(isSimple && isPath)) && assert(`Illegal attributeBinding: '${prop}' is not a valid attribute name.`, !(isSimple && isPath)));\n  operations.setAttribute(attribute, reference, false, null);\n}\nfunction createClassNameBindingRef(rootRef, microsyntax, operations) {\n  let parts = microsyntax.split(':');\n  let [prop, truthy, falsy] = parts;\n  // NOTE: This could be an empty string\n  (isDevelopingApp() && !(prop !== undefined) && assert('has prop', prop !== undefined)); // Will always have at least one part\n  let isStatic = prop === '';\n  if (isStatic) {\n    operations.setAttribute('class', createPrimitiveRef(truthy), true, null);\n  } else {\n    let isPath = prop.indexOf('.') > -1;\n    let parts = isPath ? prop.split('.') : [];\n    let value = isPath ? referenceForParts(rootRef, parts) : childRefFor(rootRef, prop);\n    let ref;\n    if (truthy === undefined) {\n      ref = createSimpleClassNameBindingRef(value, isPath ? parts[parts.length - 1] : prop);\n    } else {\n      ref = createColonClassNameBindingRef(value, truthy, falsy);\n    }\n    operations.setAttribute('class', ref, false, null);\n  }\n}\nfunction createSimpleClassNameBindingRef(inner, path) {\n  let dasherizedPath;\n  return createComputeRef(() => {\n    let value = valueForRef(inner);\n    if (value === true) {\n      (isDevelopingApp() && !(path !== undefined) && assert('You must pass a path when binding a to a class name using classNameBindings', path !== undefined));\n      return dasherizedPath || (dasherizedPath = dasherize(path));\n    } else if (value || value === 0) {\n      return String(value);\n    } else {\n      return null;\n    }\n  });\n}\nfunction createColonClassNameBindingRef(inner, truthy, falsy) {\n  return createComputeRef(() => {\n    return valueForRef(inner) ? truthy : falsy;\n  });\n}\n\nfunction NOOP() {}\n\n/**\n  @module ember\n*/\n\n/**\n  Represents the internal state of the component.\n\n  @class ComponentStateBucket\n  @private\n*/\nclass ComponentStateBucket {\n  classRef = null;\n  rootRef;\n  argsRevision;\n  constructor(component, args, argsTag, finalizer, hasWrappedElement, isInteractive) {\n    this.component = component;\n    this.args = args;\n    this.argsTag = argsTag;\n    this.finalizer = finalizer;\n    this.hasWrappedElement = hasWrappedElement;\n    this.isInteractive = isInteractive;\n    this.classRef = null;\n    this.argsRevision = args === null ? 0 : valueForTag(argsTag);\n    this.rootRef = createConstRef(component, 'this');\n    registerDestructor(this, () => this.willDestroy(), true);\n    registerDestructor(this, () => this.component.destroy());\n  }\n  willDestroy() {\n    let {\n      component,\n      isInteractive\n    } = this;\n    if (isInteractive) {\n      beginUntrackFrame();\n      component.trigger('willDestroyElement');\n      component.trigger('willClearRender');\n      endUntrackFrame();\n      let element = getViewElement(component);\n      if (element) {\n        clearElementView(element);\n        clearViewElement(component);\n      }\n    }\n    component.renderer.unregister(component);\n  }\n  finalize() {\n    let {\n      finalizer\n    } = this;\n    finalizer();\n    this.finalizer = NOOP;\n  }\n}\n\nfunction processComponentArgs(namedArgs) {\n  let attrs = Object.create(null);\n  let props = Object.create(null);\n  for (let name in namedArgs) {\n    let ref = namedArgs[name];\n    (isDevelopingApp() && !(ref) && assert('expected ref', ref));\n    let value = valueForRef(ref);\n    if (isUpdatableRef(ref)) {\n      attrs[name] = new MutableCell(ref, value);\n    } else {\n      attrs[name] = value;\n    }\n    props[name] = value;\n  }\n  props.attrs = attrs;\n  return props;\n}\nconst REF = Symbol('REF');\nclass MutableCell {\n  value;\n  [MUTABLE_CELL];\n  [REF];\n  constructor(ref, value) {\n    this[MUTABLE_CELL] = true;\n    this[REF] = ref;\n    this.value = value;\n  }\n  update(val) {\n    updateRef(this[REF], val);\n  }\n}\n\nconst ARGS = enumerableSymbol('ARGS');\nconst HAS_BLOCK = enumerableSymbol('HAS_BLOCK');\nconst DIRTY_TAG = Symbol('DIRTY_TAG');\nconst IS_DISPATCHING_ATTRS = Symbol('IS_DISPATCHING_ATTRS');\nconst BOUNDS = Symbol('BOUNDS');\nconst EMBER_VIEW_REF = createPrimitiveRef('ember-view');\nfunction aliasIdToElementId(args, props) {\n  if (args.named.has('id')) {\n    (isDevelopingApp() && !(!args.named.has('elementId')) && assert(`You cannot invoke a component with both 'id' and 'elementId' at the same time.`, !args.named.has('elementId')));\n    props.elementId = props.id;\n  }\n}\n\n// We must traverse the attributeBindings in reverse keeping track of\n// what has already been applied. This is essentially refining the concatenated\n// properties applying right to left.\nfunction applyAttributeBindings(attributeBindings, component, rootRef, operations) {\n  let seen = [];\n  let i = attributeBindings.length - 1;\n  while (i !== -1) {\n    let binding = attributeBindings[i];\n    (isDevelopingApp() && !(binding) && assert('has binding', binding));\n    let parsed = parseAttributeBinding(binding);\n    let attribute = parsed[1];\n    if (seen.indexOf(attribute) === -1) {\n      seen.push(attribute);\n      installAttributeBinding(component, rootRef, parsed, operations);\n    }\n    i--;\n  }\n  if (seen.indexOf('id') === -1) {\n    let id = component.elementId ? component.elementId : guidFor(component);\n    operations.setAttribute('id', createPrimitiveRef(id), false, null);\n  }\n}\nconst EMPTY_POSITIONAL_ARGS = [];\ndebugFreeze(EMPTY_POSITIONAL_ARGS);\nclass CurlyComponentManager {\n  templateFor(component) {\n    let {\n      layout,\n      layoutName\n    } = component;\n    let owner = getOwner(component);\n    (isDevelopingApp() && !(owner) && assert('Component is unexpectedly missing an owner', owner));\n    let factory;\n    if (layout === undefined) {\n      if (layoutName !== undefined) {\n        let _factory = owner.lookup(`template:${layoutName}`);\n        (isDevelopingApp() && !(_factory !== undefined) && assert(`Layout \\`${layoutName}\\` not found!`, _factory !== undefined));\n        factory = _factory;\n      } else {\n        return null;\n      }\n    } else if (isTemplateFactory(layout)) {\n      factory = layout;\n    } else {\n      // no layout was found, use the default layout\n      return null;\n    }\n    return unwrapTemplate(factory(owner)).asWrappedLayout();\n  }\n  getDynamicLayout(bucket) {\n    return this.templateFor(bucket.component);\n  }\n  getTagName(state) {\n    let {\n      component,\n      hasWrappedElement\n    } = state;\n    if (!hasWrappedElement) {\n      return null;\n    }\n    return component && component.tagName || 'div';\n  }\n  getCapabilities() {\n    return CURLY_CAPABILITIES;\n  }\n  prepareArgs(ComponentClass, args) {\n    if (args.named.has('__ARGS__')) {\n      (isDevelopingApp() && !(args.positional.length === 0) && assert('[BUG] cannot pass both __ARGS__ and positional arguments', args.positional.length === 0));\n      let {\n        __ARGS__,\n        ...rest\n      } = args.named.capture();\n      (isDevelopingApp() && !(__ARGS__) && assert('[BUG] unexpectedly missing __ARGS__ after check', __ARGS__)); // does this need to be untracked?\n      let __args__ = valueForRef(__ARGS__);\n      let prepared = {\n        positional: __args__.positional,\n        named: {\n          ...rest,\n          ...__args__.named\n        }\n      };\n      return prepared;\n    }\n    const {\n      positionalParams\n    } = ComponentClass.class ?? ComponentClass;\n\n    // early exits\n    if (positionalParams === undefined || positionalParams === null || args.positional.length === 0) {\n      return null;\n    }\n    let named;\n    if (typeof positionalParams === 'string') {\n      (isDevelopingApp() && !(!args.named.has(positionalParams)) && assert(`You cannot specify positional parameters and the hash argument \\`${positionalParams}\\`.`, !args.named.has(positionalParams)));\n      let captured = args.positional.capture();\n      named = {\n        [positionalParams]: createComputeRef(() => reifyPositional(captured))\n      };\n      Object.assign(named, args.named.capture());\n    } else if (Array.isArray(positionalParams) && positionalParams.length > 0) {\n      const count = Math.min(positionalParams.length, args.positional.length);\n      named = {};\n      Object.assign(named, args.named.capture());\n      for (let i = 0; i < count; i++) {\n        let name = positionalParams[i];\n        (isDevelopingApp() && !(name) && assert('Expected at least one positional param', name));\n        (isDevelopingApp() && !(!args.named.has(name)) && assert(`You cannot specify both a positional param (at position ${i}) and the hash argument \\`${name}\\`.`, !args.named.has(name)));\n        named[name] = args.positional.at(i);\n      }\n    } else {\n      return null;\n    }\n    return {\n      positional: EMPTY_ARRAY$2,\n      named\n    };\n  }\n\n  /*\n   * This hook is responsible for actually instantiating the component instance.\n   * It also is where we perform additional bookkeeping to support legacy\n   * features like exposed by view mixins like ChildViewSupport, ActionSupport,\n   * etc.\n   */\n  create(owner, ComponentClass, args, {\n    isInteractive\n  }, dynamicScope, callerSelfRef, hasBlock) {\n    // Get the nearest concrete component instance from the scope. \"Virtual\"\n    // components will be skipped.\n    let parentView = dynamicScope.view;\n\n    // Capture the arguments, which tells Glimmer to give us our own, stable\n    // copy of the Arguments object that is safe to hold on to between renders.\n    let capturedArgs = args.named.capture();\n    beginTrackFrame();\n    let props = processComponentArgs(capturedArgs);\n    props[ARGS] = capturedArgs;\n    let argsTag = endTrackFrame();\n\n    // Alias `id` argument to `elementId` property on the component instance.\n    aliasIdToElementId(args, props);\n\n    // Set component instance's parentView property to point to nearest concrete\n    // component.\n    props.parentView = parentView;\n\n    // Set whether this component was invoked with a block\n    // (`{{#my-component}}{{/my-component}}`) or without one\n    // (`{{my-component}}`).\n    props[HAS_BLOCK] = hasBlock;\n\n    // Save the current `this` context of the template as the component's\n    // `_target`, so bubbled actions are routed to the right place.\n    props._target = valueForRef(callerSelfRef);\n    setOwner(props, owner);\n\n    // caller:\n    // <FaIcon @name=\"bug\" />\n    //\n    // callee:\n    // <i class=\"fa-{{@name}}\"></i>\n\n    // Now that we've built up all of the properties to set on the component instance,\n    // actually create it.\n    beginUntrackFrame();\n    let component = ComponentClass.create(props);\n    let finalizer = _instrumentStart('render.component', initialRenderInstrumentDetails, component);\n\n    // We become the new parentView for downstream components, so save our\n    // component off on the dynamic scope.\n    dynamicScope.view = component;\n\n    // Unless we're the root component, we need to add ourselves to our parent\n    // component's childViews array.\n    if (parentView !== null && parentView !== undefined) {\n      addChildView(parentView, component);\n    }\n    component.trigger('didReceiveAttrs');\n    let hasWrappedElement = component.tagName !== '';\n\n    // We usually do this in the `didCreateElement`, but that hook doesn't fire for tagless components\n    if (!hasWrappedElement) {\n      if (isInteractive) {\n        component.trigger('willRender');\n      }\n      component._transitionTo('hasElement');\n      if (isInteractive) {\n        component.trigger('willInsertElement');\n      }\n    }\n\n    // Track additional lifecycle metadata about this component in a state bucket.\n    // Essentially we're saving off all the state we'll need in the future.\n    let bucket = new ComponentStateBucket(component, capturedArgs, argsTag, finalizer, hasWrappedElement, isInteractive);\n    if (args.named.has('class')) {\n      bucket.classRef = args.named.get('class');\n    }\n    if (isDevelopingApp()) {\n      processComponentInitializationAssertions(component, props);\n    }\n    if (isInteractive && hasWrappedElement) {\n      component.trigger('willRender');\n    }\n    endUntrackFrame();\n\n    // consume every argument so we always run again\n    consumeTag(bucket.argsTag);\n    consumeTag(component[DIRTY_TAG]);\n    return bucket;\n  }\n  getDebugName(definition) {\n    return definition.fullName || definition.normalizedName || definition.class?.name || definition.name;\n  }\n  getSelf({\n    rootRef\n  }) {\n    return rootRef;\n  }\n  didCreateElement({\n    component,\n    classRef,\n    isInteractive,\n    rootRef\n  }, element, operations) {\n    setViewElement(component, element);\n    setElementView(element, component);\n    let {\n      attributeBindings,\n      classNames,\n      classNameBindings\n    } = component;\n    if (attributeBindings && attributeBindings.length) {\n      applyAttributeBindings(attributeBindings, component, rootRef, operations);\n    } else {\n      let id = component.elementId ? component.elementId : guidFor(component);\n      operations.setAttribute('id', createPrimitiveRef(id), false, null);\n    }\n    if (classRef) {\n      const ref = createSimpleClassNameBindingRef(classRef);\n      operations.setAttribute('class', ref, false, null);\n    }\n    if (classNames && classNames.length) {\n      classNames.forEach(name => {\n        operations.setAttribute('class', createPrimitiveRef(name), false, null);\n      });\n    }\n    if (classNameBindings && classNameBindings.length) {\n      classNameBindings.forEach(binding => {\n        createClassNameBindingRef(rootRef, binding, operations);\n      });\n    }\n    operations.setAttribute('class', EMBER_VIEW_REF, false, null);\n    if ('ariaRole' in component) {\n      operations.setAttribute('role', childRefFor(rootRef, 'ariaRole'), false, null);\n    }\n    component._transitionTo('hasElement');\n    if (isInteractive) {\n      beginUntrackFrame();\n      component.trigger('willInsertElement');\n      endUntrackFrame();\n    }\n  }\n  didRenderLayout(bucket, bounds) {\n    bucket.component[BOUNDS] = bounds;\n    bucket.finalize();\n  }\n  didCreate({\n    component,\n    isInteractive\n  }) {\n    if (isInteractive) {\n      component._transitionTo('inDOM');\n      component.trigger('didInsertElement');\n      component.trigger('didRender');\n    }\n  }\n  update(bucket) {\n    let {\n      component,\n      args,\n      argsTag,\n      argsRevision,\n      isInteractive\n    } = bucket;\n    bucket.finalizer = _instrumentStart('render.component', rerenderInstrumentDetails, component);\n    beginUntrackFrame();\n    if (args !== null && !validateTag(argsTag, argsRevision)) {\n      beginTrackFrame();\n      let props = processComponentArgs(args);\n      argsTag = bucket.argsTag = endTrackFrame();\n      bucket.argsRevision = valueForTag(argsTag);\n      component[IS_DISPATCHING_ATTRS] = true;\n      component.setProperties(props);\n      component[IS_DISPATCHING_ATTRS] = false;\n      component.trigger('didUpdateAttrs');\n      component.trigger('didReceiveAttrs');\n    }\n    if (isInteractive) {\n      component.trigger('willUpdate');\n      component.trigger('willRender');\n    }\n    endUntrackFrame();\n    consumeTag(argsTag);\n    consumeTag(component[DIRTY_TAG]);\n  }\n  didUpdateLayout(bucket) {\n    bucket.finalize();\n  }\n  didUpdate({\n    component,\n    isInteractive\n  }) {\n    if (isInteractive) {\n      component.trigger('didUpdate');\n      component.trigger('didRender');\n    }\n  }\n  getDestroyable(bucket) {\n    return bucket;\n  }\n}\nfunction processComponentInitializationAssertions(component, props) {\n  (isDevelopingApp() && !((() => {\n    let {\n      classNameBindings\n    } = component;\n    for (let i = 0; i < classNameBindings.length; i++) {\n      let binding = classNameBindings[i];\n      if (typeof binding !== 'string' || binding.length === 0) {\n        return false;\n      }\n    }\n    return true;\n  })()) && assert(`classNameBindings must be non-empty strings: ${component}`, (() => {\n    let {\n      classNameBindings\n    } = component;\n    for (let i = 0; i < classNameBindings.length; i++) {\n      let binding = classNameBindings[i];\n      if (typeof binding !== 'string' || binding.length === 0) {\n        return false;\n      }\n    }\n    return true;\n  })()));\n  (isDevelopingApp() && !((() => {\n    let {\n      classNameBindings\n    } = component;\n    for (let binding of classNameBindings) {\n      if (binding.split(' ').length > 1) {\n        return false;\n      }\n    }\n    return true;\n  })()) && assert(`classNameBindings must not have spaces in them: ${component}`, (() => {\n    let {\n      classNameBindings\n    } = component;\n    for (let binding of classNameBindings) {\n      if (binding.split(' ').length > 1) {\n        return false;\n      }\n    }\n    return true;\n  })()));\n  (isDevelopingApp() && !(component.tagName !== '' || !component.classNameBindings || component.classNameBindings.length === 0) && assert(`You cannot use \\`classNameBindings\\` on a tag-less component: ${component}`, component.tagName !== '' || !component.classNameBindings || component.classNameBindings.length === 0));\n  (isDevelopingApp() && !(component.tagName !== '' || props.id === component.elementId || !component.elementId && component.elementId !== '') && assert(`You cannot use \\`elementId\\` on a tag-less component: ${component}`, component.tagName !== '' || props.id === component.elementId || !component.elementId && component.elementId !== ''));\n  (isDevelopingApp() && !(component.tagName !== '' || !component.attributeBindings || component.attributeBindings.length === 0) && assert(`You cannot use \\`attributeBindings\\` on a tag-less component: ${component}`, component.tagName !== '' || !component.attributeBindings || component.attributeBindings.length === 0));\n}\nfunction initialRenderInstrumentDetails(component) {\n  return component.instrumentDetails({\n    initialRender: true\n  });\n}\nfunction rerenderInstrumentDetails(component) {\n  return component.instrumentDetails({\n    initialRender: false\n  });\n}\nconst CURLY_CAPABILITIES = {\n  dynamicLayout: true,\n  dynamicTag: true,\n  prepareArgs: true,\n  createArgs: true,\n  attributeHook: true,\n  elementHook: true,\n  createCaller: true,\n  dynamicScope: true,\n  updateHook: true,\n  createInstance: true,\n  wrapped: true,\n  willDestroy: true,\n  hasSubOwner: false\n};\nconst CURLY_COMPONENT_MANAGER = new CurlyComponentManager();\nfunction isCurlyManager(manager) {\n  return manager === CURLY_COMPONENT_MANAGER;\n}\n\nlet lazyEventsProcessed = new WeakMap();\nconst EMPTY_ARRAY = Object.freeze([]);\n\n/**\n  Determines if the element matches the specified selector.\n\n  @private\n  @method matches\n  @param {DOMElement} el\n  @param {String} selector\n*/\nconst elMatches = typeof Element !== 'undefined' ? Element.prototype.matches : undefined;\nfunction matches(el, selector) {\n  (isDevelopingApp() && !(elMatches !== undefined) && assert('cannot call `matches` in fastboot mode', elMatches !== undefined));\n  return elMatches.call(el, selector);\n}\n\n/**\n@module @ember/component\n*/\n\n// A zero-runtime-overhead private symbol to use in branding the component to\n// preserve its type parameter.\n\n/**\n  A component is a reusable UI element that consists of a `.hbs` template and an\n  optional JavaScript class that defines its behavior. For example, someone\n  might make a `button` in the template and handle the click behavior in the\n  JavaScript file that shares the same name as the template.\n\n  Components are broken down into two categories:\n\n  - Components _without_ JavaScript, that are based only on a template. These\n    are called Template-only or TO components.\n  - Components _with_ JavaScript, which consist of a template and a backing\n    class.\n\n  Ember ships with two types of JavaScript classes for components:\n\n  1. Glimmer components, imported from `@glimmer/component`, which are the\n     default component's for Ember Octane (3.15) and more recent editions.\n  2. Classic components, imported from `@ember/component`, which were the\n     default for older editions of Ember (pre 3.15).\n\n  Below is the documentation for Classic components. If you are looking for the\n  API documentation for Template-only or Glimmer components, it is [available\n  here](/ember/release/modules/@glimmer%2Fcomponent).\n\n  ## Defining a Classic Component\n\n  If you want to customize the component in order to handle events, transform\n  arguments or maintain internal state, you implement a subclass of `Component`.\n\n  One example is to add computed properties to your component:\n\n  ```app/components/person-profile.js\n  import Component from '@ember/component';\n\n  export default class extends Component {\n    @computed('person.title', 'person.firstName', 'person.lastName')\n    get displayName() {\n      let { title, firstName, lastName } = this.person;\n\n      if (title) {\n        return `${title} ${lastName}`;\n      } else {\n        return `${firstName} ${lastName}`;\n      }\n    }\n  }\n  ```\n\n  And then use it in the component's template:\n\n  ```app/templates/components/person-profile.hbs\n  <h1>{{this.displayName}}</h1>\n  {{yield}}\n  ```\n\n  ## Customizing a Classic Component's HTML Element in JavaScript\n\n  ### HTML Tag\n\n  The default HTML tag name used for a component's HTML representation is `div`.\n  This can be customized by setting the `tagName` property.\n\n  Consider the following component class:\n\n  ```app/components/emphasized-paragraph.js\n  import Component from '@ember/component';\n\n  export default class extends Component {\n    tagName = 'em';\n  }\n  ```\n\n  When invoked, this component would produce output that looks something like\n  this:\n\n  ```html\n  <em id=\"ember1\" class=\"ember-view\"></em>\n  ```\n\n  ### HTML `class` Attribute\n\n  The HTML `class` attribute of a component's tag can be set by providing a\n  `classNames` property that is set to an array of strings:\n\n  ```app/components/my-widget.js\n  import Component from '@ember/component';\n\n  export default class extends Component {\n    classNames = ['my-class', 'my-other-class'];\n  }\n  ```\n\n  Invoking this component will produce output that looks like this:\n\n  ```html\n  <div id=\"ember1\" class=\"ember-view my-class my-other-class\"></div>\n  ```\n\n  `class` attribute values can also be set by providing a `classNameBindings`\n  property set to an array of properties names for the component. The return\n  value of these properties will be added as part of the value for the\n  components's `class` attribute. These properties can be computed properties:\n\n  ```app/components/my-widget.js\n  import Component from '@ember/component';\n  import { computed } from '@ember/object';\n\n  export default class extends Component {\n    classNames = ['my-class', 'my-other-class'];\n    classNameBindings = ['propertyA', 'propertyB'];\n\n    propertyA = 'from-a';\n\n    get propertyB {\n      if (someLogic) { return 'from-b'; }\n    }\n  }\n  ```\n\n  Invoking this component will produce HTML that looks like:\n\n  ```html\n  <div id=\"ember1\" class=\"ember-view my-class my-other-class from-a from-b\"></div>\n  ```\n\n  Note that `classNames` and `classNameBindings` is in addition to the `class`\n  attribute passed with the angle bracket invocation syntax. Therefore, if this\n  component was invoked like so:\n\n  ```handlebars\n  <MyWidget class=\"from-invocation\" />\n  ```\n\n  The resulting HTML will look similar to this:\n\n  ```html\n  <div id=\"ember1\" class=\"from-invocation ember-view my-class my-other-class from-a from-b\"></div>\n  ```\n\n  If the value of a class name binding returns a boolean the property name\n  itself will be used as the class name if the property is true. The class name\n  will not be added if the value is `false` or `undefined`.\n\n  ```app/components/my-widget.js\n  import Component from '@ember/component';\n\n  export default class extends Component {\n    classNameBindings = ['hovered'];\n\n    hovered = true;\n  }\n  ```\n\n  Invoking this component will produce HTML that looks like:\n\n  ```html\n  <div id=\"ember1\" class=\"ember-view hovered\"></div>\n  ```\n\n  ### Custom Class Names for Boolean Values\n\n  When using boolean class name bindings you can supply a string value other\n  than the property name for use as the `class` HTML attribute by appending the\n  preferred value after a \":\" character when defining the binding:\n\n  ```app/components/my-widget.js\n  import Component from '@ember/component';\n\n  export default class extends Component {\n    classNameBindings = ['awesome:so-very-cool'];\n\n    awesome = true;\n  }\n  ```\n\n  Invoking this component will produce HTML that looks like:\n\n  ```html\n  <div id=\"ember1\" class=\"ember-view so-very-cool\"></div>\n  ```\n\n  Boolean value class name bindings whose property names are in a\n  camelCase-style format will be converted to a dasherized format:\n\n  ```app/components/my-widget.js\n  import Component from '@ember/component';\n\n  export default class extends Component {\n    classNameBindings = ['isUrgent'];\n\n    isUrgent = true;\n  }\n  ```\n\n  Invoking this component will produce HTML that looks like:\n\n  ```html\n  <div id=\"ember1\" class=\"ember-view is-urgent\"></div>\n  ```\n\n  Class name bindings can also refer to object values that are found by\n  traversing a path relative to the component itself:\n\n  ```app/components/my-widget.js\n  import Component from '@ember/component';\n  import EmberObject from '@ember/object';\n\n  export default class extends Component {\n    classNameBindings = ['messages.empty'];\n\n    messages = EmberObject.create({\n      empty: true\n    });\n  }\n  ```\n\n  Invoking this component will produce HTML that looks like:\n\n  ```html\n  <div id=\"ember1\" class=\"ember-view empty\"></div>\n  ```\n\n  If you want to add a class name for a property which evaluates to true and and\n  a different class name if it evaluates to false, you can pass a binding like\n  this:\n\n  ```app/components/my-widget.js\n  import Component from '@ember/component';\n\n  export default class extends Component {\n    classNameBindings = ['isEnabled:enabled:disabled'];\n\n    isEnabled = true;\n  }\n  ```\n\n  Invoking this component will produce HTML that looks like:\n\n  ```html\n  <div id=\"ember1\" class=\"ember-view enabled\"></div>\n  ```\n\n  When isEnabled is `false`, the resulting HTML representation looks like this:\n\n  ```html\n  <div id=\"ember1\" class=\"ember-view disabled\"></div>\n  ```\n\n  This syntax offers the convenience to add a class if a property is `false`:\n\n  ```app/components/my-widget.js\n  import Component from '@ember/component';\n\n  // Applies no class when isEnabled is true and class 'disabled' when isEnabled is false\n  export default class extends Component {\n    classNameBindings = ['isEnabled::disabled'];\n\n    isEnabled = true;\n  }\n  ```\n\n  Invoking this component when the `isEnabled` property is true will produce\n  HTML that looks like:\n\n  ```html\n  <div id=\"ember1\" class=\"ember-view\"></div>\n  ```\n\n  Invoking it when the `isEnabled` property on the component is `false` will\n  produce HTML that looks like:\n\n  ```html\n  <div id=\"ember1\" class=\"ember-view disabled\"></div>\n  ```\n\n  Updates to the value of a class name binding will result in automatic update\n  of the  HTML `class` attribute in the component's rendered HTML\n  representation. If the value becomes `false` or `undefined` the class name\n  will be removed.\n\n  Both `classNames` and `classNameBindings` are concatenated properties. See\n  [EmberObject](/ember/release/classes/EmberObject) documentation for more\n  information about concatenated properties.\n\n  ### Other HTML Attributes\n\n  The HTML attribute section of a component's tag can be set by providing an\n  `attributeBindings` property set to an array of property names on the\n  component. The return value of these properties will be used as the value of\n  the component's HTML associated attribute:\n\n  ```app/components/my-anchor.js\n  import Component from '@ember/component';\n\n  export default class extends Component {\n    tagName = 'a';\n    attributeBindings = ['href'];\n\n    href = 'http://google.com';\n  };\n  ```\n\n  Invoking this component will produce HTML that looks like:\n\n  ```html\n  <a id=\"ember1\" class=\"ember-view\" href=\"http://google.com\"></a>\n  ```\n\n  One property can be mapped on to another by placing a \":\" between the source\n  property and the destination property:\n\n  ```app/components/my-anchor.js\n  import Component from '@ember/component';\n\n  export default class extends Component {\n    tagName = 'a';\n    attributeBindings = ['url:href'];\n\n    url = 'http://google.com';\n  };\n  ```\n\n  Invoking this component will produce HTML that looks like:\n\n  ```html\n  <a id=\"ember1\" class=\"ember-view\" href=\"http://google.com\"></a>\n  ```\n\n  HTML attributes passed with angle bracket invocations will take precedence\n  over those specified in `attributeBindings`. Therefore, if this component was\n  invoked like so:\n\n  ```handlebars\n  <MyAnchor href=\"http://bing.com\" @url=\"http://google.com\" />\n  ```\n\n  The resulting HTML will looks like this:\n\n  ```html\n  <a id=\"ember1\" class=\"ember-view\" href=\"http://bing.com\"></a>\n  ```\n\n  Note that the `href` attribute is ultimately set to `http://bing.com`, despite\n  it having attribute binidng to the `url` property, which was set to\n  `http://google.com`.\n\n  Namespaced attributes (e.g. `xlink:href`) are supported, but have to be\n  mapped, since `:` is not a valid character for properties in Javascript:\n\n  ```app/components/my-use.js\n  import Component from '@ember/component';\n\n  export default class extends Component {\n    tagName = 'use';\n    attributeBindings = ['xlinkHref:xlink:href'];\n\n    xlinkHref = '#triangle';\n  };\n  ```\n\n  Invoking this component will produce HTML that looks like:\n\n  ```html\n  <use xlink:href=\"#triangle\"></use>\n  ```\n\n  If the value of a property monitored by `attributeBindings` is a boolean, the\n  attribute will be present or absent depending on the value:\n\n  ```app/components/my-text-input.js\n  import Component from '@ember/component';\n\n  export default class extends Component {\n    tagName = 'input';\n    attributeBindings = ['disabled'];\n\n    disabled = false;\n  };\n  ```\n\n  Invoking this component will produce HTML that looks like:\n\n  ```html\n  <input id=\"ember1\" class=\"ember-view\" />\n  ```\n\n  `attributeBindings` can refer to computed properties:\n\n  ```app/components/my-text-input.js\n  import Component from '@ember/component';\n  import { computed } from '@ember/object';\n\n  export default class extends Component {\n    tagName = 'input';\n    attributeBindings = ['disabled'];\n\n    get disabled() {\n      if (someLogic) {\n        return true;\n      } else {\n        return false;\n      }\n    }\n  };\n  ```\n\n  To prevent setting an attribute altogether, use `null` or `undefined` as the\n  value of the property used in `attributeBindings`:\n\n  ```app/components/my-text-input.js\n  import Component from '@ember/component';\n\n  export default class extends Component {\n    tagName = 'form';\n    attributeBindings = ['novalidate'];\n    novalidate = null;\n  };\n  ```\n\n  Updates to the property of an attribute binding will result in automatic\n  update of the  HTML attribute in the component's HTML output.\n\n  `attributeBindings` is a concatenated property. See\n  [EmberObject](/ember/release/classes/EmberObject) documentation for more\n  information about concatenated properties.\n\n  ## Layouts\n\n  The `layout` property can be used to dynamically specify a template associated\n  with a component class, instead of relying on Ember to link together a\n  component class and a template based on file names.\n\n  In general, applications should not use this feature, but it's commonly used\n  in addons for historical reasons.\n\n  The `layout` property should be set to the default export of a template\n  module, which is the name of a template file without the `.hbs` extension.\n\n  ```app/templates/components/person-profile.hbs\n  <h1>Person's Title</h1>\n  <div class='details'>{{yield}}</div>\n  ```\n\n  ```app/components/person-profile.js\n    import Component from '@ember/component';\n    import layout from '../templates/components/person-profile';\n\n    export default class extends Component {\n      layout = layout;\n    }\n  ```\n\n  If you invoke the component:\n\n  ```handlebars\n  <PersonProfile>\n    <h2>Chief Basket Weaver</h2>\n    <h3>Fisherman Industries</h3>\n  </PersonProfile>\n  ```\n\n  or\n\n  ```handlebars\n  {{#person-profile}}\n    <h2>Chief Basket Weaver</h2>\n    <h3>Fisherman Industries</h3>\n  {{/person-profile}}\n  ```\n\n  It will result in the following HTML output:\n\n  ```html\n  <h1>Person's Title</h1>\n    <div class=\"details\">\n    <h2>Chief Basket Weaver</h2>\n    <h3>Fisherman Industries</h3>\n  </div>\n  ```\n\n  ## Handling Browser Events\n\n  There are two ways to handle user-initiated events:\n\n  ### Using the `on` modifier to capture browser events\n\n  In a component's template, you can attach an event handler to any element with the `on` modifier:\n\n  ```handlebars\n  <button {{on 'click' this.doSomething}} />\n  ```\n\n  This will call the function on your component:\n\n  ```js\n  import Component from '@ember/component';\n\n  export default class ExampleComponent extends Component {\n    doSomething = (event) => {\n      // `event` is the native click Event\n      console.log('clicked on the button');\n    };\n  }\n  ```\n\n  See the [Guide on Component event\n  handlers](https://guides.emberjs.com/release/components/component-state-and-actions/#toc_html-modifiers-and-actions)\n  and the [API docs for `on`](../Ember.Templates.helpers/methods/on?anchor=on)\n  for more details.\n\n  ### Event Handler Methods\n\n  Components can also respond to user-initiated events by implementing a method\n  that matches the event name. This approach is appropriate when the same event\n  should be handled by all instances of the same component.\n\n  An event object will be passed as the argument to the event handler method.\n\n  ```app/components/my-widget.js\n  import Component from '@ember/component';\n\n  export default class extends Component {\n    click(event) {\n      // `event.target` is either the component's element or one of its children\n      let tag = event.target.tagName.toLowerCase();\n      console.log('clicked on a `<${tag}>` HTML element!');\n    }\n  }\n  ```\n\n  In this example, whenever the user clicked anywhere inside the component, it\n  will log a message to the console.\n\n  It is possible to handle event types other than `click` by implementing the\n  following event handler methods. In addition, custom events can be registered\n  by using `Application.customEvents`.\n\n  Touch events:\n\n  * `touchStart`\n  * `touchMove`\n  * `touchEnd`\n  * `touchCancel`\n\n  Keyboard events:\n\n  * `keyDown`\n  * `keyUp`\n  * `keyPress`\n\n  Mouse events:\n\n  * `mouseDown`\n  * `mouseUp`\n  * `contextMenu`\n  * `click`\n  * `doubleClick`\n  * `focusIn`\n  * `focusOut`\n\n  Form events:\n\n  * `submit`\n  * `change`\n  * `focusIn`\n  * `focusOut`\n  * `input`\n\n  Drag and drop events:\n\n  * `dragStart`\n  * `drag`\n  * `dragEnter`\n  * `dragLeave`\n  * `dragOver`\n  * `dragEnd`\n  * `drop`\n\n  @class Component\n  @extends Ember.CoreView\n  @uses Ember.TargetActionSupport\n  @uses Ember.ActionSupport\n  @public\n*/\n// This type param is used in the class, so must appear here.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\nclass Component extends CoreView.extend(TargetActionSupport, ActionSupport, {\n  // These need to be overridable via extend/create but should still\n  // have a default. Defining them here is the best way to achieve that.\n  didReceiveAttrs() {},\n  didRender() {},\n  didUpdate() {},\n  didUpdateAttrs() {},\n  willRender() {},\n  willUpdate() {}\n}, {\n  concatenatedProperties: ['attributeBindings', 'classNames', 'classNameBindings'],\n  classNames: EMPTY_ARRAY,\n  classNameBindings: EMPTY_ARRAY\n}) {\n  isComponent = true;\n\n  // SAFETY: this has no runtime existence whatsoever; it is a \"phantom type\"\n  // here to preserve the type param.\n\n  // SAFTEY: This is set in `init`.\n\n  /**\n    Standard CSS class names to apply to the view's outer element. This\n    property automatically inherits any class names defined by the view's\n    superclasses as well.\n     @property classNames\n    @type Array\n    @default ['ember-view']\n    @public\n  */\n\n  /**\n    A list of properties of the view to apply as class names. If the property\n    is a string value, the value of that string will be applied as a class\n    name.\n     ```javascript\n    // Applies the 'high' class to the view element\n    import Component from '@ember/component';\n    Component.extend({\n      classNameBindings: ['priority'],\n      priority: 'high'\n    });\n    ```\n     If the value of the property is a Boolean, the name of that property is\n    added as a dasherized class name.\n     ```javascript\n    // Applies the 'is-urgent' class to the view element\n    import Component from '@ember/component';\n    Component.extend({\n      classNameBindings: ['isUrgent'],\n      isUrgent: true\n    });\n    ```\n     If you would prefer to use a custom value instead of the dasherized\n    property name, you can pass a binding like this:\n     ```javascript\n    // Applies the 'urgent' class to the view element\n    import Component from '@ember/component';\n    Component.extend({\n      classNameBindings: ['isUrgent:urgent'],\n      isUrgent: true\n    });\n    ```\n     If you would like to specify a class that should only be added when the\n    property is false, you can declare a binding like this:\n     ```javascript\n    // Applies the 'disabled' class to the view element\n    import Component from '@ember/component';\n    Component.extend({\n      classNameBindings: ['isEnabled::disabled'],\n      isEnabled: false\n    });\n    ```\n     This list of properties is inherited from the component's superclasses as well.\n     @property classNameBindings\n    @type Array\n    @default []\n    @public\n  */\n\n  init(properties) {\n    super.init(properties);\n\n    // Handle methods from ViewMixin.\n    // The native class inheritance will not work for mixins. To work around this,\n    // we copy the existing rerender method provided by the mixin and swap in the\n    // new rerender method from our class.\n    this._superRerender = this.rerender;\n    this.rerender = this._rerender;\n    this[IS_DISPATCHING_ATTRS] = false;\n    this[DIRTY_TAG] = createTag();\n    this[BOUNDS] = null;\n    const eventDispatcher = this._dispatcher;\n    if (eventDispatcher) {\n      let lazyEventsProcessedForComponentClass = lazyEventsProcessed.get(eventDispatcher);\n      if (!lazyEventsProcessedForComponentClass) {\n        lazyEventsProcessedForComponentClass = new WeakSet();\n        lazyEventsProcessed.set(eventDispatcher, lazyEventsProcessedForComponentClass);\n      }\n      let proto = Object.getPrototypeOf(this);\n      if (!lazyEventsProcessedForComponentClass.has(proto)) {\n        let lazyEvents = eventDispatcher.lazyEvents;\n        lazyEvents.forEach((mappedEventName, event) => {\n          if (mappedEventName !== null && typeof this[mappedEventName] === 'function') {\n            eventDispatcher.setupHandlerForBrowserEvent(event);\n          }\n        });\n        lazyEventsProcessedForComponentClass.add(proto);\n      }\n    }\n    if (isDevelopingApp() && eventDispatcher && this.renderer._isInteractive && this.tagName === '') {\n      let eventNames = [];\n      let events = eventDispatcher.finalEventNameMapping;\n      for (let key in events) {\n        let methodName = events[key];\n        if (methodName && typeof this[methodName] === 'function') {\n          eventNames.push(methodName);\n        }\n      }\n      // If in a tagless component, assert that no event handlers are defined\n      (isDevelopingApp() && !(!eventNames.length) && assert(`You can not define \\`${eventNames}\\` function(s) to handle DOM event in the \\`${this}\\` tagless component since it doesn't have any DOM element.`, !eventNames.length));\n    }\n    (isDevelopingApp() && !(descriptorForProperty(this, 'classNameBindings') === undefined && Array.isArray(this.classNameBindings)) && assert(`Only arrays are allowed for 'classNameBindings'`, descriptorForProperty(this, 'classNameBindings') === undefined && Array.isArray(this.classNameBindings)));\n    (isDevelopingApp() && !(descriptorForProperty(this, 'classNames') === undefined && Array.isArray(this.classNames)) && assert(`Only arrays of static class strings are allowed for 'classNames'. For dynamic classes, use 'classNameBindings'.`, descriptorForProperty(this, 'classNames') === undefined && Array.isArray(this.classNames))); // ViewMixin\n    // Setup a view, but do not finish waking it up.\n    // * configure `childViews`\n    // * register the view with the global views hash, which is used for event\n    //   dispatch\n    (isDevelopingApp() && !(descriptorForProperty(this, 'elementId') === undefined) && assert(`You cannot use a computed property for the component's \\`elementId\\` (${this}).`, descriptorForProperty(this, 'elementId') === undefined));\n    (isDevelopingApp() && !(descriptorForProperty(this, 'tagName') === undefined) && assert(`You cannot use a computed property for the component's \\`tagName\\` (${this}).`, descriptorForProperty(this, 'tagName') === undefined));\n    if (!this.elementId && this.tagName !== '') {\n      this.elementId = guidFor(this);\n    }\n  }\n  __dispatcher;\n  get _dispatcher() {\n    if (this.__dispatcher === undefined) {\n      let owner = getOwner(this);\n      (isDevelopingApp() && !(owner) && assert('Component is unexpectedly missing an owner', owner));\n      if (owner.lookup('-environment:main').isInteractive) {\n        let dispatcher = owner.lookup('event_dispatcher:main');\n        (isDevelopingApp() && !(dispatcher instanceof EventDispatcher) && assert('Expected dispatcher to be an EventDispatcher', dispatcher instanceof EventDispatcher));\n        this.__dispatcher = dispatcher;\n      } else {\n        // In FastBoot we have no EventDispatcher. Set to null to not try again to look it up.\n        this.__dispatcher = null;\n      }\n    }\n    return this.__dispatcher;\n  }\n  on(name, target, method) {\n    this._dispatcher?.setupHandlerForEmberEvent(name);\n    // The `on` method here comes from the Evented mixin. Since this mixin\n    // is applied to the parent of this class, however, we are still able\n    // to use `super`.\n    return super.on(name, target, method);\n  }\n\n  // Changed to `rerender` on init\n  _rerender() {\n    DIRTY_TAG$1(this[DIRTY_TAG]);\n    this._superRerender();\n  }\n  [PROPERTY_DID_CHANGE](key, value) {\n    if (this[IS_DISPATCHING_ATTRS]) {\n      return;\n    }\n    let args = this[ARGS];\n    let reference = args !== undefined ? args[key] : undefined;\n    if (reference !== undefined && isUpdatableRef(reference)) {\n      updateRef(reference, arguments.length === 2 ? value : get(this, key));\n    }\n  }\n  getAttr(key) {\n    // TODO Intimate API should be deprecated\n    return this.get(key);\n  }\n\n  /**\n    Normally, Ember's component model is \"write-only\". The component takes a\n    bunch of attributes that it got passed in, and uses them to render its\n    template.\n     One nice thing about this model is that if you try to set a value to the\n    same thing as last time, Ember (through HTMLBars) will avoid doing any\n    work on the DOM.\n     This is not just a performance optimization. If an attribute has not\n    changed, it is important not to clobber the element's \"hidden state\".\n    For example, if you set an input's `value` to the same value as before,\n    it will clobber selection state and cursor position. In other words,\n    setting an attribute is not **always** idempotent.\n     This method provides a way to read an element's attribute and also\n    update the last value Ember knows about at the same time. This makes\n    setting an attribute idempotent.\n     In particular, what this means is that if you get an `<input>` element's\n    `value` attribute and then re-render the template with the same value,\n    it will avoid clobbering the cursor and selection position.\n    Since most attribute sets are idempotent in the browser, you typically\n    can get away with reading attributes using jQuery, but the most reliable\n    way to do so is through this method.\n    @method readDOMAttr\n     @param {String} name the name of the attribute\n    @return String\n    @public\n    */\n  readDOMAttr(name) {\n    // TODO revisit this\n    let _element = getViewElement(this);\n    (isDevelopingApp() && !(_element !== null) && assert(`Cannot call \\`readDOMAttr\\` on ${this} which does not have an element`, _element !== null));\n    let element = _element;\n    let isSVG = element.namespaceURI === 'http://www.w3.org/2000/svg';\n    let {\n      type,\n      normalized\n    } = normalizeProperty(element, name);\n    if (isSVG || type === 'attr') {\n      return element.getAttribute(normalized);\n    }\n    return element[normalized];\n  }\n\n  // --- Declarations which support mixins ---\n  // We use `declare` on these properties, even though they are optional, so\n  // that they do not get created on the class *at all* when emitting the\n  // transpiled code. Otherwise, since declared class properties are equivalent\n  // to calling `defineProperty` in the class constructor, they would \"stomp\"\n  // the properties supplied by mixins.\n\n  /**\n   A list of properties of the view to apply as attributes. If the property\n   is a string value, the value of that string will be applied as the value\n   for an attribute of the property's name.\n    The following example creates a tag like `<div priority=\"high\" />`.\n    ```app/components/my-component.js\n   import Component from '@ember/component';\n    export default Component.extend({\n      attributeBindings: ['priority'],\n      priority: 'high'\n    });\n   ```\n    If the value of the property is a Boolean, the attribute is treated as\n   an HTML Boolean attribute. It will be present if the property is `true`\n   and omitted if the property is `false`.\n    The following example creates markup like `<div visible />`.\n    ```app/components/my-component.js\n   import Component from '@ember/component';\n    export default Component.extend({\n      attributeBindings: ['visible'],\n      visible: true\n    });\n   ```\n    If you would prefer to use a custom value instead of the property name,\n   you can create the same markup as the last example with a binding like\n   this:\n    ```app/components/my-component.js\n   import Component from '@ember/component';\n    export default Component.extend({\n      attributeBindings: ['isVisible:visible'],\n      isVisible: true\n    });\n   ```\n    This list of attributes is inherited from the component's superclasses,\n   as well.\n    @property attributeBindings\n   @type Array\n   @default []\n   @public\n   */\n\n  /**\n   Enables components to take a list of parameters as arguments.\n    For example, a component that takes two parameters with the names\n    `name` and `age`:\n     ```app/components/my-component.js\n    import Component from '@ember/component';\n     export default class MyComponent extends Component {\n      static positionalParams = ['name', 'age'];\n    }\n    ```\n     It can then be invoked like this:\n     ```hbs\n    {{my-component \"John\" 38}}\n    ```\n     The parameters can be referred to just like named parameters:\n     ```hbs\n    Name: {{name}}, Age: {{age}}.\n    ```\n     Using a string instead of an array allows for an arbitrary number of\n    parameters:\n     ```app/components/my-component.js\n    import Component from '@ember/component';\n     export default class MyComponent extends Component {\n      static positionalParams = 'names';\n    }\n    ```\n     It can then be invoked like this:\n     ```hbs\n    {{my-component \"John\" \"Michael\" \"Scott\"}}\n    ```\n    The parameters can then be referred to by enumerating over the list:\n     ```hbs\n    {{#each names as |name|}}{{name}}{{/each}}\n    ```\n     @static\n    @public\n    @property positionalParams\n    @since 1.13.0\n    */ /**\n       Enables components to take a list of parameters as arguments.\n       For example, a component that takes two parameters with the names\n       `name` and `age`:\n       ```app/components/my-component.js\n       import Component from '@ember/component';\n       export default class MyComponent extends Component {\n       static positionalParams = ['name', 'age'];\n       }\n       ```\n       It can then be invoked like this:\n       ```hbs\n       {{my-component \"John\" 38}}\n       ```\n       The parameters can be referred to just like named parameters:\n       ```hbs\n       Name: {{name}}, Age: {{age}}.\n       ```\n       Using a string instead of an array allows for an arbitrary number of\n       parameters:\n       ```app/components/my-component.js\n       import Component from '@ember/component';\n       export default class MyComponent extends Component {\n       static positionalParams = 'names';\n       }\n       ```\n       It can then be invoked like this:\n       ```hbs\n       {{my-component \"John\" \"Michael\" \"Scott\"}}\n       ```\n       The parameters can then be referred to by enumerating over the list:\n       ```hbs\n       {{#each names as |name|}}{{name}}{{/each}}\n       ```\n       @static\n       @public\n       @property positionalParams\n       @since 1.13.0\n       */\n\n  /**\n    Layout can be used to wrap content in a component.\n    @property layout\n    @type Function\n    @public\n  */\n\n  /**\n    The name of the layout to lookup if no layout is provided.\n    By default `Component` will lookup a template with this name in\n    `Ember.TEMPLATES` (a shared global object).\n    @property layoutName\n    @type String\n    @default undefined\n    @private\n  */\n\n  /**\n   The WAI-ARIA role of the control represented by this view. For example, a\n    button may have a role of type 'button', or a pane may have a role of\n    type 'alertdialog'. This property is used by assistive software to help\n    visually challenged users navigate rich web applications.\n     The full list of valid WAI-ARIA roles is available at:\n    [https://www.w3.org/TR/wai-aria/#roles_categorization](https://www.w3.org/TR/wai-aria/#roles_categorization)\n     @property ariaRole\n    @type String\n    @default undefined\n    @public\n    */\n\n  /**\n    Array of child views. You should never edit this array directly.\n     @property childViews\n    @type Array\n    @default []\n    @private\n  */\n  // @ts-expect-error TODO: Fix these types\n  get childViews() {\n    return getChildViews(this);\n  }\n  static {\n    decorateMethodV2(this.prototype, \"childViews\", [nativeDescDecorator({\n      configurable: false,\n      enumerable: false\n    })]);\n  }\n  appendChild(view) {\n    addChildView(this, view);\n  }\n  _transitionTo(state) {\n    let priorState = this._currentState;\n    let currentState = this._currentState = this._states[state];\n    this._state = state;\n    if (priorState && priorState.exit) {\n      priorState.exit(this);\n    }\n    if (currentState.enter) {\n      currentState.enter(this);\n    }\n  }\n\n  // Begin ViewMixin\n\n  // ..........................................................\n  // TEMPLATE SUPPORT\n  //\n\n  /**\n   Return the nearest ancestor that is an instance of the provided\n   class or mixin.\n    @method nearestOfType\n   @param {Class,Mixin} klass Subclass of Ember.View (or Ember.View itself),\n   or an instance of Mixin.\n   @return Ember.View\n   @deprecated use `yield` and contextual components for composition instead.\n   @private\n   */\n  nearestOfType(klass) {\n    let view = this.parentView;\n    while (view) {\n      if (klass.detect(view.constructor)) {\n        return view;\n      }\n      view = view.parentView;\n    }\n    return;\n  }\n\n  /**\n   Return the nearest ancestor that has a given property.\n    @method nearestWithProperty\n   @param {String} property A property name\n   @return Ember.View\n   @deprecated use `yield` and contextual components for composition instead.\n   @private\n   */\n  nearestWithProperty(property) {\n    let view = this.parentView;\n    while (view) {\n      if (property in view) {\n        return view;\n      }\n      view = view.parentView;\n    }\n    return;\n  }\n\n  /**\n   Renders the view again. This will work regardless of whether the\n   view is already in the DOM or not. If the view is in the DOM, the\n   rendering process will be deferred to give bindings a chance\n   to synchronize.\n    If children were added during the rendering process using `appendChild`,\n   `rerender` will remove them, because they will be added again\n   if needed by the next `render`.\n    In general, if the display of your view changes, you should modify\n   the DOM element directly instead of manually calling `rerender`, which can\n   be slow.\n    @method rerender\n   @public\n   */\n  rerender() {\n    return this._currentState.rerender(this);\n  }\n\n  // ..........................................................\n  // ELEMENT SUPPORT\n  //\n\n  /**\n   Returns the current DOM element for the view.\n     @property element\n    @type DOMElement\n    @public\n  */\n  // @ts-expect-error The types are not correct here\n  get element() {\n    return this.renderer.getElement(this);\n  }\n\n  /**\n   Appends the view's element to the specified parent element.\n    Note that this method just schedules the view to be appended; the DOM\n   element will not be appended to the given element until all bindings have\n   finished synchronizing.\n    This is not typically a function that you will need to call directly when\n   building your application. If you do need to use `appendTo`, be sure that\n   the target element you are providing is associated with an `Application`\n   and does not have an ancestor element that is associated with an Ember view.\n    @method appendTo\n   @param {String|DOMElement} A selector, element, HTML string\n   @return {Ember.View} receiver\n   @private\n   */\n  static {\n    decorateMethodV2(this.prototype, \"element\", [nativeDescDecorator({\n      configurable: false,\n      enumerable: false\n    })]);\n  }\n  appendTo(selector) {\n    let target;\n    if (hasDOM) {\n      (isDevelopingApp() && !(typeof selector === 'string' || selector instanceof Element) && assert(`Expected a selector or instance of Element`, typeof selector === 'string' || selector instanceof Element));\n      target = typeof selector === 'string' ? document.querySelector(selector) : selector;\n      (isDevelopingApp() && !(target) && assert(`You tried to append to (${selector}) but that isn't in the DOM`, target));\n      (isDevelopingApp() && !(!matches(target, '.ember-view')) && assert('You cannot append to an existing Ember.View.', !matches(target, '.ember-view')));\n      (isDevelopingApp() && !((() => {\n        let node = target.parentNode;\n        while (node instanceof Element) {\n          if (matches(node, '.ember-view')) {\n            return false;\n          }\n          node = node.parentNode;\n        }\n        return true;\n      })()) && assert('You cannot append to an existing Ember.View.', (() => {\n        let node = target.parentNode;\n        while (node instanceof Element) {\n          if (matches(node, '.ember-view')) {\n            return false;\n          }\n          node = node.parentNode;\n        }\n        return true;\n      })()));\n    } else {\n      target = selector;\n      (isDevelopingApp() && !(typeof target !== 'string') && assert(`You tried to append to a selector string (${selector}) in an environment without a DOM`, typeof target !== 'string'));\n      (isDevelopingApp() && !(typeof target.appendChild === 'function') && assert(`You tried to append to a non-Element (${selector}) in an environment without a DOM`, typeof target.appendChild === 'function'));\n    }\n\n    // SAFETY: SimpleElement is supposed to be a subset of Element so this _should_ be safe.\n    // However, the types are more specific in some places which necessitates the `as`.\n    this.renderer.appendTo(this, target);\n    return this;\n  }\n\n  /**\n   Appends the view's element to the document body. If the view does\n   not have an HTML representation yet\n   the element will be generated automatically.\n    If your application uses the `rootElement` property, you must append\n   the view within that element. Rendering views outside of the `rootElement`\n   is not supported.\n    Note that this method just schedules the view to be appended; the DOM\n   element will not be appended to the document body until all bindings have\n   finished synchronizing.\n    @method append\n   @return {Ember.View} receiver\n   @private\n   */\n  append() {\n    return this.appendTo(document.body);\n  }\n\n  /**\n   The HTML `id` of the view's element in the DOM. You can provide this\n   value yourself but it must be unique (just as in HTML):\n    ```handlebars\n   {{my-component elementId=\"a-really-cool-id\"}}\n   ```\n    If not manually set a default value will be provided by the framework.\n    Once rendered an element's `elementId` is considered immutable and you\n   should never change it. If you need to compute a dynamic value for the\n   `elementId`, you should do this when the component or element is being\n   instantiated:\n    ```app/components/my-component.js\n   import Component from '@ember/component';\n    export default Component.extend({\n      init() {\n        this._super(...arguments);\n        let index = this.get('index');\n        this.set('elementId', 'component-id' + index);\n      }\n    });\n   ```\n    @property elementId\n   @type String\n   @public\n   */\n\n  /**\n   Called when a view is going to insert an element into the DOM.\n    @event willInsertElement\n   @public\n   */\n  willInsertElement() {\n    return this;\n  }\n\n  /**\n   Called when the element of the view has been inserted into the DOM.\n   Override this function to do any set up that requires an element\n   in the document body.\n    When a view has children, didInsertElement will be called on the\n   child view(s) first and on itself afterwards.\n    @event didInsertElement\n   @public\n   */\n  didInsertElement() {\n    return this;\n  }\n\n  /**\n   Called when the view is about to rerender, but before anything has\n   been torn down. This is a good opportunity to tear down any manual\n   observers you have installed based on the DOM state\n    @event willClearRender\n   @public\n   */\n  willClearRender() {\n    return this;\n  }\n\n  /**\n   You must call `destroy` on a view to destroy the view (and all of its\n   child views). This will remove the view from any parent node, then make\n   sure that the DOM element managed by the view can be released by the\n   memory manager.\n    @method destroy\n   @private\n   */\n  destroy() {\n    super.destroy();\n    this._currentState.destroy(this);\n    return this;\n  }\n\n  /**\n   Called when the element of the view is going to be destroyed. Override\n   this function to do any teardown that requires an element, like removing\n   event listeners.\n    Please note: any property changes made during this event will have no\n   effect on object observers.\n    @event willDestroyElement\n   @public\n   */\n  willDestroyElement() {\n    return this;\n  }\n\n  /**\n   Called after the element of the view is destroyed.\n    @event willDestroyElement\n   @public\n   */\n  didDestroyElement() {\n    return this;\n  }\n\n  /**\n   Called when the parentView property has changed.\n    @event parentViewDidChange\n   @private\n   */\n  parentViewDidChange() {\n    return this;\n  }\n\n  // ..........................................................\n  // STANDARD RENDER PROPERTIES\n  //\n\n  /**\n   Tag name for the view's outer element. The tag name is only used when an\n   element is first created. If you change the `tagName` for an element, you\n   must destroy and recreate the view element.\n    By default, the render buffer will use a `<div>` tag for views.\n    If the tagName is `''`, the view will be tagless, with no outer element.\n   Component properties that depend on the presence of an outer element, such\n   as `classNameBindings` and `attributeBindings`, do not work with tagless\n   components. Tagless components cannot implement methods to handle events,\n   and their `element` property has a `null` value.\n    @property tagName\n   @type String\n   @default null\n   @public\n   */\n\n  // We leave this null by default so we can tell the difference between\n  // the default case and a user-specified tag.\n\n  // .......................................................\n  // EVENT HANDLING\n  //\n\n  /**\n   Handle events from `EventDispatcher`\n    @method handleEvent\n   @param eventName {String}\n   @param evt {Event}\n   @private\n   */\n  handleEvent(eventName, evt) {\n    return this._currentState.handleEvent(this, eventName, evt);\n  }\n\n  // End ViewMixin\n\n  static isComponentFactory = true;\n  static toString() {\n    return '@ember/component';\n  }\n}\n\n// We continue to use reopenClass here so that positionalParams can be overridden with reopenClass in subclasses.\nComponent.reopenClass({\n  positionalParams: []\n});\nsetInternalComponentManager(CURLY_COMPONENT_MANAGER, Component);\n\n/**\n@module @ember/component\n*/\n\nconst RECOMPUTE_TAG = Symbol('RECOMPUTE_TAG');\n\n// Signature type utilities\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\n\n// Implements Ember's `Factory` interface and tags it for narrowing/checking.\n\nconst IS_CLASSIC_HELPER = Symbol('IS_CLASSIC_HELPER');\n\n// A zero-runtime-overhead private symbol to use in branding the component to\n// preserve its type parameter.\n\n/**\n  Ember Helpers are functions that can compute values, and are used in templates.\n  For example, this code calls a helper named `format-currency`:\n\n  ```app/templates/application.hbs\n  <Cost @cents={{230}} />\n  ```\n\n  ```app/components/cost.hbs\n  <div>{{format-currency @cents currency=\"$\"}}</div>\n  ```\n\n  Additionally a helper can be called as a nested helper.\n  In this example, we show the formatted currency value if the `showMoney`\n  named argument is truthy.\n\n  ```handlebars\n  {{if @showMoney (format-currency @cents currency=\"$\")}}\n  ```\n\n  Helpers defined using a class must provide a `compute` function. For example:\n\n  ```app/helpers/format-currency.js\n  import Helper from '@ember/component/helper';\n\n  export default class extends Helper {\n    compute([cents], { currency }) {\n      return `${currency}${cents * 0.01}`;\n    }\n  }\n  ```\n\n  Each time the input to a helper changes, the `compute` function will be\n  called again.\n\n  As instances, these helpers also have access to the container and will accept\n  injected dependencies.\n\n  Additionally, class helpers can call `recompute` to force a new computation.\n\n  @class Helper\n  @extends CoreObject\n  @public\n  @since 1.13.0\n*/\n// ESLint doesn't understand declaration merging.\n/* eslint-disable import/export */\n\nclass Helper extends FrameworkObject {\n  static isHelperFactory = true;\n  static [IS_CLASSIC_HELPER] = true;\n\n  // `packages/ember/index.js` was setting `Helper.helper`. This seems like\n  // a bad idea and probably not something we want. We've moved that definition\n  // here, but it should definitely be reviewed and probably removed.\n  /** @deprecated */\n  static helper = helper$1;\n\n  // SAFETY: this is initialized in `init`, rather than `constructor`. It is\n  // safe to `declare` like this *if and only if* nothing uses the constructor\n  // directly in this class, since nothing else can run before `init`.\n\n  // SAFETY: this has no runtime existence whatsoever; it is a \"phantom type\"\n  // here to preserve the type param.\n\n  init(properties) {\n    super.init(properties);\n    this[RECOMPUTE_TAG] = createTag();\n    (isDevelopingApp() && !(this.compute) && assert('expected compute to be defined', this.compute));\n  }\n\n  /**\n    On a class-based helper, it may be useful to force a recomputation of that\n    helpers value. This is akin to `rerender` on a component.\n     For example, this component will rerender when the `currentUser` on a\n    session service changes:\n     ```app/helpers/current-user-email.js\n    import Helper from '@ember/component/helper'\n    import { service } from '@ember/service'\n    import { observer } from '@ember/object'\n     export default Helper.extend({\n      session: service(),\n       onNewUser: observer('session.currentUser', function() {\n        this.recompute();\n      }),\n       compute() {\n        return this.get('session.currentUser.email');\n      }\n    });\n    ```\n     @method recompute\n    @public\n    @since 1.13.0\n  */\n  recompute() {\n    join(() => DIRTY_TAG$1(this[RECOMPUTE_TAG]));\n  }\n}\n/* eslint-enable import/export */\n\nfunction isClassicHelper(obj) {\n  return obj[IS_CLASSIC_HELPER] === true;\n}\nclass ClassicHelperManager {\n  capabilities = helperCapabilities('3.23', {\n    hasValue: true,\n    hasDestroyable: true\n  });\n  ownerInjection;\n  constructor(owner) {\n    let ownerInjection = {};\n    setOwner(ownerInjection, owner);\n    this.ownerInjection = ownerInjection;\n  }\n  createHelper(definition, args) {\n    let instance = isFactoryManager(definition) ? definition.create() : definition.create(this.ownerInjection);\n    (isDevelopingApp() && !(function (instance) {\n      if (instance !== null && typeof instance === 'object') {\n        let cast = instance;\n        return typeof cast.compute === 'function' && typeof cast.destroy === 'function';\n      }\n      return false;\n    }(instance)) && assert('expected HelperInstance', function (instance) {\n      if (instance !== null && typeof instance === 'object') {\n        let cast = instance;\n        return typeof cast.compute === 'function' && typeof cast.destroy === 'function';\n      }\n      return false;\n    }(instance)));\n    return {\n      instance,\n      args\n    };\n  }\n  getDestroyable({\n    instance\n  }) {\n    return instance;\n  }\n  getValue({\n    instance,\n    args\n  }) {\n    let {\n      positional,\n      named\n    } = args;\n    let ret = instance.compute(positional, named);\n    consumeTag(instance[RECOMPUTE_TAG]);\n    return ret;\n  }\n  getDebugName(definition) {\n    return getDebugName((definition.class || definition)['prototype']);\n  }\n}\nfunction isFactoryManager(obj) {\n  return obj != null && 'class' in obj;\n}\nsetHelperManager(owner => {\n  return new ClassicHelperManager(owner);\n}, Helper);\nconst CLASSIC_HELPER_MANAGER = getInternalHelperManager(Helper);\n\n///////////\n\nclass Wrapper {\n  isHelperFactory = true;\n  constructor(compute) {\n    this.compute = compute;\n  }\n  create() {\n    // needs new instance or will leak containers\n    return {\n      compute: this.compute\n    };\n  }\n}\nclass SimpleClassicHelperManager {\n  capabilities = helperCapabilities('3.23', {\n    hasValue: true\n  });\n  createHelper(definition, args) {\n    return () => definition.compute.call(null, args.positional, args.named);\n  }\n  getValue(fn) {\n    return fn();\n  }\n  getDebugName(definition) {\n    return getDebugName(definition.compute);\n  }\n}\nconst SIMPLE_CLASSIC_HELPER_MANAGER = new SimpleClassicHelperManager();\nsetHelperManager(() => SIMPLE_CLASSIC_HELPER_MANAGER, Wrapper.prototype);\n\n/*\n  Function-based helpers need to present with a constructor signature so that\n  type parameters can be preserved when `helper()` is passed a generic function\n  (this is particularly key for checking helper invocations with Glint).\n  Accordingly, we define an abstract class and declaration merge it with the\n  interface; this inherently provides an `abstract` constructor. Since it is\n  `abstract`, it is not callable, which is important since end users should not\n  be able to do `let myHelper = helper(someFn); new myHelper()`.\n */\n\n/**\n * The type of a function-based helper.\n *\n * @note This is *not* user-constructible: it is exported only so that the type\n *   returned by the `helper` function can be named (and indeed can be exported\n *   like `export default helper(...)` safely).\n */\n// Making `FunctionBasedHelper` an alias this way allows callers to name it in\n// terms meaningful to *them*, while preserving the type behavior described on\n// the `abstract class FunctionBasedHelperInstance` below.\n\n// This abstract class -- specifically, its `protected abstract __concrete__`\n// member -- prevents subclasses from doing `class X extends helper(..)`, since\n// that is an error at runtime. While it is rare that people would type that, it\n// is not impossible and we use this to give them early signal via the types for\n// a behavior which will break (and in a somewhat inscrutable way!) at runtime.\n//\n// This is needful because we lie about what this actually is for Glint's sake:\n// a function-based helper returns a `Factory<SimpleHelper>`, which is designed\n// to be \"opaque\" from a consumer's POV, i.e. not user-callable or constructible\n// but only useable in a template (or via `invokeHelper()` which also treats it\n// as a fully opaque `object` from a type POV). But Glint needs a `Helper<S>` to\n// make it work the same way as class-based helpers. (Note that this does not\n// hold for plain functions as helpers, which it can handle distinctly.) This\n// signature thus makes it so that the item is usable *as* a `Helper` in Glint,\n// but without letting end users treat it as a helper class instance.\n\n/**\n  In many cases it is not necessary to use the full `Helper` class.\n  The `helper` method create pure-function helpers without instances.\n  For example:\n\n  ```app/helpers/format-currency.js\n  import { helper } from '@ember/component/helper';\n\n  export default helper(function([cents], {currency}) {\n    return `${currency}${cents * 0.01}`;\n  });\n  ```\n\n  @static\n  @param {Function} helper The helper function\n  @method helper\n  @for @ember/component/helper\n  @public\n  @since 1.13.0\n*/\n// This overload allows users to write types directly on the callback passed to\n// the `helper` function and infer the resulting type correctly.\n\n// This overload allows users to provide a `Signature` type explicitly at the\n// helper definition site, e.g. `helper<Sig>((pos, named) => {...})`. **Note:**\n// this overload must appear second, since TS' inference engine will not\n// correctly infer the type of `S` here from the types on the supplied callback.\n\nfunction helper$1(helperFn) {\n  // SAFETY: this is completely lies, in two ways:\n  //\n  // 1. `Wrapper` is a `Factory<SimpleHelper<S>>`, but from the perspective of\n  //    any external callers (i.e. Ember *users*), it is quite important that\n  //    the `Factory` relationship be hidden, because it is not public API for\n  //    an end user to call `.create()` on a helper created this way. Instead,\n  //    we provide them an `abstract new` signature (which means it cannot be\n  //    directly constructed by calling `new` on it) and which does not have the\n  //    `.create()` signature on it anymore.\n  //\n  // 2. The produced type here ends up being a subtype of `Helper`, which is not\n  //    strictly true. This is necessary for the sake of Glint, which provides\n  //    its information by way of a \"declaration merge\" with `Helper<S>` in the\n  //    case of items produced by `helper()`.\n  //\n  // Long-term, this entire construct can go away in favor of deprecating the\n  // `helper()` invocation in favor of using plain functions.\n  return new Wrapper(helperFn);\n}\n\n/**\n@module @ember/template\n*/\n\n/**\n  A wrapper around a string that has been marked as \"trusted\". **When\n  rendered in HTML, Ember will not perform any escaping.**\n\n  Note:\n\n  1. This does not *make* the string safe; it means that some code in your\n     application has *marked* it as trusted using the `trustHTML()` function.\n\n  2. The only public API for getting a `TrustedHTML` is calling `trustHTML()`. It\n     is *not* user-constructible.\n\n  If a string contains user inputs or other untrusted data, you must sanitize\n  the string before using the `trustHTML` method. Otherwise your code is\n  vulnerable to [Cross-Site Scripting][xss]. There are many open source\n  sanitization libraries to choose from, both for front end and server-side\n  sanitization.\n\n  [xss]: https://owasp.org/www-community/attacks/DOM_Based_XSS\n\n  ```javascript\n  import { trustHTML } from '@ember/template';\n\n  let someTrustedOrSanitizedString = \"<div>Hello!</div>\"\n\n  trustHTML(someTrustedorSanitizedString);\n  ```\n\n  @for @ember/template\n  @class TrustedHTML\n  @since 6.7.0\n  @public\n */\nclass TrustedHTML {\n  __string;\n  constructor(string) {\n    this.__string = string;\n  }\n\n  /**\n    Get the string back to use as a string.\n     @public\n    @method toString\n    @returns {String} The string marked as trusted\n   */\n  toString() {\n    return `${this.__string}`;\n  }\n\n  /**\n    Get the wrapped string as HTML to use without escaping.\n     @public\n    @method toHTML\n    @returns {String} the trusted string, without any escaping applied\n   */\n  toHTML() {\n    return this.toString();\n  }\n}\n\n/**\n  A wrapper around a string that has been marked as safe (\"trusted\"). **When\n  rendered in HTML, Ember will not perform any escaping.**\n\n  Note:\n\n  1. This does not *make* the string safe; it means that some code in your\n     application has *marked* it as safe using the `htmlSafe()` function.\n\n  2. The only public API for getting a `SafeString` is calling `htmlSafe()`. It\n     is *not* user-constructible.\n\n  If a string contains user inputs or other untrusted data, you must sanitize\n  the string before using the `htmlSafe` method. Otherwise your code is\n  vulnerable to [Cross-Site Scripting][xss]. There are many open source\n  sanitization libraries to choose from, both for front end and server-side\n  sanitization.\n\n  [xss]: https://owasp.org/www-community/attacks/DOM_Based_XSS\n\n  ```javascript\n  import { htmlSafe } from '@ember/template';\n\n  let someTrustedOrSanitizedString = \"<div>Hello!</div>\"\n\n  htmlSafe(someTrustedorSanitizedString);\n  ```\n\n  @for @ember/template\n  @class SafeString\n  @since 4.12.0\n  @public\n */\nconst SafeString = TrustedHTML;\n/**\n  Use this method to indicate that a string should be rendered as HTML\n  when the string is used in a template. To say this another way,\n  strings marked with `htmlSafe` will not be HTML escaped.\n\n  A word of warning -   The `htmlSafe` method does not make the string safe;\n  it only tells the framework to treat the string as if it is safe to render\n  as HTML. If a string contains user inputs or other untrusted\n  data, you must sanitize the string before using the `htmlSafe` method.\n  Otherwise your code is vulnerable to\n  [Cross-Site Scripting](https://owasp.org/www-community/attacks/DOM_Based_XSS).\n  There are many open source sanitization libraries to choose from,\n  both for front end and server-side sanitization.\n\n  ```javascript\n  import { htmlSafe } from '@ember/template';\n\n  const someTrustedOrSanitizedString = \"<div>Hello!</div>\"\n\n  htmlSafe(someTrustedorSanitizedString)\n  ```\n\n  @method htmlSafe\n  @for @ember/template\n  @param str {String} The string to treat as trusted.\n  @static\n  @return {SafeString} A string that will not be HTML escaped by Handlebars.\n  @public\n*/\nconst htmlSafe = trustHTML;\n\n/**\n  Use this method to indicate that a string should be rendered as HTML\n  without escaping when the string is used in a template. To say this another way,\n  strings marked with `trustHTML` will not be HTML escaped.\n\n  A word of warning -   The `trustHTML` method does not make the string safe;\n  it only tells the framework to treat the string as if it is safe to render\n  as HTML - that we trust its contents to be safe. If a string contains user inputs or other untrusted\n  data, you must sanitize the string before using the `trustHTML` method.\n  Otherwise your code is vulnerable to\n  [Cross-Site Scripting](https://owasp.org/www-community/attacks/DOM_Based_XSS).\n  There are many open source sanitization libraries to choose from,\n  both for front end and server-side sanitization.\n\n  ```glimmer-js\n  import { trustHTML } from '@ember/template';\n\n  const someTrustedOrSanitizedString = \"<div>Hello!</div>\"\n\n  <template>\n    {{trustHTML someTrustedOrSanitizedString}}\n  </template>\n  ```\n\n  @method trustHTML\n  @for @ember/template\n  @param str {String} The string to treat as trusted.\n  @static\n  @return {TrustedHTML} A string that will not be HTML escaped by Handlebars.\n  @public\n */\nfunction trustHTML(str) {\n  if (str === null || str === undefined) {\n    str = '';\n  } else if (typeof str !== 'string') {\n    str = String(str);\n  }\n  return new TrustedHTML(str);\n}\n\n/**\n  Detects if a string was decorated using `htmlSafe`.\n\n  ```javascript\n  import { htmlSafe, isHTMLSafe } from '@ember/template';\n\n  let plainString = 'plain string';\n  let safeString = htmlSafe('<div>someValue</div>');\n\n  isHTMLSafe(plainString); // false\n  isHTMLSafe(safeString);  // true\n  ```\n\n  @method isHTMLSafe\n  @for @ember/template\n  @static\n  @return {Boolean} `true` if the string was decorated with `htmlSafe`, `false` otherwise.\n  @public\n*/\nconst isHTMLSafe = isTrustedHTML;\n\n/**\n  Detects if a string was decorated using `trustHTML`.\n\n  ```javascript\n  import { trustHTML, isTrustedHTML } from '@ember/template';\n\n  let plainString = 'plain string';\n  let safeString = trustHTML('<div>someValue</div>');\n\n  isTrustedHTML(plainString); // false\n  isTrustedHTML(safeString);  // true\n  ```\n\n  @method isTrustedHTML\n  @for @ember/template\n  @static\n  @return {Boolean} `true` if the string was decorated with `htmlSafe`, `false` otherwise.\n  @public\n*/\nfunction isTrustedHTML(str) {\n  return (\n    // SAFETY: cast `as SafeString` only present to make this check \"legal\"; we\n    // can further improve this by changing the behavior to do an `in` check\n    // instead, but that's worth landing as a separate change for bisecting if\n    // it happens to have an impact on e.g. perf.\n    str !== null && typeof str === 'object' && typeof str.toHTML === 'function'\n  );\n}\n\nfunction instrumentationPayload$1(def) {\n  // \"main\" used to be the outlet name, keeping it around for compatibility\n  return {\n    object: `${def.name}:main`\n  };\n}\nconst CAPABILITIES$2 = {\n  dynamicLayout: false,\n  dynamicTag: false,\n  prepareArgs: false,\n  createArgs: false,\n  attributeHook: false,\n  elementHook: false,\n  createCaller: false,\n  dynamicScope: true,\n  updateHook: false,\n  createInstance: true,\n  wrapped: false,\n  willDestroy: false,\n  hasSubOwner: false\n};\nconst CAPABILITIES_MASK$1 = capabilityFlagsFrom(CAPABILITIES$2);\nclass OutletComponentManager {\n  create(_owner, definition, _args, env, dynamicScope) {\n    let parentStateRef = dynamicScope.get('outletState');\n    let currentStateRef = definition.ref;\n\n    // This is the actual primary responsibility of the outlet component –\n    // it represents the switching from one route component/template into\n    // the next. The rest only exists to support the debug render tree and\n    // the old-school (and unreliable) instrumentation.\n    dynamicScope.set('outletState', currentStateRef);\n    let state = {\n      finalize: _instrumentStart('render.outlet', instrumentationPayload$1, definition)\n    };\n    if (env.debugRenderTree !== undefined) {\n      let parentState = valueForRef(parentStateRef);\n      let parentOwner = parentState?.render?.owner;\n      let currentState = valueForRef(currentStateRef);\n      let currentOwner = currentState?.render?.owner;\n      if (parentOwner && parentOwner !== currentOwner) {\n        (isDevelopingApp() && !(currentOwner instanceof EngineInstance) && assert('Expected currentOwner to be an EngineInstance', currentOwner instanceof EngineInstance));\n        let {\n          mountPoint\n        } = currentOwner;\n        if (mountPoint) {\n          state.engine = {\n            mountPoint,\n            instance: currentOwner\n          };\n        }\n      }\n    }\n    return state;\n  }\n  getDebugName({\n    name\n  }) {\n    return `{{outlet}} for ${name}`;\n  }\n  getDebugCustomRenderTree(_definition, state) {\n    let nodes = [];\n    nodes.push({\n      bucket: state,\n      type: 'outlet',\n      // \"main\" used to be the outlet name, keeping it around for compatibility\n      name: 'main',\n      args: EMPTY_ARGS,\n      instance: undefined,\n      template: undefined\n    });\n    if (state.engine) {\n      nodes.push({\n        bucket: state.engine,\n        type: 'engine',\n        name: state.engine.mountPoint,\n        args: EMPTY_ARGS,\n        instance: state.engine.instance,\n        template: undefined\n      });\n    }\n    return nodes;\n  }\n  getCapabilities() {\n    return CAPABILITIES$2;\n  }\n  getSelf() {\n    return UNDEFINED_REFERENCE;\n  }\n  didCreate() {}\n  didUpdate() {}\n  didRenderLayout(state) {\n    state.finalize();\n  }\n  didUpdateLayout() {}\n  getDestroyable() {\n    return null;\n  }\n}\nconst OUTLET_MANAGER = new OutletComponentManager();\nconst OUTLET_COMPONENT_TEMPLATE = templateFactory(\n/*\n  <@Component @controller={{@controller}} @model={{@model}} />\n*/\n{\n  \"id\": null,\n  \"block\": \"[[[8,[30,1],null,[[\\\"@controller\\\",\\\"@model\\\"],[[30,2],[30,3]]],null]],[\\\"@Component\\\",\\\"@controller\\\",\\\"@model\\\"],[]]\",\n  \"moduleName\": \"/home/runner/work/ember.js/ember.js/packages/@ember/-internals/glimmer/lib/component-managers/outlet.ts\",\n  \"isStrictMode\": true\n});\nclass OutletComponent {\n  // handle is not used by this custom definition\n  handle = -1;\n  resolvedName = null;\n  manager = OUTLET_MANAGER;\n  capabilities = CAPABILITIES_MASK$1;\n  compilable;\n  constructor(owner, state) {\n    this.state = state;\n    this.compilable = unwrapTemplate(OUTLET_COMPONENT_TEMPLATE(owner)).asLayout();\n  }\n}\nfunction createRootOutlet(outletView) {\n  return new OutletComponent(outletView.owner, outletView.state);\n}\n\nclass RootComponentManager extends CurlyComponentManager {\n  component;\n  constructor(component) {\n    super();\n    this.component = component;\n  }\n  create(_owner, _state, _args, {\n    isInteractive\n  }, dynamicScope) {\n    let component = this.component;\n    let finalizer = _instrumentStart('render.component', initialRenderInstrumentDetails, component);\n    dynamicScope.view = component;\n    let hasWrappedElement = component.tagName !== '';\n\n    // We usually do this in the `didCreateElement`, but that hook doesn't fire for tagless components\n    if (!hasWrappedElement) {\n      if (isInteractive) {\n        component.trigger('willRender');\n      }\n      component._transitionTo('hasElement');\n      if (isInteractive) {\n        component.trigger('willInsertElement');\n      }\n    }\n    if (isDevelopingApp()) {\n      processComponentInitializationAssertions(component, {});\n    }\n    let bucket = new ComponentStateBucket(component, null, CONSTANT_TAG, finalizer, hasWrappedElement, isInteractive);\n    consumeTag(component[DIRTY_TAG]);\n    return bucket;\n  }\n}\n\n// ROOT is the top-level template it has nothing but one yield.\n// it is supposed to have a dummy element\nconst ROOT_CAPABILITIES = {\n  dynamicLayout: true,\n  dynamicTag: true,\n  prepareArgs: false,\n  createArgs: false,\n  attributeHook: true,\n  elementHook: true,\n  createCaller: true,\n  dynamicScope: true,\n  updateHook: true,\n  createInstance: true,\n  wrapped: true,\n  willDestroy: false,\n  hasSubOwner: false\n};\nclass RootComponentDefinition {\n  // handle is not used by this custom definition\n  handle = -1;\n  resolvedName = '-top-level';\n  state;\n  manager;\n  capabilities = capabilityFlagsFrom(ROOT_CAPABILITIES);\n  compilable = null;\n  constructor(component) {\n    this.manager = new RootComponentManager(component);\n    let factory = getFactoryFor(component);\n    (isDevelopingApp() && !(factory !== undefined) && assert('missing factory for component', factory !== undefined));\n    this.state = factory;\n  }\n}\n\nfunction internalHelper(helper) {\n  return setInternalHelperManager(helper, {});\n}\n\n/**\n@module ember\n*/\nclass EachInWrapper {\n  constructor(inner) {\n    this.inner = inner;\n  }\n}\nconst eachIn = internalHelper(({\n  positional\n}) => {\n  const inner = positional[0];\n  (isDevelopingApp() && !(inner) && assert('expected at least one positional arg', inner));\n  return createComputeRef(() => {\n    let iterable = valueForRef(inner);\n    consumeTag(tagForObject(iterable));\n    if (isProxy(iterable)) {\n      // this is because the each-in doesn't actually get(proxy, 'key') but bypasses it\n      // and the proxy's tag is lazy updated on access\n      iterable = contentFor(iterable);\n    }\n    return new EachInWrapper(iterable);\n  });\n});\n\nfunction toIterator(iterable) {\n  if (iterable instanceof EachInWrapper) {\n    return toEachInIterator(iterable.inner);\n  } else {\n    return toEachIterator(iterable);\n  }\n}\nfunction toEachInIterator(iterable) {\n  if (!isIndexable(iterable)) {\n    return null;\n  }\n  if (Array.isArray(iterable) || isEmberArray(iterable)) {\n    return ObjectIterator.fromIndexable(iterable);\n  } else if (isNativeIterable(iterable)) {\n    return MapLikeNativeIterator.from(iterable);\n  } else if (hasForEach(iterable)) {\n    return ObjectIterator.fromForEachable(iterable);\n  } else {\n    return ObjectIterator.fromIndexable(iterable);\n  }\n}\nfunction toEachIterator(iterable) {\n  if (!isObject(iterable)) {\n    return null;\n  }\n  if (Array.isArray(iterable)) {\n    return ArrayIterator.from(iterable);\n  } else if (isEmberArray(iterable)) {\n    return EmberArrayIterator.from(iterable);\n  } else if (isNativeIterable(iterable)) {\n    return ArrayLikeNativeIterator.from(iterable);\n  } else if (hasForEach(iterable)) {\n    return ArrayIterator.fromForEachable(iterable);\n  } else {\n    return null;\n  }\n}\nclass BoundedIterator {\n  position = 0;\n  constructor(length) {\n    this.length = length;\n  }\n  isEmpty() {\n    return false;\n  }\n  memoFor(position) {\n    return position;\n  }\n  next() {\n    let {\n      length,\n      position\n    } = this;\n    if (position >= length) {\n      return null;\n    }\n    let value = this.valueFor(position);\n    let memo = this.memoFor(position);\n    this.position++;\n    return {\n      value,\n      memo\n    };\n  }\n}\nclass ArrayIterator extends BoundedIterator {\n  static from(iterable) {\n    return iterable.length > 0 ? new this(iterable) : null;\n  }\n  static fromForEachable(object) {\n    let array = [];\n    object.forEach(item => array.push(item));\n    return this.from(array);\n  }\n  constructor(array) {\n    super(array.length);\n    this.array = array;\n  }\n  valueFor(position) {\n    return this.array[position];\n  }\n}\nclass EmberArrayIterator extends BoundedIterator {\n  static from(iterable) {\n    return iterable.length > 0 ? new this(iterable) : null;\n  }\n  constructor(array) {\n    super(array.length);\n    this.array = array;\n  }\n  valueFor(position) {\n    return objectAt(this.array, position);\n  }\n}\nclass ObjectIterator extends BoundedIterator {\n  static fromIndexable(obj) {\n    let keys = Object.keys(obj);\n    if (keys.length === 0) {\n      return null;\n    } else {\n      let values = [];\n      for (let key of keys) {\n        let value;\n        value = obj[key];\n\n        // Add the tag of the returned value if it is an array, since arrays\n        // should always cause updates if they are consumed and then changed\n        if (isTracking()) {\n          consumeTag(tagFor(obj, key));\n          if (Array.isArray(value)) {\n            consumeTag(tagFor(value, '[]'));\n          }\n        }\n        values.push(value);\n      }\n      return new this(keys, values);\n    }\n  }\n  static fromForEachable(obj) {\n    let keys = [];\n    let values = [];\n    let length = 0;\n    let isMapLike = false;\n\n    // Not using an arrow function here so we can get an accurate `arguments`\n    obj.forEach(function (value, key) {\n      isMapLike = isMapLike || arguments.length >= 2;\n      if (isMapLike) {\n        keys.push(key);\n      }\n      values.push(value);\n      length++;\n    });\n    if (length === 0) {\n      return null;\n    } else if (isMapLike) {\n      return new this(keys, values);\n    } else {\n      return new ArrayIterator(values);\n    }\n  }\n  constructor(keys, values) {\n    super(values.length);\n    this.keys = keys;\n    this.values = values;\n  }\n  valueFor(position) {\n    return this.values[position];\n  }\n  memoFor(position) {\n    return this.keys[position];\n  }\n}\nclass NativeIterator {\n  static from(iterable) {\n    let iterator = iterable[Symbol.iterator]();\n    let result = iterator.next();\n    let {\n      done\n    } = result;\n    if (done) {\n      return null;\n    } else {\n      return new this(iterator, result);\n    }\n  }\n  position = 0;\n  constructor(iterable, result) {\n    this.iterable = iterable;\n    this.result = result;\n  }\n  isEmpty() {\n    return false;\n  }\n  next() {\n    let {\n      iterable,\n      result,\n      position\n    } = this;\n    if (result.done) {\n      return null;\n    }\n    let value = this.valueFor(result, position);\n    let memo = this.memoFor(result, position);\n    this.position++;\n    this.result = iterable.next();\n    return {\n      value,\n      memo\n    };\n  }\n}\nclass ArrayLikeNativeIterator extends NativeIterator {\n  valueFor(result) {\n    return result.value;\n  }\n  memoFor(_result, position) {\n    return position;\n  }\n}\nclass MapLikeNativeIterator extends NativeIterator {\n  valueFor(result) {\n    return result.value[1];\n  }\n  memoFor(result) {\n    return result.value[0];\n  }\n}\nfunction hasForEach(value) {\n  return value != null && typeof value['forEach'] === 'function';\n}\nfunction isNativeIterable(value) {\n  return value != null && typeof value[Symbol.iterator] === 'function';\n}\nfunction isIndexable(value) {\n  return value !== null && (typeof value === 'object' || typeof value === 'function');\n}\n\nfunction toBool(predicate) {\n  if (isProxy(predicate)) {\n    consumeTag(tagForProperty(predicate, 'content'));\n    return Boolean(get(predicate, 'isTruthy'));\n  } else if (isArray(predicate)) {\n    consumeTag(tagForProperty(predicate, '[]'));\n    return predicate.length !== 0;\n  } else if (isHTMLSafe(predicate)) {\n    return Boolean(predicate.toString());\n  } else {\n    return Boolean(predicate);\n  }\n}\n\nsetGlobalContext({\n  scheduleRevalidate() {\n    _backburner.ensureInstance();\n  },\n  toBool,\n  toIterator,\n  getProp: _getProp,\n  setProp: _setProp,\n  getPath: get,\n  setPath: set,\n  scheduleDestroy(destroyable, destructor) {\n    schedule('actions', null, destructor, destroyable);\n  },\n  scheduleDestroyed(finalizeDestructor) {\n    schedule('destroy', null, finalizeDestructor);\n  },\n  warnIfStyleNotTrusted(value) {\n    (isDevelopingApp() && warn(constructStyleDeprecationMessage(String(value)), (() => {\n      if (value === null || value === undefined || isHTMLSafe(value)) {\n        return true;\n      }\n      return false;\n    })(), {\n      id: 'ember-htmlbars.style-xss-warning'\n    }));\n  },\n  assert(test, msg, options) {\n    if (isDevelopingApp()) {\n      let id = options?.id;\n      let override = VM_ASSERTION_OVERRIDES.filter(o => o.id === id)[0];\n      (isDevelopingApp() && !(test) && assert(override?.message ?? msg, test));\n    }\n  },\n  deprecate(msg, test, options) {\n    if (isDevelopingApp()) {\n      let {\n        id\n      } = options;\n      if (id === 'argument-less-helper-paren-less-invocation') {\n        throw new Error(`A resolved helper cannot be passed as a named argument as the syntax is ` + `ambiguously a pass-by-reference or invocation. Use the ` + `\\`{{helper 'foo-helper}}\\` helper to pass by reference or explicitly ` + `invoke the helper with parens: \\`{{(fooHelper)}}\\`.`);\n      }\n      let override = VM_DEPRECATION_OVERRIDES.filter(o => o.id === id)[0];\n      if (!override) throw new Error(`deprecation override for ${id} not found`);\n\n      // allow deprecations to be disabled in the VM_DEPRECATION_OVERRIDES array below\n      if (!override.disabled) {\n        (isDevelopingApp() && !(Boolean(test)) && deprecate(override.message ?? msg, Boolean(test), override));\n      }\n    }\n  }\n});\nif (isDevelopingApp()) {\n  debug?.setTrackingTransactionEnv?.({\n    debugMessage(obj, keyName) {\n      let dirtyString = keyName ? `\\`${keyName}\\` on \\`${getDebugName?.(obj)}\\`` : `\\`${getDebugName?.(obj)}\\``;\n      return `You attempted to update ${dirtyString}, but it had already been used previously in the same computation.  Attempting to update a value after using it in a computation can cause logical errors, infinite revalidation bugs, and performance issues, and is not supported.`;\n    }\n  });\n}\n\n///////////\n\n// VM Assertion/Deprecation overrides\n\nconst VM_DEPRECATION_OVERRIDES = [{\n  id: 'setting-on-hash',\n  until: '4.4.0',\n  for: 'ember-source',\n  since: {\n    available: '3.28.0',\n    enabled: '3.28.0'\n  }\n}];\nconst VM_ASSERTION_OVERRIDES = [];\n\n///////////\n\n// Define environment delegate\n\nclass EmberEnvironmentDelegate {\n  enableDebugTooling = ENV._DEBUG_RENDER_TREE;\n  constructor(owner, isInteractive) {\n    this.owner = owner;\n    this.isInteractive = isInteractive;\n  }\n  onTransactionCommit() {}\n}\n\n/**\n@module ember\n*/\nconst disallowDynamicResolution = internalHelper(({\n  positional,\n  named\n}) => {\n  const nameOrValueRef = positional[0];\n  (isDevelopingApp() && !(positional.length === 1 && nameOrValueRef) && assert(`[BUG] wrong number of positional arguments, expecting 1, got ${positional.length}`, positional.length === 1 && nameOrValueRef));\n  let typeRef = named['type'];\n  let locRef = named['loc'];\n  let originalRef = named['original'];\n  (isDevelopingApp() && !(typeRef) && assert(`[BUG] expecting \\`type\\` named argument`, typeRef));\n  (isDevelopingApp() && !(locRef) && assert(`[BUG] expecting \\`loc\\` named argument`, locRef));\n  (isDevelopingApp() && !(originalRef) && assert(`[BUG] expecting \\`original\\` named argument`, originalRef)); // Bug: why do these fail?\n  // assert('[BUG] expecting a string literal for the `type` argument', isConstRef(typeRef));\n  // assert('[BUG] expecting a string literal for the `loc` argument', isConstRef(locRef));\n  // assert('[BUG] expecting a string literal for the `original` argument', isConstRef(originalRef));\n  const type = valueForRef(typeRef);\n  const loc = valueForRef(locRef);\n  const original = valueForRef(originalRef);\n  (isDevelopingApp() && !(typeof type === 'string') && assert('[BUG] expecting a string literal for the `type` argument', typeof type === 'string'));\n  (isDevelopingApp() && !(typeof loc === 'string') && assert('[BUG] expecting a string literal for the `loc` argument', typeof loc === 'string'));\n  (isDevelopingApp() && !(typeof original === 'string') && assert('[BUG] expecting a string literal for the `original` argument', typeof original === 'string'));\n  return createComputeRef(() => {\n    let nameOrValue = valueForRef(nameOrValueRef);\n    (isDevelopingApp() && !(typeof nameOrValue !== 'string') && assert(`Passing a dynamic string to the \\`(${type})\\` keyword is disallowed. ` + `(You specified \\`(${type} ${original})\\` and \\`${original}\\` evaluated into \"${nameOrValue}\".) ` + `This ensures we can statically analyze the template and determine which ${type}s are used. ` + `If the ${type} name is always the same, use a string literal instead, i.e. \\`(${type} \"${nameOrValue}\")\\`. ` + `Otherwise, import the ${type}s into JavaScript and pass them directly. ` + 'See https://github.com/emberjs/rfcs/blob/master/text/0496-handlebars-strict-mode.md#4-no-dynamic-resolution for details. ' + loc, typeof nameOrValue !== 'string'));\n    return nameOrValue;\n  });\n});\n\nlet helper;\nif (isDevelopingApp()) {\n  helper = args => {\n    const inner = args.positional[0];\n    (isDevelopingApp() && !(inner) && assert('expected at least one positional arg', inner));\n    return createComputeRef(() => {\n      let value = valueForRef(inner);\n      (isDevelopingApp() && !(value !== null && value !== undefined) && assert('You cannot pass a null or undefined destination element to in-element', value !== null && value !== undefined));\n      return value;\n    });\n  };\n} else {\n  helper = args => {\n    let arg = args.positional[0];\n    (isDevelopingApp() && !(arg) && assert('expected at least one positional arg', arg));\n    return arg;\n  };\n}\nconst inElementNullCheckHelper = internalHelper(helper);\n\nconst normalizeClassHelper = internalHelper(({\n  positional\n}) => {\n  return createComputeRef(() => {\n    let classNameArg = positional[0];\n    let valueArg = positional[1];\n    (isDevelopingApp() && !(classNameArg && valueArg) && assert('expected at least two positional args', classNameArg && valueArg));\n    let classNameParts = valueForRef(classNameArg).split('.');\n    let className = classNameParts[classNameParts.length - 1];\n    (isDevelopingApp() && !(className) && assert('has className', className)); // Always at least one split result\n    let value = valueForRef(valueArg);\n    if (value === true) {\n      return dasherize(className);\n    } else if (!value && value !== 0) {\n      return '';\n    } else {\n      return String(value);\n    }\n  });\n});\n\n/**\n  @module ember\n*/\n\nconst resolve = internalHelper(({\n  positional\n}, owner) => {\n  // why is this allowed to be undefined in the first place?\n  (isDevelopingApp() && !(owner) && assert('[BUG] missing owner', owner));\n  (isDevelopingApp() && !(positional.length === 1) && assert(`[BUG] wrong number of positional arguments, expecting 1, got ${positional.length}`, positional.length === 1));\n  let fullNameRef = positional[0];\n  (isDevelopingApp() && !(fullNameRef && isConstRef(fullNameRef)) && assert('[BUG] expecting a string literal as argument', fullNameRef && isConstRef(fullNameRef)));\n  let fullName = valueForRef(fullNameRef);\n  (isDevelopingApp() && !(typeof fullName === 'string') && assert('[BUG] expecting a string literal as argument', typeof fullName === 'string'));\n  (isDevelopingApp() && !((s => s.split(':').length === 2)(fullName)) && assert('[BUG] expecting a valid full name', (s => s.split(':').length === 2)(fullName)));\n  if (isDevelopingApp()) {\n    let [type, name] = fullName.split(':');\n    (isDevelopingApp() && !(owner.hasRegistration(fullName)) && assert(`Attempted to invoke \\`(-resolve \"${fullName}\")\\`, but ${name} was not a valid ${type} name.`, owner.hasRegistration(fullName)));\n  }\n  return createConstRef(owner.factoryFor(fullName)?.class, `(-resolve \"${fullName}\")`);\n});\n\n/**\n@module ember\n*/\nconst trackArray = internalHelper(({\n  positional\n}) => {\n  const inner = positional[0];\n  (isDevelopingApp() && !(inner) && assert('expected at least one positional arg', inner));\n  return createComputeRef(() => {\n    let iterable = valueForRef(inner);\n    if (isObject(iterable)) {\n      consumeTag(tagForProperty(iterable, '[]'));\n    }\n    return iterable;\n  });\n});\n\n/**\n@module ember\n*/\nconst mut = internalHelper(({\n  positional\n}) => {\n  let ref = positional[0];\n  (isDevelopingApp() && !(ref) && assert('expected at least one positional arg', ref)); // TODO: Improve this error message. This covers at least two distinct\n  // cases:\n  //\n  // 1. (mut \"not a path\") – passing a literal, result from a helper\n  //    invocation, etc\n  //\n  // 2. (mut receivedValue) – passing a value received from the caller\n  //    that was originally derived from a literal, result from a helper\n  //    invocation, etc\n  //\n  // This message is alright for the first case, but could be quite\n  // confusing for the second case.\n  (isDevelopingApp() && !(isUpdatableRef(ref)) && assert('You can only pass a path to mut', isUpdatableRef(ref)));\n  return createInvokableRef(ref);\n});\n\n/**\n@module ember\n*/\n\nconst readonly = internalHelper(({\n  positional\n}) => {\n  let firstArg = positional[0];\n  (isDevelopingApp() && !(firstArg) && assert('has first arg', firstArg));\n  return createReadOnlyRef(firstArg);\n});\n\n/**\n@module ember\n*/\n\nconst unbound = internalHelper(({\n  positional,\n  named\n}) => {\n  (isDevelopingApp() && !(positional.length === 1 && Object.keys(named).length === 0) && assert('unbound helper cannot be called with multiple params or hash params', positional.length === 1 && Object.keys(named).length === 0));\n  return createUnboundRef(valueForRef(positional[0]), '(result of an `unbound` helper)');\n});\n\n/**\n@module ember\n*/\n\nconst uniqueId = internalHelper(() => {\n  // SAFETY: glimmer-vm should change the signature of createUnboundRef to use a generic\n  //         so that the type param to `Reference<?>` can infer from the first argument.\n  //\n  // NOTE: constRef is an optimization so we don't let the VM create extra wrappers,\n  //       tracking frames, etc.\n  return createConstRef(uniqueId$1(), 'unique-id');\n});\n\n// From https://gist.github.com/selfish/fef2c0ba6cdfe07af76e64cecd74888b\n//\n// This code should be reasonably fast, and provide a unique value every time\n// it's called, which is what we need here. It produces a string formatted as a\n// standard UUID, which avoids accidentally turning Ember-specific\n// implementation details into an intimate API. It also ensures that the UUID\n// always starts with a letter, to avoid creating invalid IDs with a numeric\n// digit at the start.\nfunction uniqueId$1() {\n  // @ts-expect-error this one-liner abuses weird JavaScript semantics that\n  // TypeScript (legitimately) doesn't like, but they're nonetheless valid and\n  // specced.\n  return ([3e7] + -1e3 + -4e3 + -2e3 + -1e11).replace(/[0-3]/g, a => (a * 4 ^ Math.random() * 16 >> (a & 2)).toString(16));\n}\n\nconst CAPABILITIES$1 = {\n  dynamicLayout: true,\n  dynamicTag: false,\n  prepareArgs: false,\n  createArgs: true,\n  attributeHook: false,\n  elementHook: false,\n  createCaller: true,\n  dynamicScope: true,\n  updateHook: true,\n  createInstance: true,\n  wrapped: false,\n  willDestroy: false,\n  hasSubOwner: true\n};\nclass MountManager {\n  getDynamicLayout(state) {\n    let templateFactory = state.engine.lookup('template:application');\n    return unwrapTemplate(templateFactory(state.engine)).asLayout();\n  }\n  getCapabilities() {\n    return CAPABILITIES$1;\n  }\n  getOwner(state) {\n    return state.engine;\n  }\n  create(owner, {\n    name\n  }, args, env) {\n    // TODO\n    // mount is a runtime helper, this shouldn't use dynamic layout\n    // we should resolve the engine app template in the helper\n    // it also should use the owner that looked up the mount helper.\n    (isDevelopingApp() && !(owner instanceof EngineInstance) && assert('Expected owner to be an EngineInstance', owner instanceof EngineInstance));\n    let engine = owner.buildChildEngineInstance(name);\n    engine.boot();\n    let applicationFactory = engine.factoryFor(`controller:application`);\n    let controllerFactory = applicationFactory || generateControllerFactory(engine, 'application');\n    let controller;\n    let self;\n    let bucket;\n    let modelRef;\n    if (args.named.has('model')) {\n      modelRef = args.named.get('model');\n    }\n    if (modelRef === undefined) {\n      controller = controllerFactory.create();\n      self = createConstRef(controller, 'this');\n      bucket = {\n        engine,\n        controller,\n        self,\n        modelRef\n      };\n    } else {\n      let model = valueForRef(modelRef);\n      controller = controllerFactory.create({\n        model\n      });\n      self = createConstRef(controller, 'this');\n      bucket = {\n        engine,\n        controller,\n        self,\n        modelRef\n      };\n    }\n    if (env.debugRenderTree) {\n      associateDestroyableChild(engine, controller);\n    }\n    return bucket;\n  }\n  getDebugName({\n    name\n  }) {\n    return name;\n  }\n  getDebugCustomRenderTree(definition, state, args, templateModuleName) {\n    return [{\n      bucket: state.engine,\n      instance: state.engine,\n      type: 'engine',\n      name: definition.name,\n      args\n    }, {\n      bucket: state.controller,\n      instance: state.controller,\n      type: 'route-template',\n      name: 'application',\n      args,\n      template: templateModuleName\n    }];\n  }\n  getSelf({\n    self\n  }) {\n    return self;\n  }\n  getDestroyable(bucket) {\n    return bucket.engine;\n  }\n  didCreate() {}\n  didUpdate() {}\n  didRenderLayout() {}\n  didUpdateLayout() {}\n  update(bucket) {\n    let {\n      controller,\n      modelRef\n    } = bucket;\n    if (modelRef !== undefined) {\n      controller.set('model', valueForRef(modelRef));\n    }\n  }\n}\nconst MOUNT_MANAGER = new MountManager();\nclass MountDefinition {\n  // handle is not used by this custom definition\n  handle = -1;\n  state;\n  manager = MOUNT_MANAGER;\n  compilable = null;\n  capabilities = capabilityFlagsFrom(CAPABILITIES$1);\n  constructor(resolvedName) {\n    this.resolvedName = resolvedName;\n    this.state = {\n      name: resolvedName\n    };\n  }\n}\n\n/**\n@module ember\n*/\n\nconst mountHelper = internalHelper((args, owner) => {\n  (isDevelopingApp() && !(owner) && assert('{{mount}} must be used within a component that has an owner', owner));\n  let nameRef = args.positional[0];\n  let captured;\n  (isDevelopingApp() && !(args.positional.length === 1) && assert('You can only pass a single positional argument to the {{mount}} helper, e.g. {{mount \"chat-engine\"}}.', args.positional.length === 1));\n  if (isDevelopingApp() && args.named) {\n    let keys = Object.keys(args.named);\n    let extra = keys.filter(k => k !== 'model');\n    (isDevelopingApp() && !(extra.length === 0) && assert('You can only pass a `model` argument to the {{mount}} helper, ' + 'e.g. {{mount \"profile-engine\" model=this.profile}}. ' + `You passed ${extra.join(',')}.`, extra.length === 0));\n  }\n  captured = createCapturedArgs(args.named, EMPTY_POSITIONAL);\n  let lastName, lastDef;\n  return createComputeRef(() => {\n    let name = valueForRef(nameRef);\n    if (typeof name === 'string') {\n      if (lastName === name) {\n        return lastDef;\n      }\n      (isDevelopingApp() && !(owner.hasRegistration(`engine:${name}`)) && assert(`You used \\`{{mount '${name}'}}\\`, but the engine '${name}' can not be found.`, owner.hasRegistration(`engine:${name}`)));\n      lastName = name;\n      lastDef = curry(0, new MountDefinition(name), owner, captured, true);\n      return lastDef;\n    } else {\n      (isDevelopingApp() && !(name === null || name === undefined) && assert(`Invalid engine name '${name}' specified, engine name must be either a string, null or undefined.`, name === null || name === undefined));\n      lastDef = null;\n      lastName = null;\n      return null;\n    }\n  });\n});\n\nconst CAPABILITIES = {\n  dynamicLayout: false,\n  dynamicTag: false,\n  prepareArgs: false,\n  createArgs: true,\n  attributeHook: false,\n  elementHook: false,\n  createCaller: false,\n  dynamicScope: false,\n  updateHook: false,\n  createInstance: true,\n  wrapped: false,\n  willDestroy: false,\n  hasSubOwner: false\n};\nconst CAPABILITIES_MASK = capabilityFlagsFrom(CAPABILITIES);\nclass RouteTemplateManager {\n  create(_owner, _definition, args) {\n    let self = args.named.get('controller');\n    if (isDevelopingApp()) {\n      self = createDebugAliasRef('this', self);\n    }\n    let controller = valueForRef(self);\n    return {\n      self,\n      controller\n    };\n  }\n  getSelf({\n    self\n  }) {\n    return self;\n  }\n  getDebugName({\n    name\n  }) {\n    return `route-template (${name})`;\n  }\n  getDebugCustomRenderTree({\n    name,\n    templateName\n  }, state, args) {\n    return [{\n      bucket: state,\n      type: 'route-template',\n      name,\n      args,\n      instance: state.controller,\n      template: templateName\n    }];\n  }\n  getCapabilities() {\n    return CAPABILITIES;\n  }\n  didRenderLayout() {}\n  didUpdateLayout() {}\n  didCreate() {}\n  didUpdate() {}\n  getDestroyable() {\n    return null;\n  }\n}\nconst ROUTE_TEMPLATE_MANAGER = new RouteTemplateManager();\n\n/**\n * This \"upgrades\" a route template into a invocable component. Conceptually\n * it can be 1:1 for each unique `Template`, but it's also cheap to construct,\n * so unless the stability is desirable for other reasons, it's probably not\n * worth caching this.\n */\nclass RouteTemplate {\n  // handle is not used by this custom definition\n  handle = -1;\n  resolvedName;\n  state;\n  manager = ROUTE_TEMPLATE_MANAGER;\n  capabilities = CAPABILITIES_MASK;\n  compilable;\n  constructor(name, template) {\n    let unwrapped = unwrapTemplate(template);\n    // TODO This actually seems inaccurate – it ultimately came from the\n    // outlet's name. Also, setting this overrides `getDebugName()` in that\n    // message. Is that desirable?\n    this.resolvedName = name;\n    this.state = {\n      name,\n      templateName: unwrapped.moduleName\n    };\n    this.compilable = unwrapped.asLayout();\n  }\n}\n\n// TODO a lot these fields are copied from the adjacent existing components\n// implementation, haven't looked into who cares about `ComponentDefinition`\n// and if it is appropriate here. It seems like this version is intended to\n// be used with `curry` which probably isn't necessary here. It could be the\n// case that we just want to do something more similar to `InternalComponent`\n// (the one we used to implement `Input` and `LinkTo`). For now it follows\n// the same pattern to get things going.\nfunction makeRouteTemplate(owner, name, template) {\n  let routeTemplate = new RouteTemplate(name, template);\n  return curry(0, routeTemplate, owner, null, true);\n}\n\n/**\n  The `{{outlet}}` helper lets you specify where a child route will render in\n  your template. An important use of the `{{outlet}}` helper is in your\n  application's `application.hbs` file:\n\n  ```app/templates/application.hbs\n  <MyHeader />\n\n  <div class=\"my-dynamic-content\">\n    <!-- this content will change based on the current route, which depends on the current URL -->\n    {{outlet}}\n  </div>\n\n  <MyFooter />\n  ```\n\n  See the [routing guide](https://guides.emberjs.com/release/routing/rendering-a-template/) for more\n  information on how your `route` interacts with the `{{outlet}}` helper.\n  Note: Your content __will not render__ if there isn't an `{{outlet}}` for it.\n\n  @method outlet\n  @for Ember.Templates.helpers\n  @public\n*/\nconst outletHelper = internalHelper((_args, owner, scope) => {\n  (isDevelopingApp() && !(owner) && assert('Expected owner to be present, {{outlet}} requires an owner', owner));\n  (isDevelopingApp() && !(scope) && assert('Expected dynamic scope to be present. You may have attempted to use the {{outlet}} keyword dynamically. This keyword cannot be used dynamically.', scope));\n  let outletRef = createComputeRef(() => {\n    let state = valueForRef(scope.get('outletState'));\n    return state?.outlets?.main;\n  });\n  let lastState = null;\n  let outlet = null;\n  return createComputeRef(() => {\n    let outletState = valueForRef(outletRef);\n    let state = stateFor(outletRef, outletState);\n\n    // This code is deliberately using the behavior in glimmer-vm where in\n    // <@Component />, the component is considered stabled via `===`, and\n    // will continue to re-render in-place as long as the `===` holds, but\n    // when it changes to a different object, it teardown the old component\n    // (running destructors, etc), and render the component in its place (or\n    // nothing if the new value is nullish. Here we are carefully exploiting\n    // that fact, and returns the same stable object so long as it is the\n    // same route, but return a different one when the route changes. On the\n    // other hand, changing the model only intentionally do not teardown the\n    // component and instead re-render in-place.\n    if (!isStable(state, lastState)) {\n      lastState = state;\n      if (state !== null) {\n        // If we are crossing an engine mount point, this is how the owner\n        // gets switched.\n        let outletOwner = outletState?.render?.owner ?? owner;\n        let named = dict();\n\n        // Here we either have a raw template that needs to be normalized,\n        // or a component that we can render as-is. `RouteTemplate` upgrades\n        // the template into a component so we can have a unified code path.\n        // We still store the original `template` value, because we rely on\n        // its identity for the stability check, and the `RouteTemplate`\n        // wrapper doesn't dedup for us.\n        let template = state.template;\n        let component;\n        if (hasInternalComponentManager(template)) {\n          component = template;\n        } else {\n          if (isDevelopingApp()) {\n            // We don't appear to have a standard way or a brand to check, but for the\n            // purpose of avoiding obvious user errors, this probably gets you close\n            // enough.\n            let isTemplate = template => {\n              if (template === null || typeof template !== 'object') {\n                return false;\n              } else {\n                let t = template;\n                return t.result === 'ok' || t.result === 'error';\n              }\n            };\n\n            // We made it past the `TemplateFactory` instantiation before\n            // getting here, so either we got unlucky where the invalid type\n            // happens to be a function that didn't mind taking owner as an\n            // argument, or this was directly set by something like test\n            // helpers.\n            if (!isTemplate(template)) {\n              let label;\n              try {\n                label = `\\`${String(template)}\\``;\n              } catch {\n                label = 'an unknown object';\n              }\n              (isDevelopingApp() && true && assert(`Failed to render the \\`${state.name}\\` route: expected ` + `a component or Template object, but got ${label}.`));\n            }\n          }\n          component = makeRouteTemplate(outletOwner, state.name, template);\n        }\n\n        // Component is stable for the lifetime of the outlet\n        named['Component'] = createConstRef(component, '@Component');\n\n        // Controller is stable for the lifetime of the outlet\n        named['controller'] = createConstRef(state.controller, '@controller');\n\n        // Create a ref for the model\n        let modelRef = childRefFromParts(outletRef, ['render', 'model']);\n\n        // Store the value of the model\n        let model = valueForRef(modelRef);\n\n        // Create a compute ref which we pass in as the `{{@model}}` reference\n        // for the outlet. This ref will update and return the value of the\n        // model _until_ the outlet itself changes. Once the outlet changes,\n        // dynamic scope also changes, and so the original model ref would not\n        // provide the correct updated value. So we stop updating and return\n        // the _last_ model value for that outlet.\n        named['model'] = createComputeRef(() => {\n          if (lastState === state) {\n            model = valueForRef(modelRef);\n          }\n          return model;\n        });\n        if (isDevelopingApp()) {\n          named['model'] = createDebugAliasRef('@model', named['model']);\n        }\n        let args = createCapturedArgs(named, EMPTY_POSITIONAL);\n\n        // Package up everything\n        outlet = curry(0, new OutletComponent(owner, state), outletOwner, args, true);\n      } else {\n        outlet = null;\n      }\n    }\n    return outlet;\n  });\n});\nfunction stateFor(ref, outlet) {\n  if (outlet === undefined) return null;\n  let render = outlet.render;\n  if (render === undefined) return null;\n  let template = render.template;\n  // The type doesn't actually allow for `null`, but if we make it past this\n  // point it is really important that we have _something_ to render. We could\n  // assert, but that is probably overly strict for very little to gain.\n  if (template === undefined || template === null) return null;\n  return {\n    ref,\n    name: render.name,\n    template,\n    controller: render.controller\n  };\n}\nfunction isStable(state, lastState) {\n  if (state === null || lastState === null) {\n    return false;\n  }\n  return state.template === lastState.template && state.controller === lastState.controller;\n}\n\nfunction instrumentationPayload(name) {\n  return {\n    object: `component:${name}`\n  };\n}\nfunction componentFor(name, owner) {\n  let fullName = `component:${name}`;\n  return owner.factoryFor(fullName) || null;\n}\nfunction lookupComponentPair(owner, name) {\n  let component = componentFor(name, owner);\n  if (isFactory(component) && component.class) {\n    let layout = getComponentTemplate(component.class);\n    if (layout !== undefined) {\n      return {\n        component,\n        layout\n      };\n    }\n  }\n  if (component === null) {\n    return null;\n  } else {\n    return {\n      component,\n      layout: null\n    };\n  }\n}\nconst BUILTIN_KEYWORD_HELPERS = {\n  mut,\n  readonly,\n  unbound,\n  '-hash': hash,\n  '-each-in': eachIn,\n  '-normalize-class': normalizeClassHelper,\n  '-resolve': resolve,\n  '-track-array': trackArray,\n  '-mount': mountHelper,\n  '-outlet': outletHelper,\n  '-in-el-null': inElementNullCheckHelper\n};\nconst BUILTIN_HELPERS = {\n  ...BUILTIN_KEYWORD_HELPERS,\n  array,\n  concat,\n  fn,\n  get: get$1,\n  hash,\n  'unique-id': uniqueId\n};\nif (isDevelopingApp()) {\n  BUILTIN_HELPERS['-disallow-dynamic-resolution'] = disallowDynamicResolution;\n} else {\n  // Bug: this may be a quirk of our test setup?\n  // In prod builds, this is a no-op helper and is unused in practice. We shouldn't need\n  // to add it at all, but the current test build doesn't produce a \"prod compiler\", so\n  // we ended up running the debug-build for the template compliler in prod tests. Once\n  // that is fixed, this can be removed. For now, this allows the test to work and does\n  // not really harm anything, since it's just a no-op pass-through helper and the bytes\n  // has to be included anyway. In the future, perhaps we can avoid the latter by using\n  // `import(...)`?\n  BUILTIN_HELPERS['-disallow-dynamic-resolution'] = disallowDynamicResolution;\n}\n\n// With the implementation of RFC #1006(https://rfcs.emberjs.com/id/1006-deprecate-action-template-helper), the `action` modifer was removed. It was the\n// only built-in keyword modifier, so this object is currently empty.\nconst BUILTIN_KEYWORD_MODIFIERS = {};\nconst BUILTIN_MODIFIERS = {\n  ...BUILTIN_KEYWORD_MODIFIERS,\n  on: on$1\n};\nconst CLASSIC_HELPER_MANAGER_ASSOCIATED = new WeakSet();\nclass ResolverImpl {\n  componentDefinitionCache = new Map();\n  lookupPartial() {\n    return null;\n  }\n  lookupHelper(name, owner) {\n    (isDevelopingApp() && !(!(BUILTIN_HELPERS[name] && owner.hasRegistration(`helper:${name}`))) && assert(`You attempted to overwrite the built-in helper \"${name}\" which is not allowed. Please rename the helper.`, !(BUILTIN_HELPERS[name] && owner.hasRegistration(`helper:${name}`))));\n    let helper = BUILTIN_HELPERS[name];\n    if (helper !== undefined) {\n      return helper;\n    }\n    let factory = owner.factoryFor(`helper:${name}`);\n    if (factory === undefined) {\n      return null;\n    }\n    let definition = factory.class;\n    if (definition === undefined) {\n      return null;\n    }\n    if (typeof definition === 'function' && isClassicHelper(definition)) {\n      // For classic class based helpers, we need to pass the factoryFor result itself rather\n      // than the raw value (`factoryFor(...).class`). This is because injections are already\n      // bound in the factoryFor result, including type-based injections\n\n      if (isDevelopingApp()) {\n        // In DEBUG we need to only set the associated value once, otherwise\n        // we'll trigger an assertion\n        if (!CLASSIC_HELPER_MANAGER_ASSOCIATED.has(factory)) {\n          CLASSIC_HELPER_MANAGER_ASSOCIATED.add(factory);\n          setInternalHelperManager(CLASSIC_HELPER_MANAGER, factory);\n        }\n      } else {\n        setInternalHelperManager(CLASSIC_HELPER_MANAGER, factory);\n      }\n      return factory;\n    }\n    return definition;\n  }\n  lookupBuiltInHelper(name) {\n    return BUILTIN_KEYWORD_HELPERS[name] ?? null;\n  }\n  lookupModifier(name, owner) {\n    let builtin = BUILTIN_MODIFIERS[name];\n    if (builtin !== undefined) {\n      return builtin;\n    }\n    let modifier = owner.factoryFor(`modifier:${name}`);\n    if (modifier === undefined) {\n      return null;\n    }\n    return modifier.class || null;\n  }\n  lookupBuiltInModifier(name) {\n    return BUILTIN_KEYWORD_MODIFIERS[name] ?? null;\n  }\n  lookupComponent(name, owner) {\n    let pair = lookupComponentPair(owner, name);\n    if (pair === null) {\n      (isDevelopingApp() && !(name !== 'text-area') && assert('Could not find component `<TextArea />` (did you mean `<Textarea />`?)', name !== 'text-area'));\n      return null;\n    }\n    let template = null;\n    let key;\n    if (pair.component === null) {\n      key = template = pair.layout(owner);\n    } else {\n      key = pair.component;\n    }\n    let cachedComponentDefinition = this.componentDefinitionCache.get(key);\n    if (cachedComponentDefinition !== undefined) {\n      return cachedComponentDefinition;\n    }\n    if (template === null && pair.layout !== null) {\n      template = pair.layout(owner);\n    }\n    let finalizer = _instrumentStart('render.getComponentDefinition', instrumentationPayload, name);\n    let definition = null;\n    if (pair.component === null) {\n      definition = {\n        state: templateOnlyComponent(undefined, name),\n        manager: TEMPLATE_ONLY_COMPONENT_MANAGER,\n        template\n      };\n    } else {\n      let factory = pair.component;\n      (isDevelopingApp() && !(factory.class !== undefined) && assert(`missing component class ${name}`, factory.class !== undefined));\n      let ComponentClass = factory.class;\n      let manager = getInternalComponentManager(ComponentClass);\n      definition = {\n        state: isCurlyManager(manager) ? factory : ComponentClass,\n        manager,\n        template\n      };\n    }\n    finalizer();\n    this.componentDefinitionCache.set(key, definition);\n    (isDevelopingApp() && !(!(definition === null && name === 'text-area')) && assert('Could not find component `<TextArea />` (did you mean `<Textarea />`?)', !(definition === null && name === 'text-area')));\n    return definition;\n  }\n}\n\n// We use the `InternalOwner` notion here because we actually need all of its\n// API for using with renderers (normally, it will be `EngineInstance`).\n// We use `getOwner` from our internal home for it rather than the narrower\n// public API for the same reason.\nconst TOP_LEVEL_NAME = '-top-level';\nclass OutletView {\n  static extend(injections) {\n    return class extends OutletView {\n      static create(options) {\n        if (options) {\n          return super.create(Object.assign({}, injections, options));\n        } else {\n          return super.create(injections);\n        }\n      }\n    };\n  }\n  static reopenClass(injections) {\n    Object.assign(this, injections);\n  }\n  static create(options) {\n    let {\n      environment: _environment,\n      application: namespace,\n      template: templateFactory\n    } = options;\n    let owner = getOwner(options);\n    (isDevelopingApp() && !(owner) && assert('OutletView is unexpectedly missing an owner', owner));\n    let template = templateFactory(owner);\n    return new OutletView(_environment, owner, template, namespace);\n  }\n  ref;\n  state;\n  constructor(_environment, owner, template, namespace) {\n    this._environment = _environment;\n    this.owner = owner;\n    this.template = template;\n    this.namespace = namespace;\n    let outletStateTag = createTag();\n    let outletState = {\n      outlets: {\n        main: undefined\n      },\n      render: {\n        owner: owner,\n        name: TOP_LEVEL_NAME,\n        controller: undefined,\n        model: undefined,\n        template\n      }\n    };\n    let ref = this.ref = createComputeRef(() => {\n      consumeTag(outletStateTag);\n      return outletState;\n    }, state => {\n      DIRTY_TAG$1(outletStateTag);\n      outletState.outlets['main'] = state;\n    });\n    this.state = {\n      ref,\n      name: TOP_LEVEL_NAME,\n      template,\n      controller: undefined\n    };\n  }\n  appendTo(selector) {\n    let target;\n    if (this._environment.hasDOM) {\n      target = typeof selector === 'string' ? document.querySelector(selector) : selector;\n    } else {\n      target = selector;\n    }\n    let renderer = this.owner.lookup('renderer:-dom');\n\n    // SAFETY: It's not clear that this cast is safe.\n    // The types for appendOutletView may be incorrect or this is a potential bug.\n    schedule('render', renderer, 'appendOutletView', this, target);\n  }\n  rerender() {\n    /**/\n  }\n  setOutletState(state) {\n    updateRef(this.ref, state);\n  }\n  destroy() {\n    /**/\n  }\n}\n\nclass DynamicScope {\n  constructor(view, outletState) {\n    this.view = view;\n    this.outletState = outletState;\n  }\n  child() {\n    return new DynamicScope(this.view, this.outletState);\n  }\n  get(key) {\n    (isDevelopingApp() && !(key === 'outletState') && assert(`Using \\`-get-dynamic-scope\\` is only supported for \\`outletState\\` (you used \\`${key}\\`).`, key === 'outletState'));\n    return this.outletState;\n  }\n  set(key, value) {\n    (isDevelopingApp() && !(key === 'outletState') && assert(`Using \\`-with-dynamic-scope\\` is only supported for \\`outletState\\` (you used \\`${key}\\`).`, key === 'outletState'));\n    this.outletState = value;\n    return value;\n  }\n}\nconst NO_OP = () => {};\n\n// This wrapper logic prevents us from rerendering in case of a hard failure\n// during render. This prevents infinite revalidation type loops from occuring,\n// and ensures that errors are not swallowed by subsequent follow on failures.\nfunction errorLoopTransaction(fn) {\n  if (isDevelopingApp()) {\n    return () => {\n      let didError = true;\n      try {\n        fn();\n        didError = false;\n      } finally {\n        if (didError) {\n          // Noop the function so that we won't keep calling it and causing\n          // infinite looping failures;\n          fn = () => {\n            // eslint-disable-next-line no-console\n            console.warn('Attempted to rerender, but the Ember application has had an unrecoverable error occur during render. You should reload the application after fixing the cause of the error.');\n          };\n        }\n      }\n    };\n  } else {\n    return fn;\n  }\n}\nclass ComponentRootState {\n  type = 'component';\n  #result;\n  #render;\n  constructor(state, definition, options) {\n    this.#render = errorLoopTransaction(() => {\n      let iterator = renderComponent$1(state.context, state.builder(state.env, options.into), state.owner, definition, options?.args);\n      let result = this.#result = iterator.sync();\n      associateDestroyableChild(this, this.#result);\n      this.#render = errorLoopTransaction(() => {\n        if (isDestroying(result) || isDestroyed(result)) return;\n        return result.rerender({\n          alwaysRevalidate: false\n        });\n      });\n    });\n  }\n  isFor(_component) {\n    return false;\n  }\n  render() {\n    this.#render();\n  }\n  destroy() {\n    destroy(this);\n  }\n  get destroyed() {\n    return isDestroyed(this);\n  }\n  get result() {\n    return this.#result;\n  }\n}\nclass ClassicRootState {\n  type = 'classic';\n  id;\n  result;\n  destroyed;\n  render;\n  env;\n  constructor(root, context, owner, template, self, parentElement, dynamicScope, builder) {\n    this.root = root;\n    (isDevelopingApp() && !(template !== undefined) && assert(`You cannot render \\`${valueForRef(self)}\\` without a template.`, template !== undefined));\n    this.id = root instanceof OutletView ? guidFor(root) : getViewId(root);\n    this.result = undefined;\n    this.destroyed = false;\n    this.env = context.env;\n    this.render = errorLoopTransaction(() => {\n      let layout = unwrapTemplate(template).asLayout();\n      let iterator = renderMain(context, owner, self, builder(context.env, {\n        element: parentElement,\n        nextSibling: null\n      }), layout, dynamicScope);\n      let result = this.result = iterator.sync();\n      associateDestroyableChild(this, result);\n      this.render = errorLoopTransaction(() => {\n        if (isDestroying(result) || isDestroyed(result)) return;\n        return result.rerender({\n          alwaysRevalidate: false\n        });\n      });\n    });\n  }\n  isFor(possibleRoot) {\n    return this.root === possibleRoot;\n  }\n  destroy() {\n    let {\n      result,\n      env\n    } = this;\n    this.destroyed = true;\n    this.root = null;\n    this.result = undefined;\n    this.render = undefined;\n    if (result !== undefined) {\n      /*\n       Handles these scenarios:\n        * When roots are removed during standard rendering process, a transaction exists already\n         `.begin()` / `.commit()` are not needed.\n       * When roots are being destroyed manually (`component.append(); component.destroy() case), no\n         transaction exists already.\n       * When roots are being destroyed during `Renderer#destroy`, no transaction exists\n        */\n\n      inTransaction(env, () => destroy(result));\n    }\n  }\n}\nconst renderers = [];\nfunction _resetRenderers() {\n  renderers.length = 0;\n}\nfunction register(renderer) {\n  (isDevelopingApp() && !(renderers.indexOf(renderer) === -1) && assert('Cannot register the same renderer twice', renderers.indexOf(renderer) === -1));\n  renderers.push(renderer);\n}\nfunction deregister(renderer) {\n  let index = renderers.indexOf(renderer);\n  (isDevelopingApp() && !(index !== -1) && assert('Cannot deregister unknown unregistered renderer', index !== -1));\n  renderers.splice(index, 1);\n}\nfunction loopBegin() {\n  for (let renderer of renderers) {\n    renderer.rerender();\n  }\n}\nlet renderSettledDeferred = null;\n/*\n  Returns a promise which will resolve when rendering has settled. Settled in\n  this context is defined as when all of the tags in use are \"current\" (e.g.\n  `renderers.every(r => r._isValid())`). When this is checked at the _end_ of\n  the run loop, this essentially guarantees that all rendering is completed.\n\n  @method renderSettled\n  @returns {Promise<void>} a promise which fulfills when rendering has settled\n*/\nfunction renderSettled() {\n  if (renderSettledDeferred === null) {\n    renderSettledDeferred = RSVP.defer();\n    // if there is no current runloop, the promise created above will not have\n    // a chance to resolve (because its resolved in backburner's \"end\" event)\n    if (!_getCurrentRunLoop()) {\n      // ensure a runloop has been kicked off\n      _backburner.schedule('actions', null, NO_OP);\n    }\n  }\n  return renderSettledDeferred.promise;\n}\nfunction resolveRenderPromise() {\n  if (renderSettledDeferred !== null) {\n    let resolve = renderSettledDeferred.resolve;\n    renderSettledDeferred = null;\n    _backburner.join(null, resolve);\n  }\n}\nlet loops = 0;\nfunction loopEnd() {\n  for (let renderer of renderers) {\n    if (!renderer.isValid()) {\n      if (loops > ENV._RERENDER_LOOP_LIMIT) {\n        loops = 0;\n        // TODO: do something better\n        renderer.destroy();\n        throw new Error('infinite rendering invalidation detected');\n      }\n      loops++;\n      return _backburner.join(null, NO_OP);\n    }\n  }\n  loops = 0;\n  resolveRenderPromise();\n}\n_backburner.on('begin', loopBegin);\n_backburner.on('end', loopEnd);\nclass RendererState {\n  static create(data, renderer) {\n    const state = new RendererState(data, renderer);\n    associateDestroyableChild(renderer, state);\n    return state;\n  }\n  #data;\n  #lastRevision = -1;\n  #inRenderTransaction = false;\n  #destroyed = false;\n  #roots = [];\n  #removedRoots = [];\n  constructor(data, renderer) {\n    this.#data = data;\n    registerDestructor(this, () => {\n      this.clearAllRoots(renderer);\n    });\n  }\n  get debug() {\n    return {\n      roots: this.#roots,\n      inRenderTransaction: this.#inRenderTransaction,\n      isInteractive: this.isInteractive\n    };\n  }\n  get roots() {\n    return this.#roots;\n  }\n  get owner() {\n    return this.#data.owner;\n  }\n  get builder() {\n    return this.#data.builder;\n  }\n  get context() {\n    return this.#data.context;\n  }\n  get env() {\n    return this.context.env;\n  }\n  get isInteractive() {\n    return this.#data.context.env.isInteractive;\n  }\n  renderRoot(root, renderer) {\n    let roots = this.#roots;\n    roots.push(root);\n    associateDestroyableChild(this, root);\n    if (roots.length === 1) {\n      register(renderer);\n    }\n    this.#renderRootsTransaction(renderer);\n    return root;\n  }\n  #renderRootsTransaction(renderer) {\n    if (this.#inRenderTransaction) {\n      // currently rendering roots, a new root was added and will\n      // be processed by the existing _renderRoots invocation\n      return;\n    }\n\n    // used to prevent calling _renderRoots again (see above)\n    // while we are actively rendering roots\n    this.#inRenderTransaction = true;\n    let completedWithoutError = false;\n    try {\n      this.renderRoots(renderer);\n      completedWithoutError = true;\n    } finally {\n      if (!completedWithoutError) {\n        this.#lastRevision = valueForTag(CURRENT_TAG);\n      }\n      this.#inRenderTransaction = false;\n    }\n  }\n  renderRoots(renderer) {\n    let roots = this.#roots;\n    let removedRoots = this.#removedRoots;\n    let initialRootsLength;\n    do {\n      initialRootsLength = roots.length;\n      inTransaction(this.context.env, () => {\n        // ensure that for the first iteration of the loop\n        // each root is processed\n        for (let i = 0; i < roots.length; i++) {\n          let root = roots[i];\n          (isDevelopingApp() && !(root) && assert('has root', root));\n          if (root.destroyed) {\n            // add to the list of roots to be removed\n            // they will be removed from `this._roots` later\n            removedRoots.push(root);\n\n            // skip over roots that have been marked as destroyed\n            continue;\n          }\n\n          // when processing non-initial reflush loops,\n          // do not process more roots than needed\n          if (i >= initialRootsLength) {\n            continue;\n          }\n          root.render();\n        }\n        this.#lastRevision = valueForTag(CURRENT_TAG);\n      });\n    } while (roots.length > initialRootsLength);\n\n    // remove any roots that were destroyed during this transaction\n    while (removedRoots.length) {\n      let root = removedRoots.pop();\n      let rootIndex = roots.indexOf(root);\n      roots.splice(rootIndex, 1);\n    }\n    if (this.#roots.length === 0) {\n      deregister(renderer);\n    }\n  }\n  scheduleRevalidate(renderer) {\n    _backburner.scheduleOnce('render', this, this.revalidate, renderer);\n  }\n  isValid() {\n    return this.#destroyed || this.#roots.length === 0 || validateTag(CURRENT_TAG, this.#lastRevision);\n  }\n  revalidate(renderer) {\n    if (this.isValid()) {\n      return;\n    }\n    this.#renderRootsTransaction(renderer);\n  }\n  clearAllRoots(renderer) {\n    let roots = this.#roots;\n    for (let root of roots) {\n      destroy(root);\n    }\n    this.#removedRoots.length = 0;\n    this.#roots = [];\n\n    // if roots were present before destroying\n    // deregister this renderer instance\n    if (roots.length) {\n      deregister(renderer);\n    }\n  }\n}\n\n/**\n * The returned object from `renderComponent`\n * @public\n * @module @ember/renderer\n */\n\nfunction intoTarget(into) {\n  if ('element' in into) {\n    return into;\n  } else {\n    return {\n      element: into,\n      nextSibling: null\n    };\n  }\n}\n\n/**\n * Render a component into a DOM element.\n *\n * @method renderComponent\n * @static\n * @for @ember/renderer\n * @param {Object} component The component to render.\n * @param {Object} options\n * @param {Element} options.into Where to render the component in to.\n * @param {Object} [options.owner] Optionally specify the owner to use. This will be used for injections, and overall cleanup.\n * @param {Object} [options.env] Optional renderer configuration\n * @param {Object} [options.args] Optionally pass args in to the component. These may be reactive as long as it is an object or object-like\n * @public\n */\nfunction renderComponent(\n/**\n * The component definition to render.\n *\n * Any component that has had its manager registered is valid.\n * For the component-types that ship with ember, manager registration\n * does not need to be worried about.\n */\ncomponent, {\n  owner = {},\n  env,\n  into,\n  args\n}) {\n  /**\n   * SAFETY: we should figure out what we need out of a `document` and narrow the API.\n   *         this exercise should also end up beginning to define what we need for CLI rendering (or to other outputs)\n   */\n  let document = env && 'document' in env ? env?.['document'] : globalThis.document;\n\n  // Reuse renderer per owner to avoid creating multiple EvaluationContexts\n  // which can cause tracking frame conflicts\n  let renderer = RENDERER_CACHE.get(owner);\n  if (!renderer) {\n    renderer = BaseRenderer.strict(owner, document, {\n      ...env,\n      isInteractive: env?.isInteractive ?? true,\n      hasDOM: env && 'hasDOM' in env ? Boolean(env?.['hasDOM']) : true\n    });\n    RENDERER_CACHE.set(owner, renderer);\n  }\n\n  /**\n   * Replace all contents, if we've rendered multiple times.\n   *\n   * https://github.com/emberjs/rfcs/pull/1099/files#diff-2b962105b9083ca84579cdc957f27f49407440f3c5078083fa369ec18cc46da8R365\n   *\n   * We could later add an option to not do this behavior\n   *\n   * NOTE: destruction is async\n   */\n  let existing = RENDER_CACHE.get(into);\n  existing?.destroy();\n  /**\n   * We can only replace the inner HTML the first time.\n   * Because destruction is async, it won't be safe to\n   * do this again, and we'll have to rely on the above destroy.\n   */\n  if (!existing && into instanceof Element) {\n    into.innerHTML = '';\n  }\n  let innerResult = renderer.render(component, {\n    into,\n    args\n  }).result;\n  if (innerResult) {\n    associateDestroyableChild(owner, innerResult);\n  }\n  let result = {\n    destroy() {\n      if (innerResult) {\n        destroy(innerResult);\n      }\n    }\n  };\n  RENDER_CACHE.set(into, result);\n  return result;\n}\nconst RENDER_CACHE = new WeakMap();\nconst RENDERER_CACHE = new WeakMap();\nclass BaseRenderer {\n  static strict(owner, document, options) {\n    return new BaseRenderer(owner, {\n      hasDOM: hasDOM,\n      ...options\n    }, document, new ResolverImpl(), clientBuilder);\n  }\n  state;\n  constructor(owner, envOptions, document, resolver, builder) {\n    let sharedArtifacts = artifacts();\n\n    /**\n     * SAFETY: are there consequences for being looser with *this* owner?\n     *         the public API for `owner` is kinda `Partial<InternalOwner>`\n     *         aka: implement only what you need.\n     *         But for actual ember apps, you *need* to implement everything\n     *         an app needs (which will actually change and become less over time)\n     */\n    let env = new EmberEnvironmentDelegate(owner, envOptions.isInteractive);\n    let options = runtimeOptions({\n      document\n    }, env, sharedArtifacts, resolver);\n    let context = new EvaluationContextImpl(sharedArtifacts, heap => new RuntimeOpImpl(heap), options);\n    this.state = RendererState.create({\n      owner,\n      context,\n      builder\n    }, this);\n  }\n  get debugRenderTree() {\n    let {\n      debugRenderTree\n    } = this.state.env;\n    (isDevelopingApp() && !(debugRenderTree) && assert('Attempted to access the DebugRenderTree, but it did not exist. Is the Ember Inspector open?', debugRenderTree));\n    return debugRenderTree;\n  }\n  isValid() {\n    return this.state.isValid();\n  }\n  destroy() {\n    destroy(this);\n  }\n  render(component, options) {\n    const root = new ComponentRootState(this.state, component, {\n      args: options.args,\n      into: intoTarget(options.into)\n    });\n    return this.state.renderRoot(root, this);\n  }\n  rerender() {\n    this.state.scheduleRevalidate(this);\n  }\n\n  // render(component: Component, options: { into: Cursor; args?: Record<string, unknown> }): void {\n  //   this.state.renderRoot(component);\n  // }\n}\nclass Renderer extends BaseRenderer {\n  static strict(owner, document, options) {\n    return new BaseRenderer(owner, {\n      hasDOM: hasDOM,\n      ...options\n    }, document, new ResolverImpl(), clientBuilder);\n  }\n  _rootTemplate;\n  _viewRegistry;\n  static create(props) {\n    let {\n      _viewRegistry\n    } = props;\n    let owner = getOwner(props);\n    (isDevelopingApp() && !(owner) && assert('Renderer is unexpectedly missing an owner', owner));\n    let document = owner.lookup('service:-document');\n    let env = owner.lookup('-environment:main');\n    let rootTemplate = owner.lookup(privatize`template:-root`);\n    let builder = owner.lookup('service:-dom-builder');\n    return new this(owner, document, env, rootTemplate, _viewRegistry, builder);\n  }\n  constructor(owner, document, env, rootTemplate, viewRegistry, builder = clientBuilder, resolver = new ResolverImpl()) {\n    super(owner, env, document, resolver, builder);\n    this._rootTemplate = rootTemplate(owner);\n    this._viewRegistry = viewRegistry || owner.lookup('-view-registry:main');\n  }\n\n  // renderer HOOKS\n\n  appendOutletView(view, target) {\n    // TODO: This bypasses the {{outlet}} syntax so logically duplicates\n    // some of the set up code. Since this is all internal (or is it?),\n    // we can refactor this to do something more direct/less convoluted\n    // and with less setup, but get it working first\n    let outlet = createRootOutlet(view);\n    let {\n      name,\n      /* controller, */template\n    } = view.state;\n    let named = dict();\n    named['Component'] = createConstRef(makeRouteTemplate(view.owner, name, template), '@Component');\n\n    // TODO: is this guaranteed to be undefined? It seems to be the\n    // case in the `OutletView` class. Investigate how much that class\n    // exists as an internal implementation detail only, or if it was\n    // used outside of core. As far as I can tell, test-helpers uses\n    // it but only for `setOutletState`.\n    // named['controller'] = createConstRef(controller, '@controller');\n    // Update: at least according to the debug render tree tests, we\n    // appear to always expect this to be undefined. Not a definitive\n    // source by any means, but is useful evidence\n    named['controller'] = UNDEFINED_REFERENCE;\n    named['model'] = UNDEFINED_REFERENCE;\n    let args = createCapturedArgs(named, EMPTY_POSITIONAL);\n    this._appendDefinition(view, curry(0, outlet, view.owner, args, true), target);\n  }\n  appendTo(view, target) {\n    let definition = new RootComponentDefinition(view);\n    this._appendDefinition(view, curry(0, definition, this.state.owner, null, true), target);\n  }\n  _appendDefinition(root, definition, target) {\n    let self = createConstRef(definition, 'this');\n    let dynamicScope = new DynamicScope(null, UNDEFINED_REFERENCE);\n    let rootState = new ClassicRootState(root, this.state.context, this.state.owner, this._rootTemplate, self, target, dynamicScope, this.state.builder);\n    this.state.renderRoot(rootState, this);\n  }\n  cleanupRootFor(component) {\n    // no need to cleanup roots if we have already been destroyed\n    if (isDestroyed(this)) {\n      return;\n    }\n    let roots = this.state.roots;\n\n    // traverse in reverse so we can remove items\n    // without mucking up the index\n    let i = roots.length;\n    while (i--) {\n      let root = roots[i];\n      (isDevelopingApp() && !(root) && assert('has root', root));\n      if (root.type === 'classic' && root.isFor(component)) {\n        root.destroy();\n        roots.splice(i, 1);\n      }\n    }\n  }\n  remove(view) {\n    view._transitionTo('destroying');\n    this.cleanupRootFor(view);\n    if (this.state.isInteractive) {\n      view.trigger('didDestroyElement');\n    }\n  }\n  get _roots() {\n    return this.state.debug.roots;\n  }\n  get _inRenderTransaction() {\n    return this.state.debug.inRenderTransaction;\n  }\n  get _isInteractive() {\n    return this.state.debug.isInteractive;\n  }\n  get _context() {\n    return this.state.context;\n  }\n  register(view) {\n    let id = getViewId(view);\n    (isDevelopingApp() && !(!this._viewRegistry[id]) && assert('Attempted to register a view with an id already in use: ' + id, !this._viewRegistry[id]));\n    this._viewRegistry[id] = view;\n  }\n  unregister(view) {\n    delete this._viewRegistry[getViewId(view)];\n  }\n  getElement(component) {\n    if (this._isInteractive) {\n      return getViewElement(component);\n    } else {\n      throw new Error('Accessing `this.element` is not allowed in non-interactive environments (such as FastBoot).');\n    }\n  }\n  getBounds(component) {\n    let bounds = component[BOUNDS];\n    (isDevelopingApp() && !(bounds) && assert('object passed to getBounds must have the BOUNDS symbol as a property', bounds));\n    let parentElement = bounds.parentElement();\n    let firstNode = bounds.firstNode();\n    let lastNode = bounds.lastNode();\n    return {\n      parentElement,\n      firstNode,\n      lastNode\n    };\n  }\n}\n\nconst OutletTemplate = templateFactory(\n/*\n  {{component (outletHelper)}}\n*/\n{\n  \"id\": null,\n  \"block\": \"[[[46,[28,[32,0],null,null],null,null,null]],[],[\\\"component\\\"]]\",\n  \"moduleName\": \"packages/@ember/-internals/glimmer/lib/templates/outlet.hbs\",\n  \"scope\": () => [outletHelper],\n  \"isStrictMode\": true\n});\n\nexport { Component as C, Helper as H, Input as I, LinkTo as L, OutletView as O, Renderer as R, SafeString as S, Textarea as T, _resetRenderers as _, RootTemplate as a, TrustedHTML as b, htmlSafe as c, isTrustedHTML as d, renderSettled as e, OutletTemplate as f, helper$1 as h, isHTMLSafe as i, renderComponent as r, trustHTML as t, uniqueId$1 as u };\n","import { E as VM_PRIMITIVE_OP, q as VM_RETURN_OP, aU as encodeHandle, aV as isMachineOp, aK as VM_CONCAT_OP, aB as VM_GET_VARIABLE_OP, D as VM_CONSTANT_REFERENCE_OP, aF as VM_GET_PROPERTY_OP, aI as VM_HAS_BLOCK_OP, aH as VM_SPREAD_BLOCK_OP, S as VM_COMPILE_BLOCK_OP, aJ as VM_HAS_BLOCK_PARAMS_OP, aL as VM_IF_INLINE_OP, aM as VM_NOT_OP, aN as VM_GET_DYNAMIC_VAR_OP, u as VM_PUSH_FRAME_OP, aO as VM_LOG_OP, t as VM_POP_FRAME_OP, M as VM_FETCH_OP, I as VM_PRIMITIVE_REFERENCE_OP, aA as VM_HELPER_OP, J as VM_DUP_OP, ay as VM_DYNAMIC_HELPER_OP, K as VM_POP_OP, ae as VM_CAPTURE_ARGS_OP, ax as VM_CURRY_OP, aW as isSmallInt, aX as encodeImmediate, y as VM_PUSH_DYNAMIC_SCOPE_OP, N as VM_BIND_DYNAMIC_SCOPE_OP, z as VM_POP_DYNAMIC_SCOPE_OP, aG as VM_GET_BLOCK_OP, T as VM_INVOKE_YIELD_OP, x as VM_POP_SCOPE_OP, w as VM_CHILD_SCOPE_OP, aC as VM_SET_VARIABLE_OP, s as VM_INVOKE_VIRTUAL_OP, A as VM_CONSTANT_OP, R as VM_PUSH_BLOCK_SCOPE_OP, Q as VM_PUSH_SYMBOL_TABLE_OP, ad as VM_PUSH_EMPTY_ARGS_OP, ac as VM_PUSH_ARGS_OP, O as VM_ENTER_OP, X as VM_JUMP_EQ_OP, r as VM_JUMP_OP, P as VM_EXIT_OP, p as VM_RETURN_TO_OP, W as VM_JUMP_UNLESS_OP, aa as VM_PUSH_COMPONENT_DEFINITION_OP, L as VM_LOAD_OP, h as hasCapability, ai as VM_BEGIN_COMPONENT_TRANSACTION_OP, ag as VM_CREATE_COMPONENT_OP, ah as VM_REGISTER_COMPONENT_DESTRUCTOR_OP, an as VM_GET_COMPONENT_SELF_OP, aE as VM_ROOT_SCOPE_OP, aD as VM_SET_BLOCK_OP, av as VM_DID_RENDER_LAYOUT_OP, aw as VM_COMMIT_COMPONENT_TRANSACTION_OP, af as VM_PREPARE_ARGS_OP, ar as VM_VIRTUAL_ROOT_SCOPE_OP, as as VM_SET_NAMED_VARIABLES_OP, at as VM_SET_BLOCKS_OP, au as VM_INVOKE_COMPONENT_LAYOUT_OP, aj as VM_PUT_COMPONENT_OPERATIONS_OP, a0 as VM_OPEN_DYNAMIC_ELEMENT_OP, am as VM_DID_CREATE_ELEMENT_OP, a3 as VM_FLUSH_ELEMENT_OP, a4 as VM_CLOSE_ELEMENT_OP, i as VM_RESOLVE_CURRIED_COMPONENT_OP, ab as VM_RESOLVE_DYNAMIC_COMPONENT_OP, j as VM_PUSH_DYNAMIC_COMPONENT_INSTANCE_OP, ap as VM_GET_COMPONENT_LAYOUT_OP, aq as VM_POPULATE_LAYOUT_OP, ao as VM_GET_COMPONENT_TAG_NAME_OP, _ as VM_COMMENT_OP, a5 as VM_MODIFIER_OP, a6 as VM_DYNAMIC_MODIFIER_OP, a7 as VM_STATIC_ATTR_OP, al as VM_STATIC_COMPONENT_ATTR_OP, a8 as VM_DYNAMIC_ATTR_OP, ak as VM_COMPONENT_ATTR_OP, $ as VM_OPEN_ELEMENT_OP, aQ as VM_DEBUGGER_OP, Z as VM_TEXT_OP, o as VM_INVOKE_STATIC_OP, aP as VM_DYNAMIC_CONTENT_TYPE_OP, a1 as VM_PUSH_REMOTE_ELEMENT_OP, a2 as VM_POP_REMOTE_ELEMENT_OP, Y as VM_TO_BOOLEAN_OP, aR as VM_ENTER_LIST_OP, aT as VM_ITERATE_OP, aS as VM_EXIT_LIST_OP } from './capabilities-DHiXCCuB.js';\nimport { d as debugToString } from './debug-to-string-BsFOvUtQ.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../@glimmer/global-context/index.js';\nimport '../@glimmer/validator/index.js';\nimport './reference-B6HMX4y0.js';\nimport { a as assert } from './assert-CUCJBR2C.js';\nimport { e as expect, u as unwrap, S as StackImpl, d as dict } from './collections-B8me-ZlQ.js';\nimport { SexpOpcodes as opcodes } from '../@glimmer/wire-format/index.js';\nimport { e as $v0, c as $fp, $ as $s0, d as $sp, h as $s1 } from './registers-ylirb0dq.js';\nimport { b as EMPTY_STRING_ARRAY, E as EMPTY_ARRAY, e as enumerate, r as reverse } from './array-utils-CZQxrdD3.js';\nimport { ContentType } from '../@glimmer/vm/index.js';\nimport '../@glimmer/destroyable/index.js';\nimport { T as TYPE_SIZE, A as ARG_SHIFT, a as MACHINE_MASK, I as InternalComponentCapabilities } from './flags-BsZlvEeR.js';\nimport { a as assign } from './object-utils-AijlD-JH.js';\nimport { i as isPresentArray } from './present-B1rrjAVM.js';\nimport { I as InstructionEncoderImpl } from './encoder-CT1wqYMF.js';\n\nfunction isGetLikeTuple(opcode) {\n  return Array.isArray(opcode) && opcode.length === 2;\n}\nfunction makeResolutionTypeVerifier(typeToVerify) {\n  return opcode => {\n    if (!isGetLikeTuple(opcode)) return false;\n    let type = opcode[0];\n    return type === opcodes.GetStrictKeyword || type === opcodes.GetLexicalSymbol || type === typeToVerify;\n  };\n}\nconst isGetFreeComponent = makeResolutionTypeVerifier(opcodes.GetFreeAsComponentHead);\nconst isGetFreeModifier = makeResolutionTypeVerifier(opcodes.GetFreeAsModifierHead);\nconst isGetFreeHelper = makeResolutionTypeVerifier(opcodes.GetFreeAsHelperHead);\nconst isGetFreeComponentOrHelper = makeResolutionTypeVerifier(opcodes.GetFreeAsComponentOrHelperHead);\nfunction assertResolverInvariants(meta) {\n  if (isDevelopingApp()) {\n    if (!meta.symbols.upvars) {\n      throw new Error('Attempted to resolve a component, helper, or modifier, but no free vars were found');\n    }\n    if (!meta.owner) {\n      throw new Error('Attempted to resolve a component, helper, or modifier, but no owner was associated with the template it was being resolved from');\n    }\n  }\n  return meta;\n}\n\n/**\n * <Foo/>\n * <Foo></Foo>\n * <Foo @arg={{true}} />\n */\nfunction resolveComponent(resolver, constants, meta, [, expr, then]) {\n  assert(isGetFreeComponent(expr));\n  let type = expr[0];\n  if (isDevelopingApp() && expr[0] === opcodes.GetStrictKeyword) {\n    assert(!meta.isStrictMode);\n    throw new Error(`Attempted to resolve a component in a strict mode template, but that value was not in scope: ${\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    meta.symbols.upvars[expr[1]] ?? '{unknown variable}'}`);\n  }\n  if (type === opcodes.GetLexicalSymbol) {\n    let {\n      scopeValues,\n      owner,\n      symbols: {\n        lexical\n      }\n    } = meta;\n    let definition = expect(scopeValues)[expr[1]];\n    then(constants.component(definition, expect(owner), false, lexical?.at(expr[1])));\n  } else {\n    let {\n      symbols: {\n        upvars\n      },\n      owner\n    } = assertResolverInvariants(meta);\n    let name = unwrap(upvars[expr[1]]);\n    let definition = resolver?.lookupComponent?.(name, owner) ?? null;\n    if (isDevelopingApp() && (typeof definition !== 'object' || definition === null)) {\n      assert(!meta.isStrictMode);\n      throw new Error(`Attempted to resolve \\`${name}\\`, which was expected to be a component, but nothing was found.`);\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    then(constants.resolvedComponent(definition, name));\n  }\n}\n\n/**\n * (helper)\n * (helper arg)\n */\nfunction resolveHelper(resolver, constants, meta, [, expr, then]) {\n  assert(isGetFreeHelper(expr));\n  let type = expr[0];\n  if (type === opcodes.GetLexicalSymbol) {\n    let {\n      scopeValues\n    } = meta;\n    let definition = expect(scopeValues)[expr[1]];\n    then(constants.helper(definition));\n  } else if (type === opcodes.GetStrictKeyword) {\n    then(lookupBuiltInHelper(expr, resolver, meta, constants, 'helper'));\n  } else {\n    let {\n      symbols: {\n        upvars\n      },\n      owner\n    } = assertResolverInvariants(meta);\n    let name = unwrap(upvars[expr[1]]);\n    let helper = resolver?.lookupHelper?.(name, owner) ?? null;\n    if (isDevelopingApp() && helper === null) {\n      assert(!meta.isStrictMode);\n      throw new Error(`Attempted to resolve \\`${name}\\`, which was expected to be a helper, but nothing was found.`);\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    then(constants.helper(helper, name));\n  }\n}\n\n/**\n * <div {{modifier}}/>\n * <div {{modifier arg}}/>\n * <Foo {{modifier}}/>\n */\nfunction resolveModifier(resolver, constants, meta, [, expr, then]) {\n  assert(isGetFreeModifier(expr));\n  let type = expr[0];\n  if (type === opcodes.GetLexicalSymbol) {\n    let {\n      scopeValues,\n      symbols: {\n        lexical\n      }\n    } = meta;\n    let definition = expect(scopeValues)[expr[1]];\n    then(constants.modifier(definition, lexical?.at(expr[1]) ?? undefined));\n  } else if (type === opcodes.GetStrictKeyword) {\n    let {\n      symbols: {\n        upvars\n      }\n    } = assertResolverInvariants(meta);\n    let name = unwrap(upvars[expr[1]]);\n    let modifier = resolver?.lookupBuiltInModifier?.(name) ?? null;\n    if (isDevelopingApp() && modifier === null) {\n      assert(!meta.isStrictMode);\n      throw new Error(`Attempted to resolve a modifier in a strict mode template, but it was not in scope: ${name}`);\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    then(constants.modifier(modifier, name));\n  } else {\n    let {\n      symbols: {\n        upvars\n      },\n      owner\n    } = assertResolverInvariants(meta);\n    let name = unwrap(upvars[expr[1]]);\n    let modifier = resolver?.lookupModifier?.(name, owner) ?? null;\n    if (isDevelopingApp() && modifier === null) {\n      assert(!meta.isStrictMode);\n      throw new Error(`Attempted to resolve \\`${name}\\`, which was expected to be a modifier, but nothing was found.`);\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    then(constants.modifier(modifier));\n  }\n}\n\n/**\n * {{component-or-helper arg}}\n */\nfunction resolveComponentOrHelper(resolver, constants, meta, [, expr, {\n  ifComponent,\n  ifHelper\n}]) {\n  assert(isGetFreeComponentOrHelper(expr));\n  let type = expr[0];\n  if (type === opcodes.GetLexicalSymbol) {\n    let {\n      scopeValues,\n      owner,\n      symbols: {\n        lexical\n      }\n    } = meta;\n    let definition = expect(scopeValues)[expr[1]];\n    let component = constants.component(definition, expect(owner), true, lexical?.at(expr[1]));\n    if (component !== null) {\n      ifComponent(component);\n      return;\n    }\n    let helper = constants.helper(definition, null, true);\n    if (isDevelopingApp() && helper === null) {\n      assert(!meta.isStrictMode);\n      throw new Error(\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      `Attempted to use a value as either a component or helper, but it did not have a component manager or helper manager associated with it. The value was: ${debugToString(definition)}`);\n    }\n    ifHelper(expect(helper));\n  } else if (type === opcodes.GetStrictKeyword) {\n    ifHelper(lookupBuiltInHelper(expr, resolver, meta, constants, 'component or helper'));\n  } else {\n    let {\n      symbols: {\n        upvars\n      },\n      owner\n    } = assertResolverInvariants(meta);\n    let name = unwrap(upvars[expr[1]]);\n    let definition = resolver?.lookupComponent?.(name, owner) ?? null;\n    if (definition !== null) {\n      ifComponent(constants.resolvedComponent(definition, name));\n    } else {\n      let helper = resolver?.lookupHelper?.(name, owner) ?? null;\n      if (isDevelopingApp() && helper === null) {\n        assert(!meta.isStrictMode);\n        throw new Error(`Attempted to resolve \\`${name}\\`, which was expected to be a component or helper, but nothing was found.`);\n      }\n\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      ifHelper(constants.helper(helper, name));\n    }\n  }\n}\n\n/**\n * {{maybeHelperOrComponent}}\n */\nfunction resolveOptionalComponentOrHelper(resolver, constants, meta, [, expr, {\n  ifComponent,\n  ifHelper,\n  ifValue\n}]) {\n  assert(isGetFreeComponentOrHelper(expr));\n  let type = expr[0];\n  if (type === opcodes.GetLexicalSymbol) {\n    let {\n      scopeValues,\n      owner,\n      symbols: {\n        lexical\n      }\n    } = meta;\n    let definition = expect(scopeValues)[expr[1]];\n    if (typeof definition !== 'function' && (typeof definition !== 'object' || definition === null)) {\n      // The value is not an object, so it can't be a component or helper.\n      ifValue(constants.value(definition));\n      return;\n    }\n    let component = constants.component(definition, expect(owner), true, lexical?.at(expr[1]));\n    if (component !== null) {\n      ifComponent(component);\n      return;\n    }\n    let helper = constants.helper(definition, null, true);\n    if (helper !== null) {\n      ifHelper(helper);\n      return;\n    }\n    ifValue(constants.value(definition));\n  } else if (type === opcodes.GetStrictKeyword) {\n    ifHelper(lookupBuiltInHelper(expr, resolver, meta, constants, 'value'));\n  } else {\n    let {\n      symbols: {\n        upvars\n      },\n      owner\n    } = assertResolverInvariants(meta);\n    let name = unwrap(upvars[expr[1]]);\n    let definition = resolver?.lookupComponent?.(name, owner) ?? null;\n    if (definition !== null) {\n      ifComponent(constants.resolvedComponent(definition, name));\n      return;\n    }\n    let helper = resolver?.lookupHelper?.(name, owner) ?? null;\n    if (helper !== null) {\n      ifHelper(constants.helper(helper, name));\n    }\n  }\n}\nfunction lookupBuiltInHelper(expr, resolver, meta, constants, type) {\n  let {\n    symbols: {\n      upvars\n    }\n  } = assertResolverInvariants(meta);\n  let name = unwrap(upvars[expr[1]]);\n  let helper = resolver?.lookupBuiltInHelper?.(name) ?? null;\n  if (isDevelopingApp() && helper === null) {\n    assert(!meta.isStrictMode);\n\n    // Keyword helper did not exist, which means that we're attempting to use a\n    // value of some kind that is not in scope\n    throw new Error(`Attempted to resolve a ${type} in a strict mode template, but that value was not in scope: ${\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n    meta.symbols.upvars[expr[1]] ?? '{unknown variable}'}`);\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n  return constants.helper(helper, name);\n}\n\nconst HighLevelResolutionOpcodes = {\n  Modifier: 1003,\n  Component: 1004,\n  Helper: 1005,\n  ComponentOrHelper: 1007,\n  OptionalComponentOrHelper: 1008,\n  Local: 1010,\n  TemplateLocal: 1011\n};\nconst HighLevelBuilderOpcodes = {\n  Label: 1000,\n  StartLabels: 1001,\n  StopLabels: 1002,\n  Start: 1000};\n\nconst HighLevelOperands = {\n  Label: 1,\n  IsStrictMode: 2,\n  DebugSymbols: 3,\n  Block: 4,\n  StdLib: 5,\n  NonSmallInt: 6,\n  SymbolTable: 7,\n  Layout: 8\n};\nfunction labelOperand(value) {\n  return {\n    type: HighLevelOperands.Label,\n    value\n  };\n}\nfunction debugSymbolsOperand(locals, upvars, lexical) {\n  return {\n    type: HighLevelOperands.DebugSymbols,\n    value: {\n      locals,\n      upvars,\n      lexical\n    }\n  };\n}\nfunction isStrictMode() {\n  return {\n    type: HighLevelOperands.IsStrictMode,\n    value: undefined\n  };\n}\nfunction blockOperand(value) {\n  return {\n    type: HighLevelOperands.Block,\n    value\n  };\n}\nfunction stdlibOperand(value) {\n  return {\n    type: HighLevelOperands.StdLib,\n    value\n  };\n}\nfunction nonSmallIntOperand(value) {\n  return {\n    type: HighLevelOperands.NonSmallInt,\n    value\n  };\n}\nfunction symbolTableOperand(value) {\n  return {\n    type: HighLevelOperands.SymbolTable,\n    value\n  };\n}\nfunction layoutOperand(value) {\n  return {\n    type: HighLevelOperands.Layout,\n    value\n  };\n}\n\nclass Labels {\n  labels = dict();\n  targets = [];\n  label(name, index) {\n    this.labels[name] = index;\n  }\n  target(at, target) {\n    this.targets.push({\n      at,\n      target\n    });\n  }\n  patch(heap) {\n    let {\n      targets,\n      labels\n    } = this;\n    for (const {\n      at,\n      target\n    } of targets) {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      let address = labels[target] - at;\n      assert(heap.getbyaddr(at) === -1);\n      heap.setbyaddr(at, address);\n    }\n  }\n}\nfunction encodeOp(encoder, context, meta, op) {\n  let {\n    program: {\n      constants\n    },\n    resolver\n  } = context;\n  if (isBuilderOpcode(op[0])) {\n    let [type, ...operands] = op;\n    encoder.push(constants, type, ...operands);\n  } else {\n    switch (op[0]) {\n      case HighLevelBuilderOpcodes.Label:\n        return encoder.label(op[1]);\n      case HighLevelBuilderOpcodes.StartLabels:\n        return encoder.startLabels();\n      case HighLevelBuilderOpcodes.StopLabels:\n        return encoder.stopLabels();\n      case HighLevelResolutionOpcodes.Component:\n        return resolveComponent(resolver, constants, meta, op);\n      case HighLevelResolutionOpcodes.Modifier:\n        return resolveModifier(resolver, constants, meta, op);\n      case HighLevelResolutionOpcodes.Helper:\n        return resolveHelper(resolver, constants, meta, op);\n      case HighLevelResolutionOpcodes.ComponentOrHelper:\n        return resolveComponentOrHelper(resolver, constants, meta, op);\n      case HighLevelResolutionOpcodes.OptionalComponentOrHelper:\n        return resolveOptionalComponentOrHelper(resolver, constants, meta, op);\n      case HighLevelResolutionOpcodes.Local:\n        {\n          let [, freeVar, andThen] = op;\n          // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n          let name = expect(meta.symbols.upvars)[freeVar];\n          andThen(name, meta.moduleName);\n          break;\n        }\n      case HighLevelResolutionOpcodes.TemplateLocal:\n        {\n          let [, valueIndex, then] = op;\n          let value = expect(meta.scopeValues)[valueIndex];\n          then(constants.value(value));\n          break;\n        }\n      default:\n        throw new Error(`Unexpected high level opcode ${op[0]}`);\n    }\n  }\n}\nclass EncoderImpl {\n  labelsStack = new StackImpl();\n  encoder = new InstructionEncoderImpl([]);\n  errors = [];\n  handle;\n  constructor(heap, meta, stdlib) {\n    this.heap = heap;\n    this.meta = meta;\n    this.stdlib = stdlib;\n    this.handle = heap.malloc();\n  }\n  error(error) {\n    this.encoder.encode(VM_PRIMITIVE_OP, 0);\n    this.errors.push(error);\n  }\n  commit(size) {\n    let handle = this.handle;\n    this.heap.pushMachine(VM_RETURN_OP);\n    this.heap.finishMalloc(handle, size);\n    if (isPresentArray(this.errors)) {\n      return {\n        errors: this.errors,\n        handle\n      };\n    } else {\n      return handle;\n    }\n  }\n  push(constants, type, ...args) {\n    let {\n      heap\n    } = this;\n    if (isDevelopingApp() && type > TYPE_SIZE) {\n      throw new Error(`Opcode type over 8-bits. Got ${type}.`);\n    }\n    let machine = isMachineOp(type) ? MACHINE_MASK : 0;\n    let first = type | machine | args.length << ARG_SHIFT;\n    heap.pushRaw(first);\n    for (let i = 0; i < args.length; i++) {\n      let op = args[i];\n      heap.pushRaw(this.operand(constants, op));\n    }\n  }\n  operand(constants, operand) {\n    if (typeof operand === 'number') {\n      return operand;\n    }\n    if (typeof operand === 'object' && operand !== null) {\n      if (Array.isArray(operand)) {\n        return encodeHandle(constants.array(operand));\n      } else {\n        switch (operand.type) {\n          case HighLevelOperands.Label:\n            this.currentLabels.target(this.heap.offset, operand.value);\n            return -1;\n          case HighLevelOperands.IsStrictMode:\n            return encodeHandle(constants.value(this.meta.isStrictMode));\n          case HighLevelOperands.DebugSymbols:\n            return encodeHandle(constants.value(operand.value));\n          case HighLevelOperands.Block:\n            return encodeHandle(constants.value(compilableBlock(operand.value, this.meta)));\n          case HighLevelOperands.StdLib:\n            return expect(this.stdlib)[operand.value];\n          case HighLevelOperands.NonSmallInt:\n          case HighLevelOperands.SymbolTable:\n          case HighLevelOperands.Layout:\n            return constants.value(operand.value);\n        }\n      }\n    }\n    return encodeHandle(constants.value(operand));\n  }\n  get currentLabels() {\n    return expect(this.labelsStack.current);\n  }\n  label(name) {\n    this.currentLabels.label(name, this.heap.offset + 1);\n  }\n  startLabels() {\n    this.labelsStack.push(new Labels());\n  }\n  stopLabels() {\n    let label = expect(this.labelsStack.pop());\n    label.patch(this.heap);\n  }\n}\nfunction isBuilderOpcode(op) {\n  return op < HighLevelBuilderOpcodes.Start;\n}\n\nfunction templateCompilationContext(evaluation, meta) {\n  let encoder = new EncoderImpl(evaluation.program.heap, meta, evaluation.stdlib);\n  return {\n    evaluation,\n    encoder,\n    meta\n  };\n}\n\nclass Compilers {\n  names = {};\n\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  funcs = [];\n  add(name, func) {\n    this.names[name] = this.funcs.push(func) - 1;\n  }\n  compile(op, sexp) {\n    let name = sexp[0];\n    let index = unwrap(this.names[name]);\n    let func = this.funcs[index];\n    assert(func, `expected an implementation for ${sexp[0]}`);\n    func(op, sexp);\n  }\n}\n\nconst EXPRESSIONS = new Compilers();\nEXPRESSIONS.add(opcodes.Concat, (op, [, parts]) => {\n  for (let part of parts) {\n    expr(op, part);\n  }\n  op(VM_CONCAT_OP, parts.length);\n});\nEXPRESSIONS.add(opcodes.Call, (op, [, expression, positional, named]) => {\n  if (isGetFreeHelper(expression)) {\n    op(HighLevelResolutionOpcodes.Helper, expression, handle => {\n      Call(op, handle, positional, named);\n    });\n  } else {\n    expr(op, expression);\n    CallDynamic(op, positional, named);\n  }\n});\nEXPRESSIONS.add(opcodes.Curry, (op, [, expr, type, positional, named]) => {\n  Curry(op, type, expr, positional, named);\n});\nEXPRESSIONS.add(opcodes.GetSymbol, (op, [, sym, path]) => {\n  op(VM_GET_VARIABLE_OP, sym);\n  withPath(op, path);\n});\nEXPRESSIONS.add(opcodes.GetLexicalSymbol, (op, [, sym, path]) => {\n  op(HighLevelResolutionOpcodes.TemplateLocal, sym, handle => {\n    op(VM_CONSTANT_REFERENCE_OP, handle);\n    withPath(op, path);\n  });\n});\nEXPRESSIONS.add(opcodes.GetStrictKeyword, (op, expr) => {\n  op(HighLevelResolutionOpcodes.Local, expr[1], _name => {\n    op(HighLevelResolutionOpcodes.Helper, expr, handle => {\n      Call(op, handle, null, null);\n    });\n  });\n});\nEXPRESSIONS.add(opcodes.GetFreeAsHelperHead, (op, expr) => {\n  op(HighLevelResolutionOpcodes.Local, expr[1], _name => {\n    op(HighLevelResolutionOpcodes.Helper, expr, handle => {\n      Call(op, handle, null, null);\n    });\n  });\n});\nfunction withPath(op, path) {\n  if (path === undefined || path.length === 0) return;\n  for (let i = 0; i < path.length; i++) {\n    op(VM_GET_PROPERTY_OP, path[i]);\n  }\n}\nEXPRESSIONS.add(opcodes.Undefined, op => PushPrimitiveReference(op, undefined));\nEXPRESSIONS.add(opcodes.HasBlock, (op, [, block]) => {\n  expr(op, block);\n  op(VM_HAS_BLOCK_OP);\n});\nEXPRESSIONS.add(opcodes.HasBlockParams, (op, [, block]) => {\n  expr(op, block);\n  op(VM_SPREAD_BLOCK_OP);\n  op(VM_COMPILE_BLOCK_OP);\n  op(VM_HAS_BLOCK_PARAMS_OP);\n});\nEXPRESSIONS.add(opcodes.IfInline, (op, [, condition, truthy, falsy]) => {\n  // Push in reverse order\n  expr(op, falsy);\n  expr(op, truthy);\n  expr(op, condition);\n  op(VM_IF_INLINE_OP);\n});\nEXPRESSIONS.add(opcodes.Not, (op, [, value]) => {\n  expr(op, value);\n  op(VM_NOT_OP);\n});\nEXPRESSIONS.add(opcodes.GetDynamicVar, (op, [, expression]) => {\n  expr(op, expression);\n  op(VM_GET_DYNAMIC_VAR_OP);\n});\nEXPRESSIONS.add(opcodes.Log, (op, [, positional]) => {\n  op(VM_PUSH_FRAME_OP);\n  SimpleArgs(op, positional, null, false);\n  op(VM_LOG_OP);\n  op(VM_POP_FRAME_OP);\n  op(VM_FETCH_OP, $v0);\n});\n\nfunction expr(op, expression) {\n  if (Array.isArray(expression)) {\n    EXPRESSIONS.compile(op, expression);\n  } else {\n    PushPrimitive(op, expression);\n    op(VM_PRIMITIVE_REFERENCE_OP);\n  }\n}\n\n/**\n * Push a reference onto the stack corresponding to a statically known primitive\n * @param value A JavaScript primitive (undefined, null, boolean, number or string)\n */\nfunction PushPrimitiveReference(op, value) {\n  PushPrimitive(op, value);\n  op(VM_PRIMITIVE_REFERENCE_OP);\n}\n\n/**\n * Push an encoded representation of a JavaScript primitive on the stack\n *\n * @param value A JavaScript primitive (undefined, null, boolean, number or string)\n */\nfunction PushPrimitive(op, primitive) {\n  let p = primitive;\n  if (typeof p === 'number') {\n    p = isSmallInt(p) ? encodeImmediate(p) : nonSmallIntOperand(p);\n  }\n  op(VM_PRIMITIVE_OP, p);\n}\n\n/**\n * Invoke a foreign function (a \"helper\") based on a statically known handle\n *\n * @param op The op creation function\n * @param handle A handle\n * @param positional An optional list of expressions to compile\n * @param named An optional list of named arguments (name + expression) to compile\n */\nfunction Call(op, handle, positional, named) {\n  op(VM_PUSH_FRAME_OP);\n  SimpleArgs(op, positional, named, false);\n  op(VM_HELPER_OP, handle);\n  op(VM_POP_FRAME_OP);\n  op(VM_FETCH_OP, $v0);\n}\n\n/**\n * Invoke a foreign function (a \"helper\") based on a dynamically loaded definition\n *\n * @param op The op creation function\n * @param positional An optional list of expressions to compile\n * @param named An optional list of named arguments (name + expression) to compile\n */\nfunction CallDynamic(op, positional, named, append) {\n  op(VM_PUSH_FRAME_OP);\n  SimpleArgs(op, positional, named, false);\n  op(VM_DUP_OP, $fp, 1);\n  op(VM_DYNAMIC_HELPER_OP);\n  if (append) {\n    op(VM_FETCH_OP, $v0);\n    append();\n    op(VM_POP_FRAME_OP);\n    op(VM_POP_OP, 1);\n  } else {\n    op(VM_POP_FRAME_OP);\n    op(VM_POP_OP, 1);\n    op(VM_FETCH_OP, $v0);\n  }\n}\n\n/**\n * Evaluate statements in the context of new dynamic scope entries. Move entries from the\n * stack into named entries in the dynamic scope, then evaluate the statements, then pop\n * the dynamic scope\n *\n * @param names a list of dynamic scope names\n * @param block a function that returns a list of statements to evaluate\n */\nfunction DynamicScope(op, names, block) {\n  op(VM_PUSH_DYNAMIC_SCOPE_OP);\n  op(VM_BIND_DYNAMIC_SCOPE_OP, names);\n  block();\n  op(VM_POP_DYNAMIC_SCOPE_OP);\n}\nfunction Curry(op, type, definition, positional, named) {\n  op(VM_PUSH_FRAME_OP);\n  SimpleArgs(op, positional, named, false);\n  op(VM_CAPTURE_ARGS_OP);\n  expr(op, definition);\n  op(VM_CURRY_OP, type, isStrictMode());\n  op(VM_POP_FRAME_OP);\n  op(VM_FETCH_OP, $v0);\n}\n\n/**\n * Yield to a block located at a particular symbol location.\n *\n * @param to the symbol containing the block to yield to\n * @param params optional block parameters to yield to the block\n */\nfunction YieldBlock(op, to, positional) {\n  SimpleArgs(op, positional, null, true);\n  op(VM_GET_BLOCK_OP, to);\n  op(VM_SPREAD_BLOCK_OP);\n  op(VM_COMPILE_BLOCK_OP);\n  op(VM_INVOKE_YIELD_OP);\n  op(VM_POP_SCOPE_OP);\n  op(VM_POP_FRAME_OP);\n}\n\n/**\n * Push an (optional) yieldable block onto the stack. The yieldable block must be known\n * statically at compile time.\n *\n * @param block An optional Compilable block\n */\nfunction PushYieldableBlock(op, block) {\n  PushSymbolTable(op, block && block[1]);\n  op(VM_PUSH_BLOCK_SCOPE_OP);\n  PushCompilable(op, block);\n}\n\n/**\n * Invoke a block that is known statically at compile time.\n *\n * @param block a Compilable block\n */\nfunction InvokeStaticBlock(op, block) {\n  op(VM_PUSH_FRAME_OP);\n  PushCompilable(op, block);\n  op(VM_COMPILE_BLOCK_OP);\n  op(VM_INVOKE_VIRTUAL_OP);\n  op(VM_POP_FRAME_OP);\n}\n\n/**\n * Invoke a static block, preserving some number of stack entries for use in\n * updating.\n *\n * @param block A compilable block\n * @param callerCount A number of stack entries to preserve\n */\nfunction InvokeStaticBlockWithStack(op, block, callerCount) {\n  let parameters = block[1];\n  let calleeCount = parameters.length;\n  let count = Math.min(callerCount, calleeCount);\n  if (count === 0) {\n    InvokeStaticBlock(op, block);\n    return;\n  }\n  op(VM_PUSH_FRAME_OP);\n  if (count) {\n    op(VM_CHILD_SCOPE_OP);\n    for (let i = 0; i < count; i++) {\n      op(VM_DUP_OP, $fp, callerCount - i);\n      op(VM_SET_VARIABLE_OP, parameters[i]);\n    }\n  }\n  PushCompilable(op, block);\n  op(VM_COMPILE_BLOCK_OP);\n  op(VM_INVOKE_VIRTUAL_OP);\n  if (count) {\n    op(VM_POP_SCOPE_OP);\n  }\n  op(VM_POP_FRAME_OP);\n}\nfunction PushSymbolTable(op, parameters) {\n  if (parameters !== null) {\n    op(VM_PUSH_SYMBOL_TABLE_OP, symbolTableOperand({\n      parameters\n    }));\n  } else {\n    PushPrimitive(op, null);\n  }\n}\nfunction PushCompilable(op, _block) {\n  if (_block === null) {\n    PushPrimitive(op, null);\n  } else {\n    op(VM_CONSTANT_OP, blockOperand(_block));\n  }\n}\n\n/**\n * Compile arguments, pushing an Arguments object onto the stack.\n *\n * @param args.params\n * @param args.hash\n * @param args.blocks\n * @param args.atNames\n */\nfunction CompileArgs(op, positional, named, blocks, atNames) {\n  let blockNames = blocks.names;\n  for (const name of blockNames) {\n    PushYieldableBlock(op, blocks.get(name));\n  }\n  let count = CompilePositional(op, positional);\n  let flags = count << 4;\n  if (atNames) flags |= 0b1000;\n  if (blocks.hasAny) {\n    flags |= 0b111;\n  }\n  let names = EMPTY_ARRAY;\n  if (named) {\n    names = named[0];\n    let val = named[1];\n    for (let i = 0; i < val.length; i++) {\n      expr(op, val[i]);\n    }\n  }\n  op(VM_PUSH_ARGS_OP, names, blockNames, flags);\n}\nfunction SimpleArgs(op, positional, named, atNames) {\n  if (positional === null && named === null) {\n    op(VM_PUSH_EMPTY_ARGS_OP);\n    return;\n  }\n  let count = CompilePositional(op, positional);\n  let flags = count << 4;\n  if (atNames) flags |= 0b1000;\n  let names = EMPTY_STRING_ARRAY;\n  if (named) {\n    names = named[0];\n    let val = named[1];\n    for (let i = 0; i < val.length; i++) {\n      expr(op, val[i]);\n    }\n  }\n  op(VM_PUSH_ARGS_OP, names, EMPTY_STRING_ARRAY, flags);\n}\n\n/**\n * Compile an optional list of positional arguments, which pushes each argument\n * onto the stack and returns the number of parameters compiled\n *\n * @param positional an optional list of positional arguments\n */\nfunction CompilePositional(op, positional) {\n  if (positional === null) return 0;\n  for (let i = 0; i < positional.length; i++) {\n    expr(op, positional[i]);\n  }\n  return positional.length;\n}\nfunction meta(layout) {\n  let [, locals, upvars, lexicalSymbols] = layout.block;\n  return {\n    symbols: {\n      locals,\n      upvars,\n      lexical: lexicalSymbols\n    },\n    scopeValues: layout.scope?.() ?? null,\n    isStrictMode: layout.isStrictMode,\n    moduleName: layout.moduleName,\n    owner: layout.owner,\n    size: locals.length\n  };\n}\n\nclass NamedBlocksImpl {\n  names;\n  constructor(blocks) {\n    this.blocks = blocks;\n    this.names = blocks ? Object.keys(blocks) : [];\n  }\n  get(name) {\n    if (!this.blocks) return null;\n    return this.blocks[name] || null;\n  }\n  has(name) {\n    let {\n      blocks\n    } = this;\n    return blocks !== null && name in blocks;\n  }\n  with(name, block) {\n    let {\n      blocks\n    } = this;\n    if (blocks) {\n      return new NamedBlocksImpl(assign({}, blocks, {\n        [name]: block\n      }));\n    } else {\n      return new NamedBlocksImpl({\n        [name]: block\n      });\n    }\n  }\n  get hasAny() {\n    return this.blocks !== null;\n  }\n}\nconst EMPTY_BLOCKS = new NamedBlocksImpl(null);\nfunction namedBlocks(blocks) {\n  if (blocks === null) {\n    return EMPTY_BLOCKS;\n  }\n  let out = dict();\n  let [keys, values] = blocks;\n  for (const [i, key] of enumerate(keys)) {\n    out[key] = unwrap(values[i]);\n  }\n  return new NamedBlocksImpl(out);\n}\n\nfunction SwitchCases(op, bootstrap, matcher) {\n  // Setup the switch DSL\n  let clauses = [];\n  let count = 0;\n  function when(match, callback) {\n    clauses.push({\n      match,\n      callback,\n      label: `CLAUSE${count++}`\n    });\n  }\n\n  // Call the callback\n  matcher(when);\n\n  // Emit the opcodes for the switch\n  op(VM_ENTER_OP, 1);\n  bootstrap();\n  op(HighLevelBuilderOpcodes.StartLabels);\n\n  // First, emit the jump opcodes. We don't need a jump for the last\n  // opcode, since it bleeds directly into its clause.\n  for (let clause of clauses.slice(0, -1)) {\n    op(VM_JUMP_EQ_OP, labelOperand(clause.label), clause.match);\n  }\n\n  // Enumerate the clauses in reverse order. Earlier matches will\n  // require fewer checks.\n  for (let i = clauses.length - 1; i >= 0; i--) {\n    let clause = unwrap(clauses[i]);\n    op(HighLevelBuilderOpcodes.Label, clause.label);\n    op(VM_POP_OP, 1);\n    clause.callback();\n\n    // The first match is special: it is placed directly before the END\n    // label, so no additional jump is needed at the end of it.\n    if (i !== 0) {\n      op(VM_JUMP_OP, labelOperand('END'));\n    }\n  }\n  op(HighLevelBuilderOpcodes.Label, 'END');\n  op(HighLevelBuilderOpcodes.StopLabels);\n  op(VM_EXIT_OP);\n}\n\n/**\n * A convenience for pushing some arguments on the stack and\n * running some code if the code needs to be re-executed during\n * updating execution if some of the arguments have changed.\n *\n * # Initial Execution\n *\n * The `args` function should push zero or more arguments onto\n * the stack and return the number of arguments pushed.\n *\n * The `body` function provides the instructions to execute both\n * during initial execution and during updating execution.\n *\n * Internally, this function starts by pushing a new frame, so\n * that the body can return and sets the return point ($ra) to\n * the ENDINITIAL label.\n *\n * It then executes the `args` function, which adds instructions\n * responsible for pushing the arguments for the block to the\n * stack. These arguments will be restored to the stack before\n * updating execution.\n *\n * Next, it adds the Enter opcode, which marks the current position\n * in the DOM, and remembers the current $pc (the next instruction)\n * as the first instruction to execute during updating execution.\n *\n * Next, it runs `body`, which adds the opcodes that should\n * execute both during initial execution and during updating execution.\n * If the `body` wishes to finish early, it should Jump to the\n * `FINALLY` label.\n *\n * Next, it adds the FINALLY label, followed by:\n *\n * - the Exit opcode, which finalizes the marked DOM started by the\n *   Enter opcode.\n * - the Return opcode, which returns to the current return point\n *   ($ra).\n *\n * Finally, it adds the ENDINITIAL label followed by the PopFrame\n * instruction, which restores $fp, $sp and $ra.\n *\n * # Updating Execution\n *\n * Updating execution for this `replayable` occurs if the `body` added an\n * assertion, via one of the `JumpIf`, `JumpUnless` or `AssertSame` opcodes.\n *\n * If, during updating executon, the assertion fails, the initial VM is\n * restored, and the stored arguments are pushed onto the stack. The DOM\n * between the starting and ending markers is cleared, and the VM's cursor\n * is set to the area just cleared.\n *\n * The return point ($ra) is set to -1, the exit instruction.\n *\n * Finally, the $pc is set to to the instruction saved off by the\n * Enter opcode during initial execution, and execution proceeds as\n * usual.\n *\n * The only difference is that when a `Return` instruction is\n * encountered, the program jumps to -1 rather than the END label,\n * and the PopFrame opcode is not needed.\n */\nfunction Replayable(op, args, body) {\n  // Start a new label frame, to give END and RETURN\n  // a unique meaning.\n\n  op(HighLevelBuilderOpcodes.StartLabels);\n  op(VM_PUSH_FRAME_OP);\n\n  // If the body invokes a block, its return will return to\n  // END. Otherwise, the return in RETURN will return to END.\n  op(VM_RETURN_TO_OP, labelOperand('ENDINITIAL'));\n\n  // Push the arguments onto the stack. The args() function\n  // tells us how many stack elements to retain for re-execution\n  // when updating.\n  let count = args();\n\n  // Start a new updating closure, remembering `count` elements\n  // from the stack. Everything after this point, and before END,\n  // will execute both initially and to update the block.\n  //\n  // The enter and exit opcodes also track the area of the DOM\n  // associated with this block. If an assertion inside the block\n  // fails (for example, the test value changes from true to false\n  // in an #if), the DOM is cleared and the program is re-executed,\n  // restoring `count` elements to the stack and executing the\n  // instructions between the enter and exit.\n  op(VM_ENTER_OP, count);\n\n  // Evaluate the body of the block. The body of the block may\n  // return, which will jump execution to END during initial\n  // execution, and exit the updating routine.\n  body();\n\n  // All execution paths in the body should run the FINALLY once\n  // they are done. It is executed both during initial execution\n  // and during updating execution.\n  op(HighLevelBuilderOpcodes.Label, 'FINALLY');\n\n  // Finalize the DOM.\n  op(VM_EXIT_OP);\n\n  // In initial execution, this is a noop: it returns to the\n  // immediately following opcode. In updating execution, this\n  // exits the updating routine.\n  op(VM_RETURN_OP);\n\n  // Cleanup code for the block. Runs on initial execution\n  // but not on updating.\n  op(HighLevelBuilderOpcodes.Label, 'ENDINITIAL');\n  op(VM_POP_FRAME_OP);\n  op(HighLevelBuilderOpcodes.StopLabels);\n}\n\n/**\n * A specialized version of the `replayable` convenience that allows the\n * caller to provide different code based upon whether the item at\n * the top of the stack is true or false.\n *\n * As in `replayable`, the `ifTrue` and `ifFalse` code can invoke `return`.\n *\n * During the initial execution, a `return` will continue execution\n * in the cleanup code, which finalizes the current DOM block and pops\n * the current frame.\n *\n * During the updating execution, a `return` will exit the updating\n * routine, as it can reuse the DOM block and is always only a single\n * frame deep.\n */\nfunction ReplayableIf(op, args, ifTrue, ifFalse) {\n  return Replayable(op, args, () => {\n    // If the conditional is false, jump to the ELSE label.\n    op(VM_JUMP_UNLESS_OP, labelOperand('ELSE'));\n    // Otherwise, execute the code associated with the true branch.\n    ifTrue();\n    // We're done, so return. In the initial execution, this runs\n    // the cleanup code. In the updating VM, it exits the updating\n    // routine.\n    op(VM_JUMP_OP, labelOperand('FINALLY'));\n    op(HighLevelBuilderOpcodes.Label, 'ELSE');\n\n    // If the conditional is false, and code associatied ith the\n    // false branch was provided, execute it. If there was no code\n    // associated with the false branch, jumping to the else statement\n    // has no other behavior.\n    if (ifFalse !== undefined) {\n      ifFalse();\n    }\n  });\n}\n\nconst ATTRS_BLOCK = '&attrs';\n\n// {{component}}\n\n// <Component>\n\n// chokepoint\n\nfunction InvokeComponent(op, component, _elementBlock, positional, named, _blocks) {\n  let {\n    compilable,\n    capabilities,\n    handle\n  } = component;\n  let elementBlock = _elementBlock ? [_elementBlock, []] : null;\n  let blocks = namedBlocks(_blocks);\n  if (compilable) {\n    op(VM_PUSH_COMPONENT_DEFINITION_OP, handle);\n    InvokeStaticComponent(op, {\n      capabilities: capabilities,\n      layout: compilable,\n      elementBlock,\n      positional,\n      named,\n      blocks\n    });\n  } else {\n    op(VM_PUSH_COMPONENT_DEFINITION_OP, handle);\n    InvokeNonStaticComponent(op, {\n      capabilities: capabilities,\n      elementBlock,\n      positional,\n      named,\n      atNames: true,\n      blocks\n    });\n  }\n}\nfunction InvokeDynamicComponent(op, definition, _elementBlock, positional, named, _blocks, atNames, curried) {\n  let elementBlock = _elementBlock ? [_elementBlock, []] : null;\n  let blocks = namedBlocks(_blocks);\n  Replayable(op, () => {\n    expr(op, definition);\n    op(VM_DUP_OP, $sp, 0);\n    return 2;\n  }, () => {\n    op(VM_JUMP_UNLESS_OP, labelOperand('ELSE'));\n    if (curried) {\n      op(VM_RESOLVE_CURRIED_COMPONENT_OP);\n    } else {\n      op(VM_RESOLVE_DYNAMIC_COMPONENT_OP, isStrictMode());\n    }\n    op(VM_PUSH_DYNAMIC_COMPONENT_INSTANCE_OP);\n    InvokeNonStaticComponent(op, {\n      capabilities: true,\n      elementBlock,\n      positional,\n      named,\n      atNames,\n      blocks\n    });\n    op(HighLevelBuilderOpcodes.Label, 'ELSE');\n  });\n}\nfunction InvokeStaticComponent(op, {\n  capabilities,\n  layout,\n  elementBlock,\n  positional,\n  named,\n  blocks\n}) {\n  let {\n    symbolTable\n  } = layout;\n  let bailOut = hasCapability(capabilities, InternalComponentCapabilities.prepareArgs);\n  if (bailOut) {\n    InvokeNonStaticComponent(op, {\n      capabilities,\n      elementBlock,\n      positional,\n      named,\n      atNames: true,\n      blocks,\n      layout\n    });\n    return;\n  }\n  op(VM_FETCH_OP, $s0);\n  op(VM_DUP_OP, $sp, 1);\n  op(VM_LOAD_OP, $s0);\n  op(VM_PUSH_FRAME_OP);\n\n  // Setup arguments\n  let {\n    symbols\n  } = symbolTable;\n\n  // As we push values onto the stack, we store the symbols associated  with them\n  // so that we can set them on the scope later on with SetVariable and SetBlock\n  let blockSymbols = [];\n  let argSymbols = [];\n  let argNames = [];\n\n  // First we push the blocks onto the stack\n  let blockNames = blocks.names;\n\n  // Starting with the attrs block, if it exists and is referenced in the component\n  if (elementBlock !== null) {\n    let symbol = symbols.indexOf(ATTRS_BLOCK);\n    if (symbol !== -1) {\n      PushYieldableBlock(op, elementBlock);\n      blockSymbols.push(symbol);\n    }\n  }\n\n  // Followed by the other blocks, if they exist and are referenced in the component.\n  // Also store the index of the associated symbol.\n  for (const name of blockNames) {\n    let symbol = symbols.indexOf(`&${name}`);\n    if (symbol !== -1) {\n      PushYieldableBlock(op, blocks.get(name));\n      blockSymbols.push(symbol);\n    }\n  }\n\n  // Next up we have arguments. If the component has the `createArgs` capability,\n  // then it wants access to the arguments in JavaScript. We can't know whether\n  // or not an argument is used, so we have to give access to all of them.\n  if (hasCapability(capabilities, InternalComponentCapabilities.createArgs)) {\n    // First we push positional arguments\n    let count = CompilePositional(op, positional);\n\n    // setup the flags with the count of positionals, and to indicate that atNames\n    // are used\n    let flags = count << 4;\n    flags |= 0b1000;\n    let names = EMPTY_STRING_ARRAY;\n\n    // Next, if named args exist, push them all. If they have an associated symbol\n    // in the invoked component (e.g. they are used within its template), we push\n    // that symbol. If not, we still push the expression as it may be used, and\n    // we store the symbol as -1 (this is used later).\n    if (named !== null) {\n      names = named[0];\n      let val = named[1];\n      for (let i = 0; i < val.length; i++) {\n        let symbol = symbols.indexOf(unwrap(names[i]));\n        expr(op, val[i]);\n        argSymbols.push(symbol);\n      }\n    }\n\n    // Finally, push the VM arguments themselves. These args won't need access\n    // to blocks (they aren't accessible from userland anyways), so we push an\n    // empty array instead of the actual block names.\n    op(VM_PUSH_ARGS_OP, names, EMPTY_STRING_ARRAY, flags);\n\n    // And push an extra pop operation to remove the args before we begin setting\n    // variables on the local context\n    argSymbols.push(-1);\n  } else if (named !== null) {\n    // If the component does not have the `createArgs` capability, then the only\n    // expressions we need to push onto the stack are those that are actually\n    // referenced in the template of the invoked component (e.g. have symbols).\n    let names = named[0];\n    let val = named[1];\n    for (let i = 0; i < val.length; i++) {\n      let name = unwrap(names[i]);\n      let symbol = symbols.indexOf(name);\n      if (symbol !== -1) {\n        expr(op, val[i]);\n        argSymbols.push(symbol);\n        argNames.push(name);\n      }\n    }\n  }\n  op(VM_BEGIN_COMPONENT_TRANSACTION_OP, $s0);\n  if (hasCapability(capabilities, InternalComponentCapabilities.dynamicScope)) {\n    op(VM_PUSH_DYNAMIC_SCOPE_OP);\n  }\n  if (hasCapability(capabilities, InternalComponentCapabilities.createInstance)) {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    op(VM_CREATE_COMPONENT_OP, blocks.has('default') | 0);\n  }\n  op(VM_REGISTER_COMPONENT_DESTRUCTOR_OP, $s0);\n  if (hasCapability(capabilities, InternalComponentCapabilities.createArgs)) {\n    op(VM_GET_COMPONENT_SELF_OP, $s0);\n  } else {\n    op(VM_GET_COMPONENT_SELF_OP, $s0, argNames);\n  }\n\n  // Setup the new root scope for the component\n  op(VM_ROOT_SCOPE_OP, symbols.length + 1, Object.keys(blocks).length > 0 ? 1 : 0);\n\n  // Pop the self reference off the stack and set it to the symbol for `this`\n  // in the new scope. This is why all subsequent symbols are increased by one.\n  op(VM_SET_VARIABLE_OP, 0);\n\n  // Going in reverse, now we pop the args/blocks off the stack, starting with\n  // arguments, and assign them to their symbols in the new scope.\n  for (const symbol of reverse(argSymbols)) {\n    // for (let i = argSymbols.length - 1; i >= 0; i--) {\n    //   let symbol = argSymbols[i];\n\n    if (symbol === -1) {\n      // The expression was not bound to a local symbol, it was only pushed to be\n      // used with VM args in the javascript side\n      op(VM_POP_OP, 1);\n    } else {\n      op(VM_SET_VARIABLE_OP, symbol + 1);\n    }\n  }\n\n  // if any positional params exist, pop them off the stack as well\n  if (positional !== null) {\n    op(VM_POP_OP, positional.length);\n  }\n\n  // Finish up by popping off and assigning blocks\n  for (const symbol of reverse(blockSymbols)) {\n    op(VM_SET_BLOCK_OP, symbol + 1);\n  }\n  op(VM_CONSTANT_OP, layoutOperand(layout));\n  op(VM_COMPILE_BLOCK_OP);\n  op(VM_INVOKE_VIRTUAL_OP);\n  op(VM_DID_RENDER_LAYOUT_OP, $s0);\n  op(VM_POP_FRAME_OP);\n  op(VM_POP_SCOPE_OP);\n  if (hasCapability(capabilities, InternalComponentCapabilities.dynamicScope)) {\n    op(VM_POP_DYNAMIC_SCOPE_OP);\n  }\n  op(VM_COMMIT_COMPONENT_TRANSACTION_OP);\n  op(VM_LOAD_OP, $s0);\n}\nfunction InvokeNonStaticComponent(op, {\n  capabilities,\n  elementBlock,\n  positional,\n  named,\n  atNames,\n  blocks: namedBlocks,\n  layout\n}) {\n  let bindableBlocks = Boolean(namedBlocks);\n  let bindableAtNames = capabilities === true || hasCapability(capabilities, InternalComponentCapabilities.prepareArgs) || named?.[0].length !== 0;\n  let blocks = namedBlocks.with('attrs', elementBlock);\n  op(VM_FETCH_OP, $s0);\n  op(VM_DUP_OP, $sp, 1);\n  op(VM_LOAD_OP, $s0);\n  op(VM_PUSH_FRAME_OP);\n  CompileArgs(op, positional, named, blocks, atNames);\n  op(VM_PREPARE_ARGS_OP, $s0);\n  invokePreparedComponent(op, blocks.has('default'), bindableBlocks, bindableAtNames, () => {\n    if (layout) {\n      op(VM_PUSH_SYMBOL_TABLE_OP, symbolTableOperand(layout.symbolTable));\n      op(VM_CONSTANT_OP, layoutOperand(layout));\n      op(VM_COMPILE_BLOCK_OP);\n    } else {\n      op(VM_GET_COMPONENT_LAYOUT_OP, $s0);\n    }\n    op(VM_POPULATE_LAYOUT_OP, $s0);\n  });\n  op(VM_LOAD_OP, $s0);\n}\nfunction WrappedComponent(op, layout, attrsBlockNumber) {\n  op(HighLevelBuilderOpcodes.StartLabels);\n  WithSavedRegister(op, $s1, () => {\n    op(VM_GET_COMPONENT_TAG_NAME_OP, $s0);\n    op(VM_PRIMITIVE_REFERENCE_OP);\n    op(VM_DUP_OP, $sp, 0);\n  });\n  op(VM_JUMP_UNLESS_OP, labelOperand('BODY'));\n  op(VM_FETCH_OP, $s1);\n  op(VM_PUT_COMPONENT_OPERATIONS_OP);\n  op(VM_OPEN_DYNAMIC_ELEMENT_OP);\n  op(VM_DID_CREATE_ELEMENT_OP, $s0);\n  YieldBlock(op, attrsBlockNumber, null);\n  op(VM_FLUSH_ELEMENT_OP);\n  op(HighLevelBuilderOpcodes.Label, 'BODY');\n  InvokeStaticBlock(op, [layout.block[0], []]);\n  op(VM_FETCH_OP, $s1);\n  op(VM_JUMP_UNLESS_OP, labelOperand('END'));\n  op(VM_CLOSE_ELEMENT_OP);\n  op(HighLevelBuilderOpcodes.Label, 'END');\n  op(VM_LOAD_OP, $s1);\n  op(HighLevelBuilderOpcodes.StopLabels);\n}\nfunction invokePreparedComponent(op, hasBlock, bindableBlocks, bindableAtNames, populateLayout = null) {\n  op(VM_BEGIN_COMPONENT_TRANSACTION_OP, $s0);\n  op(VM_PUSH_DYNAMIC_SCOPE_OP);\n\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  op(VM_CREATE_COMPONENT_OP, hasBlock | 0);\n\n  // this has to run after createComponent to allow\n  // for late-bound layouts, but a caller is free\n  // to populate the layout earlier if it wants to\n  // and do nothing here.\n  if (populateLayout) {\n    populateLayout();\n  }\n  op(VM_REGISTER_COMPONENT_DESTRUCTOR_OP, $s0);\n  op(VM_GET_COMPONENT_SELF_OP, $s0);\n  op(VM_VIRTUAL_ROOT_SCOPE_OP, $s0);\n  op(VM_SET_VARIABLE_OP, 0);\n  if (bindableAtNames) op(VM_SET_NAMED_VARIABLES_OP, $s0);\n  if (bindableBlocks) op(VM_SET_BLOCKS_OP, $s0);\n  op(VM_POP_OP, 1);\n  op(VM_INVOKE_COMPONENT_LAYOUT_OP, $s0);\n  op(VM_DID_RENDER_LAYOUT_OP, $s0);\n  op(VM_POP_FRAME_OP);\n  op(VM_POP_SCOPE_OP);\n  op(VM_POP_DYNAMIC_SCOPE_OP);\n  op(VM_COMMIT_COMPONENT_TRANSACTION_OP);\n}\nfunction InvokeBareComponent(op) {\n  op(VM_FETCH_OP, $s0);\n  op(VM_DUP_OP, $sp, 1);\n  op(VM_LOAD_OP, $s0);\n  op(VM_PUSH_FRAME_OP);\n  op(VM_PUSH_EMPTY_ARGS_OP);\n  op(VM_PREPARE_ARGS_OP, $s0);\n  invokePreparedComponent(op, false, false, true, () => {\n    op(VM_GET_COMPONENT_LAYOUT_OP, $s0);\n    op(VM_POPULATE_LAYOUT_OP, $s0);\n  });\n  op(VM_LOAD_OP, $s0);\n}\nfunction WithSavedRegister(op, register, block) {\n  op(VM_FETCH_OP, register);\n  block();\n  op(VM_LOAD_OP, register);\n}\n\nconst STATEMENTS = new Compilers();\nconst INFLATE_ATTR_TABLE = ['class', 'id', 'value', 'name', 'type', 'style', 'href'];\nconst INFLATE_TAG_TABLE = ['div', 'span', 'p', 'a'];\nfunction inflateTagName(tagName) {\n  return typeof tagName === 'string' ? tagName : INFLATE_TAG_TABLE[tagName];\n}\nfunction inflateAttrName(attrName) {\n  return typeof attrName === 'string' ? attrName : INFLATE_ATTR_TABLE[attrName];\n}\nSTATEMENTS.add(opcodes.Comment, (op, sexp) => op(VM_COMMENT_OP, sexp[1]));\nSTATEMENTS.add(opcodes.CloseElement, op => op(VM_CLOSE_ELEMENT_OP));\nSTATEMENTS.add(opcodes.FlushElement, op => op(VM_FLUSH_ELEMENT_OP));\nSTATEMENTS.add(opcodes.Modifier, (op, [, expression, positional, named]) => {\n  if (isGetFreeModifier(expression)) {\n    op(HighLevelResolutionOpcodes.Modifier, expression, handle => {\n      op(VM_PUSH_FRAME_OP);\n      SimpleArgs(op, positional, named, false);\n      op(VM_MODIFIER_OP, handle);\n      op(VM_POP_FRAME_OP);\n    });\n  } else {\n    expr(op, expression);\n    op(VM_PUSH_FRAME_OP);\n    SimpleArgs(op, positional, named, false);\n    op(VM_DUP_OP, $fp, 1);\n    op(VM_DYNAMIC_MODIFIER_OP);\n    op(VM_POP_FRAME_OP);\n  }\n});\nSTATEMENTS.add(opcodes.StaticAttr, (op, [, name, value, namespace]) => {\n  op(VM_STATIC_ATTR_OP, inflateAttrName(name), value, namespace ?? null);\n});\nSTATEMENTS.add(opcodes.StaticComponentAttr, (op, [, name, value, namespace]) => {\n  op(VM_STATIC_COMPONENT_ATTR_OP, inflateAttrName(name), value, namespace ?? null);\n});\nSTATEMENTS.add(opcodes.DynamicAttr, (op, [, name, value, namespace]) => {\n  expr(op, value);\n  op(VM_DYNAMIC_ATTR_OP, inflateAttrName(name), false, namespace ?? null);\n});\nSTATEMENTS.add(opcodes.TrustingDynamicAttr, (op, [, name, value, namespace]) => {\n  expr(op, value);\n  op(VM_DYNAMIC_ATTR_OP, inflateAttrName(name), true, namespace ?? null);\n});\nSTATEMENTS.add(opcodes.ComponentAttr, (op, [, name, value, namespace]) => {\n  expr(op, value);\n  op(VM_COMPONENT_ATTR_OP, inflateAttrName(name), false, namespace ?? null);\n});\nSTATEMENTS.add(opcodes.TrustingComponentAttr, (op, [, name, value, namespace]) => {\n  expr(op, value);\n  op(VM_COMPONENT_ATTR_OP, inflateAttrName(name), true, namespace ?? null);\n});\nSTATEMENTS.add(opcodes.OpenElement, (op, [, tag]) => {\n  op(VM_OPEN_ELEMENT_OP, inflateTagName(tag));\n});\nSTATEMENTS.add(opcodes.OpenElementWithSplat, (op, [, tag]) => {\n  op(VM_PUT_COMPONENT_OPERATIONS_OP);\n  op(VM_OPEN_ELEMENT_OP, inflateTagName(tag));\n});\nSTATEMENTS.add(opcodes.Component, (op, [, expr, elementBlock, named, blocks]) => {\n  if (isGetFreeComponent(expr)) {\n    op(HighLevelResolutionOpcodes.Component, expr, component => {\n      InvokeComponent(op, component, elementBlock, null, named, blocks);\n    });\n  } else {\n    // otherwise, the component name was an expression, so resolve the expression\n    // and invoke it as a dynamic component\n    InvokeDynamicComponent(op, expr, elementBlock, null, named, blocks, true, true);\n  }\n});\nSTATEMENTS.add(opcodes.Yield, (op, [, to, params]) => YieldBlock(op, to, params));\nSTATEMENTS.add(opcodes.AttrSplat, (op, [, to]) => YieldBlock(op, to, null));\nSTATEMENTS.add(opcodes.Debugger, (op, [, locals, upvars, lexical]) => {\n  op(VM_DEBUGGER_OP, debugSymbolsOperand(locals, upvars, lexical));\n});\nSTATEMENTS.add(opcodes.Append, (op, [, value]) => {\n  // Special case for static values\n  if (!Array.isArray(value)) {\n    op(VM_TEXT_OP, value === null || value === undefined ? '' : String(value));\n  } else if (isGetFreeComponentOrHelper(value)) {\n    op(HighLevelResolutionOpcodes.OptionalComponentOrHelper, value, {\n      ifComponent(component) {\n        InvokeComponent(op, component, null, null, null, null);\n      },\n      ifHelper(handle) {\n        op(VM_PUSH_FRAME_OP);\n        Call(op, handle, null, null);\n        op(VM_INVOKE_STATIC_OP, stdlibOperand('cautious-non-dynamic-append'));\n        op(VM_POP_FRAME_OP);\n      },\n      ifValue(handle) {\n        op(VM_PUSH_FRAME_OP);\n        op(VM_CONSTANT_REFERENCE_OP, handle);\n        op(VM_INVOKE_STATIC_OP, stdlibOperand('cautious-non-dynamic-append'));\n        op(VM_POP_FRAME_OP);\n      }\n    });\n  } else if (value[0] === opcodes.Call) {\n    let [, expression, positional, named] = value;\n    if (isGetFreeComponentOrHelper(expression)) {\n      op(HighLevelResolutionOpcodes.ComponentOrHelper, expression, {\n        ifComponent(component) {\n          InvokeComponent(op, component, null, positional, hashToArgs(named), null);\n        },\n        ifHelper(handle) {\n          op(VM_PUSH_FRAME_OP);\n          Call(op, handle, positional, named);\n          op(VM_INVOKE_STATIC_OP, stdlibOperand('cautious-non-dynamic-append'));\n          op(VM_POP_FRAME_OP);\n        }\n      });\n    } else {\n      SwitchCases(op, () => {\n        expr(op, expression);\n        op(VM_DYNAMIC_CONTENT_TYPE_OP);\n      }, when => {\n        when(ContentType.Component, () => {\n          op(VM_RESOLVE_CURRIED_COMPONENT_OP);\n          op(VM_PUSH_DYNAMIC_COMPONENT_INSTANCE_OP);\n          InvokeNonStaticComponent(op, {\n            capabilities: true,\n            elementBlock: null,\n            positional,\n            named,\n            atNames: false,\n            blocks: namedBlocks(null)\n          });\n        });\n        when(ContentType.Helper, () => {\n          CallDynamic(op, positional, named, () => {\n            op(VM_INVOKE_STATIC_OP, stdlibOperand('cautious-non-dynamic-append'));\n          });\n        });\n      });\n    }\n  } else {\n    op(VM_PUSH_FRAME_OP);\n    expr(op, value);\n    op(VM_INVOKE_STATIC_OP, stdlibOperand('cautious-append'));\n    op(VM_POP_FRAME_OP);\n  }\n});\nSTATEMENTS.add(opcodes.TrustingAppend, (op, [, value]) => {\n  if (!Array.isArray(value)) {\n    op(VM_TEXT_OP, value === null || value === undefined ? '' : String(value));\n  } else {\n    op(VM_PUSH_FRAME_OP);\n    expr(op, value);\n    op(VM_INVOKE_STATIC_OP, stdlibOperand('trusting-append'));\n    op(VM_POP_FRAME_OP);\n  }\n});\nSTATEMENTS.add(opcodes.Block, (op, [, expr, positional, named, blocks]) => {\n  if (isGetFreeComponent(expr)) {\n    op(HighLevelResolutionOpcodes.Component, expr, component => {\n      InvokeComponent(op, component, null, positional, hashToArgs(named), blocks);\n    });\n  } else {\n    InvokeDynamicComponent(op, expr, null, positional, named, blocks, false, false);\n  }\n});\nSTATEMENTS.add(opcodes.InElement, (op, [, block, guid, destination, insertBefore]) => {\n  ReplayableIf(op, () => {\n    expr(op, guid);\n    if (insertBefore === undefined) {\n      PushPrimitiveReference(op, undefined);\n    } else {\n      expr(op, insertBefore);\n    }\n    expr(op, destination);\n    op(VM_DUP_OP, $sp, 0);\n    return 4;\n  }, () => {\n    op(VM_PUSH_REMOTE_ELEMENT_OP);\n    InvokeStaticBlock(op, block);\n    op(VM_POP_REMOTE_ELEMENT_OP);\n  });\n});\nSTATEMENTS.add(opcodes.If, (op, [, condition, block, inverse]) => ReplayableIf(op, () => {\n  expr(op, condition);\n  op(VM_TO_BOOLEAN_OP);\n  return 1;\n}, () => {\n  InvokeStaticBlock(op, block);\n}, inverse ? () => {\n  InvokeStaticBlock(op, inverse);\n} : undefined));\nSTATEMENTS.add(opcodes.Each, (op, [, value, key, block, inverse]) => Replayable(op, () => {\n  if (key) {\n    expr(op, key);\n  } else {\n    PushPrimitiveReference(op, null);\n  }\n  expr(op, value);\n  return 2;\n}, () => {\n  op(VM_ENTER_LIST_OP, labelOperand('BODY'), labelOperand('ELSE'));\n  op(VM_PUSH_FRAME_OP);\n  op(VM_DUP_OP, $fp, 1);\n  op(VM_RETURN_TO_OP, labelOperand('ITER'));\n  op(HighLevelBuilderOpcodes.Label, 'ITER');\n  op(VM_ITERATE_OP, labelOperand('BREAK'));\n  op(HighLevelBuilderOpcodes.Label, 'BODY');\n  InvokeStaticBlockWithStack(op, block, 2);\n  op(VM_POP_OP, 2);\n  op(VM_JUMP_OP, labelOperand('FINALLY'));\n  op(HighLevelBuilderOpcodes.Label, 'BREAK');\n  op(VM_POP_FRAME_OP);\n  op(VM_EXIT_LIST_OP);\n  op(VM_JUMP_OP, labelOperand('FINALLY'));\n  op(HighLevelBuilderOpcodes.Label, 'ELSE');\n  if (inverse) {\n    InvokeStaticBlock(op, inverse);\n  }\n}));\nSTATEMENTS.add(opcodes.Let, (op, [, positional, block]) => {\n  let count = CompilePositional(op, positional);\n  InvokeStaticBlockWithStack(op, block, count);\n});\nSTATEMENTS.add(opcodes.WithDynamicVars, (op, [, named, block]) => {\n  if (named) {\n    let [names, expressions] = named;\n    CompilePositional(op, expressions);\n    DynamicScope(op, names, () => {\n      InvokeStaticBlock(op, block);\n    });\n  } else {\n    InvokeStaticBlock(op, block);\n  }\n});\nSTATEMENTS.add(opcodes.InvokeComponent, (op, [, expr, positional, named, blocks]) => {\n  if (isGetFreeComponent(expr)) {\n    op(HighLevelResolutionOpcodes.Component, expr, component => {\n      InvokeComponent(op, component, null, positional, hashToArgs(named), blocks);\n    });\n  } else {\n    InvokeDynamicComponent(op, expr, null, positional, named, blocks, false, false);\n  }\n});\nfunction hashToArgs(hash) {\n  if (hash === null) return null;\n  let names = hash[0].map(key => `@${key}`);\n  return [names, hash[1]];\n}\n\nconst PLACEHOLDER_HANDLE = -1;\nclass CompilableTemplateImpl {\n  static {\n  }\n  compiled = new WeakMap();\n  constructor(statements, meta,\n  // Part of CompilableTemplate\n  symbolTable,\n  // Used for debugging\n  moduleName = 'plain block') {\n    this.statements = statements;\n    this.meta = meta;\n    this.symbolTable = symbolTable;\n    this.moduleName = moduleName;\n  }\n\n  // Part of CompilableTemplate\n  compile(context) {\n    return maybeCompile(this, context);\n  }\n}\nfunction compilable(layout, moduleName) {\n  let [statements, symbols] = layout.block;\n  return new CompilableTemplateImpl(statements, meta(layout), {\n    symbols\n  }, moduleName);\n}\nfunction maybeCompile(compilable, context) {\n  if (compilable.compiled.has(context)) {\n    return compilable.compiled.get(context);\n  }\n  compilable.compiled.set(context, PLACEHOLDER_HANDLE);\n  let {\n    statements,\n    meta\n  } = compilable;\n  let result = compileStatements(statements, meta, context);\n  compilable.compiled.set(context, result);\n  return result;\n}\nfunction compileStatements(statements, meta, syntaxContext) {\n  let sCompiler = STATEMENTS;\n  let context = templateCompilationContext(syntaxContext, meta);\n  let {\n    encoder,\n    evaluation\n  } = context;\n  function pushOp(...op) {\n    encodeOp(encoder, evaluation, meta, op);\n  }\n  for (const statement of statements) {\n    sCompiler.compile(pushOp, statement);\n  }\n  let handle = context.encoder.commit(meta.size);\n  return handle;\n}\nfunction compilableBlock(block, containing) {\n  return new CompilableTemplateImpl(block[0], containing, {\n    parameters: block[1] || EMPTY_ARRAY\n  });\n}\n\nclass WrappedBuilder {\n  symbolTable;\n  compiled = null;\n  attrsBlockNumber;\n  meta;\n  constructor(layout, moduleName) {\n    this.layout = layout;\n    this.moduleName = moduleName;\n    let {\n      block\n    } = layout;\n    let [, symbols] = block;\n    symbols = symbols.slice();\n\n    // ensure ATTRS_BLOCK is always included (only once) in the list of symbols\n    let attrsBlockIndex = symbols.indexOf(ATTRS_BLOCK);\n    if (attrsBlockIndex === -1) {\n      this.attrsBlockNumber = symbols.push(ATTRS_BLOCK);\n    } else {\n      this.attrsBlockNumber = attrsBlockIndex + 1;\n    }\n    this.symbolTable = {\n      symbols\n    };\n    this.meta = meta(layout);\n  }\n  compile(syntax) {\n    if (this.compiled !== null) return this.compiled;\n    let m = meta(this.layout);\n    let context = templateCompilationContext(syntax, m);\n    let {\n      encoder,\n      evaluation\n    } = context;\n    function pushOp(...op) {\n      encodeOp(encoder, evaluation, m, op);\n    }\n    WrappedComponent(pushOp, this.layout, this.attrsBlockNumber);\n    let handle = context.encoder.commit(m.size);\n    if (typeof handle !== 'number') {\n      return handle;\n    }\n    this.compiled = handle;\n    return handle;\n  }\n}\n\nlet clientId = 0;\nlet templateCacheCounters = {\n  cacheHit: 0,\n  cacheMiss: 0\n};\n\n// These interfaces are for backwards compatibility, some addons use these intimate APIs\n\n/**\n * Wraps a template js in a template module to change it into a factory\n * that handles lazy parsing the template and to create per env singletons\n * of the template.\n */\nfunction templateFactory({\n  id: templateId,\n  moduleName,\n  block,\n  scope,\n  isStrictMode\n}) {\n  // TODO(template-refactors): This should be removed in the near future, as it\n  // appears that id is unused. It is currently kept for backwards compat reasons.\n  let id = templateId || `client-${clientId++}`;\n\n  // TODO: This caches JSON serialized output once in case a template is\n  // compiled by multiple owners, but we haven't verified if this is actually\n  // helpful. We should benchmark this in the future.\n  let parsedBlock;\n  let ownerlessTemplate = null;\n  let templateCache = new WeakMap();\n  let factory = owner => {\n    if (parsedBlock === undefined) {\n      parsedBlock = JSON.parse(block);\n    }\n    if (owner === undefined) {\n      if (ownerlessTemplate === null) {\n        templateCacheCounters.cacheMiss++;\n        ownerlessTemplate = new TemplateImpl({\n          id,\n          block: parsedBlock,\n          moduleName,\n          owner: null,\n          scope,\n          isStrictMode\n        });\n      } else {\n        templateCacheCounters.cacheHit++;\n      }\n      return ownerlessTemplate;\n    }\n    let result = templateCache.get(owner);\n    if (result === undefined) {\n      templateCacheCounters.cacheMiss++;\n      result = new TemplateImpl({\n        id,\n        block: parsedBlock,\n        moduleName,\n        owner,\n        scope,\n        isStrictMode\n      });\n      templateCache.set(owner, result);\n    } else {\n      templateCacheCounters.cacheHit++;\n    }\n    return result;\n  };\n  factory.__id = id;\n  factory.__meta = {\n    moduleName\n  };\n  return factory;\n}\nclass TemplateImpl {\n  result = 'ok';\n  layout = null;\n  wrappedLayout = null;\n  constructor(parsedLayout) {\n    this.parsedLayout = parsedLayout;\n  }\n  get moduleName() {\n    return this.parsedLayout.moduleName;\n  }\n  get id() {\n    return this.parsedLayout.id;\n  }\n\n  // TODO(template-refactors): This should be removed in the near future, it is\n  // only being exposed for backwards compatibility\n  get referrer() {\n    return {\n      moduleName: this.parsedLayout.moduleName,\n      owner: this.parsedLayout.owner\n    };\n  }\n  asLayout() {\n    if (this.layout) return this.layout;\n    return this.layout = compilable(assign({}, this.parsedLayout), this.moduleName);\n  }\n  asWrappedLayout() {\n    if (this.wrappedLayout) return this.wrappedLayout;\n    return this.wrappedLayout = new WrappedBuilder(assign({}, this.parsedLayout), this.moduleName);\n  }\n}\n\nexport { CallDynamic as C, EMPTY_BLOCKS as E, InvokeStaticBlock as I, SwitchCases as S, WrappedBuilder as W, templateCacheCounters as a, compileStatements as b, compilable as c, InvokeStaticBlockWithStack as d, templateCompilationContext as e, EncoderImpl as f, encodeOp as g, InvokeBareComponent as h, invokePreparedComponent as i, meta as m, templateFactory as t };\n","/**\n  Checks to see if the `methodName` exists on the `obj`.\n\n  ```javascript\n  let foo = { bar: function() { return 'bar'; }, baz: null };\n\n  Ember.canInvoke(foo, 'bar'); // true\n  Ember.canInvoke(foo, 'baz'); // false\n  Ember.canInvoke(foo, 'bat'); // false\n  ```\n\n  @method canInvoke\n  @for Ember\n  @param {Object} obj The object to check for the method\n  @param {String} methodName The method name to check for\n  @return {Boolean}\n  @private\n*/\nfunction canInvoke(obj, methodName) {\n  return obj != null && typeof obj[methodName] === 'function';\n}\n\n/**\n  @module @ember/utils\n*/\n\nexport { canInvoke as c };\n","import { d as isObject } from './mandatory-setter-DLKyVs4Q.js';\n\nconst PROXIES = new WeakSet();\nfunction isProxy(value) {\n  if (isObject(value)) {\n    return PROXIES.has(value);\n  }\n  return false;\n}\nfunction setProxy(object) {\n  if (isObject(object)) {\n    PROXIES.add(object);\n  }\n}\n\nexport { isProxy as i, setProxy as s };\n","import { toIterator, getPath } from '../@glimmer/global-context/index.js';\nimport { E as EMPTY_ARRAY } from './array-utils-CZQxrdD3.js';\nimport { a as isIndexable } from './collections-B8me-ZlQ.js';\nimport './debug-to-string-BsFOvUtQ.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { dirtyTag as DIRTY_TAG, consumeTag, createTag } from '../@glimmer/validator/index.js';\nimport { b as createComputeRef, v as valueForRef } from './reference-B6HMX4y0.js';\n\nconst NULL_IDENTITY = {};\nconst KEY = (_, index) => index;\nconst INDEX = (_, index) => String(index);\nconst IDENTITY = item => {\n  if (item === null) {\n    // Returning null as an identity will cause failures since the iterator\n    // can't tell that it's actually supposed to be null\n    return NULL_IDENTITY;\n  }\n  return item;\n};\nfunction keyForPath(path) {\n  if (isDevelopingApp() && path[0] === '@') {\n    throw new Error(`invalid keypath: '${path}', valid keys: @index, @identity, or a path`);\n  }\n  return uniqueKeyFor(item => getPath(item, path));\n}\nfunction makeKeyFor(key) {\n  switch (key) {\n    case '@key':\n      return uniqueKeyFor(KEY);\n    case '@index':\n      return uniqueKeyFor(INDEX);\n    case '@identity':\n      return uniqueKeyFor(IDENTITY);\n    default:\n      return keyForPath(key);\n  }\n}\nclass WeakMapWithPrimitives {\n  _weakMap;\n  _primitiveMap;\n  get weakMap() {\n    if (this._weakMap === undefined) {\n      this._weakMap = new WeakMap();\n    }\n    return this._weakMap;\n  }\n  get primitiveMap() {\n    if (this._primitiveMap === undefined) {\n      this._primitiveMap = new Map();\n    }\n    return this._primitiveMap;\n  }\n  set(key, value) {\n    if (isIndexable(key)) {\n      this.weakMap.set(key, value);\n    } else {\n      this.primitiveMap.set(key, value);\n    }\n  }\n  get(key) {\n    if (isIndexable(key)) {\n      return this.weakMap.get(key);\n    } else {\n      return this.primitiveMap.get(key);\n    }\n  }\n}\nconst IDENTITIES = new WeakMapWithPrimitives();\nfunction identityForNthOccurence(value, count) {\n  let identities = IDENTITIES.get(value);\n  if (identities === undefined) {\n    identities = [];\n    IDENTITIES.set(value, identities);\n  }\n  let identity = identities[count];\n  if (identity === undefined) {\n    identity = {\n      value,\n      count\n    };\n    identities[count] = identity;\n  }\n  return identity;\n}\n\n/**\n * When iterating over a list, it's possible that an item with the same unique\n * key could be encountered twice:\n *\n * ```js\n * let arr = ['same', 'different', 'same', 'same'];\n * ```\n *\n * In general, we want to treat these items as _unique within the list_. To do\n * this, we track the occurences of every item as we iterate the list, and when\n * an item occurs more than once, we generate a new unique key just for that\n * item, and that occurence within the list. The next time we iterate the list,\n * and encounter an item for the nth time, we can get the _same_ key, and let\n * Glimmer know that it should reuse the DOM for the previous nth occurence.\n */\nfunction uniqueKeyFor(keyFor) {\n  let seen = new WeakMapWithPrimitives();\n  return (value, memo) => {\n    let key = keyFor(value, memo);\n    let count = seen.get(key) || 0;\n    seen.set(key, count + 1);\n    if (count === 0) {\n      return key;\n    }\n    return identityForNthOccurence(key, count);\n  };\n}\nfunction createIteratorRef(listRef, key) {\n  return createComputeRef(() => {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    let iterable = valueForRef(listRef);\n    let keyFor = makeKeyFor(key);\n    if (Array.isArray(iterable)) {\n      return new ArrayIterator(iterable, keyFor);\n    }\n    let maybeIterator = toIterator(iterable);\n    if (maybeIterator === null) {\n      return new ArrayIterator(EMPTY_ARRAY, () => null);\n    }\n    return new IteratorWrapper(maybeIterator, keyFor);\n  });\n}\nfunction createIteratorItemRef(_value) {\n  let value = _value;\n  let tag = createTag();\n  return createComputeRef(() => {\n    consumeTag(tag);\n    return value;\n  }, newValue => {\n    if (value !== newValue) {\n      value = newValue;\n      DIRTY_TAG(tag);\n    }\n  });\n}\nclass IteratorWrapper {\n  constructor(inner, keyFor) {\n    this.inner = inner;\n    this.keyFor = keyFor;\n  }\n  isEmpty() {\n    return this.inner.isEmpty();\n  }\n  next() {\n    let nextValue = this.inner.next();\n    if (nextValue !== null) {\n      nextValue.key = this.keyFor(nextValue.value, nextValue.memo);\n    }\n    return nextValue;\n  }\n}\nclass ArrayIterator {\n  current;\n  pos = 0;\n  constructor(iterator, keyFor) {\n    this.iterator = iterator;\n    this.keyFor = keyFor;\n    if (iterator.length === 0) {\n      this.current = {\n        kind: 'empty'\n      };\n    } else {\n      this.current = {\n        kind: 'first',\n        value: iterator[this.pos]\n      };\n    }\n  }\n  isEmpty() {\n    return this.current.kind === 'empty';\n  }\n  next() {\n    let value;\n    let current = this.current;\n    if (current.kind === 'first') {\n      this.current = {\n        kind: 'progress'\n      };\n      value = current.value;\n    } else if (this.pos >= this.iterator.length - 1) {\n      return null;\n    } else {\n      value = this.iterator[++this.pos];\n    }\n    let {\n      keyFor\n    } = this;\n    let key = keyFor(value, this.pos);\n    let memo = this.pos;\n    return {\n      key,\n      value,\n      memo\n    };\n  }\n}\n\nexport { createIteratorRef as a, createIteratorItemRef as c };\n","import { isDevelopingApp } from '@embroider/macros';\nimport '../@ember/debug/index.js';\nimport { assert } from '../@ember/debug/lib/assert.js';\n\n/**\n  Strongly hint runtimes to intern the provided string.\n\n  When do I need to use this function?\n\n  For the most part, never. Pre-mature optimization is bad, and often the\n  runtime does exactly what you need it to, and more often the trade-off isn't\n  worth it.\n\n  Why?\n\n  Runtimes store strings in at least 2 different representations:\n  Ropes and Symbols (interned strings). The Rope provides a memory efficient\n  data-structure for strings created from concatenation or some other string\n  manipulation like splitting.\n\n  Unfortunately checking equality of different ropes can be quite costly as\n  runtimes must resort to clever string comparison algorithms. These\n  algorithms typically cost in proportion to the length of the string.\n  Luckily, this is where the Symbols (interned strings) shine. As Symbols are\n  unique by their string content, equality checks can be done by pointer\n  comparison.\n\n  How do I know if my string is a rope or symbol?\n\n  Typically (warning general sweeping statement, but truthy in runtimes at\n  present) static strings created as part of the JS source are interned.\n  Strings often used for comparisons can be interned at runtime if some\n  criteria are met.  One of these criteria can be the size of the entire rope.\n  For example, in chrome 38 a rope longer then 12 characters will not\n  intern, nor will segments of that rope.\n\n  Some numbers: http://jsperf.com/eval-vs-keys/8\n\n  Known Trick™\n\n  @private\n  @return {String} interned version of the provided string\n*/\nfunction intern(str) {\n  let obj = Object.create(null);\n  obj[str] = 1;\n  for (let key in obj) {\n    if (key === str) {\n      return key;\n    }\n  }\n  return str;\n}\n\n/**\n  Returns whether Type(value) is Object.\n\n  Useful for checking whether a value is a valid WeakMap key.\n\n  Refs: https://tc39.github.io/ecma262/#sec-typeof-operator-runtime-semantics-evaluation\n        https://tc39.github.io/ecma262/#sec-weakmap.prototype.set\n\n  @private\n  @function isObject\n*/\nfunction isObject(value) {\n  return value !== null && (typeof value === 'object' || typeof value === 'function');\n}\n\n/**\n @module @ember/object\n*/\n\n/**\n @private\n @return {Number} the uuid\n */\nlet _uuid = 0;\n\n/**\n Generates a universally unique identifier. This method\n is used internally by Ember for assisting with\n the generation of GUID's and other unique identifiers.\n\n @public\n @return {Number} [description]\n */\nfunction uuid() {\n  return ++_uuid;\n}\n\n/**\n Prefix used for guids through out Ember.\n @private\n @property GUID_PREFIX\n @for Ember\n @type String\n @final\n */\nconst GUID_PREFIX = 'ember';\n\n// Used for guid generation...\nconst OBJECT_GUIDS = new WeakMap();\nconst NON_OBJECT_GUIDS = new Map();\n/**\n  A unique key used to assign guids and other private metadata to objects.\n  If you inspect an object in your browser debugger you will often see these.\n  They can be safely ignored.\n\n  On browsers that support it, these properties are added with enumeration\n  disabled so they won't show up when you iterate over your properties.\n\n  @private\n  @property GUID_KEY\n  @for Ember\n  @type String\n  @final\n*/\nconst GUID_KEY = intern(`__ember${Date.now()}`);\n\n/**\n  Generates a new guid, optionally saving the guid to the object that you\n  pass in. You will rarely need to use this method. Instead you should\n  call `guidFor(obj)`, which return an existing guid if available.\n\n  @private\n  @method generateGuid\n  @static\n  @for @ember/object/internals\n  @param {Object} [obj] Object the guid will be used for. If passed in, the guid will\n    be saved on the object and reused whenever you pass the same object\n    again.\n\n    If no object is passed, just generate a new guid.\n  @param {String} [prefix] Prefix to place in front of the guid. Useful when you want to\n    separate the guid into separate namespaces.\n  @return {String} the guid\n*/\n// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types\nfunction generateGuid(obj, prefix = GUID_PREFIX) {\n  let guid = prefix + uuid().toString();\n  if (isObject(obj)) {\n    OBJECT_GUIDS.set(obj, guid);\n  }\n  return guid;\n}\n\n/**\n  Returns a unique id for the object. If the object does not yet have a guid,\n  one will be assigned to it. You can call this on any object,\n  `EmberObject`-based or not.\n\n  You can also use this method on DOM Element objects.\n\n  @public\n  @static\n  @method guidFor\n  @for @ember/object/internals\n  @param {Object} obj any object, string, number, Element, or primitive\n  @return {String} the unique guid for this instance.\n*/\nfunction guidFor(value) {\n  let guid;\n  if (isObject(value)) {\n    guid = OBJECT_GUIDS.get(value);\n    if (guid === undefined) {\n      guid = `${GUID_PREFIX}${uuid()}`;\n      OBJECT_GUIDS.set(value, guid);\n    }\n  } else {\n    guid = NON_OBJECT_GUIDS.get(value);\n    if (guid === undefined) {\n      let type = typeof value;\n      if (type === 'string') {\n        guid = `st${uuid()}`;\n      } else if (type === 'number') {\n        guid = `nu${uuid()}`;\n      } else if (type === 'symbol') {\n        guid = `sy${uuid()}`;\n      } else {\n        guid = `(${value})`;\n      }\n      NON_OBJECT_GUIDS.set(value, guid);\n    }\n  }\n  return guid;\n}\n\nlet getDebugName;\nif (isDevelopingApp()) {\n  let getFunctionName = fn => {\n    let functionName = fn.name;\n    if (functionName === undefined) {\n      let match = Function.prototype.toString.call(fn).match(/function (\\w+)\\s*\\(/);\n      functionName = match && match[1] || '';\n    }\n    return functionName.replace(/^bound /, '');\n  };\n  let getObjectName = obj => {\n    let name;\n    let className;\n    if (obj.constructor && obj.constructor !== Object) {\n      className = getFunctionName(obj.constructor);\n    }\n    if ('toString' in obj && obj.toString !== Object.prototype.toString && obj.toString !== Function.prototype.toString) {\n      name = obj.toString();\n    }\n\n    // If the class has a decent looking name, and the `toString` is one of the\n    // default Ember toStrings, replace the constructor portion of the toString\n    // with the class name. We check the length of the class name to prevent doing\n    // this when the value is minified.\n    if (name && name.match(/<.*:ember\\d+>/) && className && className[0] !== '_' && className.length > 2 && className !== 'Class') {\n      return name.replace(/<.*:/, `<${className}:`);\n    }\n    return name || className;\n  };\n  let getPrimitiveName = value => {\n    return String(value);\n  };\n  getDebugName = value => {\n    if (typeof value === 'function') {\n      return getFunctionName(value) || `(unknown function)`;\n    } else if (typeof value === 'object' && value !== null) {\n      return getObjectName(value) || `(unknown object)`;\n    } else {\n      return getPrimitiveName(value);\n    }\n  };\n}\nconst getDebugName$1 = getDebugName;\n\nconst HAS_SUPER_PATTERN = /\\.(_super|call\\(this|apply\\(this)/;\nconst fnToString = Function.prototype.toString;\nconst checkHasSuper = (() => {\n  let sourceAvailable = fnToString.call(function () {\n    return this;\n  }).indexOf('return this') > -1;\n  if (sourceAvailable) {\n    return function checkHasSuper(func) {\n      return HAS_SUPER_PATTERN.test(fnToString.call(func));\n    };\n  }\n  return function checkHasSuper() {\n    return true;\n  };\n})();\nconst HAS_SUPER_MAP = new WeakMap();\nconst ROOT = Object.freeze(function () {});\nHAS_SUPER_MAP.set(ROOT, false);\nfunction hasSuper(func) {\n  let hasSuper = HAS_SUPER_MAP.get(func);\n  if (hasSuper === undefined) {\n    hasSuper = checkHasSuper(func);\n    HAS_SUPER_MAP.set(func, hasSuper);\n  }\n  return hasSuper;\n}\nclass ObserverListenerMeta {\n  listeners = undefined;\n  observers = undefined;\n}\nconst OBSERVERS_LISTENERS_MAP = new WeakMap();\nfunction createObserverListenerMetaFor(fn) {\n  let meta = OBSERVERS_LISTENERS_MAP.get(fn);\n  if (meta === undefined) {\n    meta = new ObserverListenerMeta();\n    OBSERVERS_LISTENERS_MAP.set(fn, meta);\n  }\n  return meta;\n}\nfunction observerListenerMetaFor(fn) {\n  return OBSERVERS_LISTENERS_MAP.get(fn);\n}\nfunction setObservers(func, observers) {\n  let meta = createObserverListenerMetaFor(func);\n  meta.observers = observers;\n}\nfunction setListeners(func, listeners) {\n  let meta = createObserverListenerMetaFor(func);\n  meta.listeners = listeners;\n}\nconst IS_WRAPPED_FUNCTION_SET = new WeakSet();\n\n/**\n  Wraps the passed function so that `this._super` will point to the superFunc\n  when the function is invoked. This is the primitive we use to implement\n  calls to super.\n\n  @private\n  @method wrap\n  @for Ember\n  @param {Function} func The function to call\n  @param {Function} superFunc The super function.\n  @return {Function} wrapped function.\n*/\nfunction wrap(func, superFunc) {\n  if (!hasSuper(func)) {\n    return func;\n  }\n  // ensure an unwrapped super that calls _super is wrapped with a terminal _super\n  if (!IS_WRAPPED_FUNCTION_SET.has(superFunc) && hasSuper(superFunc)) {\n    return _wrap(func, _wrap(superFunc, ROOT));\n  }\n  return _wrap(func, superFunc);\n}\nfunction _wrap(func, superFunc) {\n  function superWrapper() {\n    let orig = this._super;\n    this._super = superFunc;\n    let ret = func.apply(this, arguments);\n    this._super = orig;\n    return ret;\n  }\n  IS_WRAPPED_FUNCTION_SET.add(superWrapper);\n  let meta = OBSERVERS_LISTENERS_MAP.get(func);\n  if (meta !== undefined) {\n    OBSERVERS_LISTENERS_MAP.set(superWrapper, meta);\n  }\n  return superWrapper;\n}\n\nfunction lookupDescriptor(obj, keyName) {\n  let current = obj;\n  do {\n    let descriptor = Object.getOwnPropertyDescriptor(current, keyName);\n    if (descriptor !== undefined) {\n      return descriptor;\n    }\n    current = Object.getPrototypeOf(current);\n  } while (current !== null);\n  return null;\n}\n\nlet setupMandatorySetter;\nlet teardownMandatorySetter;\nlet setWithMandatorySetter;\nfunction isElementKey(key) {\n  return typeof key === 'number' ? isPositiveInt(key) : isStringInt(key);\n}\nfunction isStringInt(str) {\n  let num = parseInt(str, 10);\n  return isPositiveInt(num) && str === String(num);\n}\nfunction isPositiveInt(num) {\n  return num >= 0 && num % 1 === 0;\n}\nif (isDevelopingApp()) {\n  let SEEN_TAGS = new WeakSet();\n  let MANDATORY_SETTERS = new WeakMap();\n  let propertyIsEnumerable = function (obj, key) {\n    return Object.prototype.propertyIsEnumerable.call(obj, key);\n  };\n  setupMandatorySetter = function (tag, obj, keyName) {\n    if (SEEN_TAGS.has(tag)) {\n      return;\n    }\n    SEEN_TAGS.add(tag);\n    if (Array.isArray(obj) && isElementKey(keyName)) {\n      return;\n    }\n    let desc = lookupDescriptor(obj, keyName) || {};\n    if (desc.get || desc.set) {\n      // if it has a getter or setter, we can't install the mandatory setter.\n      // native setters are allowed, we have to assume that they will resolve\n      // to tracked properties.\n      return;\n    }\n    if (desc && (!desc.configurable || !desc.writable)) {\n      // if it isn't writable anyways, so we shouldn't provide the setter.\n      // if it isn't configurable, we can't overwrite it anyways.\n      return;\n    }\n    let setters = MANDATORY_SETTERS.get(obj);\n    if (setters === undefined) {\n      setters = {};\n      MANDATORY_SETTERS.set(obj, setters);\n    }\n    desc.hadOwnProperty = Object.hasOwnProperty.call(obj, keyName);\n    setters[keyName] = desc;\n    Object.defineProperty(obj, keyName, {\n      configurable: true,\n      enumerable: propertyIsEnumerable(obj, keyName),\n      get() {\n        if (desc.get) {\n          return desc.get.call(this);\n        } else {\n          return desc.value;\n        }\n      },\n      set(value) {\n        (isDevelopingApp() && true && assert(`You attempted to update ${this}.${String(keyName)} to \"${String(value)}\", but it is being tracked by a tracking context, such as a template, computed property, or observer. In order to make sure the context updates properly, you must invalidate the property when updating it. You can mark the property as \\`@tracked\\`, or use \\`@ember/object#set\\` to do this.`));\n      }\n    });\n  };\n  teardownMandatorySetter = function (obj, keyName) {\n    let setters = MANDATORY_SETTERS.get(obj);\n    if (setters !== undefined && setters[keyName] !== undefined) {\n      Object.defineProperty(obj, keyName, setters[keyName]);\n      delete setters[keyName];\n    }\n  };\n  setWithMandatorySetter = function (obj, keyName, value) {\n    let setters = MANDATORY_SETTERS.get(obj);\n    if (setters !== undefined && setters[keyName] !== undefined) {\n      let setter = setters[keyName];\n      if (setter.set) {\n        setter.set.call(obj, value);\n      } else {\n        setter.value = value;\n\n        // If the object didn't have own property before, it would have changed\n        // the enumerability after setting the value the first time.\n        if (!setter.hadOwnProperty) {\n          let desc = lookupDescriptor(obj, keyName);\n          desc.enumerable = true;\n          Object.defineProperty(obj, keyName, desc);\n        }\n      }\n    } else {\n      obj[keyName] = value;\n    }\n  };\n}\n\nexport { GUID_KEY as G, ROOT as R, generateGuid as a, getDebugName$1 as b, checkHasSuper as c, isObject as d, setObservers as e, setWithMandatorySetter as f, guidFor as g, setupMandatorySetter as h, intern as i, lookupDescriptor as l, observerListenerMetaFor as o, setListeners as s, teardownMandatorySetter as t, uuid as u, wrap as w };\n","import { d as isObject } from './mandatory-setter-DLKyVs4Q.js';\n\nconst NAMES = new WeakMap();\nfunction setName(obj, name) {\n  if (isObject(obj)) NAMES.set(obj, name);\n}\nfunction getName(obj) {\n  return NAMES.get(obj);\n}\n\nexport { getName as g, setName as s };\n","import { c as context } from './env-DEd6hPbj.js';\nimport './mandatory-setter-DLKyVs4Q.js';\nimport '@embroider/macros';\nimport { s as setName, g as getName } from './name-DVtQREj6.js';\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nlet searchDisabled = false;\nconst flags = {\n  _set: 0,\n  _unprocessedNamespaces: false,\n  get unprocessedNamespaces() {\n    return this._unprocessedNamespaces;\n  },\n  set unprocessedNamespaces(v) {\n    this._set++;\n    this._unprocessedNamespaces = v;\n  }\n};\nlet unprocessedMixins = false;\nconst NAMESPACES = [];\nconst NAMESPACES_BY_ID = Object.create(null);\nfunction addNamespace(namespace) {\n  flags.unprocessedNamespaces = true;\n  NAMESPACES.push(namespace);\n}\nfunction removeNamespace(namespace) {\n  let name = getName(namespace);\n  delete NAMESPACES_BY_ID[name];\n  NAMESPACES.splice(NAMESPACES.indexOf(namespace), 1);\n  if (name in context.lookup && namespace === context.lookup[name]) {\n    context.lookup[name] = undefined;\n  }\n}\nfunction findNamespaces() {\n  if (!flags.unprocessedNamespaces) {\n    return;\n  }\n  let lookup = context.lookup;\n  let keys = Object.keys(lookup);\n  for (let key of keys) {\n    // Only process entities that start with uppercase A-Z\n    if (!isUppercase(key.charCodeAt(0))) {\n      continue;\n    }\n    let obj = tryIsNamespace(lookup, key);\n    if (obj) {\n      setName(obj, key);\n    }\n  }\n}\nfunction findNamespace(name) {\n  if (!searchDisabled) {\n    processAllNamespaces();\n  }\n  return NAMESPACES_BY_ID[name];\n}\nfunction processNamespace(namespace) {\n  _processNamespace([namespace.toString()], namespace, new Set());\n}\nfunction processAllNamespaces() {\n  let unprocessedNamespaces = flags.unprocessedNamespaces;\n  if (unprocessedNamespaces) {\n    findNamespaces();\n    flags.unprocessedNamespaces = false;\n  }\n  if (unprocessedNamespaces || unprocessedMixins) {\n    let namespaces = NAMESPACES;\n    for (let namespace of namespaces) {\n      processNamespace(namespace);\n    }\n    unprocessedMixins = false;\n  }\n}\nfunction isSearchDisabled() {\n  return searchDisabled;\n}\nfunction setSearchDisabled(flag) {\n  searchDisabled = Boolean(flag);\n}\nfunction setUnprocessedMixins() {\n  unprocessedMixins = true;\n}\nfunction _processNamespace(paths, root, seen) {\n  let idx = paths.length;\n  let id = paths.join('.');\n  NAMESPACES_BY_ID[id] = root;\n  setName(root, id);\n\n  // Loop over all of the keys in the namespace, looking for classes\n  for (let key in root) {\n    if (!hasOwnProperty.call(root, key)) {\n      continue;\n    }\n    let obj = root[key];\n\n    // If we are processing the `Ember` namespace, for example, the\n    // `paths` will start with `[\"Ember\"]`. Every iteration through\n    // the loop will update the **second** element of this list with\n    // the key, so processing `Ember.View` will make the Array\n    // `['Ember', 'View']`.\n    paths[idx] = key;\n\n    // If we have found an unprocessed class\n    if (obj && getName(obj) === void 0) {\n      // Replace the class' `toString` with the dot-separated path\n      setName(obj, paths.join('.'));\n      // Support nested namespaces\n    } else if (obj && isNamespace(obj)) {\n      // Skip aliased namespaces\n      if (seen.has(obj)) {\n        continue;\n      }\n      seen.add(obj);\n      // Process the child namespace\n      _processNamespace(paths, obj, seen);\n    }\n  }\n  paths.length = idx; // cut out last item\n}\nfunction isNamespace(obj) {\n  return obj != null && typeof obj === 'object' && obj.isNamespace;\n}\nfunction isUppercase(code) {\n  return code >= 65 && code <= 90 // A\n; // Z\n}\nfunction tryIsNamespace(lookup, prop) {\n  try {\n    let obj = lookup[prop];\n    return (obj !== null && typeof obj === 'object' || typeof obj === 'function') && obj.isNamespace && obj;\n  } catch (_e) {\n    // continue\n  }\n}\n\nexport { NAMESPACES as N, NAMESPACES_BY_ID as a, addNamespace as b, findNamespaces as c, processNamespace as d, setSearchDisabled as e, findNamespace as f, isSearchDisabled as i, processAllNamespaces as p, removeNamespace as r, setUnprocessedMixins as s };\n","import './capabilities-DHiXCCuB.js';\nimport './debug-to-string-BsFOvUtQ.js';\nimport '@embroider/macros';\nimport '../@glimmer/global-context/index.js';\nimport '../@glimmer/validator/index.js';\nimport './reference-B6HMX4y0.js';\nimport { C as ConcreteBounds } from './dynamic-CuBsUXX8.js';\nimport './constants-oDhF27qL.js';\nimport '../@glimmer/destroyable/index.js';\nimport createHTMLDocument from '../@simple-dom/document/index.js';\nimport { D as DOMTreeConstruction } from './element-builder-BuVym8EM.js';\n\nclass NodeDOMTreeConstruction extends DOMTreeConstruction {\n  // Hides property on base class\n  constructor(doc) {\n    super(doc || createHTMLDocument());\n  }\n\n  // override to prevent usage of `this.document` until after the constructor\n  setupUselessElement() {}\n  insertHTMLBefore(parent, reference, html) {\n    // eslint-disable-next-line @typescript-eslint/no-deprecated, @typescript-eslint/no-non-null-assertion\n    let raw = this.document.createRawHTMLSection(html);\n    parent.insertBefore(raw, reference);\n    return new ConcreteBounds(parent, raw, raw);\n  }\n\n  // override to avoid SVG detection/work when in node (this is not needed in SSR)\n  createElement(tag) {\n    return this.document.createElement(tag);\n  }\n\n  // override to avoid namespace shenanigans when in node (this is not needed in SSR)\n  setAttribute(element, name, value) {\n    element.setAttribute(name, value);\n  }\n}\n\nexport { NodeDOMTreeConstruction as N };\n","const assign = Object.assign;\nfunction values(obj) {\n  return Object.values(obj);\n}\nfunction entries(dict) {\n  return Object.entries(dict);\n}\nfunction keys(obj) {\n  return Object.keys(obj);\n}\n\nexport { assign as a, entries as e, keys as k, values as v };\n","import { peekMeta, meta } from '../@ember/-internals/meta/lib/meta.js';\nimport { h as setupMandatorySetter, d as isObject, s as setListeners, f as setWithMandatorySetter } from './mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { warn, debug } from '../@ember/debug/index.js';\nimport { isDestroyed, registerDestructor } from '../@glimmer/destroyable/index.js';\nimport { tagFor, dirtyTagFor, CONSTANT_TAG, combine, validateTag, tagMetaFor, createUpdatableTag, updateTag as UPDATE_TAG, valueForTag, CURRENT_TAG, untrack, ALLOW_CYCLES, consumeTag, track, isTracking, trackedData } from '../@glimmer/validator/index.js';\nimport './debug-to-string-BsFOvUtQ.js';\nimport '../@glimmer/global-context/index.js';\nimport './reference-B6HMX4y0.js';\nimport './capabilities-DHiXCCuB.js';\nimport { E as ENV } from './env-DEd6hPbj.js';\nimport { assert } from '../@ember/debug/lib/assert.js';\nimport { t as toString, s as symbol } from './to-string-CqD7_vQ4.js';\nimport { g as getCustomTagFor } from './args-proxy-B91L3LRK.js';\nimport { s as setProxy } from './is_proxy-C2q5rUMp.js';\nimport { isEmberArray } from '../@ember/array/-internals.js';\nimport { C as Cache } from './cache-qDyqAcpg.js';\nimport Version from '../ember/version.js';\nimport { getOwner } from '../@ember/-internals/owner/index.js';\nimport inspect from '../@ember/debug/lib/inspect.js';\n\nfunction objectAt(array, index) {\n  if (Array.isArray(array)) {\n    return array[index];\n  } else {\n    return array.objectAt(index);\n  }\n}\n\n// This is exported for `@tracked`, but should otherwise be avoided. Use `tagForObject`.\nconst SELF_TAG = symbol('SELF_TAG');\nfunction tagForProperty(obj, propertyKey, addMandatorySetter = false, meta) {\n  let customTagFor = getCustomTagFor(obj);\n  if (customTagFor !== undefined) {\n    return customTagFor(obj, propertyKey, addMandatorySetter);\n  }\n  let tag = tagFor(obj, propertyKey, meta);\n  if (isDevelopingApp() && addMandatorySetter) {\n    setupMandatorySetter(tag, obj, propertyKey);\n  }\n  return tag;\n}\nfunction tagForObject(obj) {\n  if (isObject(obj)) {\n    if (isDevelopingApp()) {\n      (isDevelopingApp() && !(!isDestroyed(obj)) && assert(isDestroyed(obj) ? `Cannot create a new tag for \\`${toString(obj)}\\` after it has been destroyed.` : '', !isDestroyed(obj)));\n    }\n    return tagFor(obj, SELF_TAG);\n  }\n  return CONSTANT_TAG;\n}\nfunction markObjectAsDirty(obj, propertyKey) {\n  dirtyTagFor(obj, propertyKey);\n  dirtyTagFor(obj, SELF_TAG);\n}\n\nconst CHAIN_PASS_THROUGH = new WeakSet();\nfunction finishLazyChains(meta, key, value) {\n  let lazyTags = meta.readableLazyChainsFor(key);\n  if (lazyTags === undefined) {\n    return;\n  }\n  if (isObject(value)) {\n    for (let [tag, deps] of lazyTags) {\n      UPDATE_TAG(tag, getChainTagsForKey(value, deps, tagMetaFor(value), peekMeta(value)));\n    }\n  }\n  lazyTags.length = 0;\n}\nfunction getChainTagsForKeys(obj, keys, tagMeta, meta) {\n  let tags = [];\n  for (let key of keys) {\n    getChainTags(tags, obj, key, tagMeta, meta);\n  }\n  return combine(tags);\n}\nfunction getChainTagsForKey(obj, key, tagMeta, meta) {\n  return combine(getChainTags([], obj, key, tagMeta, meta));\n}\nfunction getChainTags(chainTags, obj, path, tagMeta, meta$1) {\n  let current = obj;\n  let currentTagMeta = tagMeta;\n  let currentMeta = meta$1;\n  let pathLength = path.length;\n  let segmentEnd = -1;\n  // prevent closures\n  let segment, descriptor;\n  while (true) {\n    let lastSegmentEnd = segmentEnd + 1;\n    segmentEnd = path.indexOf('.', lastSegmentEnd);\n    if (segmentEnd === -1) {\n      segmentEnd = pathLength;\n    }\n    segment = path.slice(lastSegmentEnd, segmentEnd);\n\n    // If the segment is an @each, we can process it and then break\n    if (segment === '@each' && segmentEnd !== pathLength) {\n      lastSegmentEnd = segmentEnd + 1;\n      segmentEnd = path.indexOf('.', lastSegmentEnd);\n      let arrLength = current.length;\n      if (typeof arrLength !== 'number' ||\n      // TODO: should the second test be `isEmberArray` instead?\n      !(Array.isArray(current) || 'objectAt' in current)) {\n        // If the current object isn't an array, there's nothing else to do,\n        // we don't watch individual properties. Break out of the loop.\n        break;\n      } else if (arrLength === 0) {\n        // Fast path for empty arrays\n        chainTags.push(tagForProperty(current, '[]'));\n        break;\n      }\n      if (segmentEnd === -1) {\n        segment = path.slice(lastSegmentEnd);\n      } else {\n        // Deprecated, remove once we turn the deprecation into an assertion\n        segment = path.slice(lastSegmentEnd, segmentEnd);\n      }\n\n      // Push the tags for each item's property\n      for (let i = 0; i < arrLength; i++) {\n        let item = objectAt(current, i);\n        if (item) {\n          (isDevelopingApp() && !(typeof item === 'object') && assert(`When using @each to observe the array \\`${current.toString()}\\`, the items in the array must be objects`, typeof item === 'object'));\n          chainTags.push(tagForProperty(item, segment, true));\n          currentMeta = peekMeta(item);\n          descriptor = currentMeta !== null ? currentMeta.peekDescriptors(segment) : undefined;\n\n          // If the key is an alias, we need to bootstrap it\n          if (descriptor !== undefined && typeof descriptor.altKey === 'string') {\n            // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n            item[segment];\n          }\n        }\n      }\n\n      // Push the tag for the array length itself\n      chainTags.push(tagForProperty(current, '[]', true, currentTagMeta));\n      break;\n    }\n    let propertyTag = tagForProperty(current, segment, true, currentTagMeta);\n    descriptor = currentMeta !== null ? currentMeta.peekDescriptors(segment) : undefined;\n    chainTags.push(propertyTag);\n\n    // If we're at the end of the path, processing the last segment, and it's\n    // not an alias, we should _not_ get the last value, since we already have\n    // its tag. There's no reason to access it and do more work.\n    if (segmentEnd === pathLength) {\n      // If the key was an alias, we should always get the next value in order to\n      // bootstrap the alias. This is because aliases, unlike other CPs, should\n      // always be in sync with the aliased value.\n      if (CHAIN_PASS_THROUGH.has(descriptor)) {\n        // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n        current[segment];\n      }\n      break;\n    }\n    if (descriptor === undefined) {\n      // If the descriptor is undefined, then its a normal property, so we should\n      // lookup the value to chain off of like normal.\n\n      if (!(segment in current) && typeof current.unknownProperty === 'function') {\n        current = current.unknownProperty(segment);\n      } else {\n        current = current[segment];\n      }\n    } else if (CHAIN_PASS_THROUGH.has(descriptor)) {\n      current = current[segment];\n    } else {\n      // If the descriptor is defined, then its a normal CP (not an alias, which\n      // would have been handled earlier). We get the last revision to check if\n      // the CP is still valid, and if so we use the cached value. If not, then\n      // we create a lazy chain lookup, and the next time the CP is calculated,\n      // it will update that lazy chain.\n      let instanceMeta = currentMeta.source === current ? currentMeta : meta(current);\n      let lastRevision = instanceMeta.revisionFor(segment);\n      if (lastRevision !== undefined && validateTag(propertyTag, lastRevision)) {\n        current = instanceMeta.valueFor(segment);\n      } else {\n        // use metaFor here to ensure we have the meta for the instance\n        let lazyChains = instanceMeta.writableLazyChainsFor(segment);\n        let rest = path.substring(segmentEnd + 1);\n        let placeholderTag = createUpdatableTag();\n        lazyChains.push([placeholderTag, rest]);\n        chainTags.push(placeholderTag);\n        break;\n      }\n    }\n    if (!isObject(current)) {\n      // we've hit the end of the chain for now, break out\n      break;\n    }\n    currentTagMeta = tagMetaFor(current);\n    currentMeta = peekMeta(current);\n  }\n  return chainTags;\n}\n\nfunction isElementDescriptor(args) {\n  let [maybeTarget, maybeKey, maybeDesc] = args;\n  return (\n    // Ensure we have the right number of args\n    args.length === 3 && (\n    // Make sure the target is a class or object (prototype)\n    typeof maybeTarget === 'function' || typeof maybeTarget === 'object' && maybeTarget !== null) &&\n    // Make sure the key is a string\n    typeof maybeKey === 'string' && (\n    // Make sure the descriptor is the right shape\n    typeof maybeDesc === 'object' && maybeDesc !== null || maybeDesc === undefined)\n  );\n}\nfunction nativeDescDecorator(propertyDesc) {\n  let decorator = function () {\n    return propertyDesc;\n  };\n  setClassicDecorator(decorator);\n  return decorator;\n}\n\n/**\n  Objects of this type can implement an interface to respond to requests to\n  get and set. The default implementation handles simple properties.\n\n  @class Descriptor\n  @private\n*/\nclass ComputedDescriptor {\n  enumerable = true;\n  configurable = true;\n  _dependentKeys = undefined;\n  _meta = undefined;\n  setup(_obj, keyName, _propertyDesc, meta) {\n    meta.writeDescriptors(keyName, this);\n  }\n  teardown(_obj, keyName, meta) {\n    meta.removeDescriptors(keyName);\n  }\n}\nlet COMPUTED_GETTERS;\nif (isDevelopingApp()) {\n  COMPUTED_GETTERS = new WeakSet();\n}\nfunction DESCRIPTOR_GETTER_FUNCTION(name, descriptor) {\n  function getter() {\n    return descriptor.get(this, name);\n  }\n  if (isDevelopingApp()) {\n    COMPUTED_GETTERS.add(getter);\n  }\n  return getter;\n}\nfunction DESCRIPTOR_SETTER_FUNCTION(name, descriptor) {\n  let set = function CPSETTER_FUNCTION(value) {\n    return descriptor.set(this, name, value);\n  };\n  COMPUTED_SETTERS.add(set);\n  return set;\n}\nconst COMPUTED_SETTERS = new WeakSet();\nfunction makeComputedDecorator(desc, DecoratorClass) {\n  let decorator = function COMPUTED_DECORATOR(target, key, propertyDesc, maybeMeta, isClassicDecorator) {\n    (isDevelopingApp() && !(isClassicDecorator || !propertyDesc || !propertyDesc.get || !COMPUTED_GETTERS.has(propertyDesc.get)) && assert(`Only one computed property decorator can be applied to a class field or accessor, but '${key}' was decorated twice. You may have added the decorator to both a getter and setter, which is unnecessary.`, isClassicDecorator || !propertyDesc || !propertyDesc.get || !COMPUTED_GETTERS.has(propertyDesc.get)));\n    let meta$1 = arguments.length === 3 ? meta(target) : maybeMeta;\n    desc.setup(target, key, propertyDesc, meta$1);\n    let computedDesc = {\n      enumerable: desc.enumerable,\n      configurable: desc.configurable,\n      get: DESCRIPTOR_GETTER_FUNCTION(key, desc),\n      set: DESCRIPTOR_SETTER_FUNCTION(key, desc)\n    };\n    return computedDesc;\n  };\n  setClassicDecorator(decorator, desc);\n  Object.setPrototypeOf(decorator, DecoratorClass.prototype);\n  return decorator;\n}\n\n/////////////\n\nconst DECORATOR_DESCRIPTOR_MAP = new WeakMap();\n\n/**\n  Returns the CP descriptor associated with `obj` and `keyName`, if any.\n\n  @method descriptorForProperty\n  @param {Object} obj the object to check\n  @param {String} keyName the key to check\n  @return {Descriptor}\n  @private\n*/\nfunction descriptorForProperty(obj, keyName, _meta) {\n  (isDevelopingApp() && !(obj !== null) && assert('Cannot call `descriptorForProperty` on null', obj !== null));\n  (isDevelopingApp() && !(obj !== undefined) && assert('Cannot call `descriptorForProperty` on undefined', obj !== undefined));\n  (isDevelopingApp() && !(typeof obj === 'object' || typeof obj === 'function') && assert(`Cannot call \\`descriptorForProperty\\` on ${typeof obj}`, typeof obj === 'object' || typeof obj === 'function'));\n  let meta = _meta === undefined ? peekMeta(obj) : _meta;\n  if (meta !== null) {\n    return meta.peekDescriptors(keyName);\n  }\n}\nfunction descriptorForDecorator(dec) {\n  return DECORATOR_DESCRIPTOR_MAP.get(dec);\n}\n\n/**\n  Check whether a value is a decorator\n\n  @method isClassicDecorator\n  @param {any} possibleDesc the value to check\n  @return {boolean}\n  @private\n*/\nfunction isClassicDecorator(dec) {\n  return typeof dec === 'function' && DECORATOR_DESCRIPTOR_MAP.has(dec);\n}\n\n/**\n  Set a value as a decorator\n\n  @method setClassicDecorator\n  @param {function} decorator the value to mark as a decorator\n  @private\n*/\nfunction setClassicDecorator(dec, value = true) {\n  DECORATOR_DESCRIPTOR_MAP.set(dec, value);\n}\n\nconst END_WITH_EACH_REGEX = /\\.@each$/;\n\n/**\n  Expands `pattern`, invoking `callback` for each expansion.\n\n  The only pattern supported is brace-expansion, anything else will be passed\n  once to `callback` directly.\n\n  Example\n\n  ```js\n  import { expandProperties } from '@ember/object/computed';\n\n  function echo(arg){ console.log(arg); }\n\n  expandProperties('foo.bar', echo);              //=> 'foo.bar'\n  expandProperties('{foo,bar}', echo);            //=> 'foo', 'bar'\n  expandProperties('foo.{bar,baz}', echo);        //=> 'foo.bar', 'foo.baz'\n  expandProperties('{foo,bar}.baz', echo);        //=> 'foo.baz', 'bar.baz'\n  expandProperties('foo.{bar,baz}.[]', echo)      //=> 'foo.bar.[]', 'foo.baz.[]'\n  expandProperties('{foo,bar}.{spam,eggs}', echo) //=> 'foo.spam', 'foo.eggs', 'bar.spam', 'bar.eggs'\n  expandProperties('{foo}.bar.{baz}')             //=> 'foo.bar.baz'\n  ```\n\n  @method expandProperties\n  @static\n  @for @ember/object/computed\n  @public\n  @param {String} pattern The property pattern to expand.\n  @param {Function} callback The callback to invoke.  It is invoked once per\n  expansion, and is passed the expansion.\n*/\nfunction expandProperties(pattern, callback) {\n  (isDevelopingApp() && !(typeof pattern === 'string') && assert(`A computed property key must be a string, you passed ${typeof pattern} ${pattern}`, typeof pattern === 'string'));\n  (isDevelopingApp() && !(pattern.indexOf(' ') === -1) && assert('Brace expanded properties cannot contain spaces, e.g. \"user.{firstName, lastName}\" should be \"user.{firstName,lastName}\"', pattern.indexOf(' ') === -1)); // regex to look for double open, double close, or unclosed braces\n  (isDevelopingApp() && !(pattern.match(/\\{[^}{]*\\{|\\}[^}{]*\\}|\\{[^}]*$/g) === null) && assert(`Brace expanded properties have to be balanced and cannot be nested, pattern: ${pattern}`, pattern.match(/\\{[^}{]*\\{|\\}[^}{]*\\}|\\{[^}]*$/g) === null));\n  let start = pattern.indexOf('{');\n  if (start < 0) {\n    callback(pattern.replace(END_WITH_EACH_REGEX, '.[]'));\n  } else {\n    dive('', pattern, start, callback);\n  }\n}\nfunction dive(prefix, pattern, start, callback) {\n  let end = pattern.indexOf('}'),\n    i = 0,\n    newStart,\n    arrayLength;\n  let tempArr = pattern.substring(start + 1, end).split(',');\n  let after = pattern.substring(end + 1);\n  prefix = prefix + pattern.substring(0, start);\n  arrayLength = tempArr.length;\n  while (i < arrayLength) {\n    newStart = after.indexOf('{');\n    if (newStart < 0) {\n      callback((prefix + tempArr[i++] + after).replace(END_WITH_EACH_REGEX, '.[]'));\n    } else {\n      dive(prefix + tempArr[i++], after, newStart, callback);\n    }\n  }\n}\n\nconst AFTER_OBSERVERS = ':change';\nfunction changeEvent(keyName) {\n  return keyName + AFTER_OBSERVERS;\n}\n\n/**\n@module @ember/object\n*/\n\nfunction addListener(obj, eventName, target, method, once, sync = true) {\n  (isDevelopingApp() && !(Boolean(obj) && Boolean(eventName)) && assert('You must pass at least an object and event name to addListener', Boolean(obj) && Boolean(eventName)));\n  if (!method && 'function' === typeof target) {\n    method = target;\n    target = null;\n  }\n  meta(obj).addToListeners(eventName, target, method, once === true, sync);\n}\n\n/**\n  Remove an event listener\n\n  Arguments should match those passed to `addListener`.\n\n  @method removeListener\n  @static\n  @for @ember/object/events\n  @param obj\n  @param {String} eventName\n  @param {Object|Function} target A target object or a function\n  @param {Function|String} method A function or the name of a function to be called on `target`\n  @public\n*/\nfunction removeListener(obj, eventName, targetOrFunction, functionOrName) {\n  (isDevelopingApp() && !(Boolean(obj) && Boolean(eventName) && (typeof targetOrFunction === 'function' || typeof targetOrFunction === 'object' && Boolean(functionOrName))) && assert('You must pass at least an object, event name, and method or target and method/method name to removeListener', Boolean(obj) && Boolean(eventName) && (typeof targetOrFunction === 'function' || typeof targetOrFunction === 'object' && Boolean(functionOrName))));\n  let target, method;\n  if (typeof targetOrFunction === 'object') {\n    target = targetOrFunction;\n    method = functionOrName;\n  } else {\n    target = null;\n    method = targetOrFunction;\n  }\n  let m = meta(obj);\n  m.removeFromListeners(eventName, target, method);\n}\n\n/**\n  Send an event. The execution of suspended listeners\n  is skipped, and once listeners are removed. A listener without\n  a target is executed on the passed object. If an array of actions\n  is not passed, the actions stored on the passed object are invoked.\n\n  @method sendEvent\n  @static\n  @for @ember/object/events\n  @param obj\n  @param {String} eventName\n  @param {Array} params Optional parameters for each listener.\n  @return {Boolean} if the event was delivered to one or more actions\n  @public\n*/\nfunction sendEvent(obj, eventName, params, actions, _meta) {\n  if (actions === undefined) {\n    let meta = _meta === undefined ? peekMeta(obj) : _meta;\n    actions = meta !== null ? meta.matchingListeners(eventName) : undefined;\n  }\n  if (actions === undefined || actions.length === 0) {\n    return false;\n  }\n  for (let i = actions.length - 3; i >= 0; i -= 3) {\n    // looping in reverse for once listeners\n    let target = actions[i];\n    let method = actions[i + 1];\n    let once = actions[i + 2];\n    if (!method) {\n      continue;\n    }\n    if (once) {\n      removeListener(obj, eventName, target, method);\n    }\n    if (!target) {\n      target = obj;\n    }\n    let type = typeof method;\n    if (type === 'string' || type === 'symbol') {\n      method = target[method];\n    }\n    method.apply(target, params);\n  }\n  return true;\n}\n\n/**\n  @public\n  @method hasListeners\n  @static\n  @for @ember/object/events\n  @param obj\n  @param {String} eventName\n  @return {Boolean} if `obj` has listeners for event `eventName`\n*/\nfunction hasListeners(obj, eventName) {\n  let meta = peekMeta(obj);\n  if (meta === null) {\n    return false;\n  }\n  let matched = meta.matchingListeners(eventName);\n  return matched !== undefined && matched.length > 0;\n}\n\n/**\n  Define a property as a function that should be executed when\n  a specified event or events are triggered.\n\n  ``` javascript\n  import EmberObject from '@ember/object';\n  import { on } from '@ember/object/evented';\n  import { sendEvent } from '@ember/object/events';\n\n  let Job = EmberObject.extend({\n    logCompleted: on('completed', function() {\n      console.log('Job completed!');\n    })\n  });\n\n  let job = Job.create();\n\n  sendEvent(job, 'completed'); // Logs 'Job completed!'\n ```\n\n  @method on\n  @static\n  @for @ember/object/evented\n  @param {String} eventNames*\n  @param {Function} func\n  @return {Function} the listener function, passed as last argument to on(...)\n  @public\n*/\nfunction on(...args) {\n  let func = args.pop();\n  let events = args;\n  (isDevelopingApp() && !(typeof func === 'function') && assert('on expects function as last argument', typeof func === 'function'));\n  (isDevelopingApp() && !(events.length > 0 && events.every(p => typeof p === 'string' && p.length > 0)) && assert('on called without valid event names', events.length > 0 && events.every(p => typeof p === 'string' && p.length > 0)));\n  setListeners(func, events);\n  return func;\n}\n\nconst SYNC_DEFAULT = !ENV._DEFAULT_ASYNC_OBSERVERS;\nconst SYNC_OBSERVERS = new Map();\nconst ASYNC_OBSERVERS = new Map();\n\n/**\n@module @ember/object\n*/\n\n/**\n  @method addObserver\n  @static\n  @for @ember/object/observers\n  @param obj\n  @param {String} path\n  @param {Object|Function} target\n  @param {Function|String} [method]\n  @public\n*/\nfunction addObserver(obj, path, target, method, sync = SYNC_DEFAULT) {\n  let eventName = changeEvent(path);\n  addListener(obj, eventName, target, method, false, sync);\n  let meta = peekMeta(obj);\n  if (meta === null || !(meta.isPrototypeMeta(obj) || meta.isInitializing())) {\n    activateObserver(obj, eventName, sync);\n  }\n}\n\n/**\n  @method removeObserver\n  @static\n  @for @ember/object/observers\n  @param obj\n  @param {String} path\n  @param {Object|Function} target\n  @param {Function|String} [method]\n  @public\n*/\nfunction removeObserver(obj, path, target, method, sync = SYNC_DEFAULT) {\n  let eventName = changeEvent(path);\n  let meta = peekMeta(obj);\n  if (meta === null || !(meta.isPrototypeMeta(obj) || meta.isInitializing())) {\n    deactivateObserver(obj, eventName, sync);\n  }\n  removeListener(obj, eventName, target, method);\n}\nfunction getOrCreateActiveObserversFor(target, sync) {\n  let observerMap = sync === true ? SYNC_OBSERVERS : ASYNC_OBSERVERS;\n  if (!observerMap.has(target)) {\n    observerMap.set(target, new Map());\n    registerDestructor(target, () => destroyObservers(target), true);\n  }\n  return observerMap.get(target);\n}\nfunction activateObserver(target, eventName, sync = false) {\n  let activeObservers = getOrCreateActiveObserversFor(target, sync);\n  if (activeObservers.has(eventName)) {\n    activeObservers.get(eventName).count++;\n  } else {\n    let path = eventName.substring(0, eventName.lastIndexOf(':'));\n    let tag = getChainTagsForKey(target, path, tagMetaFor(target), peekMeta(target));\n    activeObservers.set(eventName, {\n      count: 1,\n      path,\n      tag,\n      lastRevision: valueForTag(tag),\n      suspended: false\n    });\n  }\n}\nlet DEACTIVATE_SUSPENDED = false;\nlet SCHEDULED_DEACTIVATE = [];\nfunction deactivateObserver(target, eventName, sync = false) {\n  if (DEACTIVATE_SUSPENDED === true) {\n    SCHEDULED_DEACTIVATE.push([target, eventName, sync]);\n    return;\n  }\n  let observerMap = sync === true ? SYNC_OBSERVERS : ASYNC_OBSERVERS;\n  let activeObservers = observerMap.get(target);\n  if (activeObservers !== undefined) {\n    let observer = activeObservers.get(eventName);\n    observer.count--;\n    if (observer.count === 0) {\n      activeObservers.delete(eventName);\n      if (activeObservers.size === 0) {\n        observerMap.delete(target);\n      }\n    }\n  }\n}\nfunction suspendedObserverDeactivation() {\n  DEACTIVATE_SUSPENDED = true;\n}\nfunction resumeObserverDeactivation() {\n  DEACTIVATE_SUSPENDED = false;\n  for (let [target, eventName, sync] of SCHEDULED_DEACTIVATE) {\n    deactivateObserver(target, eventName, sync);\n  }\n  SCHEDULED_DEACTIVATE = [];\n}\n\n/**\n * Primarily used for cases where we are redefining a class, e.g. mixins/reopen\n * being applied later. Revalidates all the observers, resetting their tags.\n *\n * @private\n * @param target\n */\nfunction revalidateObservers(target) {\n  if (ASYNC_OBSERVERS.has(target)) {\n    ASYNC_OBSERVERS.get(target).forEach(observer => {\n      observer.tag = getChainTagsForKey(target, observer.path, tagMetaFor(target), peekMeta(target));\n      observer.lastRevision = valueForTag(observer.tag);\n    });\n  }\n  if (SYNC_OBSERVERS.has(target)) {\n    SYNC_OBSERVERS.get(target).forEach(observer => {\n      observer.tag = getChainTagsForKey(target, observer.path, tagMetaFor(target), peekMeta(target));\n      observer.lastRevision = valueForTag(observer.tag);\n    });\n  }\n}\nlet lastKnownRevision = 0;\nfunction flushAsyncObservers(_schedule) {\n  let currentRevision = valueForTag(CURRENT_TAG);\n  if (lastKnownRevision === currentRevision) {\n    return;\n  }\n  lastKnownRevision = currentRevision;\n  ASYNC_OBSERVERS.forEach((activeObservers, target) => {\n    let meta = peekMeta(target);\n    activeObservers.forEach((observer, eventName) => {\n      if (!validateTag(observer.tag, observer.lastRevision)) {\n        let sendObserver = () => {\n          try {\n            sendEvent(target, eventName, [target, observer.path], undefined, meta);\n          } finally {\n            observer.tag = getChainTagsForKey(target, observer.path, tagMetaFor(target), peekMeta(target));\n            observer.lastRevision = valueForTag(observer.tag);\n          }\n        };\n        if (_schedule) {\n          _schedule('actions', sendObserver);\n        } else {\n          sendObserver();\n        }\n      }\n    });\n  });\n}\nfunction flushSyncObservers() {\n  // When flushing synchronous observers, we know that something has changed (we\n  // only do this during a notifyPropertyChange), so there's no reason to check\n  // a global revision.\n\n  SYNC_OBSERVERS.forEach((activeObservers, target) => {\n    let meta = peekMeta(target);\n    activeObservers.forEach((observer, eventName) => {\n      if (!observer.suspended && !validateTag(observer.tag, observer.lastRevision)) {\n        try {\n          observer.suspended = true;\n          sendEvent(target, eventName, [target, observer.path], undefined, meta);\n        } finally {\n          observer.tag = getChainTagsForKey(target, observer.path, tagMetaFor(target), peekMeta(target));\n          observer.lastRevision = valueForTag(observer.tag);\n          observer.suspended = false;\n        }\n      }\n    });\n  });\n}\nfunction setObserverSuspended(target, property, suspended) {\n  let activeObservers = SYNC_OBSERVERS.get(target);\n  if (!activeObservers) {\n    return;\n  }\n  let observer = activeObservers.get(changeEvent(property));\n  if (observer) {\n    observer.suspended = suspended;\n  }\n}\nfunction destroyObservers(target) {\n  if (SYNC_OBSERVERS.size > 0) SYNC_OBSERVERS.delete(target);\n  if (ASYNC_OBSERVERS.size > 0) ASYNC_OBSERVERS.delete(target);\n}\n\nconst PROPERTY_DID_CHANGE = Symbol('PROPERTY_DID_CHANGE');\nfunction hasPropertyDidChange(obj) {\n  return obj != null && typeof obj === 'object' && typeof obj[PROPERTY_DID_CHANGE] === 'function';\n}\nlet deferred = 0;\n\n/**\n  This function is called just after an object property has changed.\n  It will notify any observers and clear caches among other things.\n\n  Normally you will not need to call this method directly but if for some\n  reason you can't directly watch a property you can invoke this method\n  manually.\n\n  @method notifyPropertyChange\n  @for @ember/object\n  @param {Object} obj The object with the property that will change\n  @param {String} keyName The property key (or path) that will change.\n  @param {Meta} [_meta] The objects meta.\n  @param {unknown} [value] The new value to set for the property\n  @return {void}\n  @since 3.1.0\n  @public\n*/\nfunction notifyPropertyChange(obj, keyName, _meta, value) {\n  let meta = _meta === undefined ? peekMeta(obj) : _meta;\n  if (meta !== null && (meta.isInitializing() || meta.isPrototypeMeta(obj))) {\n    return;\n  }\n  markObjectAsDirty(obj, keyName);\n  if (deferred <= 0) {\n    flushSyncObservers();\n  }\n  if (PROPERTY_DID_CHANGE in obj) {\n    // It's redundant to do this here, but we don't want to check above so we can avoid an extra function call in prod.\n    (isDevelopingApp() && !(hasPropertyDidChange(obj)) && assert('property did change hook is invalid', hasPropertyDidChange(obj))); // we need to check the arguments length here; there's a check in Component's `PROPERTY_DID_CHANGE`\n    // that checks its arguments length, so we have to explicitly not call this with `value`\n    // if it is not passed to `notifyPropertyChange`\n    if (arguments.length === 4) {\n      obj[PROPERTY_DID_CHANGE](keyName, value);\n    } else {\n      obj[PROPERTY_DID_CHANGE](keyName);\n    }\n  }\n}\n\n/**\n  @method beginPropertyChanges\n  @chainable\n  @private\n*/\nfunction beginPropertyChanges() {\n  deferred++;\n  suspendedObserverDeactivation();\n}\n\n/**\n  @method endPropertyChanges\n  @private\n*/\nfunction endPropertyChanges() {\n  deferred--;\n  if (deferred <= 0) {\n    flushSyncObservers();\n    resumeObserverDeactivation();\n  }\n}\n\n/**\n  Make a series of property changes together in an\n  exception-safe way.\n\n  ```javascript\n  Ember.changeProperties(function() {\n    obj1.set('foo', mayBlowUpWhenSet);\n    obj2.set('bar', baz);\n  });\n  ```\n\n  @method changeProperties\n  @param {Function} callback\n  @private\n*/\nfunction changeProperties(callback) {\n  beginPropertyChanges();\n  try {\n    callback();\n  } finally {\n    endPropertyChanges();\n  }\n}\n\n/**\n@module @ember/object\n*/\n\nconst DEEP_EACH_REGEX = /\\.@each\\.[^.]+\\./;\nfunction noop() {}\n/**\n  `@computed` is a decorator that turns a JavaScript getter and setter into a\n  computed property, which is a _cached, trackable value_. By default the getter\n  will only be called once and the result will be cached. You can specify\n  various properties that your computed property depends on. This will force the\n  cached result to be cleared if the dependencies are modified, and lazily recomputed the next time something asks for it.\n\n  In the following example we decorate a getter - `fullName` -  by calling\n  `computed` with the property dependencies (`firstName` and `lastName`) as\n  arguments. The `fullName` getter will be called once (regardless of how many\n  times it is accessed) as long as its dependencies do not change. Once\n  `firstName` or `lastName` are updated any future calls to `fullName` will\n  incorporate the new values, and any watchers of the value such as templates\n  will be updated:\n\n  ```javascript\n  import { computed, set } from '@ember/object';\n\n  class Person {\n    constructor(firstName, lastName) {\n      set(this, 'firstName', firstName);\n      set(this, 'lastName', lastName);\n    }\n\n    @computed('firstName', 'lastName')\n    get fullName() {\n      return `${this.firstName} ${this.lastName}`;\n    }\n  });\n\n  let tom = new Person('Tom', 'Dale');\n\n  tom.fullName; // 'Tom Dale'\n  ```\n\n  You can also provide a setter, which will be used when updating the computed\n  property. Ember's `set` function must be used to update the property\n  since it will also notify observers of the property:\n\n  ```javascript\n  import { computed, set } from '@ember/object';\n\n  class Person {\n    constructor(firstName, lastName) {\n      set(this, 'firstName', firstName);\n      set(this, 'lastName', lastName);\n    }\n\n    @computed('firstName', 'lastName')\n    get fullName() {\n      return `${this.firstName} ${this.lastName}`;\n    }\n\n    set fullName(value) {\n      let [firstName, lastName] = value.split(' ');\n\n      set(this, 'firstName', firstName);\n      set(this, 'lastName', lastName);\n    }\n  });\n\n  let person = new Person();\n\n  set(person, 'fullName', 'Peter Wagenet');\n  person.firstName; // 'Peter'\n  person.lastName;  // 'Wagenet'\n  ```\n\n  You can also pass a getter function or object with `get` and `set` functions\n  as the last argument to the computed decorator. This allows you to define\n  computed property _macros_:\n\n  ```js\n  import { computed } from '@ember/object';\n\n  function join(...keys) {\n    return computed(...keys, function() {\n      return keys.map(key => this[key]).join(' ');\n    });\n  }\n\n  class Person {\n    @join('firstName', 'lastName')\n    fullName;\n  }\n  ```\n\n  Note that when defined this way, getters and setters receive the _key_ of the\n  property they are decorating as the first argument. Setters receive the value\n  they are setting to as the second argument instead. Additionally, setters must\n  _return_ the value that should be cached:\n\n  ```javascript\n  import { computed, set } from '@ember/object';\n\n  function fullNameMacro(firstNameKey, lastNameKey) {\n    return computed(firstNameKey, lastNameKey, {\n      get() {\n        return `${this[firstNameKey]} ${this[lastNameKey]}`;\n      }\n\n      set(key, value) {\n        let [firstName, lastName] = value.split(' ');\n\n        set(this, firstNameKey, firstName);\n        set(this, lastNameKey, lastName);\n\n        return value;\n      }\n    });\n  }\n\n  class Person {\n    constructor(firstName, lastName) {\n      set(this, 'firstName', firstName);\n      set(this, 'lastName', lastName);\n    }\n\n    @fullNameMacro('firstName', 'lastName') fullName;\n  });\n\n  let person = new Person();\n\n  set(person, 'fullName', 'Peter Wagenet');\n  person.firstName; // 'Peter'\n  person.lastName;  // 'Wagenet'\n  ```\n\n  Computed properties can also be used in classic classes. To do this, we\n  provide the getter and setter as the last argument like we would for a macro,\n  and we assign it to a property on the class definition. This is an _anonymous_\n  computed macro:\n\n  ```javascript\n  import EmberObject, { computed, set } from '@ember/object';\n\n  let Person = EmberObject.extend({\n    // these will be supplied by `create`\n    firstName: null,\n    lastName: null,\n\n    fullName: computed('firstName', 'lastName', {\n      get() {\n        return `${this.firstName} ${this.lastName}`;\n      }\n\n      set(key, value) {\n        let [firstName, lastName] = value.split(' ');\n\n        set(this, 'firstName', firstName);\n        set(this, 'lastName', lastName);\n\n        return value;\n      }\n    })\n  });\n\n  let tom = Person.create({\n    firstName: 'Tom',\n    lastName: 'Dale'\n  });\n\n  tom.get('fullName') // 'Tom Dale'\n  ```\n\n  You can overwrite computed property without setters with a normal property (no\n  longer computed) that won't change if dependencies change. You can also mark\n  computed property as `.readOnly()` and block all attempts to set it.\n\n  ```javascript\n  import { computed, set } from '@ember/object';\n\n  class Person {\n    constructor(firstName, lastName) {\n      set(this, 'firstName', firstName);\n      set(this, 'lastName', lastName);\n    }\n\n    @computed('firstName', 'lastName').readOnly()\n    get fullName() {\n      return `${this.firstName} ${this.lastName}`;\n    }\n  });\n\n  let person = new Person();\n  person.set('fullName', 'Peter Wagenet'); // Uncaught Error: Cannot set read-only property \"fullName\" on object: <(...):emberXXX>\n  ```\n\n  Additional resources:\n  - [Decorators RFC](https://github.com/emberjs/rfcs/blob/master/text/0408-decorators.md)\n  - [New CP syntax RFC](https://github.com/emberjs/rfcs/blob/master/text/0011-improved-cp-syntax.md)\n  - [New computed syntax explained in \"Ember 1.12 released\" ](https://emberjs.com/blog/2015/05/13/ember-1-12-released.html#toc_new-computed-syntax)\n\n  @class ComputedProperty\n  @public\n*/\nclass ComputedProperty extends ComputedDescriptor {\n  _readOnly = false;\n  _hasConfig = false;\n  _getter = undefined;\n  _setter = undefined;\n  constructor(args) {\n    super();\n    let maybeConfig = args[args.length - 1];\n    if (typeof maybeConfig === 'function' || maybeConfig !== null && typeof maybeConfig === 'object') {\n      this._hasConfig = true;\n      let config = args.pop();\n      if (typeof config === 'function') {\n        (isDevelopingApp() && !(!isClassicDecorator(config)) && assert(`You attempted to pass a computed property instance to computed(). Computed property instances are decorator functions, and cannot be passed to computed() because they cannot be turned into decorators twice`, !isClassicDecorator(config)));\n        this._getter = config;\n      } else {\n        const objectConfig = config;\n        (isDevelopingApp() && !(typeof objectConfig === 'object' && !Array.isArray(objectConfig)) && assert('computed expects a function or an object as last argument.', typeof objectConfig === 'object' && !Array.isArray(objectConfig)));\n        (isDevelopingApp() && !(Object.keys(objectConfig).every(key => key === 'get' || key === 'set')) && assert('Config object passed to computed can only contain `get` and `set` keys.', Object.keys(objectConfig).every(key => key === 'get' || key === 'set')));\n        (isDevelopingApp() && !(Boolean(objectConfig.get) || Boolean(objectConfig.set)) && assert('Computed properties must receive a getter or a setter, you passed none.', Boolean(objectConfig.get) || Boolean(objectConfig.set)));\n        this._getter = objectConfig.get || noop;\n        this._setter = objectConfig.set;\n      }\n    }\n    if (args.length > 0) {\n      this._property(...args);\n    }\n  }\n  setup(obj, keyName, propertyDesc, meta) {\n    super.setup(obj, keyName, propertyDesc, meta);\n    (isDevelopingApp() && !(!(propertyDesc && typeof propertyDesc.value === 'function')) && assert(`@computed can only be used on accessors or fields, attempted to use it with ${keyName} but that was a method. Try converting it to a getter (e.g. \\`get ${keyName}() {}\\`)`, !(propertyDesc && typeof propertyDesc.value === 'function')));\n    (isDevelopingApp() && !(!propertyDesc || !propertyDesc.initializer) && assert(`@computed can only be used on empty fields. ${keyName} has an initial value (e.g. \\`${keyName} = someValue\\`)`, !propertyDesc || !propertyDesc.initializer));\n    (isDevelopingApp() && !(!(this._hasConfig && propertyDesc && (typeof propertyDesc.get === 'function' || typeof propertyDesc.set === 'function'))) && assert(`Attempted to apply a computed property that already has a getter/setter to a ${keyName}, but it is a method or an accessor. If you passed @computed a function or getter/setter (e.g. \\`@computed({ get() { ... } })\\`), then it must be applied to a field`, !(this._hasConfig && propertyDesc && (typeof propertyDesc.get === 'function' || typeof propertyDesc.set === 'function'))));\n    if (this._hasConfig === false) {\n      (isDevelopingApp() && !(propertyDesc && (typeof propertyDesc.get === 'function' || typeof propertyDesc.set === 'function')) && assert(`Attempted to use @computed on ${keyName}, but it did not have a getter or a setter. You must either pass a get a function or getter/setter to @computed directly (e.g. \\`@computed({ get() { ... } })\\`) or apply @computed directly to a getter/setter`, propertyDesc && (typeof propertyDesc.get === 'function' || typeof propertyDesc.set === 'function')));\n      let {\n        get,\n        set\n      } = propertyDesc;\n      if (get !== undefined) {\n        this._getter = get;\n      }\n      if (set !== undefined) {\n        this._setter = function setterWrapper(_key, value) {\n          let ret = set.call(this, value);\n          if (get !== undefined) {\n            return typeof ret === 'undefined' ? get.call(this) : ret;\n          }\n          return ret;\n        };\n      }\n    }\n  }\n  _property(...passedArgs) {\n    let args = [];\n    function addArg(property) {\n      (isDevelopingApp() && !(DEEP_EACH_REGEX.test(property) === false) && assert(`Dependent keys containing @each only work one level deep. ` + `You used the key \"${property}\" which is invalid. ` + `Please create an intermediary computed property or ` + `switch to using tracked properties.`, DEEP_EACH_REGEX.test(property) === false));\n      args.push(property);\n    }\n    for (let arg of passedArgs) {\n      expandProperties(arg, addArg);\n    }\n    this._dependentKeys = args;\n  }\n  get(obj, keyName) {\n    let meta$1 = meta(obj);\n    let tagMeta = tagMetaFor(obj);\n    let propertyTag = tagFor(obj, keyName, tagMeta);\n    let ret;\n    let revision = meta$1.revisionFor(keyName);\n    if (revision !== undefined && validateTag(propertyTag, revision)) {\n      ret = meta$1.valueFor(keyName);\n    } else {\n      // For backwards compatibility, we only throw if the CP has any dependencies. CPs without dependencies\n      // should be allowed, even after the object has been destroyed, which is why we check _dependentKeys.\n      (isDevelopingApp() && !(this._dependentKeys === undefined || !isDestroyed(obj)) && assert(`Attempted to access the computed ${obj}.${keyName} on a destroyed object, which is not allowed`, this._dependentKeys === undefined || !isDestroyed(obj)));\n      let {\n        _getter,\n        _dependentKeys\n      } = this;\n\n      // Create a tracker that absorbs any trackable actions inside the CP\n      untrack(() => {\n        ret = _getter.call(obj, keyName);\n      });\n      if (_dependentKeys !== undefined) {\n        UPDATE_TAG(propertyTag, getChainTagsForKeys(obj, _dependentKeys, tagMeta, meta$1));\n        if (isDevelopingApp()) {\n          ALLOW_CYCLES.set(propertyTag, true);\n        }\n      }\n      meta$1.setValueFor(keyName, ret);\n      meta$1.setRevisionFor(keyName, valueForTag(propertyTag));\n      finishLazyChains(meta$1, keyName, ret);\n    }\n    consumeTag(propertyTag);\n\n    // Add the tag of the returned value if it is an array, since arrays\n    // should always cause updates if they are consumed and then changed\n    if (Array.isArray(ret)) {\n      consumeTag(tagFor(ret, '[]'));\n    }\n    return ret;\n  }\n  set(obj, keyName, value) {\n    if (this._readOnly) {\n      this._throwReadOnlyError(obj, keyName);\n    }\n    (isDevelopingApp() && !(this._setter !== undefined) && assert(`Cannot override the computed property \\`${keyName}\\` on ${toString(obj)}.`, this._setter !== undefined));\n    let meta$1 = meta(obj);\n\n    // ensure two way binding works when the component has defined a computed\n    // property with both a setter and dependent keys, in that scenario without\n    // the sync observer added below the caller's value will never be updated\n    //\n    // See GH#18147 / GH#19028 for details.\n    if (\n    // ensure that we only run this once, while the component is being instantiated\n    meta$1.isInitializing() && this._dependentKeys !== undefined && this._dependentKeys.length > 0 && typeof obj[PROPERTY_DID_CHANGE] === 'function' && obj.isComponent) {\n      // It's redundant to do this here, but we don't want to check above so we can avoid an extra function call in prod.\n      (isDevelopingApp() && !(hasPropertyDidChange(obj)) && assert('property did change hook is invalid', hasPropertyDidChange(obj)));\n      addObserver(obj, keyName, () => {\n        obj[PROPERTY_DID_CHANGE](keyName);\n      }, undefined, true);\n    }\n    let ret;\n    try {\n      beginPropertyChanges();\n      ret = this._set(obj, keyName, value, meta$1);\n      finishLazyChains(meta$1, keyName, ret);\n      let tagMeta = tagMetaFor(obj);\n      let propertyTag = tagFor(obj, keyName, tagMeta);\n      let {\n        _dependentKeys\n      } = this;\n      if (_dependentKeys !== undefined) {\n        UPDATE_TAG(propertyTag, getChainTagsForKeys(obj, _dependentKeys, tagMeta, meta$1));\n        if (isDevelopingApp()) {\n          ALLOW_CYCLES.set(propertyTag, true);\n        }\n      }\n      meta$1.setRevisionFor(keyName, valueForTag(propertyTag));\n    } finally {\n      endPropertyChanges();\n    }\n    return ret;\n  }\n  _throwReadOnlyError(obj, keyName) {\n    throw new Error(`Cannot set read-only property \"${keyName}\" on object: ${inspect(obj)}`);\n  }\n  _set(obj, keyName, value, meta) {\n    let hadCachedValue = meta.revisionFor(keyName) !== undefined;\n    let cachedValue = meta.valueFor(keyName);\n    let ret;\n    let {\n      _setter\n    } = this;\n    setObserverSuspended(obj, keyName, true);\n    try {\n      ret = _setter.call(obj, keyName, value, cachedValue);\n    } finally {\n      setObserverSuspended(obj, keyName, false);\n    }\n\n    // allows setter to return the same value that is cached already\n    if (hadCachedValue && cachedValue === ret) {\n      return ret;\n    }\n    meta.setValueFor(keyName, ret);\n    notifyPropertyChange(obj, keyName, meta, value);\n    return ret;\n  }\n\n  /* called before property is overridden */\n  teardown(obj, keyName, meta) {\n    if (meta.revisionFor(keyName) !== undefined) {\n      meta.setRevisionFor(keyName, undefined);\n      meta.setValueFor(keyName, undefined);\n    }\n    super.teardown(obj, keyName, meta);\n  }\n}\nclass AutoComputedProperty extends ComputedProperty {\n  get(obj, keyName) {\n    let meta$1 = meta(obj);\n    let tagMeta = tagMetaFor(obj);\n    let propertyTag = tagFor(obj, keyName, tagMeta);\n    let ret;\n    let revision = meta$1.revisionFor(keyName);\n    if (revision !== undefined && validateTag(propertyTag, revision)) {\n      ret = meta$1.valueFor(keyName);\n    } else {\n      (isDevelopingApp() && !(!isDestroyed(obj)) && assert(`Attempted to access the computed ${obj}.${keyName} on a destroyed object, which is not allowed`, !isDestroyed(obj)));\n      let {\n        _getter\n      } = this;\n\n      // Create a tracker that absorbs any trackable actions inside the CP\n      let tag = track(() => {\n        ret = _getter.call(obj, keyName);\n      });\n      UPDATE_TAG(propertyTag, tag);\n      meta$1.setValueFor(keyName, ret);\n      meta$1.setRevisionFor(keyName, valueForTag(propertyTag));\n      finishLazyChains(meta$1, keyName, ret);\n    }\n    consumeTag(propertyTag);\n\n    // Add the tag of the returned value if it is an array, since arrays\n    // should always cause updates if they are consumed and then changed\n    if (Array.isArray(ret)) {\n      consumeTag(tagFor(ret, '[]', tagMeta));\n    }\n    return ret;\n  }\n}\n// TODO: This class can be svelted once `meta` has been deprecated\nclass ComputedDecoratorImpl extends Function {\n  /**\n    Call on a computed property to set it into read-only mode. When in this\n    mode the computed property will throw an error when set.\n     Example:\n     ```javascript\n    import { computed, set } from '@ember/object';\n     class Person {\n      @computed().readOnly()\n      get guid() {\n        return 'guid-guid-guid';\n      }\n    }\n     let person = new Person();\n    set(person, 'guid', 'new-guid'); // will throw an exception\n    ```\n     Classic Class Example:\n     ```javascript\n    import EmberObject, { computed } from '@ember/object';\n     let Person = EmberObject.extend({\n      guid: computed(function() {\n        return 'guid-guid-guid';\n      }).readOnly()\n    });\n     let person = Person.create();\n    person.set('guid', 'new-guid'); // will throw an exception\n    ```\n     @method readOnly\n    @return {ComputedProperty} this\n    @chainable\n    @public\n  */\n  readOnly() {\n    let desc = descriptorForDecorator(this);\n    (isDevelopingApp() && !(!(desc._setter && desc._setter !== desc._getter)) && assert('Computed properties that define a setter using the new syntax cannot be read-only', !(desc._setter && desc._setter !== desc._getter)));\n    desc._readOnly = true;\n    return this;\n  }\n\n  /**\n    In some cases, you may want to annotate computed properties with additional\n    metadata about how they function or what values they operate on. For example,\n    computed property functions may close over variables that are then no longer\n    available for introspection. You can pass a hash of these values to a\n    computed property.\n     Example:\n     ```javascript\n    import { computed } from '@ember/object';\n    import Person from 'my-app/utils/person';\n     class Store {\n      @computed().meta({ type: Person })\n      get person() {\n        let personId = this.personId;\n        return Person.create({ id: personId });\n      }\n    }\n    ```\n     Classic Class Example:\n     ```javascript\n    import { computed } from '@ember/object';\n    import Person from 'my-app/utils/person';\n     const Store = EmberObject.extend({\n      person: computed(function() {\n        let personId = this.get('personId');\n        return Person.create({ id: personId });\n      }).meta({ type: Person })\n    });\n    ```\n     The hash that you pass to the `meta()` function will be saved on the\n    computed property descriptor under the `_meta` key. Ember runtime\n    exposes a public API for retrieving these values from classes,\n    via the `metaForProperty()` function.\n     @method meta\n    @param {Object} meta\n    @chainable\n    @public\n  */\n\n  meta(meta) {\n    let prop = descriptorForDecorator(this);\n    if (arguments.length === 0) {\n      return prop._meta || {};\n    } else {\n      prop._meta = meta;\n      return this;\n    }\n  }\n\n  // TODO: Remove this when we can provide alternatives in the ecosystem to\n  // addons such as ember-macro-helpers that use it.\n  /** @internal */\n  get _getter() {\n    return descriptorForDecorator(this)._getter;\n  }\n\n  // TODO: Refactor this, this is an internal API only\n  /** @internal */\n  set enumerable(value) {\n    descriptorForDecorator(this).enumerable = value;\n  }\n}\n\n/**\n  This helper returns a new property descriptor that wraps the passed\n  computed property function. You can use this helper to define properties with\n  native decorator syntax, mixins, or via `defineProperty()`.\n\n  Example:\n\n  ```js\n  import { computed, set } from '@ember/object';\n\n  class Person {\n    constructor() {\n      this.firstName = 'Betty';\n      this.lastName = 'Jones';\n    },\n\n    @computed('firstName', 'lastName')\n    get fullName() {\n      return `${this.firstName} ${this.lastName}`;\n    }\n  }\n\n  let client = new Person();\n\n  client.fullName; // 'Betty Jones'\n\n  set(client, 'lastName', 'Fuller');\n  client.fullName; // 'Betty Fuller'\n  ```\n\n  Classic Class Example:\n\n  ```js\n  import EmberObject, { computed } from '@ember/object';\n\n  let Person = EmberObject.extend({\n    init() {\n      this._super(...arguments);\n\n      this.firstName = 'Betty';\n      this.lastName = 'Jones';\n    },\n\n    fullName: computed('firstName', 'lastName', function() {\n      return `${this.get('firstName')} ${this.get('lastName')}`;\n    })\n  });\n\n  let client = Person.create();\n\n  client.get('fullName'); // 'Betty Jones'\n\n  client.set('lastName', 'Fuller');\n  client.get('fullName'); // 'Betty Fuller'\n  ```\n\n  You can also provide a setter, either directly on the class using native class\n  syntax, or by passing a hash with `get` and `set` functions.\n\n  Example:\n\n  ```js\n  import { computed, set } from '@ember/object';\n\n  class Person {\n    constructor() {\n      this.firstName = 'Betty';\n      this.lastName = 'Jones';\n    },\n\n    @computed('firstName', 'lastName')\n    get fullName() {\n      return `${this.firstName} ${this.lastName}`;\n    }\n\n    set fullName(value) {\n      let [firstName, lastName] = value.split(/\\s+/);\n\n      set(this, 'firstName', firstName);\n      set(this, 'lastName', lastName);\n\n      return value;\n    }\n  }\n\n  let client = new Person();\n\n  client.fullName; // 'Betty Jones'\n\n  set(client, 'lastName', 'Fuller');\n  client.fullName; // 'Betty Fuller'\n  ```\n\n  Classic Class Example:\n\n  ```js\n  import EmberObject, { computed } from '@ember/object';\n\n  let Person = EmberObject.extend({\n    init() {\n      this._super(...arguments);\n\n      this.firstName = 'Betty';\n      this.lastName = 'Jones';\n    },\n\n    fullName: computed('firstName', 'lastName', {\n      get(key) {\n        return `${this.get('firstName')} ${this.get('lastName')}`;\n      },\n      set(key, value) {\n        let [firstName, lastName] = value.split(/\\s+/);\n        this.setProperties({ firstName, lastName });\n        return value;\n      }\n    })\n  });\n\n  let client = Person.create();\n  client.get('firstName'); // 'Betty'\n\n  client.set('fullName', 'Carroll Fuller');\n  client.get('firstName'); // 'Carroll'\n  ```\n\n  When passed as an argument, the `set` function should accept two parameters,\n  `key` and `value`. The value returned from `set` will be the new value of the\n  property.\n\n  _Note: This is the preferred way to define computed properties when writing third-party\n  libraries that depend on or use Ember, since there is no guarantee that the user\n  will have [prototype Extensions](https://guides.emberjs.com/release/configuring-ember/disabling-prototype-extensions/) enabled._\n\n  @method computed\n  @for @ember/object\n  @static\n  @param {String} [dependentKeys*] Optional dependent keys that trigger this computed property.\n  @param {Function} func The computed property function.\n  @return {ComputedDecorator} property decorator instance\n  @public\n*/\n// @computed without parens or computed with descriptor args\n\n// @computed with keys only\n\n// @computed with keys and config\n\n// @computed with config only\n\nfunction computed(...args) {\n  (isDevelopingApp() && !(!(isElementDescriptor(args.slice(0, 3)) && args.length === 5 && args[4] === true)) && assert(`@computed can only be used directly as a native decorator. If you're using tracked in classic classes, add parenthesis to call it like a function: computed()`, !(isElementDescriptor(args.slice(0, 3)) && args.length === 5 && args[4] === true)));\n  if (isElementDescriptor(args)) {\n    // SAFETY: We passed in the impl for this class\n    let decorator = makeComputedDecorator(new ComputedProperty([]), ComputedDecoratorImpl);\n    return decorator(args[0], args[1], args[2]);\n  }\n\n  // SAFETY: We passed in the impl for this class\n  return makeComputedDecorator(new ComputedProperty(args), ComputedDecoratorImpl);\n}\nfunction autoComputed(...config) {\n  // SAFETY: We passed in the impl for this class\n  return makeComputedDecorator(new AutoComputedProperty(config), ComputedDecoratorImpl);\n}\n\n/**\n  Allows checking if a given property on an object is a computed property. For the most part,\n  this doesn't matter (you would normally just access the property directly and use its value),\n  but for some tooling specific scenarios (e.g. the ember-inspector) it is important to\n  differentiate if a property is a computed property or a \"normal\" property.\n\n  This will work on either a class's prototype or an instance itself.\n\n  @static\n  @method isComputed\n  @for @ember/debug\n  @private\n */\nfunction isComputed(obj, key) {\n  return Boolean(descriptorForProperty(obj, key));\n}\n\n/**\n@module @ember/object\n*/\n\nfunction defineProperty(obj, keyName, desc, data, _meta) {\n  let meta$1 = _meta === undefined ? meta(obj) : _meta;\n  let previousDesc = descriptorForProperty(obj, keyName, meta$1);\n  let wasDescriptor = previousDesc !== undefined;\n  if (wasDescriptor) {\n    previousDesc.teardown(obj, keyName, meta$1);\n  }\n  if (isClassicDecorator(desc)) {\n    defineDecorator(obj, keyName, desc, meta$1);\n  } else if (desc === null || desc === undefined) {\n    defineValue(obj, keyName, data, wasDescriptor, true);\n  } else {\n    // fallback to ES5\n    Object.defineProperty(obj, keyName, desc);\n  }\n\n  // if key is being watched, override chains that\n  // were initialized with the prototype\n  if (!meta$1.isPrototypeMeta(obj)) {\n    revalidateObservers(obj);\n  }\n}\nfunction defineDecorator(obj, keyName, desc, meta) {\n  let propertyDesc;\n  if (isDevelopingApp()) {\n    propertyDesc = desc(obj, keyName, undefined, meta, true);\n  } else {\n    propertyDesc = desc(obj, keyName, undefined, meta);\n  }\n  Object.defineProperty(obj, keyName, propertyDesc);\n\n  // pass the decorator function forward for backwards compat\n  return desc;\n}\nfunction defineValue(obj, keyName, value, wasDescriptor, enumerable = true) {\n  if (wasDescriptor === true || enumerable === false) {\n    Object.defineProperty(obj, keyName, {\n      configurable: true,\n      enumerable,\n      writable: true,\n      value\n    });\n  } else {\n    if (isDevelopingApp()) {\n      setWithMandatorySetter(obj, keyName, value);\n    } else {\n      obj[keyName] = value;\n    }\n  }\n  return value;\n}\n\nconst firstDotIndexCache = new Cache(1000, key => key.indexOf('.'));\nfunction isPath(path) {\n  return typeof path === 'string' && firstDotIndexCache.get(path) !== -1;\n}\n\n/**\n@module @ember/object\n*/\n\nconst PROXY_CONTENT = symbol('PROXY_CONTENT');\nlet getPossibleMandatoryProxyValue;\nif (isDevelopingApp()) {\n  getPossibleMandatoryProxyValue = function getPossibleMandatoryProxyValue(obj, keyName) {\n    let content = obj[PROXY_CONTENT];\n    if (content === undefined) {\n      return obj[keyName];\n    } else {\n      /* global Reflect */\n      return Reflect.get(content, keyName, obj);\n    }\n  };\n}\nfunction hasUnknownProperty(val) {\n  return typeof val === 'object' && val !== null && typeof val.unknownProperty === 'function';\n}\n\n// ..........................................................\n// GET AND SET\n//\n// If we are on a platform that supports accessors we can use those.\n// Otherwise simulate accessors by looking up the property directly on the\n// object.\n\n/**\n  Gets the value of a property on an object. If the property is computed,\n  the function will be invoked. If the property is not defined but the\n  object implements the `unknownProperty` method then that will be invoked.\n\n  ```javascript\n  import { get } from '@ember/object';\n  get(obj, \"name\");\n  ```\n\n  If you plan to run on IE8 and older browsers then you should use this\n  method anytime you want to retrieve a property on an object that you don't\n  know for sure is private. (Properties beginning with an underscore '_'\n  are considered private.)\n\n  On all newer browsers, you only need to use this method to retrieve\n  properties if the property might not be defined on the object and you want\n  to respect the `unknownProperty` handler. Otherwise you can ignore this\n  method.\n\n  Note that if the object itself is `undefined`, this method will throw\n  an error.\n\n  @method get\n  @for @ember/object\n  @static\n  @param {Object} obj The object to retrieve from.\n  @param {String} keyName The property key to retrieve\n  @return {Object} the property value or `null`.\n  @public\n*/\n\nfunction get(obj, keyName) {\n  (isDevelopingApp() && !(arguments.length === 2) && assert(`Get must be called with two arguments; an object and a property key`, arguments.length === 2));\n  (isDevelopingApp() && !(obj !== undefined && obj !== null) && assert(`Cannot call get with '${keyName}' on an undefined object.`, obj !== undefined && obj !== null));\n  (isDevelopingApp() && !(typeof keyName === 'string' || typeof keyName === 'number' && !isNaN(keyName)) && assert(`The key provided to get must be a string or number, you passed ${keyName}`, typeof keyName === 'string' || typeof keyName === 'number' && !isNaN(keyName)));\n  (isDevelopingApp() && !(typeof keyName !== 'string' || keyName.lastIndexOf('this.', 0) !== 0) && assert(`'this' in paths is not supported`, typeof keyName !== 'string' || keyName.lastIndexOf('this.', 0) !== 0));\n  return isPath(keyName) ? _getPath(obj, keyName) : _getProp(obj, keyName);\n}\nfunction _getProp(obj, keyName) {\n  if (obj == null) {\n    return;\n  }\n  let value;\n  if (typeof obj === 'object' || typeof obj === 'function') {\n    if (isDevelopingApp()) {\n      value = getPossibleMandatoryProxyValue(obj, keyName);\n    } else {\n      value = obj[keyName];\n    }\n    if (value === undefined && typeof obj === 'object' && !(keyName in obj) && hasUnknownProperty(obj)) {\n      value = obj.unknownProperty(keyName);\n    }\n    if (isTracking()) {\n      consumeTag(tagFor(obj, keyName));\n      if (Array.isArray(value) || isEmberArray(value)) {\n        // Add the tag of the returned value if it is an array, since arrays\n        // should always cause updates if they are consumed and then changed\n        consumeTag(tagFor(value, '[]'));\n      }\n    }\n  } else {\n    // SAFETY: It should be ok to access properties on any non-nullish value\n    value = obj[keyName];\n  }\n  return value;\n}\nfunction _getPath(obj, path, forSet) {\n  let parts = typeof path === 'string' ? path.split('.') : path;\n  for (let part of parts) {\n    if (obj === undefined || obj === null || obj.isDestroyed) {\n      return undefined;\n    }\n    if (forSet && (part === '__proto__' || part === 'constructor')) {\n      return;\n    }\n    obj = _getProp(obj, part);\n  }\n  return obj;\n}\n\n// Warm it up\n_getProp('foo', 'a');\n_getProp('foo', 1);\n_getProp({}, 'a');\n_getProp({}, 1);\n_getProp({\n  unknownProperty() {}\n}, 'a');\n_getProp({\n  unknownProperty() {}\n}, 1);\nget({}, 'foo');\nget({}, 'foo.bar');\nlet fakeProxy = {};\nsetProxy(fakeProxy);\ntrack(() => _getProp({}, 'a'));\ntrack(() => _getProp({}, 1));\ntrack(() => _getProp({\n  a: []\n}, 'a'));\ntrack(() => _getProp({\n  a: fakeProxy\n}, 'a'));\n\n/**\n @module ember\n*/\n/**\n  Helper class that allows you to register your library with Ember.\n\n  Singleton created at `Ember.libraries`.\n\n  @class Libraries\n  @constructor\n  @private\n*/\nclass Libraries {\n  _registry;\n  _coreLibIndex;\n  constructor() {\n    this._registry = [];\n    this._coreLibIndex = 0;\n  }\n  _getLibraryByName(name) {\n    let libs = this._registry;\n    for (let lib of libs) {\n      if (lib.name === name) {\n        return lib;\n      }\n    }\n    return undefined;\n  }\n  register(name, version, isCoreLibrary) {\n    let index = this._registry.length;\n    if (!this._getLibraryByName(name)) {\n      if (isCoreLibrary) {\n        index = this._coreLibIndex++;\n      }\n      this._registry.splice(index, 0, {\n        name,\n        version\n      });\n    } else {\n      (isDevelopingApp() && warn(`Library \"${name}\" is already registered with Ember.`, false, {\n        id: 'ember-metal.libraries-register'\n      }));\n    }\n  }\n  registerCoreLibrary(name, version) {\n    this.register(name, version, true);\n  }\n  deRegister(name) {\n    let lib = this._getLibraryByName(name);\n    let index;\n    if (lib) {\n      index = this._registry.indexOf(lib);\n      this._registry.splice(index, 1);\n    }\n  }\n}\nif (isDevelopingApp()) {\n  Libraries.prototype.logVersions = function () {\n    let libs = this._registry;\n    let nameLengths = libs.map(item => get(item, 'name.length'));\n    (isDevelopingApp() && !(nameLengths instanceof Array && nameLengths.every(n => typeof n === 'number')) && assert('nameLengths is number array', nameLengths instanceof Array && nameLengths.every(n => typeof n === 'number')));\n    let maxNameLength = Math.max.apply(null, nameLengths);\n    debug('-------------------------------');\n    for (let lib of libs) {\n      let spaces = new Array(maxNameLength - lib.name.length + 1).join(' ');\n      debug([lib.name, spaces, ' : ', lib.version].join(''));\n    }\n    debug('-------------------------------');\n  };\n}\nconst LIBRARIES = new Libraries();\nLIBRARIES.registerCoreLibrary('Ember', Version);\n\nlet DEBUG_INJECTION_FUNCTIONS;\nif (isDevelopingApp()) {\n  DEBUG_INJECTION_FUNCTIONS = new WeakMap();\n}\n\n/**\n @module ember\n @private\n */\n\n/**\n  Read-only property that returns the result of a container lookup.\n\n  @class InjectedProperty\n  @namespace Ember\n  @constructor\n  @param {String} type The container type the property will lookup\n  @param {String} nameOrDesc (optional) The name the property will lookup, defaults\n         to the property's name\n  @private\n*/\n// Decorator factory (with args)\n// (Also matches non-decorator form, types may be incorrect for this.)\n\n// Non-decorator\n\n// Decorator (without args)\n\n// Catch-all for service and controller injections\n\nfunction inject(type, ...args) {\n  (isDevelopingApp() && !(typeof type === 'string') && assert('a string type must be provided to inject', typeof type === 'string'));\n  let elementDescriptor;\n  let name;\n  if (isElementDescriptor(args)) {\n    elementDescriptor = args;\n  } else if (typeof args[0] === 'string') {\n    name = args[0];\n  }\n  let getInjection = function (propertyName) {\n    let owner = getOwner(this) || this.container; // fallback to `container` for backwards compat\n    (isDevelopingApp() && !(Boolean(owner)) && assert(`Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.`, Boolean(owner)));\n    return owner.lookup(`${type}:${name || propertyName}`);\n  };\n  if (isDevelopingApp()) {\n    DEBUG_INJECTION_FUNCTIONS.set(getInjection, {\n      type,\n      name\n    });\n  }\n  let decorator = computed({\n    get: getInjection,\n    set(keyName, value) {\n      defineProperty(this, keyName, null, value);\n    }\n  });\n  if (elementDescriptor) {\n    return decorator(elementDescriptor[0], elementDescriptor[1], elementDescriptor[2]);\n  } else {\n    return decorator;\n  }\n}\n\nfunction tracked(...args) {\n  (isDevelopingApp() && !(!(isElementDescriptor(args.slice(0, 3)) && args.length === 5 && args[4] === true)) && assert(`@tracked can only be used directly as a native decorator. If you're using tracked in classic classes, add parenthesis to call it like a function: tracked()`, !(isElementDescriptor(args.slice(0, 3)) && args.length === 5 && args[4] === true)));\n  if (!isElementDescriptor(args)) {\n    let propertyDesc = args[0];\n    (isDevelopingApp() && !(args.length === 0 || typeof propertyDesc === 'object' && propertyDesc !== null) && assert(`tracked() may only receive an options object containing 'value' or 'initializer', received ${propertyDesc}`, args.length === 0 || typeof propertyDesc === 'object' && propertyDesc !== null));\n    if (isDevelopingApp() && propertyDesc) {\n      let keys = Object.keys(propertyDesc);\n      (isDevelopingApp() && !(keys.length <= 1 && (keys[0] === undefined || keys[0] === 'value' || keys[0] === 'initializer')) && assert(`The options object passed to tracked() may only contain a 'value' or 'initializer' property, not both. Received: [${keys}]`, keys.length <= 1 && (keys[0] === undefined || keys[0] === 'value' || keys[0] === 'initializer')));\n      (isDevelopingApp() && !(!('initializer' in propertyDesc) || typeof propertyDesc.initializer === 'function') && assert(`The initializer passed to tracked must be a function. Received ${propertyDesc.initializer}`, !('initializer' in propertyDesc) || typeof propertyDesc.initializer === 'function'));\n    }\n    let initializer = propertyDesc ? propertyDesc.initializer : undefined;\n    let value = propertyDesc ? propertyDesc.value : undefined;\n    let decorator = function (target, key, _desc, _meta, isClassicDecorator) {\n      (isDevelopingApp() && !(isClassicDecorator) && assert(`You attempted to set a default value for ${key} with the @tracked({ value: 'default' }) syntax. You can only use this syntax with classic classes. For native classes, you can use class initializers: @tracked field = 'default';`, isClassicDecorator));\n      let fieldDesc = {\n        initializer: initializer || (() => value)\n      };\n      return descriptorForField([target, key, fieldDesc]);\n    };\n    setClassicDecorator(decorator);\n    return decorator;\n  }\n  return descriptorForField(args);\n}\nif (isDevelopingApp()) {\n  // Normally this isn't a classic decorator, but we want to throw a helpful\n  // error in development so we need it to treat it like one\n  setClassicDecorator(tracked);\n}\nfunction descriptorForField([target, key, desc]) {\n  (isDevelopingApp() && !(!desc || !desc.value && !desc.get && !desc.set) && assert(`You attempted to use @tracked on ${key}, but that element is not a class field. @tracked is only usable on class fields. Native getters and setters will autotrack add any tracked fields they encounter, so there is no need mark getters and setters with @tracked.`, !desc || !desc.value && !desc.get && !desc.set));\n  let {\n    getter,\n    setter\n  } = trackedData(key, desc ? desc.initializer : undefined);\n  function get() {\n    let value = getter(this);\n\n    // Add the tag of the returned value if it is an array, since arrays\n    // should always cause updates if they are consumed and then changed\n    if (Array.isArray(value) || isEmberArray(value)) {\n      consumeTag(tagFor(value, '[]'));\n    }\n    return value;\n  }\n  function set(newValue) {\n    setter(this, newValue);\n    dirtyTagFor(this, SELF_TAG);\n  }\n  let newDesc = {\n    enumerable: true,\n    configurable: true,\n    isTracked: true,\n    get,\n    set\n  };\n  COMPUTED_SETTERS.add(set);\n  meta(target).writeDescriptors(key, new TrackedDescriptor(get, set));\n  return newDesc;\n}\nclass TrackedDescriptor {\n  constructor(_get, _set) {\n    this._get = _get;\n    this._set = _set;\n    CHAIN_PASS_THROUGH.add(this);\n  }\n  get(obj) {\n    return this._get.call(obj);\n  }\n  set(obj, _key, value) {\n    this._set.call(obj, value);\n  }\n}\n\nexport { markObjectAsDirty as $, defineDecorator as A, revalidateObservers as B, ComputedProperty as C, DEBUG_INJECTION_FUNCTIONS as D, descriptorForDecorator as E, addListener as F, removeListener as G, makeComputedDecorator as H, flushAsyncObservers as I, ComputedDescriptor as J, CHAIN_PASS_THROUGH as K, getChainTagsForKey as L, finishLazyChains as M, on as N, LIBRARIES as O, PROXY_CONTENT as P, PROPERTY_DID_CHANGE as Q, autoComputed as R, tracked as S, changeProperties as T, isComputed as U, ASYNC_OBSERVERS as V, Libraries as W, SYNC_OBSERVERS as X, TrackedDescriptor as Y, _getProp as Z, _getPath as _, tagForProperty as a, descriptorForProperty as b, computed as c, defineProperty as d, expandProperties as e, isClassicDecorator as f, get as g, hasUnknownProperty as h, isElementDescriptor as i, activateObserver as j, sendEvent as k, beginPropertyChanges as l, endPropertyChanges as m, notifyPropertyChange as n, objectAt as o, inject as p, isPath as q, COMPUTED_SETTERS as r, setClassicDecorator as s, tagForObject as t, getPossibleMandatoryProxyValue as u, hasListeners as v, removeObserver as w, addObserver as x, nativeDescDecorator as y, defineValue as z };\n","function isPresentArray(list) {\n  return list ? list.length > 0 : false;\n}\nfunction asPresentArray(list, message = `unexpected empty list`) {\n  return list;\n}\nfunction getLast(list) {\n  return list.length === 0 ? undefined : list[list.length - 1];\n}\nfunction getFirst(list) {\n  return list.length === 0 ? undefined : list[0];\n}\nfunction mapPresentArray(list, mapper) {\n  if (list === null) {\n    return null;\n  }\n  let out = [];\n  for (let item of list) {\n    out.push(mapper(item));\n  }\n  return out;\n}\n\nexport { getFirst as a, asPresentArray as b, getLast as g, isPresentArray as i, mapPresentArray as m };\n","import './debug-to-string-BsFOvUtQ.js';\nimport { u as unwrap } from './collections-B8me-ZlQ.js';\nimport '@embroider/macros';\nimport { O as OPERAND_LEN_MASK, A as ARG_SHIFT, a as MACHINE_MASK, b as TYPE_MASK } from './flags-BsZlvEeR.js';\n\nclass RuntimeOpImpl {\n  offset = 0;\n  constructor(heap) {\n    this.heap = heap;\n  }\n  get size() {\n    let rawType = this.heap.getbyaddr(this.offset);\n    return ((rawType & OPERAND_LEN_MASK) >> ARG_SHIFT) + 1;\n  }\n  get isMachine() {\n    let rawType = this.heap.getbyaddr(this.offset);\n    return rawType & MACHINE_MASK ? 1 : 0;\n  }\n  get type() {\n    return this.heap.getbyaddr(this.offset) & TYPE_MASK;\n  }\n  get op1() {\n    return this.heap.getbyaddr(this.offset + 1);\n  }\n  get op2() {\n    return this.heap.getbyaddr(this.offset + 2);\n  }\n  get op3() {\n    return this.heap.getbyaddr(this.offset + 3);\n  }\n}\n\nconst ALLOCATED = 0;\nconst FREED = 1;\nconst PURGED = 2;\nconst POINTER = 3;\nconst PAGE_SIZE = 0x100000;\n\n/**\n * The Program Heap is responsible for dynamically allocating\n * memory in which we read/write the VM's instructions\n * from/to. When we malloc we pass out a VMHandle, which\n * is used as an indirect way of accessing the memory during\n * execution of the VM. Internally we track the different\n * regions of the memory in an int array known as the table.\n *\n * The table 32-bit aligned and has the following layout:\n *\n * | ... | hp (u32) |       info (u32)   | size (u32) |\n * | ... |  Handle  | Scope Size | State | Size       |\n * | ... | 32bits   | 30bits     | 2bits | 32bit      |\n *\n * With this information we effectively have the ability to\n * control when we want to free memory. That being said you\n * can not free during execution as raw address are only\n * valid during the execution. This means you cannot close\n * over them as you will have a bad memory access exception.\n */\nclass ProgramHeapImpl {\n  offset = 0;\n  heap;\n  handleTable;\n  handleState;\n  handle = 0;\n  constructor() {\n    this.heap = new Int32Array(PAGE_SIZE);\n    this.handleTable = [];\n    this.handleState = [];\n  }\n  entries() {\n    return this.offset;\n  }\n  pushRaw(value) {\n    this.sizeCheck();\n    this.heap[this.offset++] = value;\n  }\n  pushOp(item) {\n    this.pushRaw(item);\n  }\n  pushMachine(item) {\n    this.pushRaw(item | MACHINE_MASK);\n  }\n  sizeCheck() {\n    let {\n      heap\n    } = this;\n    if (this.offset === this.heap.length) {\n      let newHeap = new Int32Array(heap.length + PAGE_SIZE);\n      newHeap.set(heap, 0);\n      this.heap = newHeap;\n    }\n  }\n  getbyaddr(address) {\n    return unwrap(this.heap[address]);\n  }\n  setbyaddr(address, value) {\n    this.heap[address] = value;\n  }\n  malloc() {\n    // push offset, info, size\n    this.handleTable.push(this.offset);\n    return this.handleTable.length - 1;\n  }\n  finishMalloc(handle) {\n  }\n  size() {\n    return this.offset;\n  }\n\n  // It is illegal to close over this address, as compaction\n  // may move it. However, it is legal to use this address\n  // multiple times between compactions.\n  getaddr(handle) {\n    return unwrap(this.handleTable[handle]);\n  }\n  sizeof(handle) {\n    return sizeof(this.handleTable);\n  }\n  free(handle) {\n    this.handleState[handle] = FREED;\n  }\n\n  /**\n   * The heap uses the [Mark-Compact Algorithm](https://en.wikipedia.org/wiki/Mark-compact_algorithm) to shift\n   * reachable memory to the bottom of the heap and freeable\n   * memory to the top of the heap. When we have shifted all\n   * the reachable memory to the top of the heap, we move the\n   * offset to the next free position.\n   */\n  compact() {\n    let compactedSize = 0;\n    let {\n      handleTable,\n      handleState,\n      heap\n    } = this;\n    for (let i = 0; i < length; i++) {\n      let offset = unwrap(handleTable[i]);\n      let size = unwrap(handleTable[i + 1]) - unwrap(offset);\n      let state = handleState[i];\n      if (state === PURGED) {\n        continue;\n      } else if (state === FREED) {\n        // transition to \"already freed\" aka \"purged\"\n        // a good improvement would be to reuse\n        // these slots\n        handleState[i] = PURGED;\n        compactedSize += size;\n      } else if (state === ALLOCATED) {\n        for (let j = offset; j <= i + size; j++) {\n          heap[j - compactedSize] = unwrap(heap[j]);\n        }\n        handleTable[i] = offset - compactedSize;\n      } else if (state === POINTER) {\n        handleTable[i] = offset - compactedSize;\n      }\n    }\n    this.offset = this.offset - compactedSize;\n  }\n}\nclass ProgramImpl {\n  _opcode;\n  constructor(constants, heap) {\n    this.constants = constants;\n    this.heap = heap;\n    this._opcode = new RuntimeOpImpl(this.heap);\n  }\n  opcode(offset) {\n    this._opcode.offset = offset;\n    return this._opcode;\n  }\n}\nfunction sizeof(table, handle) {\n  {\n    return -1;\n  }\n}\n\nexport { ProgramHeapImpl as P, RuntimeOpImpl as R, ProgramImpl as a };\n","import { V as VM_MAIN_OP, d as VM_CONTENT_TYPE_OP, e as VM_ASSERT_SAME_OP, f as VM_APPEND_HTML_OP, g as VM_APPEND_TEXT_OP, i as VM_RESOLVE_CURRIED_COMPONENT_OP, j as VM_PUSH_DYNAMIC_COMPONENT_INSTANCE_OP, k as VM_APPEND_SAFE_HTML_OP, l as VM_APPEND_DOCUMENT_FRAGMENT_OP, n as VM_APPEND_NODE_OP, o as VM_INVOKE_STATIC_OP } from './capabilities-DHiXCCuB.js';\nimport { ContentType } from '../@glimmer/vm/index.js';\nimport { $ as $s0 } from './registers-ylirb0dq.js';\nimport { f as EncoderImpl, g as encodeOp, i as invokePreparedComponent, S as SwitchCases, h as InvokeBareComponent, C as CallDynamic } from './index-CQkjwqTv.js';\n\nclass StdLib {\n  constructor(main, trustingGuardedAppend, cautiousGuardedAppend, trustingNonDynamicAppend, cautiousNonDynamicAppend) {\n    this.main = main;\n    this.trustingGuardedAppend = trustingGuardedAppend;\n    this.cautiousGuardedAppend = cautiousGuardedAppend;\n    this.trustingNonDynamicAppend = trustingNonDynamicAppend;\n    this.cautiousNonDynamicAppend = cautiousNonDynamicAppend;\n  }\n  get 'trusting-append'() {\n    return this.trustingGuardedAppend;\n  }\n  get 'cautious-append'() {\n    return this.cautiousGuardedAppend;\n  }\n  get 'trusting-non-dynamic-append'() {\n    return this.trustingNonDynamicAppend;\n  }\n  get 'cautious-non-dynamic-append'() {\n    return this.cautiousNonDynamicAppend;\n  }\n  getAppend(trusting) {\n    return trusting ? this.trustingGuardedAppend : this.cautiousGuardedAppend;\n  }\n}\n\nfunction main(op) {\n  op(VM_MAIN_OP, $s0);\n  invokePreparedComponent(op, false, false, true);\n}\n\n/**\n * Append content to the DOM. This standard function triages content and does the\n * right thing based upon whether it's a string, safe string, component, fragment\n * or node.\n *\n * @param trusting whether to interpolate a string as raw HTML (corresponds to\n * triple curlies)\n */\nfunction StdAppend(op, trusting, nonDynamicAppend) {\n  SwitchCases(op, () => op(VM_CONTENT_TYPE_OP), when => {\n    when(ContentType.String, () => {\n      if (trusting) {\n        op(VM_ASSERT_SAME_OP);\n        op(VM_APPEND_HTML_OP);\n      } else {\n        op(VM_APPEND_TEXT_OP);\n      }\n    });\n    if (typeof nonDynamicAppend === 'number') {\n      when(ContentType.Component, () => {\n        op(VM_RESOLVE_CURRIED_COMPONENT_OP);\n        op(VM_PUSH_DYNAMIC_COMPONENT_INSTANCE_OP);\n        InvokeBareComponent(op);\n      });\n      when(ContentType.Helper, () => {\n        CallDynamic(op, null, null, () => {\n          op(VM_INVOKE_STATIC_OP, nonDynamicAppend);\n        });\n      });\n    } else {\n      // when non-dynamic, we can no longer call the value (potentially because we've already called it)\n      // this prevents infinite loops. We instead coerce the value, whatever it is, into the DOM.\n      when(ContentType.Component, () => {\n        op(VM_APPEND_TEXT_OP);\n      });\n      when(ContentType.Helper, () => {\n        op(VM_APPEND_TEXT_OP);\n      });\n    }\n    when(ContentType.SafeString, () => {\n      op(VM_ASSERT_SAME_OP);\n      op(VM_APPEND_SAFE_HTML_OP);\n    });\n    when(ContentType.Fragment, () => {\n      op(VM_ASSERT_SAME_OP);\n      op(VM_APPEND_DOCUMENT_FRAGMENT_OP);\n    });\n    when(ContentType.Node, () => {\n      op(VM_ASSERT_SAME_OP);\n      op(VM_APPEND_NODE_OP);\n    });\n  });\n}\nfunction compileStd(context) {\n  let mainHandle = build(context, op => main(op));\n  let trustingGuardedNonDynamicAppend = build(context, op => StdAppend(op, true, null));\n  let cautiousGuardedNonDynamicAppend = build(context, op => StdAppend(op, false, null));\n  let trustingGuardedDynamicAppend = build(context, op => StdAppend(op, true, trustingGuardedNonDynamicAppend));\n  let cautiousGuardedDynamicAppend = build(context, op => StdAppend(op, false, cautiousGuardedNonDynamicAppend));\n  return new StdLib(mainHandle, trustingGuardedDynamicAppend, cautiousGuardedDynamicAppend, trustingGuardedNonDynamicAppend, cautiousGuardedNonDynamicAppend);\n}\nconst STDLIB_META = {\n  symbols: {\n    locals: null,\n    upvars: null\n  },\n  moduleName: 'stdlib',\n  // TODO: ??\n  scopeValues: null,\n  isStrictMode: true,\n  owner: null,\n  size: 0\n};\nfunction build(evaluation, builder) {\n  let encoder = new EncoderImpl(evaluation.program.heap, STDLIB_META);\n  function pushOp(...op) {\n    encodeOp(encoder, evaluation, STDLIB_META, op);\n  }\n  builder(pushOp);\n  let result = encoder.commit(0);\n  if (typeof result !== 'number') {\n    // This shouldn't be possible\n    throw new Error(`Unexpected errors compiling std`);\n  } else {\n    return result;\n  }\n}\n\nclass EvaluationContextImpl {\n  constants;\n  heap;\n  resolver;\n  stdlib;\n  createOp;\n  env;\n  program;\n  constructor({\n    constants,\n    heap\n  }, createOp, runtime) {\n    this.constants = constants;\n    this.heap = heap;\n    this.resolver = runtime.resolver;\n    this.createOp = createOp;\n    this.env = runtime.env;\n    this.program = runtime.program;\n    this.stdlib = compileStd(this);\n  }\n}\n\nexport { EvaluationContextImpl as E, StdLib as S, compileStd as c };\n","import { f as setWithMandatorySetter, l as lookupDescriptor } from './mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { t as toString } from './to-string-CqD7_vQ4.js';\nimport '../@ember/debug/index.js';\nimport { q as isPath, _ as _getPath, r as COMPUTED_SETTERS, u as getPossibleMandatoryProxyValue, n as notifyPropertyChange } from './observers-DhgQ6ba5.js';\nimport { assert } from '../@ember/debug/lib/assert.js';\n\n/**\n @module @ember/object\n*/\n/**\n  Sets the value of a property on an object, respecting computed properties\n  and notifying observers and other listeners of the change.\n  If the specified property is not defined on the object and the object\n  implements the `setUnknownProperty` method, then instead of setting the\n  value of the property on the object, its `setUnknownProperty` handler\n  will be invoked with the two parameters `keyName` and `value`.\n\n  ```javascript\n  import { set } from '@ember/object';\n  set(obj, \"name\", value);\n  ```\n\n  @method set\n  @static\n  @for @ember/object\n  @param {Object} obj The object to modify.\n  @param {String} keyName The property key to set\n  @param {Object} value The value to set\n  @return {Object} the passed value.\n  @public\n*/\nfunction set(obj, keyName, value, tolerant) {\n  (isDevelopingApp() && !(arguments.length === 3 || arguments.length === 4) && assert(`Set must be called with three or four arguments; an object, a property key, a value and tolerant true/false`, arguments.length === 3 || arguments.length === 4));\n  (isDevelopingApp() && !(obj && typeof obj === 'object' || typeof obj === 'function') && assert(`Cannot call set with '${keyName}' on an undefined object.`, obj && typeof obj === 'object' || typeof obj === 'function'));\n  (isDevelopingApp() && !(typeof keyName === 'string' || typeof keyName === 'number' && !isNaN(keyName)) && assert(`The key provided to set must be a string or number, you passed ${keyName}`, typeof keyName === 'string' || typeof keyName === 'number' && !isNaN(keyName)));\n  (isDevelopingApp() && !(typeof keyName !== 'string' || keyName.lastIndexOf('this.', 0) !== 0) && assert(`'this' in paths is not supported`, typeof keyName !== 'string' || keyName.lastIndexOf('this.', 0) !== 0));\n  if (obj.isDestroyed) {\n    (isDevelopingApp() && !(tolerant) && assert(`calling set on destroyed object: ${toString(obj)}.${keyName} = ${toString(value)}`, tolerant));\n    return value;\n  }\n  return isPath(keyName) ? _setPath(obj, keyName, value, tolerant) : _setProp(obj, keyName, value);\n}\nfunction _setProp(obj, keyName, value) {\n  let descriptor = lookupDescriptor(obj, keyName);\n  if (descriptor !== null && COMPUTED_SETTERS.has(descriptor.set)) {\n    obj[keyName] = value;\n    return value;\n  }\n  let currentValue;\n  if (isDevelopingApp()) {\n    currentValue = getPossibleMandatoryProxyValue(obj, keyName);\n  } else {\n    currentValue = obj[keyName];\n  }\n  if (currentValue === undefined && 'object' === typeof obj && !(keyName in obj) && typeof obj.setUnknownProperty === 'function') {\n    /* unknown property */\n    obj.setUnknownProperty(keyName, value);\n  } else {\n    if (isDevelopingApp()) {\n      setWithMandatorySetter(obj, keyName, value);\n    } else {\n      obj[keyName] = value;\n    }\n    if (currentValue !== value) {\n      notifyPropertyChange(obj, keyName);\n    }\n  }\n  return value;\n}\nfunction _setPath(root, path, value, tolerant) {\n  let parts = path.split('.');\n  let keyName = parts.pop();\n  (isDevelopingApp() && !(keyName.trim().length > 0) && assert('Property set failed: You passed an empty path', keyName.trim().length > 0));\n  let newRoot = _getPath(root, parts, true);\n  if (newRoot !== null && newRoot !== undefined) {\n    return set(newRoot, keyName, value);\n  } else if (!tolerant) {\n    throw new Error(`Property set failed: object in path \"${parts.join('.')}\" could not be found.`);\n  }\n}\n\n/**\n  Error-tolerant form of `set`. Will not blow up if any part of the\n  chain is `undefined`, `null`, or destroyed.\n\n  This is primarily used when syncing bindings, which may try to update after\n  an object has been destroyed.\n\n  ```javascript\n  import { trySet } from '@ember/object';\n\n  let obj = { name: \"Zoey\" };\n  trySet(obj, \"contacts.twitter\", \"@emberjs\");\n  ```\n\n  @method trySet\n  @static\n  @for @ember/object\n  @param {Object} root The object to modify.\n  @param {String} path The property path to set\n  @param {Object} value The value to set\n  @public\n*/\nfunction trySet(root, path, value) {\n  return set(root, path, value, true);\n}\n\nexport { _setProp as _, set as s, trySet as t };\n","import Test from '../ember-testing/lib/test.js';\nimport Adapter from '../ember-testing/lib/adapters/adapter.js';\nimport setupForTesting from '../ember-testing/lib/setup_for_testing.js';\nimport QUnitAdapter from '../ember-testing/lib/adapters/qunit.js';\nimport '../ember-testing/lib/ext/application.js';\nimport '../ember-testing/lib/ext/rsvp.js';\nimport '../ember-testing/lib/helpers.js';\nimport '../ember-testing/lib/initializers.js';\n\n// to setup initializer\n\nconst EmberTesting = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({\n\t__proto__: null,\n\tAdapter,\n\tQUnitAdapter,\n\tTest,\n\tsetupForTesting\n}, Symbol.toStringTag, { value: 'Module' }));\n\nexport { EmberTesting as E };\n","import './debug-to-string-BsFOvUtQ.js';\nimport { i as isDict, e as expect } from './collections-B8me-ZlQ.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { setProp, getProp } from '../@glimmer/global-context/index.js';\nimport { CONSTANT_TAG, INITIAL, validateTag, track, valueForTag, consumeTag } from '../@glimmer/validator/index.js';\n\nconst REFERENCE = Symbol('REFERENCE');\nconst CONSTANT = 0;\nconst COMPUTE = 1;\nconst UNBOUND = 2;\nconst INVOKABLE = 3;\n\n//////////\n\nclass ReferenceImpl {\n  [REFERENCE];\n  tag = null;\n  lastRevision = INITIAL;\n  lastValue;\n  children = null;\n  compute = null;\n  update = null;\n  debugLabel;\n  constructor(type) {\n    this[REFERENCE] = type;\n  }\n}\nfunction createPrimitiveRef(value) {\n  const ref = new ReferenceImpl(UNBOUND);\n  ref.tag = CONSTANT_TAG;\n  ref.lastValue = value;\n  if (isDevelopingApp()) {\n    ref.debugLabel = String(value);\n  }\n  return ref;\n}\nconst UNDEFINED_REFERENCE = createPrimitiveRef(undefined);\nconst NULL_REFERENCE = createPrimitiveRef(null);\nconst TRUE_REFERENCE = createPrimitiveRef(true);\nconst FALSE_REFERENCE = createPrimitiveRef(false);\nfunction createConstRef(value, debugLabel) {\n  const ref = new ReferenceImpl(CONSTANT);\n  ref.lastValue = value;\n  ref.tag = CONSTANT_TAG;\n  if (isDevelopingApp()) {\n    ref.debugLabel = debugLabel;\n  }\n  return ref;\n}\nfunction createUnboundRef(value, debugLabel) {\n  const ref = new ReferenceImpl(UNBOUND);\n  ref.lastValue = value;\n  ref.tag = CONSTANT_TAG;\n  if (isDevelopingApp()) {\n    ref.debugLabel = debugLabel;\n  }\n  return ref;\n}\nfunction createComputeRef(compute, update = null, debugLabel = 'unknown') {\n  const ref = new ReferenceImpl(COMPUTE);\n  ref.compute = compute;\n  ref.update = update;\n  if (isDevelopingApp()) {\n    ref.debugLabel = `(result of a \\`${debugLabel}\\` helper)`;\n  }\n  return ref;\n}\nfunction createReadOnlyRef(ref) {\n  if (!isUpdatableRef(ref)) return ref;\n  return createComputeRef(() => valueForRef(ref), null, ref.debugLabel);\n}\nfunction isInvokableRef(ref) {\n  return ref[REFERENCE] === INVOKABLE;\n}\nfunction createInvokableRef(inner) {\n  const ref = createComputeRef(() => valueForRef(inner), value => updateRef(inner, value));\n  ref.debugLabel = inner.debugLabel;\n  ref[REFERENCE] = INVOKABLE;\n  return ref;\n}\nfunction isConstRef(_ref) {\n  const ref = _ref;\n  return ref.tag === CONSTANT_TAG;\n}\nfunction isUpdatableRef(_ref) {\n  const ref = _ref;\n  return ref.update !== null;\n}\nfunction valueForRef(_ref) {\n  const ref = _ref;\n  let {\n    tag\n  } = ref;\n  if (tag === CONSTANT_TAG) {\n    return ref.lastValue;\n  }\n  const {\n    lastRevision\n  } = ref;\n  let lastValue;\n  if (tag === null || !validateTag(tag, lastRevision)) {\n    const {\n      compute\n    } = ref;\n    const newTag = track(() => {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      lastValue = ref.lastValue = compute();\n    }, isDevelopingApp() && ref.debugLabel);\n    tag = ref.tag = newTag;\n    ref.lastRevision = valueForTag(newTag);\n  } else {\n    lastValue = ref.lastValue;\n  }\n  consumeTag(tag);\n  return lastValue;\n}\nfunction updateRef(_ref, value) {\n  const ref = _ref;\n  const update = expect(ref.update);\n  update(value);\n}\nfunction childRefFor(_parentRef, path) {\n  const parentRef = _parentRef;\n  const type = parentRef[REFERENCE];\n  let children = parentRef.children;\n  let child;\n  if (children === null) {\n    children = parentRef.children = new Map();\n  } else {\n    const next = children.get(path);\n    if (next) return next;\n  }\n  if (type === UNBOUND) {\n    const parent = valueForRef(parentRef);\n    if (isDict(parent)) {\n      child = createUnboundRef(parent[path], isDevelopingApp() && `${parentRef.debugLabel}.${path}`);\n    } else {\n      child = UNDEFINED_REFERENCE;\n    }\n  } else {\n    child = createComputeRef(() => {\n      const parent = valueForRef(parentRef);\n      if (isDict(parent)) {\n        return getProp(parent, path);\n      }\n    }, val => {\n      const parent = valueForRef(parentRef);\n      if (isDict(parent)) {\n        return setProp(parent, path, val);\n      }\n    });\n    if (isDevelopingApp()) {\n      child.debugLabel = `${parentRef.debugLabel}.${path}`;\n    }\n  }\n  children.set(path, child);\n  return child;\n}\nfunction childRefFromParts(root, parts) {\n  let reference = root;\n  for (const part of parts) {\n    reference = childRefFor(reference, part);\n  }\n  return reference;\n}\nlet createDebugAliasRef;\nif (isDevelopingApp()) {\n  createDebugAliasRef = (debugLabel, inner) => {\n    const update = isUpdatableRef(inner) ? value => updateRef(inner, value) : null;\n    const ref = createComputeRef(() => valueForRef(inner), update);\n    ref[REFERENCE] = inner[REFERENCE];\n    ref.debugLabel = debugLabel;\n    return ref;\n  };\n}\n\nexport { FALSE_REFERENCE as F, NULL_REFERENCE as N, REFERENCE as R, TRUE_REFERENCE as T, UNDEFINED_REFERENCE as U, childRefFromParts as a, createComputeRef as b, childRefFor as c, createConstRef as d, createDebugAliasRef as e, createInvokableRef as f, createPrimitiveRef as g, createReadOnlyRef as h, createUnboundRef as i, isConstRef as j, isInvokableRef as k, isUpdatableRef as l, updateRef as u, valueForRef as v };\n","/**\n * Registers\n *\n * For the most part, these follows MIPS naming conventions, however the\n * register numbers are different.\n */\n\n// $0 or $pc (program counter): pointer into `program` for the next insturction; -1 means exit\n\nconst $pc = 0;\n// $1 or $ra (return address): pointer into `program` for the return\n\nconst $ra = 1;\n// $2 or $fp (frame pointer): pointer into the `evalStack` for the base of the stack\n\nconst $fp = 2;\n// $3 or $sp (stack pointer): pointer into the `evalStack` for the top of the stack\n\nconst $sp = 3;\n// $4-$5 or $s0-$s1 (saved): callee saved general-purpose registers\n\nconst $s0 = 4;\nconst $s1 = 5;\n// $6-$7 or $t0-$t1 (temporaries): caller saved general-purpose registers\n\nconst $t0 = 6;\nconst $t1 = 7;\n// $8 or $v0 (return value)\n\nconst $v0 = 8;\nfunction isLowLevelRegister(register) {\n  return register <= $sp;\n}\n\nexport { $s0 as $, $pc as a, $ra as b, $fp as c, $sp as d, $v0 as e, $t1 as f, $t0 as g, $s1 as h, isLowLevelRegister as i };\n","import { i as intern } from './mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { m as makeDictionary } from './dictionary-gc5gpyOG.js';\nimport '../@ember/debug/index.js';\nimport { setOwner } from '../@ember/-internals/owner/index.js';\nimport { assert } from '../@ember/debug/lib/assert.js';\n\n// doesn't work with isolatedModules\nlet leakTracking;\nlet containers;\nif (isDevelopingApp()) {\n  // requires v8\n  // chrome --js-flags=\"--allow-natives-syntax --expose-gc\"\n  // node --allow-natives-syntax --expose-gc\n  try {\n    if (typeof gc === 'function') {\n      leakTracking = (() => {\n        // avoid syntax errors when --allow-natives-syntax not present\n        let GetWeakSetValues = new Function('weakSet', 'return %GetWeakSetValues(weakSet, 0)');\n        containers = new WeakSet();\n        return {\n          hasContainers() {\n            gc();\n            return GetWeakSetValues(containers).length > 0;\n          },\n          reset() {\n            let values = GetWeakSetValues(containers);\n            for (let i = 0; i < values.length; i++) {\n              containers.delete(values[i]);\n            }\n          }\n        };\n      })();\n    }\n  } catch (_e) {\n    // ignore\n  }\n}\n/**\n A container used to instantiate and cache objects.\n\n Every `Container` must be associated with a `Registry`, which is referenced\n to determine the factory and options that should be used to instantiate\n objects.\n\n The public API for `Container` is still in flux and should not be considered\n stable.\n\n @private\n @class Container\n */\nclass Container {\n  static _leakTracking;\n  owner;\n  registry;\n  cache;\n  factoryManagerCache;\n  validationCache;\n  isDestroyed;\n  isDestroying;\n  constructor(registry, options = {}) {\n    this.registry = registry;\n    this.owner = options.owner || null;\n    this.cache = makeDictionary(options.cache || null);\n    this.factoryManagerCache = makeDictionary(options.factoryManagerCache || null);\n    this.isDestroyed = false;\n    this.isDestroying = false;\n    if (isDevelopingApp()) {\n      this.validationCache = makeDictionary(options.validationCache || null);\n      if (containers !== undefined) {\n        containers.add(this);\n      }\n    }\n  }\n\n  /**\n   @private\n   @property registry\n   @type Registry\n   @since 1.11.0\n   */\n\n  /**\n   @private\n   @property cache\n   @type InheritingDict\n   */\n\n  /**\n   @private\n   @property validationCache\n   @type InheritingDict\n   */\n\n  /**\n   Given a fullName return a corresponding instance.\n    The default behavior is for lookup to return a singleton instance.\n   The singleton is scoped to the container, allowing multiple containers\n   to all have their own locally scoped singletons.\n    ```javascript\n   let registry = new Registry();\n   let container = registry.container();\n    registry.register('api:twitter', Twitter);\n    let twitter = container.lookup('api:twitter');\n    twitter instanceof Twitter; // => true\n    // by default the container will return singletons\n   let twitter2 = container.lookup('api:twitter');\n   twitter2 instanceof Twitter; // => true\n    twitter === twitter2; //=> true\n   ```\n    If singletons are not wanted, an optional flag can be provided at lookup.\n    ```javascript\n   let registry = new Registry();\n   let container = registry.container();\n    registry.register('api:twitter', Twitter);\n    let twitter = container.lookup('api:twitter', { singleton: false });\n   let twitter2 = container.lookup('api:twitter', { singleton: false });\n    twitter === twitter2; //=> false\n   ```\n    @private\n   @method lookup\n   @param {String} fullName\n   @param {RegisterOptions} [options]\n   @return {any}\n   */\n  lookup(fullName, options) {\n    if (this.isDestroyed) {\n      throw new Error(`Cannot call \\`.lookup('${fullName}')\\` after the owner has been destroyed`);\n    }\n    (isDevelopingApp() && !(this.registry.isValidFullName(fullName)) && assert('fullName must be a proper full name', this.registry.isValidFullName(fullName)));\n    return lookup(this, this.registry.normalize(fullName), options);\n  }\n\n  /**\n   A depth first traversal, destroying the container, its descendant containers and all\n   their managed objects.\n    @private\n   @method destroy\n   */\n  destroy() {\n    this.isDestroying = true;\n    destroyDestroyables(this);\n  }\n  finalizeDestroy() {\n    resetCache(this);\n    this.isDestroyed = true;\n  }\n\n  /**\n   Clear either the entire cache or just the cache for a particular key.\n    @private\n   @method reset\n   @param {String} fullName optional key to reset; if missing, resets everything\n  */\n  reset(fullName) {\n    if (this.isDestroyed) return;\n    if (fullName === undefined) {\n      destroyDestroyables(this);\n      resetCache(this);\n    } else {\n      resetMember(this, this.registry.normalize(fullName));\n    }\n  }\n\n  /**\n   Returns an object that can be used to provide an owner to a\n   manually created instance.\n    @private\n   @method ownerInjection\n   @returns { Object }\n  */\n  ownerInjection() {\n    let injection = {};\n    setOwner(injection, this.owner);\n    return injection;\n  }\n\n  /**\n   Given a fullName, return the corresponding factory. The consumer of the factory\n   is responsible for the destruction of any factory instances, as there is no\n   way for the container to ensure instances are destroyed when it itself is\n   destroyed.\n    @public\n   @method factoryFor\n   @param {String} fullName\n   @return {any}\n   */\n  factoryFor(fullName) {\n    if (this.isDestroyed) {\n      throw new Error(`Cannot call \\`.factoryFor('${fullName}')\\` after the owner has been destroyed`);\n    }\n    let normalizedName = this.registry.normalize(fullName);\n    (isDevelopingApp() && !(this.registry.isValidFullName(normalizedName)) && assert('fullName must be a proper full name', this.registry.isValidFullName(normalizedName)));\n    return factoryFor(this, normalizedName, fullName);\n  }\n}\nif (isDevelopingApp()) {\n  Container._leakTracking = leakTracking;\n}\n\n/*\n * Wrap a factory manager in a proxy which will not permit properties to be\n * set on the manager.\n */\nfunction wrapManagerInDeprecationProxy(manager) {\n  let validator = {\n    set(_obj, prop) {\n      throw new Error(`You attempted to set \"${String(prop)}\" on a factory manager created by container#factoryFor. A factory manager is a read-only construct.`);\n    }\n  };\n\n  // Note:\n  // We have to proxy access to the manager here so that private property\n  // access doesn't cause the above errors to occur.\n  let m = manager;\n  let proxiedManager = {\n    class: m.class,\n    create(props) {\n      return m.create(props);\n    }\n  };\n  return new Proxy(proxiedManager, validator);\n}\nfunction isSingleton(container, fullName) {\n  return container.registry.getOption(fullName, 'singleton') !== false;\n}\nfunction isInstantiatable(container, fullName) {\n  return container.registry.getOption(fullName, 'instantiate') !== false;\n}\nfunction lookup(container, fullName, options = {}) {\n  let normalizedName = fullName;\n  if (options.singleton === true || options.singleton === undefined && isSingleton(container, fullName)) {\n    let cached = container.cache[normalizedName];\n    if (cached !== undefined) {\n      return cached;\n    }\n  }\n  return instantiateFactory(container, normalizedName, fullName, options);\n}\nfunction factoryFor(container, normalizedName, fullName) {\n  let cached = container.factoryManagerCache[normalizedName];\n  if (cached !== undefined) {\n    return cached;\n  }\n  let factory = container.registry.resolve(normalizedName);\n  if (factory === undefined) {\n    return;\n  }\n  if (isDevelopingApp() && factory && typeof factory._onLookup === 'function') {\n    factory._onLookup(fullName);\n  }\n  let manager = new InternalFactoryManager(container, factory, fullName, normalizedName);\n  if (isDevelopingApp()) {\n    manager = wrapManagerInDeprecationProxy(manager);\n  }\n  container.factoryManagerCache[normalizedName] = manager;\n  return manager;\n}\nfunction isSingletonClass(container, fullName, {\n  instantiate,\n  singleton\n}) {\n  return singleton !== false && !instantiate && isSingleton(container, fullName) && !isInstantiatable(container, fullName);\n}\nfunction isSingletonInstance(container, fullName, {\n  instantiate,\n  singleton\n}) {\n  return singleton !== false && instantiate !== false && (singleton === true || isSingleton(container, fullName)) && isInstantiatable(container, fullName);\n}\nfunction isFactoryClass(container, fullname, {\n  instantiate,\n  singleton\n}) {\n  return instantiate === false && (singleton === false || !isSingleton(container, fullname)) && !isInstantiatable(container, fullname);\n}\nfunction isFactoryInstance(container, fullName, {\n  instantiate,\n  singleton\n}) {\n  return instantiate !== false && (singleton === false || !isSingleton(container, fullName)) && isInstantiatable(container, fullName);\n}\nfunction instantiateFactory(container, normalizedName, fullName, options) {\n  let factoryManager = factoryFor(container, normalizedName, fullName);\n  if (factoryManager === undefined) {\n    return;\n  }\n\n  // SomeClass { singleton: true, instantiate: true } | { singleton: true } | { instantiate: true } | {}\n  // By default majority of objects fall into this case\n  if (isSingletonInstance(container, fullName, options)) {\n    let instance = container.cache[normalizedName] = factoryManager.create();\n\n    // if this lookup happened _during_ destruction (emits a deprecation, but\n    // is still possible) ensure that it gets destroyed\n    if (container.isDestroying) {\n      if (typeof instance.destroy === 'function') {\n        instance.destroy();\n      }\n    }\n    return instance;\n  }\n\n  // SomeClass { singleton: false, instantiate: true }\n  if (isFactoryInstance(container, fullName, options)) {\n    return factoryManager.create();\n  }\n\n  // SomeClass { singleton: true, instantiate: false } | { instantiate: false } | { singleton: false, instantiation: false }\n  if (isSingletonClass(container, fullName, options) || isFactoryClass(container, fullName, options)) {\n    return factoryManager.class;\n  }\n  throw new Error('Could not create factory');\n}\nfunction destroyDestroyables(container) {\n  let cache = container.cache;\n  let keys = Object.keys(cache);\n  for (let key of keys) {\n    let value = cache[key];\n    (isDevelopingApp() && !(value) && assert('has cached value', value));\n    if (value.destroy) {\n      value.destroy();\n    }\n  }\n}\nfunction resetCache(container) {\n  container.cache = makeDictionary(null);\n  container.factoryManagerCache = makeDictionary(null);\n}\nfunction resetMember(container, fullName) {\n  let member = container.cache[fullName];\n  delete container.factoryManagerCache[fullName];\n  if (member) {\n    delete container.cache[fullName];\n    if (member.destroy) {\n      member.destroy();\n    }\n  }\n}\nconst INIT_FACTORY = Symbol('INIT_FACTORY');\nfunction getFactoryFor(obj) {\n  // SAFETY: since we know `obj` is an `object`, we also know we can safely ask\n  // whether a key is set on it.\n  return obj[INIT_FACTORY];\n}\nfunction setFactoryFor(obj, factory) {\n  // SAFETY: since we know `obj` is an `object`, we also know we can safely set\n  // a key it safely at this location. (The only way this could be blocked is if\n  // someone has gone out of their way to use `Object.defineProperty()` with our\n  // internal-only symbol and made it `writable: false`.)\n  obj[INIT_FACTORY] = factory;\n}\nclass InternalFactoryManager {\n  container;\n  owner;\n  class;\n  fullName;\n  normalizedName;\n  madeToString;\n  injections;\n  constructor(container, factory, fullName, normalizedName) {\n    this.container = container;\n    this.owner = container.owner;\n    this.class = factory;\n    this.fullName = fullName;\n    this.normalizedName = normalizedName;\n    this.madeToString = undefined;\n    this.injections = undefined;\n  }\n  toString() {\n    if (this.madeToString === undefined) {\n      this.madeToString = this.container.registry.makeToString(this.class, this.fullName);\n    }\n    return this.madeToString;\n  }\n  create(options) {\n    let {\n      container\n    } = this;\n    if (container.isDestroyed) {\n      throw new Error(`Cannot create new instances after the owner has been destroyed (you attempted to create ${this.fullName})`);\n    }\n    let props = options ? {\n      ...options\n    } : {};\n    setOwner(props, container.owner);\n    setFactoryFor(props, this);\n    if (isDevelopingApp()) {\n      let lazyInjections;\n      let validationCache = this.container.validationCache;\n      // Ensure that all lazy injections are valid at instantiation time\n      if (!validationCache[this.fullName] && this.class && typeof this.class._lazyInjections === 'function') {\n        lazyInjections = this.class._lazyInjections();\n        lazyInjections = this.container.registry.normalizeInjectionsHash(lazyInjections);\n        this.container.registry.validateInjections(lazyInjections);\n      }\n      validationCache[this.fullName] = true;\n      (isDevelopingApp() && !(typeof this.class.create === 'function') && assert(`Failed to create an instance of '${this.normalizedName}'. Most likely an improperly defined class or an invalid module export.`, typeof this.class.create === 'function'));\n    }\n    return this.class.create(props);\n  }\n}\n\nconst VALID_FULL_NAME_REGEXP = /^[^:]+:[^:]+$/;\n\n/**\n A registry used to store factory and option information keyed\n by type.\n\n A `Registry` stores the factory and option information needed by a\n `Container` to instantiate and cache objects.\n\n The API for `Registry` is still in flux and should not be considered stable.\n\n @private\n @class Registry\n @since 1.11.0\n*/\nclass Registry {\n  _failSet;\n  resolver;\n  fallback;\n  registrations;\n  _normalizeCache;\n  _options;\n  _resolveCache;\n  _typeOptions;\n  constructor(options = {}) {\n    this.fallback = options.fallback || null;\n    this.resolver = options.resolver || null;\n    this.registrations = makeDictionary(options.registrations || null);\n    this._normalizeCache = makeDictionary(null);\n    this._resolveCache = makeDictionary(null);\n    this._failSet = new Set();\n    this._options = makeDictionary(null);\n    this._typeOptions = makeDictionary(null);\n  }\n\n  /**\n   A backup registry for resolving registrations when no matches can be found.\n    @private\n   @property fallback\n   @type Registry\n   */\n\n  /**\n   An object that has a `resolve` method that resolves a name.\n    @private\n   @property resolver\n   @type Resolver\n   */\n\n  /**\n   @private\n   @property registrations\n   @type InheritingDict\n   */\n\n  /**\n   @private\n    @property _normalizeCache\n   @type InheritingDict\n   */\n\n  /**\n   @private\n    @property _resolveCache\n   @type InheritingDict\n   */\n\n  /**\n   @private\n    @property _options\n   @type InheritingDict\n   */\n\n  /**\n   @private\n    @property _typeOptions\n   @type InheritingDict\n   */\n\n  /**\n   Creates a container based on this registry.\n    @private\n   @method container\n   @param {Object} options\n   @return {Container} created container\n   */\n  container(options) {\n    return new Container(this, options);\n  }\n\n  /**\n   Registers a factory for later injection.\n    Example:\n    ```javascript\n   let registry = new Registry();\n    registry.register('model:user', Person, {singleton: false });\n   registry.register('fruit:favorite', Orange);\n   registry.register('communication:main', Email, {singleton: false});\n   ```\n    @private\n   @method register\n   @param {String} fullName\n   @param {Function} factory\n   @param {Object} options\n   */\n\n  register(fullName, factory, options = {}) {\n    (isDevelopingApp() && !(this.isValidFullName(fullName)) && assert('fullName must be a proper full name', this.isValidFullName(fullName)));\n    (isDevelopingApp() && !(factory !== undefined) && assert(`Attempting to register an unknown factory: '${fullName}'`, factory !== undefined));\n    let normalizedName = this.normalize(fullName);\n    (isDevelopingApp() && !(!this._resolveCache[normalizedName]) && assert(`Cannot re-register: '${fullName}', as it has already been resolved.`, !this._resolveCache[normalizedName]));\n    this._failSet.delete(normalizedName);\n    this.registrations[normalizedName] = factory;\n    this._options[normalizedName] = options;\n  }\n\n  /**\n   Unregister a fullName\n    ```javascript\n   let registry = new Registry();\n   registry.register('model:user', User);\n    registry.resolve('model:user').create() instanceof User //=> true\n    registry.unregister('model:user')\n   registry.resolve('model:user') === undefined //=> true\n   ```\n    @private\n   @method unregister\n   @param {String} fullName\n   */\n  unregister(fullName) {\n    (isDevelopingApp() && !(this.isValidFullName(fullName)) && assert('fullName must be a proper full name', this.isValidFullName(fullName)));\n    let normalizedName = this.normalize(fullName);\n    delete this.registrations[normalizedName];\n    delete this._resolveCache[normalizedName];\n    delete this._options[normalizedName];\n    this._failSet.delete(normalizedName);\n  }\n\n  /**\n   Given a fullName return the corresponding factory.\n    By default `resolve` will retrieve the factory from\n   the registry.\n    ```javascript\n   let registry = new Registry();\n   registry.register('api:twitter', Twitter);\n    registry.resolve('api:twitter') // => Twitter\n   ```\n    Optionally the registry can be provided with a custom resolver.\n   If provided, `resolve` will first provide the custom resolver\n   the opportunity to resolve the fullName, otherwise it will fallback\n   to the registry.\n    ```javascript\n   let registry = new Registry();\n   registry.resolver = function(fullName) {\n      // lookup via the module system of choice\n    };\n    // the twitter factory is added to the module system\n   registry.resolve('api:twitter') // => Twitter\n   ```\n    @private\n   @method resolve\n   @param {String} fullName\n   @return {Function} fullName's factory\n   */\n  resolve(fullName) {\n    let factory = resolve(this, this.normalize(fullName));\n    if (factory === undefined && this.fallback !== null) {\n      factory = this.fallback.resolve(fullName);\n    }\n    return factory;\n  }\n\n  /**\n   A hook that can be used to describe how the resolver will\n   attempt to find the factory.\n    For example, the default Ember `.describe` returns the full\n   class name (including namespace) where Ember's resolver expects\n   to find the `fullName`.\n    @private\n   @method describe\n   @param {String} fullName\n   @return {string} described fullName\n   */\n  describe(fullName) {\n    if (this.resolver !== null && this.resolver.lookupDescription) {\n      return this.resolver.lookupDescription(fullName);\n    } else if (this.fallback !== null) {\n      return this.fallback.describe(fullName);\n    } else {\n      return fullName;\n    }\n  }\n\n  /**\n   A hook to enable custom fullName normalization behavior\n    @private\n   @method normalizeFullName\n   @param {String} fullName\n   @return {string} normalized fullName\n   */\n  normalizeFullName(fullName) {\n    if (this.resolver !== null && this.resolver.normalize) {\n      return this.resolver.normalize(fullName);\n    } else if (this.fallback !== null) {\n      return this.fallback.normalizeFullName(fullName);\n    } else {\n      return fullName;\n    }\n  }\n\n  /**\n   Normalize a fullName based on the application's conventions\n    @private\n   @method normalize\n   @param {String} fullName\n   @return {string} normalized fullName\n   */\n  normalize(fullName) {\n    return this._normalizeCache[fullName] || (this._normalizeCache[fullName] = this.normalizeFullName(fullName));\n  }\n\n  /**\n   @method makeToString\n    @private\n   @param {any} factory\n   @param {string} fullName\n   @return {function} toString function\n   */\n  makeToString(factory, fullName) {\n    if (this.resolver !== null && this.resolver.makeToString) {\n      return this.resolver.makeToString(factory, fullName);\n    } else if (this.fallback !== null) {\n      return this.fallback.makeToString(factory, fullName);\n    } else {\n      return typeof factory === 'string' ? factory : factory.name ?? '(unknown class)';\n    }\n  }\n\n  /**\n   Given a fullName check if the container is aware of its factory\n   or singleton instance.\n    @private\n   @method has\n   @param {String} fullName\n   @param {Object} [options]\n   @param {String} [options.source] the fullname of the request source (used for local lookups)\n   @return {Boolean}\n   */\n  has(fullName) {\n    if (!this.isValidFullName(fullName)) {\n      return false;\n    }\n    return has(this, this.normalize(fullName));\n  }\n\n  /**\n   Allow registering options for all factories of a type.\n    ```javascript\n   let registry = new Registry();\n   let container = registry.container();\n    // if all of type `connection` must not be singletons\n   registry.optionsForType('connection', { singleton: false });\n    registry.register('connection:twitter', TwitterConnection);\n   registry.register('connection:facebook', FacebookConnection);\n    let twitter = container.lookup('connection:twitter');\n   let twitter2 = container.lookup('connection:twitter');\n    twitter === twitter2; // => false\n    let facebook = container.lookup('connection:facebook');\n   let facebook2 = container.lookup('connection:facebook');\n    facebook === facebook2; // => false\n   ```\n    @private\n   @method optionsForType\n   @param {String} type\n   @param {Object} options\n   */\n  optionsForType(type, options) {\n    this._typeOptions[type] = options;\n  }\n  getOptionsForType(type) {\n    let optionsForType = this._typeOptions[type];\n    if (optionsForType === undefined && this.fallback !== null) {\n      optionsForType = this.fallback.getOptionsForType(type);\n    }\n    return optionsForType;\n  }\n\n  /**\n   @private\n   @method options\n   @param {String} fullName\n   @param {Object} options\n   */\n  options(fullName, options) {\n    let normalizedName = this.normalize(fullName);\n    this._options[normalizedName] = options;\n  }\n  getOptions(fullName) {\n    let normalizedName = this.normalize(fullName);\n    let options = this._options[normalizedName];\n    if (options === undefined && this.fallback !== null) {\n      options = this.fallback.getOptions(fullName);\n    }\n    return options;\n  }\n  getOption(fullName, optionName) {\n    let options = this._options[fullName];\n    if (options !== undefined && options[optionName] !== undefined) {\n      return options[optionName];\n    }\n    let type = fullName.split(':')[0];\n    (isDevelopingApp() && !(type) && assert('has type', type)); // split always will have at least one value\n    options = this._typeOptions[type];\n    if (options && options[optionName] !== undefined) {\n      return options[optionName];\n    } else if (this.fallback !== null) {\n      return this.fallback.getOption(fullName, optionName);\n    }\n    return undefined;\n  }\n\n  /**\n   @private\n   @method knownForType\n   @param {String} type the type to iterate over\n  */\n  knownForType(type) {\n    let localKnown = makeDictionary(null);\n    let registeredNames = Object.keys(this.registrations);\n    for (let fullName of registeredNames) {\n      let itemType = fullName.split(':')[0];\n      if (itemType === type) {\n        localKnown[fullName] = true;\n      }\n    }\n    let fallbackKnown, resolverKnown;\n    if (this.fallback !== null) {\n      fallbackKnown = this.fallback.knownForType(type);\n    }\n    if (this.resolver !== null && this.resolver.knownForType) {\n      resolverKnown = this.resolver.knownForType(type);\n    }\n    return Object.assign({}, fallbackKnown, localKnown, resolverKnown);\n  }\n  isValidFullName(fullName) {\n    return VALID_FULL_NAME_REGEXP.test(fullName);\n  }\n}\nif (isDevelopingApp()) {\n  const proto = Registry.prototype;\n  proto.normalizeInjectionsHash = function (hash) {\n    let injections = [];\n    for (let key in hash) {\n      if (Object.prototype.hasOwnProperty.call(hash, key)) {\n        let value = hash[key];\n        (isDevelopingApp() && !(value) && assert('has value', value));\n        let {\n          specifier\n        } = value;\n        (isDevelopingApp() && !(this.isValidFullName(specifier)) && assert(`Expected a proper full name, given '${specifier}'`, this.isValidFullName(specifier)));\n        injections.push({\n          property: key,\n          specifier\n        });\n      }\n    }\n    return injections;\n  };\n  proto.validateInjections = function (injections) {\n    if (!injections) {\n      return;\n    }\n    for (let injection of injections) {\n      let {\n        specifier\n      } = injection;\n      (isDevelopingApp() && !(this.has(specifier)) && assert(`Attempting to inject an unknown injection: '${specifier}'`, this.has(specifier)));\n    }\n  };\n}\nfunction resolve(registry, _normalizedName) {\n  let normalizedName = _normalizedName;\n  let cached = registry._resolveCache[normalizedName];\n  if (cached !== undefined) {\n    return cached;\n  }\n  if (registry._failSet.has(normalizedName)) {\n    return;\n  }\n  let resolved;\n  if (registry.resolver) {\n    resolved = registry.resolver.resolve(normalizedName);\n  }\n  if (resolved === undefined) {\n    resolved = registry.registrations[normalizedName];\n  }\n  if (resolved === undefined) {\n    registry._failSet.add(normalizedName);\n  } else {\n    registry._resolveCache[normalizedName] = resolved;\n  }\n  return resolved;\n}\nfunction has(registry, fullName) {\n  return registry.resolve(fullName) !== undefined;\n}\nconst privateNames = makeDictionary(null);\nconst privateSuffix = `${Math.random()}${Date.now()}`.replace('.', '');\nfunction privatize([fullName]) {\n  (isDevelopingApp() && !(arguments.length === 1 && fullName) && assert('has a single string argument', arguments.length === 1 && fullName));\n  let name = privateNames[fullName];\n  if (name) {\n    return name;\n  }\n  let [type, rawName] = fullName.split(':');\n  return privateNames[fullName] = intern(`${type}:${rawName}-${privateSuffix}`);\n}\n\nexport { Container as C, INIT_FACTORY as I, Registry as R, getFactoryFor as g, privatize as p, setFactoryFor as s };\n","import './debug-to-string-BsFOvUtQ.js';\nimport { u as unwrap, e as expect, S as StackImpl } from './collections-B8me-ZlQ.js';\nimport { u as unwrapHandle } from './constants-oDhF27qL.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport { assertGlobalContextWasSet } from '../@glimmer/global-context/index.js';\nimport { track, updateTag as UPDATE_TAG, debug, resetTracking, beginTrackFrame, endTrackFrame } from '../@glimmer/validator/index.js';\nimport { U as UNDEFINED_REFERENCE, v as valueForRef, u as updateRef, d as createConstRef, c as childRefFor } from './reference-B6HMX4y0.js';\nimport { a as assert } from './assert-CUCJBR2C.js';\nimport { a as ProgramImpl } from './program-CcLlGnAU.js';\nimport { k as DebugRenderTreeImpl, l as isArgumentError, m as DOMChangesImpl, A as APPEND_OPCODES, n as move, j as clear, V as VMArgumentsImpl, p as externs, J as JumpIfNotModifiedOpcode, B as BeginTrackFrameOpcode, E as EndTrackFrameOpcode } from './dynamic-CuBsUXX8.js';\nimport { D as DOMTreeConstruction, N as NewTreeBuilder } from './element-builder-BuVym8EM.js';\nimport { a as assign } from './object-utils-AijlD-JH.js';\nimport { destroyChildren, associateDestroyableChild, destroy, registerDestructor } from '../@glimmer/destroyable/index.js';\nimport { c as createIteratorItemRef } from './iterable-BKS7az3P.js';\nimport { r as reverse } from './array-utils-CZQxrdD3.js';\nimport { a as $pc, b as $ra, c as $fp, d as $sp, i as isLowLevelRegister } from './registers-ylirb0dq.js';\nimport { p as VM_RETURN_TO_OP, q as VM_RETURN_OP, r as VM_JUMP_OP, s as VM_INVOKE_VIRTUAL_OP, o as VM_INVOKE_STATIC_OP, t as VM_POP_FRAME_OP, u as VM_PUSH_FRAME_OP } from './capabilities-DHiXCCuB.js';\n\nclass DynamicScopeImpl {\n  bucket;\n  constructor(bucket) {\n    if (bucket) {\n      this.bucket = assign({}, bucket);\n    } else {\n      this.bucket = {};\n    }\n  }\n  get(key) {\n    return unwrap(this.bucket[key]);\n  }\n  set(key, reference) {\n    return this.bucket[key] = reference;\n  }\n  child() {\n    return new DynamicScopeImpl(this.bucket);\n  }\n}\nclass ScopeImpl {\n  static root(owner, {\n    self,\n    size = 0\n  }) {\n    let refs = new Array(size + 1).fill(UNDEFINED_REFERENCE);\n    return new ScopeImpl(owner, refs, null).init({\n      self\n    });\n  }\n  static sized(owner, size = 0) {\n    let refs = new Array(size + 1).fill(UNDEFINED_REFERENCE);\n    return new ScopeImpl(owner, refs, null);\n  }\n  owner;\n  slots;\n  callerScope;\n  constructor(owner,\n  // the 0th slot is `self`\n  slots,\n  // a single program can mix owners via curried components, and the state lives on root scopes\n  callerScope) {\n    this.owner = owner;\n    this.slots = slots;\n    this.callerScope = callerScope;\n  }\n  init({\n    self\n  }) {\n    this.slots[0] = self;\n    return this;\n  }\n\n  /**\n   * @debug\n   */\n  snapshot() {\n    return this.slots.slice();\n  }\n  getSelf() {\n    return this.get(0);\n  }\n  getSymbol(symbol) {\n    return this.get(symbol);\n  }\n  getBlock(symbol) {\n    let block = this.get(symbol);\n    return block === UNDEFINED_REFERENCE ? null : block;\n  }\n  bind(symbol, value) {\n    this.set(symbol, value);\n  }\n  bindSelf(self) {\n    this.set(0, self);\n  }\n  bindSymbol(symbol, value) {\n    this.set(symbol, value);\n  }\n  bindBlock(symbol, value) {\n    this.set(symbol, value);\n  }\n  bindCallerScope(scope) {\n    this.callerScope = scope;\n  }\n  getCallerScope() {\n    return this.callerScope;\n  }\n  child() {\n    return new ScopeImpl(this.owner, this.slots.slice(), this.callerScope);\n  }\n  get(index) {\n    if (index >= this.slots.length) {\n      throw new RangeError(`BUG: cannot get $${index} from scope; length=${this.slots.length}`);\n    }\n    return this.slots[index];\n  }\n  set(index, value) {\n    if (index >= this.slots.length) {\n      throw new RangeError(`BUG: cannot get $${index} from scope; length=${this.slots.length}`);\n    }\n    this.slots[index] = value;\n  }\n}\n\nconst TRANSACTION = Symbol('TRANSACTION');\nclass TransactionImpl {\n  scheduledInstallModifiers = [];\n  scheduledUpdateModifiers = [];\n  createdComponents = [];\n  updatedComponents = [];\n  didCreate(component) {\n    this.createdComponents.push(component);\n  }\n  didUpdate(component) {\n    this.updatedComponents.push(component);\n  }\n  scheduleInstallModifier(modifier) {\n    this.scheduledInstallModifiers.push(modifier);\n  }\n  scheduleUpdateModifier(modifier) {\n    this.scheduledUpdateModifiers.push(modifier);\n  }\n  commit() {\n    let {\n      createdComponents,\n      updatedComponents\n    } = this;\n    for (const {\n      manager,\n      state\n    } of createdComponents) {\n      manager.didCreate(state);\n    }\n    for (const {\n      manager,\n      state\n    } of updatedComponents) {\n      manager.didUpdate(state);\n    }\n    let {\n      scheduledInstallModifiers,\n      scheduledUpdateModifiers\n    } = this;\n    for (const {\n      manager,\n      state,\n      definition\n    } of scheduledInstallModifiers) {\n      let modifierTag = manager.getTag(state);\n      if (modifierTag !== null) {\n        let tag = track(() => manager.install(state), isDevelopingApp() && `- While rendering:\\n  (instance of a \\`${definition.resolvedName || manager.getDebugName(definition.state)}\\` modifier)`);\n        UPDATE_TAG(modifierTag, tag);\n      } else {\n        manager.install(state);\n      }\n    }\n    for (const {\n      manager,\n      state,\n      definition\n    } of scheduledUpdateModifiers) {\n      let modifierTag = manager.getTag(state);\n      if (modifierTag !== null) {\n        let tag = track(() => manager.update(state), isDevelopingApp() && `- While rendering:\\n  (instance of a \\`${definition.resolvedName || manager.getDebugName(definition.state)}\\` modifier)`);\n        UPDATE_TAG(modifierTag, tag);\n      } else {\n        manager.update(state);\n      }\n    }\n  }\n}\nclass EnvironmentImpl {\n  [TRANSACTION] = null;\n  updateOperations;\n\n  // Delegate methods and values\n  isInteractive;\n\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  isArgumentCaptureError;\n  debugRenderTree;\n  constructor(options, delegate) {\n    this.delegate = delegate;\n    this.isInteractive = delegate.isInteractive;\n    this.debugRenderTree = this.delegate.enableDebugTooling ? new DebugRenderTreeImpl() : undefined;\n    this.isArgumentCaptureError = this.delegate.enableDebugTooling ? isArgumentError : undefined;\n    if (options.appendOperations) {\n      this.appendOperations = options.appendOperations;\n      this.updateOperations = options.updateOperations;\n    } else if (options.document) {\n      this.appendOperations = new DOMTreeConstruction(options.document);\n      this.updateOperations = new DOMChangesImpl(options.document);\n    } else if (isDevelopingApp()) {\n      throw new Error('you must pass document or appendOperations to a new runtime');\n    }\n  }\n  getAppendOperations() {\n    return this.appendOperations;\n  }\n  getDOM() {\n    return expect(this.updateOperations);\n  }\n  begin() {\n    assert(!this[TRANSACTION]);\n    this.debugRenderTree?.begin();\n    this[TRANSACTION] = new TransactionImpl();\n  }\n  get transaction() {\n    return expect(this[TRANSACTION]);\n  }\n  didCreate(component) {\n    this.transaction.didCreate(component);\n  }\n  didUpdate(component) {\n    this.transaction.didUpdate(component);\n  }\n  scheduleInstallModifier(modifier) {\n    if (this.isInteractive) {\n      this.transaction.scheduleInstallModifier(modifier);\n    }\n  }\n  scheduleUpdateModifier(modifier) {\n    if (this.isInteractive) {\n      this.transaction.scheduleUpdateModifier(modifier);\n    }\n  }\n  commit() {\n    let transaction = this.transaction;\n    this[TRANSACTION] = null;\n    transaction.commit();\n    this.debugRenderTree?.commit();\n    this.delegate.onTransactionCommit();\n  }\n}\nfunction runtimeOptions(options, delegate, artifacts, resolver) {\n  return {\n    env: new EnvironmentImpl(options, delegate),\n    program: new ProgramImpl(artifacts.constants, artifacts.heap),\n    resolver\n  };\n}\nfunction inTransaction(env, block) {\n  if (!env[TRANSACTION]) {\n    env.begin();\n    try {\n      block();\n    } finally {\n      env.commit();\n    }\n  } else {\n    block();\n  }\n}\n\nfunction initializeRegistersWithSP(sp) {\n  return [0, -1, sp, 0];\n}\nclass LowLevelVM {\n  currentOpSize = 0;\n  registers;\n  context;\n  constructor(stack, context, externs, registers) {\n    this.stack = stack;\n    this.externs = externs;\n    this.context = context;\n    this.registers = registers;\n  }\n  fetchRegister(register) {\n    return this.registers[register];\n  }\n  loadRegister(register, value) {\n    this.registers[register] = value;\n  }\n  setPc(pc) {\n    this.registers[$pc] = pc;\n  }\n\n  // Start a new frame and save $ra and $fp on the stack\n  pushFrame() {\n    this.stack.push(this.registers[$ra]);\n    this.stack.push(this.registers[$fp]);\n    this.registers[$fp] = this.registers[$sp] - 1;\n  }\n\n  // Restore $ra, $sp and $fp\n  popFrame() {\n    this.registers[$sp] = this.registers[$fp] - 1;\n    this.registers[$ra] = this.stack.get(0);\n    this.registers[$fp] = this.stack.get(1);\n  }\n  pushSmallFrame() {\n    this.stack.push(this.registers[$ra]);\n  }\n  popSmallFrame() {\n    this.registers[$ra] = this.stack.pop();\n  }\n\n  // Jump to an address in `program`\n  goto(offset) {\n    this.setPc(this.target(offset));\n  }\n  target(offset) {\n    return this.registers[$pc] + offset - this.currentOpSize;\n  }\n\n  // Save $pc into $ra, then jump to a new address in `program` (jal in MIPS)\n  call(handle) {\n    this.registers[$ra] = this.registers[$pc];\n    this.setPc(this.context.program.heap.getaddr(handle));\n  }\n\n  // Put a specific `program` address in $ra\n  returnTo(offset) {\n    this.registers[$ra] = this.target(offset);\n  }\n\n  // Return to the `program` address stored in $ra\n  return() {\n    this.setPc(this.registers[$ra]);\n  }\n  nextStatement() {\n    let {\n      registers,\n      context\n    } = this;\n    let pc = registers[$pc];\n    if (pc === -1) {\n      return null;\n    }\n\n    // We have to save off the current operations size so that\n    // when we do a jump we can calculate the correct offset\n    // to where we are going. We can't simply ask for the size\n    // in a jump because we have have already incremented the\n    // program counter to the next instruction prior to executing.\n    let opcode = context.program.opcode(pc);\n    let operationSize = this.currentOpSize = opcode.size;\n    this.registers[$pc] += operationSize;\n    return opcode;\n  }\n  evaluateOuter(opcode, vm) {\n    {\n      this.evaluateInner(opcode, vm);\n    }\n  }\n  evaluateInner(opcode, vm) {\n    if (opcode.isMachine) {\n      this.evaluateMachine(opcode, vm);\n    } else {\n      this.evaluateSyscall(opcode, vm);\n    }\n  }\n  evaluateMachine(opcode, vm) {\n    switch (opcode.type) {\n      case VM_PUSH_FRAME_OP:\n        return void this.pushFrame();\n      case VM_POP_FRAME_OP:\n        return void this.popFrame();\n      case VM_INVOKE_STATIC_OP:\n        return void this.call(opcode.op1);\n      case VM_INVOKE_VIRTUAL_OP:\n        return void vm.call(this.stack.pop());\n      case VM_JUMP_OP:\n        return void this.goto(opcode.op1);\n      case VM_RETURN_OP:\n        return void vm.return();\n      case VM_RETURN_TO_OP:\n        return void this.returnTo(opcode.op1);\n    }\n  }\n  evaluateSyscall(opcode, vm) {\n    APPEND_OPCODES.evaluate(vm, opcode, opcode.type);\n  }\n}\n\nclass UpdatingVM {\n  env;\n  dom;\n  alwaysRevalidate;\n  frameStack = new StackImpl();\n  constructor(env, {\n    alwaysRevalidate = false\n  }) {\n    this.env = env;\n    this.dom = env.getDOM();\n    this.alwaysRevalidate = alwaysRevalidate;\n  }\n  execute(opcodes, handler) {\n    if (isDevelopingApp()) {\n      let hasErrored = true;\n      try {\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n        debug.runInTrackingTransaction(() => this._execute(opcodes, handler), '- While rendering:');\n\n        // using a boolean here to avoid breaking ergonomics of \"pause on uncaught exceptions\"\n        // which would happen with a `catch` + `throw`\n        hasErrored = false;\n      } finally {\n        if (hasErrored) {\n          // eslint-disable-next-line no-console\n          console.error(`\\n\\nError occurred:\\n\\n${resetTracking()}\\n\\n`);\n        }\n      }\n    } else {\n      this._execute(opcodes, handler);\n    }\n  }\n  _execute(opcodes, handler) {\n    let {\n      frameStack\n    } = this;\n    this.try(opcodes, handler);\n    while (!frameStack.isEmpty()) {\n      let opcode = this.frame.nextStatement();\n      if (opcode === undefined) {\n        frameStack.pop();\n        continue;\n      }\n      opcode.evaluate(this);\n    }\n  }\n  get frame() {\n    return expect(this.frameStack.current);\n  }\n  goto(index) {\n    this.frame.goto(index);\n  }\n  try(ops, handler) {\n    this.frameStack.push(new UpdatingVMFrame(ops, handler));\n  }\n  throw() {\n    this.frame.handleException();\n    this.frameStack.pop();\n  }\n}\nclass BlockOpcode {\n  children;\n  bounds;\n  constructor(state, context, bounds, children) {\n    this.state = state;\n    this.context = context;\n    this.children = children;\n    this.bounds = bounds;\n  }\n  parentElement() {\n    return this.bounds.parentElement();\n  }\n  firstNode() {\n    return this.bounds.firstNode();\n  }\n  lastNode() {\n    return this.bounds.lastNode();\n  }\n  evaluate(vm) {\n    vm.try(this.children, null);\n  }\n}\nclass TryOpcode extends BlockOpcode {\n  type = 'try';\n  // Shadows property on base class\n\n  evaluate(vm) {\n    vm.try(this.children, this);\n  }\n  handleException() {\n    let {\n      state,\n      bounds,\n      context: {\n        env\n      }\n    } = this;\n    destroyChildren(this);\n    let tree = NewTreeBuilder.resume(env, bounds);\n    let vm = state.evaluate(tree);\n    let children = this.children = [];\n    let result = vm.execute(vm => {\n      vm.updateWith(this);\n      vm.pushUpdating(children);\n    });\n    associateDestroyableChild(this, result.drop);\n  }\n}\nclass ListItemOpcode extends TryOpcode {\n  retained = false;\n  index = -1;\n  constructor(state, context, bounds, key, memo, value) {\n    super(state, context, bounds, []);\n    this.key = key;\n    this.memo = memo;\n    this.value = value;\n  }\n  shouldRemove() {\n    return !this.retained;\n  }\n  reset() {\n    this.retained = false;\n  }\n}\nclass ListBlockOpcode extends BlockOpcode {\n  type = 'list-block';\n  opcodeMap = new Map();\n  marker = null;\n  lastIterator;\n  constructor(state, context, bounds, children, iterableRef) {\n    super(state, context, bounds, children);\n    this.iterableRef = iterableRef;\n    this.lastIterator = valueForRef(iterableRef);\n  }\n  initializeChild(opcode) {\n    opcode.index = this.children.length - 1;\n    this.opcodeMap.set(opcode.key, opcode);\n  }\n  evaluate(vm) {\n    let iterator = valueForRef(this.iterableRef);\n    if (this.lastIterator !== iterator) {\n      let {\n        bounds\n      } = this;\n      let {\n        dom\n      } = vm;\n      let marker = this.marker = dom.createComment('');\n      dom.insertAfter(bounds.parentElement(), marker, expect(bounds.lastNode()));\n      this.sync(iterator);\n      this.parentElement().removeChild(marker);\n      this.marker = null;\n      this.lastIterator = iterator;\n    }\n\n    // Run now-updated updating opcodes\n    super.evaluate(vm);\n  }\n  sync(iterator) {\n    let {\n      opcodeMap: itemMap,\n      children\n    } = this;\n    let currentOpcodeIndex = 0;\n    let seenIndex = 0;\n    this.children = this.bounds.boundList = [];\n    while (true) {\n      let item = iterator.next();\n      if (item === null) break;\n      let opcode = children[currentOpcodeIndex];\n      let {\n        key\n      } = item;\n\n      // Items that have already been found and moved will already be retained,\n      // we can continue until we find the next unretained item\n      while (opcode !== undefined && opcode.retained) {\n        opcode = children[++currentOpcodeIndex];\n      }\n      if (opcode !== undefined && opcode.key === key) {\n        this.retainItem(opcode, item);\n        currentOpcodeIndex++;\n      } else if (itemMap.has(key)) {\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n        let itemOpcode = itemMap.get(key);\n\n        // The item opcode was seen already, so we should move it.\n        if (itemOpcode.index < seenIndex) {\n          this.moveItem(itemOpcode, item, opcode);\n        } else {\n          // Update the seen index, we are going to be moving this item around\n          // so any other items that come before it will likely need to move as\n          // well.\n          seenIndex = itemOpcode.index;\n          let seenUnretained = false;\n\n          // iterate through all of the opcodes between the current position and\n          // the position of the item's opcode, and determine if they are all\n          // retained.\n          for (let i = currentOpcodeIndex + 1; i < seenIndex; i++) {\n            if (!unwrap(children[i]).retained) {\n              seenUnretained = true;\n              break;\n            }\n          }\n\n          // If we have seen only retained opcodes between this and the matching\n          // opcode, it means that all the opcodes in between have been moved\n          // already, and we can safely retain this item's opcode.\n          if (!seenUnretained) {\n            this.retainItem(itemOpcode, item);\n            currentOpcodeIndex = seenIndex + 1;\n          } else {\n            this.moveItem(itemOpcode, item, opcode);\n            currentOpcodeIndex++;\n          }\n        }\n      } else {\n        this.insertItem(item, opcode);\n      }\n    }\n    for (const opcode of children) {\n      if (!opcode.retained) {\n        this.deleteItem(opcode);\n      } else {\n        opcode.reset();\n      }\n    }\n  }\n  retainItem(opcode, item) {\n    let {\n      children\n    } = this;\n    updateRef(opcode.memo, item.memo);\n    updateRef(opcode.value, item.value);\n    opcode.retained = true;\n    opcode.index = children.length;\n    children.push(opcode);\n  }\n  insertItem(item, before) {\n    let {\n      opcodeMap,\n      bounds,\n      state,\n      children,\n      context: {\n        env\n      }\n    } = this;\n    let {\n      key\n    } = item;\n    let nextSibling = before === undefined ? this.marker : before.firstNode();\n    let elementStack = NewTreeBuilder.forInitialRender(env, {\n      element: bounds.parentElement(),\n      nextSibling\n    });\n    let vm = state.evaluate(elementStack);\n    vm.execute(vm => {\n      let opcode = vm.enterItem(item);\n      opcode.index = children.length;\n      children.push(opcode);\n      opcodeMap.set(key, opcode);\n      associateDestroyableChild(this, opcode);\n    });\n  }\n  moveItem(opcode, item, before) {\n    let {\n      children\n    } = this;\n    updateRef(opcode.memo, item.memo);\n    updateRef(opcode.value, item.value);\n    opcode.retained = true;\n    let currentSibling, nextSibling;\n    if (before === undefined) {\n      move(opcode, this.marker);\n    } else {\n      currentSibling = opcode.lastNode().nextSibling;\n      nextSibling = before.firstNode();\n\n      // Items are moved throughout the algorithm, so there are cases where the\n      // the items already happen to be siblings (e.g. an item in between was\n      // moved before this move happened). Check to see if they are siblings\n      // first before doing the move.\n      if (currentSibling !== nextSibling) {\n        move(opcode, nextSibling);\n      }\n    }\n    opcode.index = children.length;\n    children.push(opcode);\n  }\n  deleteItem(opcode) {\n    destroy(opcode);\n    clear(opcode);\n    this.opcodeMap.delete(opcode.key);\n  }\n}\nclass UpdatingVMFrame {\n  current = 0;\n  constructor(ops, exceptionHandler) {\n    this.ops = ops;\n    this.exceptionHandler = exceptionHandler;\n  }\n  goto(index) {\n    this.current = index;\n  }\n  nextStatement() {\n    return this.ops[this.current++];\n  }\n  handleException() {\n    if (this.exceptionHandler) {\n      this.exceptionHandler.handleException();\n    }\n  }\n}\n\nclass RenderResultImpl {\n  constructor(env, updating, bounds, drop) {\n    this.env = env;\n    this.updating = updating;\n    this.bounds = bounds;\n    this.drop = drop;\n    associateDestroyableChild(this, drop);\n    registerDestructor(this, () => clear(this.bounds));\n  }\n  rerender({\n    alwaysRevalidate = false\n  } = {\n    alwaysRevalidate: false\n  }) {\n    let {\n      env,\n      updating\n    } = this;\n    let vm = new UpdatingVM(env, {\n      alwaysRevalidate\n    });\n    vm.execute(updating, this);\n  }\n  parentElement() {\n    return this.bounds.parentElement();\n  }\n  firstNode() {\n    return this.bounds.firstNode();\n  }\n  lastNode() {\n    return this.bounds.lastNode();\n  }\n  handleException() {\n  }\n}\n\nclass EvaluationStackImpl {\n  static restore(snapshot, pc) {\n    const stack = new this(snapshot.slice(), initializeRegistersWithSP(snapshot.length - 1));\n    stack.registers[$pc] = pc;\n    stack.registers[$sp] = snapshot.length - 1;\n    stack.registers[$fp] = -1;\n    return stack;\n  }\n  registers;\n\n  // fp -> sp\n  constructor(stack = [], registers) {\n    this.stack = stack;\n    this.registers = registers;\n  }\n  push(value) {\n    this.stack[++this.registers[$sp]] = value;\n  }\n  dup(position = this.registers[$sp]) {\n    this.stack[++this.registers[$sp]] = this.stack[position];\n  }\n  copy(from, to) {\n    this.stack[to] = this.stack[from];\n  }\n  pop(n = 1) {\n    let top = this.stack[this.registers[$sp]];\n    this.registers[$sp] -= n;\n    return top;\n  }\n  peek(offset = 0) {\n    return this.stack[this.registers[$sp] - offset];\n  }\n  get(offset, base = this.registers[$fp]) {\n    return this.stack[base + offset];\n  }\n  set(value, offset, base = this.registers[$fp]) {\n    this.stack[base + offset] = value;\n  }\n  slice(start, end) {\n    return this.stack.slice(start, end);\n  }\n  capture(items) {\n    let end = this.registers[$sp] + 1;\n    let start = end - items;\n    return this.stack.slice(start, end);\n  }\n  reset() {\n    this.stack.length = 0;\n  }\n  static {\n  }\n}\n\nclass Stacks {\n  drop = {};\n  scope = new StackImpl();\n  dynamicScope = new StackImpl();\n  updating = new StackImpl();\n  cache = new StackImpl();\n  list = new StackImpl();\n  destroyable = new StackImpl();\n  constructor(scope, dynamicScope) {\n    this.scope.push(scope);\n    this.dynamicScope.push(dynamicScope);\n    this.destroyable.push(this.drop);\n  }\n}\nclass VM {\n  #stacks;\n  args;\n  lowlevel;\n  debug;\n  trace;\n  get stack() {\n    return this.lowlevel.stack;\n  }\n\n  /* Registers */\n\n  get pc() {\n    return this.lowlevel.fetchRegister($pc);\n  }\n  #registers = [null, null, null, null, null, null, null, null, null];\n\n  /**\n   * Fetch a value from a syscall register onto the stack.\n   *\n   * ## Opcodes\n   *\n   * - Append: `Fetch`\n   *\n   * ## State changes\n   *\n   * [!] push Eval Stack <- $register\n   */\n  fetch(register) {\n    let value = this.fetchValue(register);\n    this.stack.push(value);\n  }\n\n  /**\n   * Load a value from the stack into a syscall register.\n   *\n   * ## Opcodes\n   *\n   * - Append: `Load`\n   *\n   * ## State changes\n   *\n   * [!] pop Eval Stack -> `value`\n   * [$] $register <- `value`\n   */\n  load(register) {\n    let value = this.stack.pop();\n    this.loadValue(register, value);\n  }\n\n  /**\n   * Load a value into a syscall register.\n   *\n   * ## State changes\n   *\n   * [$] $register <- `value`\n   *\n   * @utility\n   */\n  loadValue(register, value) {\n    this.#registers[register] = value;\n  }\n\n  /**\n   * Fetch a value from a register (machine or syscall).\n   *\n   * ## State changes\n   *\n   * [ ] get $register\n   *\n   * @utility\n   */\n\n  fetchValue(register) {\n    if (isLowLevelRegister(register)) {\n      return this.lowlevel.fetchRegister(register);\n    }\n    return this.#registers[register];\n  }\n\n  // Save $pc into $ra, then jump to a new address in `program` (jal in MIPS)\n  call(handle) {\n    if (handle !== null) {\n      this.lowlevel.call(handle);\n    }\n  }\n\n  // Return to the `program` address stored in $ra\n  return() {\n    this.lowlevel.return();\n  }\n  #tree;\n  context;\n  constructor({\n    scope,\n    dynamicScope,\n    stack,\n    pc\n  }, context, tree) {\n    if (isDevelopingApp()) {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      assertGlobalContextWasSet();\n    }\n    let evalStack = EvaluationStackImpl.restore(stack, pc);\n    this.#tree = tree;\n    this.context = context;\n    this.#stacks = new Stacks(scope, dynamicScope);\n    this.args = new VMArgumentsImpl();\n    this.lowlevel = new LowLevelVM(evalStack, context, externs(), evalStack.registers);\n    this.pushUpdating();\n  }\n  static initial(context, options) {\n    let scope = ScopeImpl.root(options.owner, options.scope ?? {\n      self: UNDEFINED_REFERENCE,\n      size: 0\n    });\n    const state = closureState(context.program.heap.getaddr(options.handle), scope, options.dynamicScope);\n    return new VM(state, context, options.tree);\n  }\n  compile(block) {\n    let handle = unwrapHandle(block.compile(this.context));\n    return handle;\n  }\n  get constants() {\n    return this.context.program.constants;\n  }\n  get program() {\n    return this.context.program;\n  }\n  get env() {\n    return this.context.env;\n  }\n  captureClosure(args, pc = this.lowlevel.fetchRegister($pc)) {\n    return {\n      pc,\n      scope: this.scope(),\n      dynamicScope: this.dynamicScope(),\n      stack: this.stack.capture(args)\n    };\n  }\n  capture(args, pc = this.lowlevel.fetchRegister($pc)) {\n    return new Closure(this.captureClosure(args, pc), this.context);\n  }\n\n  /**\n   * ## Opcodes\n   *\n   * - Append: `BeginComponentTransaction`\n   *\n   * ## State Changes\n   *\n   * [ ] create `guard` (`JumpIfNotModifiedOpcode`)\n   * [ ] create `tracker` (`BeginTrackFrameOpcode`)\n   * [!] push Updating Stack <- `guard`\n   * [!] push Updating Stack <- `tracker`\n   * [!] push Cache Stack <- `guard`\n   * [!] push Tracking Stack\n   */\n  beginCacheGroup(name) {\n    let opcodes = this.updating();\n    let guard = new JumpIfNotModifiedOpcode();\n    opcodes.push(guard);\n    opcodes.push(new BeginTrackFrameOpcode(name));\n    this.#stacks.cache.push(guard);\n    beginTrackFrame(name);\n  }\n\n  /**\n   * ## Opcodes\n   *\n   * - Append: `CommitComponentTransaction`\n   *\n   * ## State Changes\n   *\n   * Create a new `EndTrackFrameOpcode` (`end`)\n   *\n   * [!] pop CacheStack -> `guard`\n   * [!] pop Tracking Stack -> `tag`\n   * [ ] create `end` (`EndTrackFrameOpcode`) with `guard`\n   * [-] consume `tag`\n   */\n  commitCacheGroup() {\n    let opcodes = this.updating();\n    let guard = expect(this.#stacks.cache.pop());\n    let tag = endTrackFrame();\n    opcodes.push(new EndTrackFrameOpcode(guard));\n    guard.finalize(tag, opcodes.length);\n  }\n\n  /**\n   * ## Opcodes\n   *\n   * - Append: `Enter`\n   *\n   * ## State changes\n   *\n   * [!] push Element Stack as `block`\n   * [ ] create `try` (`TryOpcode`) with `block`, capturing `args` from the Eval Stack\n   *\n   * Did Enter (`try`):\n   * [-] associate destroyable `try`\n   * [!] push Destroyable Stack <- `try`\n   * [!] push Updating List <- `try`\n   * [!] push Updating Stack <- `try.children`\n   */\n  enter(args) {\n    let updating = [];\n    let state = this.capture(args);\n    let block = this.tree().pushResettableBlock();\n    let tryOpcode = new TryOpcode(state, this.context, block, updating);\n    this.didEnter(tryOpcode);\n  }\n\n  /**\n   * ## Opcodes\n   *\n   * - Append: `Iterate`\n   * - Update: `ListBlock`\n   *\n   * ## State changes\n   *\n   * Create a new ref for the iterator item (`value`).\n   * Create a new ref for the iterator key (`key`).\n   *\n   * [ ] create `valueRef` (`Reference`) from `value`\n   * [ ] create `keyRef` (`Reference`) from `key`\n   * [!] push Eval Stack <- `valueRef`\n   * [!] push Eval Stack <- `keyRef`\n   * [!] push Element Stack <- `UpdatableBlock` as `block`\n   * [ ] capture `closure` with *2* items from the Eval Stack\n   * [ ] create `iteration` (`ListItemOpcode`) with `closure`, `block`, `key`, `keyRef` and `valueRef`\n   *\n   * Did Enter (`iteration`):\n   * [-] associate destroyable `iteration`\n   * [!] push Destroyable Stack <- `iteration`\n   * [!] push Updating List <- `iteration`\n   * [!] push Updating Stack <- `iteration.children`\n   */\n  enterItem({\n    key,\n    value,\n    memo\n  }) {\n    let {\n      stack\n    } = this;\n    let valueRef = createIteratorItemRef(value);\n    let memoRef = createIteratorItemRef(memo);\n    stack.push(valueRef);\n    stack.push(memoRef);\n    let state = this.capture(2);\n    let block = this.tree().pushResettableBlock();\n    let opcode = new ListItemOpcode(state, this.context, block, key, memoRef, valueRef);\n    this.didEnter(opcode);\n    return opcode;\n  }\n  registerItem(opcode) {\n    this.listBlock().initializeChild(opcode);\n  }\n\n  /**\n   * ## Opcodes\n   *\n   * - Append: `EnterList`\n   *\n   * ## State changes\n   *\n   * [ ] capture `closure` with *0* items from the Eval Stack, and `$pc` from `offset`\n   * [ ] create `updating` (empty `Array`)\n   * [!] push Element Stack <- `list` (`BlockList`) with `updating`\n   * [ ] create `list` (`ListBlockOpcode`) with `closure`, `list`, `updating` and `iterableRef`\n   * [!] push List Stack <- `list`\n   *\n   * Did Enter (`list`):\n   * [-] associate destroyable `list`\n   * [!] push Destroyable Stack <- `list`\n   * [!] push Updating List <- `list`\n   * [!] push Updating Stack <- `list.children`\n   */\n  enterList(iterableRef, offset) {\n    let updating = [];\n    let addr = this.lowlevel.target(offset);\n    let state = this.capture(0, addr);\n    let list = this.tree().pushBlockList(updating);\n    let opcode = new ListBlockOpcode(state, this.context, list, updating, iterableRef);\n    this.#stacks.list.push(opcode);\n    this.didEnter(opcode);\n  }\n\n  /**\n   * ## Opcodes\n   *\n   * - Append: `Enter`\n   * - Append: `Iterate`\n   * - Append: `EnterList`\n   * - Update: `ListBlock`\n   *\n   * ## State changes\n   *\n   * [-] associate destroyable `opcode`\n   * [!] push Destroyable Stack <- `opcode`\n   * [!] push Updating List <- `opcode`\n   * [!] push Updating Stack <- `opcode.children`\n   *\n   */\n  didEnter(opcode) {\n    this.associateDestroyable(opcode);\n    this.#stacks.destroyable.push(opcode);\n    this.updateWith(opcode);\n    this.pushUpdating(opcode.children);\n  }\n\n  /**\n   * ## Opcodes\n   *\n   * - Append: `Exit`\n   * - Append: `ExitList`\n   *\n   * ## State changes\n   *\n   * [!] pop Destroyable Stack\n   * [!] pop Element Stack\n   * [!] pop Updating Stack\n   */\n  exit() {\n    this.#stacks.destroyable.pop();\n    this.#tree.popBlock();\n    this.popUpdating();\n  }\n\n  /**\n   * ## Opcodes\n   *\n   * - Append: `ExitList`\n   *\n   * ## State changes\n   *\n   * Pop List:\n   * [!] pop Destroyable Stack\n   * [!] pop Element Stack\n   * [!] pop Updating Stack\n   *\n   * [!] pop List Stack\n   */\n  exitList() {\n    this.exit();\n    this.#stacks.list.pop();\n  }\n\n  /**\n   * ## Opcodes\n   *\n   * - Append: `RootScope`\n   * - Append: `VirtualRootScope`\n   *\n   * ## State changes\n   *\n   * [!] push Scope Stack\n   */\n  pushRootScope(size, owner) {\n    let scope = ScopeImpl.sized(owner, size);\n    this.#stacks.scope.push(scope);\n    return scope;\n  }\n\n  /**\n   * ## Opcodes\n   *\n   * - Append: `ChildScope`\n   *\n   * ## State changes\n   *\n   * [!] push Scope Stack <- `child` of current Scope\n   */\n  pushChildScope() {\n    this.#stacks.scope.push(this.scope().child());\n  }\n\n  /**\n   * ## Opcodes\n   *\n   * - Append: `Yield`\n   *\n   * ## State changes\n   *\n   * [!] push Scope Stack <- `scope`\n   */\n  pushScope(scope) {\n    this.#stacks.scope.push(scope);\n  }\n\n  /**\n   * ## Opcodes\n   *\n   * - Append: `PopScope`\n   *\n   * ## State changes\n   *\n   * [!] pop Scope Stack\n   */\n  popScope() {\n    this.#stacks.scope.pop();\n  }\n\n  /**\n   * ## Opcodes\n   *\n   * - Append: `PushDynamicScope`\n   *\n   * ## State changes:\n   *\n   * [!] push Dynamic Scope Stack <- child of current Dynamic Scope\n   */\n  pushDynamicScope() {\n    let child = this.dynamicScope().child();\n    this.#stacks.dynamicScope.push(child);\n    return child;\n  }\n\n  /**\n   * ## Opcodes\n   *\n   * - Append: `BindDynamicScope`\n   *\n   * ## State changes:\n   *\n   * [!] pop Dynamic Scope Stack `names.length` times\n   */\n  bindDynamicScope(names) {\n    let scope = this.dynamicScope();\n    for (const name of reverse(names)) {\n      scope.set(name, this.stack.pop());\n    }\n  }\n\n  /**\n   * ## State changes\n   *\n   * - [!] push Updating Stack\n   *\n   * @utility\n   */\n  pushUpdating(list = []) {\n    this.#stacks.updating.push(list);\n  }\n\n  /**\n   * ## State changes\n   *\n   * [!] pop Updating Stack\n   *\n   * @utility\n   */\n  popUpdating() {\n    return expect(this.#stacks.updating.pop());\n  }\n\n  /**\n   * ## State changes\n   *\n   * [!] push Updating List\n   *\n   * @utility\n   */\n  updateWith(opcode) {\n    this.updating().push(opcode);\n  }\n  listBlock() {\n    return expect(this.#stacks.list.current);\n  }\n\n  /**\n   * ## State changes\n   *\n   * [-] associate destroyable `child`\n   *\n   * @utility\n   */\n  associateDestroyable(child) {\n    let parent = expect(this.#stacks.destroyable.current);\n    associateDestroyableChild(parent, child);\n  }\n  updating() {\n    return expect(this.#stacks.updating.current);\n  }\n\n  /**\n   * Get Tree Builder\n   */\n  tree() {\n    return this.#tree;\n  }\n\n  /**\n   * Get current Scope\n   */\n  scope() {\n    return expect(this.#stacks.scope.current);\n  }\n\n  /**\n   * Get current Dynamic Scope\n   */\n  dynamicScope() {\n    return expect(this.#stacks.dynamicScope.current);\n  }\n  popDynamicScope() {\n    this.#stacks.dynamicScope.pop();\n  }\n\n  /// SCOPE HELPERS\n\n  getOwner() {\n    return this.scope().owner;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  getSelf() {\n    return this.scope().getSelf();\n  }\n  referenceForSymbol(symbol) {\n    return this.scope().getSymbol(symbol);\n  }\n\n  /// EXECUTION\n\n  execute(initialize) {\n    if (isDevelopingApp()) {\n      let hasErrored = true;\n      try {\n        let value = this._execute(initialize);\n\n        // using a boolean here to avoid breaking ergonomics of \"pause on uncaught exceptions\"\n        // which would happen with a `catch` + `throw`\n        hasErrored = false;\n        return value;\n      } finally {\n        if (hasErrored) {\n          // If any existing blocks are open, due to an error or something like\n          // that, we need to close them all and clean things up properly.\n          let elements = this.tree();\n          while (elements.hasBlocks) {\n            elements.popBlock();\n          }\n\n          // eslint-disable-next-line no-console\n          console.error(`\\n\\nError occurred:\\n\\n${resetTracking()}\\n\\n`);\n        }\n      }\n    } else {\n      return this._execute(initialize);\n    }\n  }\n  _execute(initialize) {\n    if (initialize) initialize(this);\n    let result;\n    do result = this.next(); while (!result.done);\n    return result.value;\n  }\n  next() {\n    let {\n      env\n    } = this;\n    let opcode = this.lowlevel.nextStatement();\n    let result;\n    if (opcode !== null) {\n      this.lowlevel.evaluateOuter(opcode, this);\n      result = {\n        done: false,\n        value: null\n      };\n    } else {\n      // Unload the stack\n      this.stack.reset();\n      result = {\n        done: true,\n        value: new RenderResultImpl(env, this.popUpdating(), this.#tree.popBlock(), this.#stacks.drop)\n      };\n    }\n    return result;\n  }\n}\nfunction closureState(pc, scope, dynamicScope) {\n  return {\n    pc,\n    scope,\n    dynamicScope,\n    stack: []\n  };\n}\n/**\n * A closure captures the state of the VM for a particular block of code that is necessary to\n * re-invoke the block in the future.\n *\n * In practice, this allows us to clear the previous render and \"replay\" the block's execution,\n * rendering content in the same position as the first render.\n */\nclass Closure {\n  state;\n  context;\n  constructor(state, context) {\n    this.state = state;\n    this.context = context;\n  }\n  evaluate(tree) {\n    return new VM(this.state, this.context, tree);\n  }\n}\n\nclass TemplateIteratorImpl {\n  constructor(vm) {\n    this.vm = vm;\n  }\n  next() {\n    return this.vm.next();\n  }\n  sync() {\n    if (isDevelopingApp()) {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      return debug.runInTrackingTransaction(() => this.vm.execute(), '- While rendering:');\n    } else {\n      return this.vm.execute();\n    }\n  }\n}\nfunction renderSync(env, iterator) {\n  let result;\n  inTransaction(env, () => result = iterator.sync());\n\n  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n  return result;\n}\nfunction renderMain(context, owner, self, tree, layout, dynamicScope = new DynamicScopeImpl()) {\n  let handle = unwrapHandle(layout.compile(context));\n  let numSymbols = layout.symbolTable.symbols.length;\n  let vm = VM.initial(context, {\n    scope: {\n      self,\n      size: numSymbols\n    },\n    dynamicScope,\n    tree,\n    handle,\n    owner\n  });\n  return new TemplateIteratorImpl(vm);\n}\nfunction renderInvocation(vm, context, owner, definition, args) {\n  // Get a list of tuples of argument names and references, like\n  // [['title', reference], ['name', reference]]\n  const argList = Object.keys(args).map(key => [key, args[key]]);\n  const blockNames = ['main', 'else', 'attrs'];\n  // Prefix argument names with `@` symbol\n  const argNames = argList.map(([name]) => `@${name}`);\n  let reified = vm.constants.component(definition, owner, undefined, '{ROOT}');\n  vm.lowlevel.pushFrame();\n\n  // Push blocks on to the stack, three stack values per block\n  for (let i = 0; i < 3 * blockNames.length; i++) {\n    vm.stack.push(null);\n  }\n  vm.stack.push(null);\n\n  // For each argument, push its backing reference on to the stack\n  argList.forEach(([, reference]) => {\n    vm.stack.push(reference);\n  });\n\n  // Configure VM based on blocks and args just pushed on to the stack.\n  vm.args.setup(vm.stack, argNames, blockNames, 0, true);\n  const compilable = expect(reified.compilable);\n  const layoutHandle = unwrapHandle(compilable.compile(context));\n  const invocation = {\n    handle: layoutHandle,\n    symbolTable: compilable.symbolTable\n  };\n\n  // Needed for the Op.Main opcode: arguments, component invocation object, and\n  // component definition.\n  vm.stack.push(vm.args);\n  vm.stack.push(invocation);\n  vm.stack.push(reified);\n  return new TemplateIteratorImpl(vm);\n}\nfunction renderComponent(context, tree, owner, definition, args = {}, dynamicScope = new DynamicScopeImpl()) {\n  let vm = VM.initial(context, {\n    tree,\n    handle: context.stdlib.main,\n    dynamicScope,\n    owner\n  });\n  return renderInvocation(vm, context, owner, definition, recordToReference(args));\n}\nfunction recordToReference(record) {\n  const root = createConstRef(record, 'args');\n  return Object.keys(record).reduce((acc, key) => {\n    acc[key] = childRefFor(root, key);\n    return acc;\n  }, {});\n}\n\nexport { DynamicScopeImpl as D, EnvironmentImpl as E, LowLevelVM as L, ScopeImpl as S, UpdatingVM as U, renderMain as a, renderSync as b, runtimeOptions as c, inTransaction as i, renderComponent as r };\n","import RouteRecognizer from '../route-recognizer/index.js';\nimport { P as Promise$1 } from './rsvp-CnCSY930.js';\nimport { Q as QUERY_PARAMS_SYMBOL, m as merge, i as isTransition, a as isParam, t as throwIfAborted, P as PARAMS_SYMBOL, p as prepareResult, b as isPromise, f as forEach, c as promiseLabel, U as UnrecognizedURLError, T as Transition, S as STATE_SYMBOL, g as getChangelist, d as log, l as logAbort, e as isTransitionAborted, h as extractQueryParams } from './unrecognized-url-error-BBMMZhBN.js';\n\nlet ROUTE_INFOS = new WeakMap();\nfunction toReadOnlyRouteInfo(routeInfos, queryParams = {}, options = {\n  includeAttributes: false,\n  localizeMapUpdates: false\n}) {\n  const LOCAL_ROUTE_INFOS = new WeakMap();\n  return routeInfos.map((info, i) => {\n    let {\n      name,\n      params,\n      paramNames,\n      context,\n      route\n    } = info;\n    // SAFETY: This should be safe since it is just for use as a key\n    let key = info;\n    if (ROUTE_INFOS.has(key) && options.includeAttributes) {\n      let routeInfo = ROUTE_INFOS.get(key);\n      routeInfo = attachMetadata(route, routeInfo);\n      let routeInfoWithAttribute = createRouteInfoWithAttributes(routeInfo, context);\n      LOCAL_ROUTE_INFOS.set(key, routeInfo);\n      if (!options.localizeMapUpdates) {\n        ROUTE_INFOS.set(key, routeInfoWithAttribute);\n      }\n      return routeInfoWithAttribute;\n    }\n    const routeInfosRef = options.localizeMapUpdates ? LOCAL_ROUTE_INFOS : ROUTE_INFOS;\n    let routeInfo = {\n      find(predicate, thisArg) {\n        let publicInfo;\n        let arr = [];\n        if (predicate.length === 3) {\n          arr = routeInfos.map(\n          // SAFETY: This should be safe since it is just for use as a key\n          info => routeInfosRef.get(info));\n        }\n        for (let i = 0; routeInfos.length > i; i++) {\n          // SAFETY: This should be safe since it is just for use as a key\n          publicInfo = routeInfosRef.get(routeInfos[i]);\n          if (predicate.call(thisArg, publicInfo, i, arr)) {\n            return publicInfo;\n          }\n        }\n        return undefined;\n      },\n      get name() {\n        return name;\n      },\n      get paramNames() {\n        return paramNames;\n      },\n      get metadata() {\n        return buildRouteInfoMetadata(info.route);\n      },\n      get parent() {\n        let parent = routeInfos[i - 1];\n        if (parent === undefined) {\n          return null;\n        }\n        // SAFETY: This should be safe since it is just for use as a key\n        return routeInfosRef.get(parent);\n      },\n      get child() {\n        let child = routeInfos[i + 1];\n        if (child === undefined) {\n          return null;\n        }\n        // SAFETY: This should be safe since it is just for use as a key\n        return routeInfosRef.get(child);\n      },\n      get localName() {\n        let parts = this.name.split('.');\n        return parts[parts.length - 1];\n      },\n      get params() {\n        return params;\n      },\n      get queryParams() {\n        return queryParams;\n      }\n    };\n    if (options.includeAttributes) {\n      routeInfo = createRouteInfoWithAttributes(routeInfo, context);\n    }\n    // SAFETY: This should be safe since it is just for use as a key\n    LOCAL_ROUTE_INFOS.set(info, routeInfo);\n    if (!options.localizeMapUpdates) {\n      // SAFETY: This should be safe since it is just for use as a key\n      ROUTE_INFOS.set(info, routeInfo);\n    }\n    return routeInfo;\n  });\n}\nfunction createRouteInfoWithAttributes(routeInfo, context) {\n  let attributes = {\n    get attributes() {\n      return context;\n    }\n  };\n  if (!Object.isExtensible(routeInfo) || routeInfo.hasOwnProperty('attributes')) {\n    return Object.freeze(Object.assign({}, routeInfo, attributes));\n  }\n  return Object.assign(routeInfo, attributes);\n}\nfunction buildRouteInfoMetadata(route) {\n  if (route !== undefined && route !== null && route.buildRouteInfoMetadata !== undefined) {\n    return route.buildRouteInfoMetadata();\n  }\n  return null;\n}\nfunction attachMetadata(route, routeInfo) {\n  let metadata = {\n    get metadata() {\n      return buildRouteInfoMetadata(route);\n    }\n  };\n  if (!Object.isExtensible(routeInfo) || routeInfo.hasOwnProperty('metadata')) {\n    return Object.freeze(Object.assign({}, routeInfo, metadata));\n  }\n  return Object.assign(routeInfo, metadata);\n}\nclass InternalRouteInfo {\n  constructor(router, name, paramNames, route) {\n    this._routePromise = undefined;\n    this._route = null;\n    this.params = {};\n    this.isResolved = false;\n    this.name = name;\n    this.paramNames = paramNames;\n    this.router = router;\n    if (route) {\n      this._processRoute(route);\n    }\n  }\n  getModel(_transition) {\n    return Promise$1.resolve(this.context);\n  }\n  serialize(_context) {\n    return this.params || {};\n  }\n  resolve(transition) {\n    return Promise$1.resolve(this.routePromise).then(route => {\n      throwIfAborted(transition);\n      return route;\n    }).then(() => this.runBeforeModelHook(transition)).then(() => throwIfAborted(transition)).then(() => this.getModel(transition)).then(resolvedModel => {\n      throwIfAborted(transition);\n      return resolvedModel;\n    }).then(resolvedModel => this.runAfterModelHook(transition, resolvedModel)).then(resolvedModel => this.becomeResolved(transition, resolvedModel));\n  }\n  becomeResolved(transition, resolvedContext) {\n    let params = this.serialize(resolvedContext);\n    if (transition) {\n      this.stashResolvedModel(transition, resolvedContext);\n      transition[PARAMS_SYMBOL] = transition[PARAMS_SYMBOL] || {};\n      transition[PARAMS_SYMBOL][this.name] = params;\n    }\n    let context;\n    let contextsMatch = resolvedContext === this.context;\n    if ('context' in this || !contextsMatch) {\n      context = resolvedContext;\n    }\n    // SAFETY: Since this is just for lookup, it should be safe\n    let cached = ROUTE_INFOS.get(this);\n    let resolved = new ResolvedRouteInfo(this.router, this.name, this.paramNames, params, this.route, context);\n    if (cached !== undefined) {\n      // SAFETY: This is potentially a bit risker, but for what we're doing, it should be ok.\n      ROUTE_INFOS.set(resolved, cached);\n    }\n    return resolved;\n  }\n  shouldSupersede(routeInfo) {\n    // Prefer this newer routeInfo over `other` if:\n    // 1) The other one doesn't exist\n    // 2) The names don't match\n    // 3) This route has a context that doesn't match\n    //    the other one (or the other one doesn't have one).\n    // 4) This route has parameters that don't match the other.\n    if (!routeInfo) {\n      return true;\n    }\n    let contextsMatch = routeInfo.context === this.context;\n    return routeInfo.name !== this.name || 'context' in this && !contextsMatch || this.hasOwnProperty('params') && !paramsMatch(this.params, routeInfo.params);\n  }\n  get route() {\n    // _route could be set to either a route object or undefined, so we\n    // compare against null to know when it's been set\n    if (this._route !== null) {\n      return this._route;\n    }\n    return this.fetchRoute();\n  }\n  set route(route) {\n    this._route = route;\n  }\n  get routePromise() {\n    if (this._routePromise) {\n      return this._routePromise;\n    }\n    this.fetchRoute();\n    return this._routePromise;\n  }\n  set routePromise(routePromise) {\n    this._routePromise = routePromise;\n  }\n  log(transition, message) {\n    if (transition.log) {\n      transition.log(this.name + ': ' + message);\n    }\n  }\n  updateRoute(route) {\n    route._internalName = this.name;\n    return this.route = route;\n  }\n  runBeforeModelHook(transition) {\n    if (transition.trigger) {\n      transition.trigger(true, 'willResolveModel', transition, this.route);\n    }\n    let result;\n    if (this.route) {\n      if (this.route.beforeModel !== undefined) {\n        result = this.route.beforeModel(transition);\n      }\n    }\n    if (isTransition(result)) {\n      result = null;\n    }\n    return Promise$1.resolve(result);\n  }\n  runAfterModelHook(transition, resolvedModel) {\n    // Stash the resolved model on the payload.\n    // This makes it possible for users to swap out\n    // the resolved model in afterModel.\n    let name = this.name;\n    this.stashResolvedModel(transition, resolvedModel);\n    let result;\n    if (this.route !== undefined) {\n      if (this.route.afterModel !== undefined) {\n        result = this.route.afterModel(resolvedModel, transition);\n      }\n    }\n    result = prepareResult(result);\n    return Promise$1.resolve(result).then(() => {\n      // Ignore the fulfilled value returned from afterModel.\n      // Return the value stashed in resolvedModels, which\n      // might have been swapped out in afterModel.\n      // SAFTEY: We expect this to be of type T, though typing it as such is challenging.\n      return transition.resolvedModels[name];\n    });\n  }\n  stashResolvedModel(transition, resolvedModel) {\n    transition.resolvedModels = transition.resolvedModels || {};\n    // SAFETY: It's unfortunate that we have to do this cast. It should be safe though.\n    transition.resolvedModels[this.name] = resolvedModel;\n  }\n  fetchRoute() {\n    let route = this.router.getRoute(this.name);\n    return this._processRoute(route);\n  }\n  _processRoute(route) {\n    // Setup a routePromise so that we can wait for asynchronously loaded routes\n    this.routePromise = Promise$1.resolve(route);\n    // Wait until the 'route' property has been updated when chaining to a route\n    // that is a promise\n    if (isPromise(route)) {\n      this.routePromise = this.routePromise.then(r => {\n        return this.updateRoute(r);\n      });\n      // set to undefined to avoid recursive loop in the route getter\n      return this.route = undefined;\n    } else if (route) {\n      return this.updateRoute(route);\n    }\n    return undefined;\n  }\n}\nclass ResolvedRouteInfo extends InternalRouteInfo {\n  constructor(router, name, paramNames, params, route, context) {\n    super(router, name, paramNames, route);\n    this.params = params;\n    this.isResolved = true;\n    this.context = context;\n  }\n  resolve(transition) {\n    // A ResolvedRouteInfo just resolved with itself.\n    if (transition && transition.resolvedModels) {\n      transition.resolvedModels[this.name] = this.context;\n    }\n    return Promise$1.resolve(this);\n  }\n}\nclass UnresolvedRouteInfoByParam extends InternalRouteInfo {\n  constructor(router, name, paramNames, params, route) {\n    super(router, name, paramNames, route);\n    this.params = {};\n    if (params) {\n      this.params = params;\n    }\n  }\n  getModel(transition) {\n    let fullParams = this.params;\n    if (transition && transition[QUERY_PARAMS_SYMBOL]) {\n      fullParams = {};\n      merge(fullParams, this.params);\n      fullParams.queryParams = transition[QUERY_PARAMS_SYMBOL];\n    }\n    let route = this.route;\n    let result;\n    // FIXME: Review these casts\n    if (route.deserialize) {\n      result = route.deserialize(fullParams, transition);\n    } else if (route.model) {\n      result = route.model(fullParams, transition);\n    }\n    if (result && isTransition(result)) {\n      result = undefined;\n    }\n    return Promise$1.resolve(result);\n  }\n}\nclass UnresolvedRouteInfoByObject extends InternalRouteInfo {\n  constructor(router, name, paramNames, context) {\n    super(router, name, paramNames);\n    this.context = context;\n    this.serializer = this.router.getSerializer(name);\n  }\n  getModel(transition) {\n    if (this.router.log !== undefined) {\n      this.router.log(this.name + ': resolving provided model');\n    }\n    return super.getModel(transition);\n  }\n  /**\n    @private\n       Serializes a route using its custom `serialize` method or\n    by a default that looks up the expected property name from\n    the dynamic segment.\n       @param {Object} model the model to be serialized for this route\n  */\n  serialize(model) {\n    let {\n      paramNames,\n      context\n    } = this;\n    if (!model) {\n      // SAFETY: By the time we serialize, we expect to be resolved.\n      // This may not be an entirely safe assumption though no tests fail.\n      model = context;\n    }\n    let object = {};\n    if (isParam(model)) {\n      object[paramNames[0]] = model;\n      return object;\n    }\n    // Use custom serialize if it exists.\n    if (this.serializer) {\n      // invoke this.serializer unbound (getSerializer returns a stateless function)\n      return this.serializer.call(null, model, paramNames);\n    } else if (this.route !== undefined) {\n      if (this.route.serialize) {\n        return this.route.serialize(model, paramNames);\n      }\n    }\n    if (paramNames.length !== 1) {\n      return;\n    }\n    let name = paramNames[0];\n    if (/_id$/.test(name)) {\n      // SAFETY: Model is supposed to extend IModel already\n      object[name] = model.id;\n    } else {\n      object[name] = model;\n    }\n    return object;\n  }\n}\nfunction paramsMatch(a, b) {\n  if (a === b) {\n    // Both are identical, may both be undefined\n    return true;\n  }\n  if (!a || !b) {\n    // Only one is undefined, already checked they aren't identical\n    return false;\n  }\n  // Note: this assumes that both params have the same\n  // number of keys, but since we're comparing the\n  // same routes, they should.\n  for (let k in a) {\n    if (a.hasOwnProperty(k) && a[k] !== b[k]) {\n      return false;\n    }\n  }\n  return true;\n}\n\nclass TransitionIntent {\n  constructor(router, data = {}) {\n    this.router = router;\n    this.data = data;\n  }\n}\n\nfunction handleError(currentState, transition, error) {\n  // This is the only possible\n  // reject value of TransitionState#resolve\n  let routeInfos = currentState.routeInfos;\n  let errorHandlerIndex = transition.resolveIndex >= routeInfos.length ? routeInfos.length - 1 : transition.resolveIndex;\n  let wasAborted = transition.isAborted;\n  throw new TransitionError(error, currentState.routeInfos[errorHandlerIndex].route, wasAborted, currentState);\n}\nfunction resolveOneRouteInfo(currentState, transition) {\n  if (transition.resolveIndex === currentState.routeInfos.length) {\n    // This is is the only possible\n    // fulfill value of TransitionState#resolve\n    return;\n  }\n  let routeInfo = currentState.routeInfos[transition.resolveIndex];\n  let callback = proceed.bind(null, currentState, transition);\n  return routeInfo.resolve(transition).then(callback, null, currentState.promiseLabel('Proceed'));\n}\nfunction proceed(currentState, transition, resolvedRouteInfo) {\n  let wasAlreadyResolved = currentState.routeInfos[transition.resolveIndex].isResolved;\n  // Swap the previously unresolved routeInfo with\n  // the resolved routeInfo\n  currentState.routeInfos[transition.resolveIndex++] = resolvedRouteInfo;\n  if (!wasAlreadyResolved) {\n    // Call the redirect hook. The reason we call it here\n    // vs. afterModel is so that redirects into child\n    // routes don't re-run the model hooks for this\n    // already-resolved route.\n    let {\n      route\n    } = resolvedRouteInfo;\n    if (route !== undefined) {\n      if (route.redirect) {\n        route.redirect(resolvedRouteInfo.context, transition);\n      }\n    }\n  }\n  // Proceed after ensuring that the redirect hook\n  // didn't abort this transition by transitioning elsewhere.\n  throwIfAborted(transition);\n  return resolveOneRouteInfo(currentState, transition);\n}\nclass TransitionState {\n  constructor() {\n    this.routeInfos = [];\n    this.queryParams = {};\n    this.params = {};\n  }\n  promiseLabel(label) {\n    let targetName = '';\n    forEach(this.routeInfos, function (routeInfo) {\n      if (targetName !== '') {\n        targetName += '.';\n      }\n      targetName += routeInfo.name;\n      return true;\n    });\n    return promiseLabel(\"'\" + targetName + \"': \" + label);\n  }\n  resolve(transition) {\n    // First, calculate params for this state. This is useful\n    // information to provide to the various route hooks.\n    let params = this.params;\n    forEach(this.routeInfos, routeInfo => {\n      params[routeInfo.name] = routeInfo.params || {};\n      return true;\n    });\n    transition.resolveIndex = 0;\n    let callback = resolveOneRouteInfo.bind(null, this, transition);\n    let errorHandler = handleError.bind(null, this, transition);\n    // The prelude RSVP.resolve() async moves us into the promise land.\n    return Promise$1.resolve(null, this.promiseLabel('Start transition')).then(callback, null, this.promiseLabel('Resolve route')).catch(errorHandler, this.promiseLabel('Handle error')).then(() => this);\n  }\n}\nclass TransitionError {\n  constructor(error, route, wasAborted, state) {\n    this.error = error;\n    this.route = route;\n    this.wasAborted = wasAborted;\n    this.state = state;\n  }\n}\n\nclass NamedTransitionIntent extends TransitionIntent {\n  constructor(router, name, pivotHandler, contexts = [], queryParams = {}, data) {\n    super(router, data);\n    this.preTransitionState = undefined;\n    this.name = name;\n    this.pivotHandler = pivotHandler;\n    this.contexts = contexts;\n    this.queryParams = queryParams;\n  }\n  applyToState(oldState, isIntermediate) {\n    let handlers = this.router.recognizer.handlersFor(this.name);\n    let targetRouteName = handlers[handlers.length - 1].handler;\n    return this.applyToHandlers(oldState, handlers, targetRouteName, isIntermediate, false);\n  }\n  applyToHandlers(oldState, parsedHandlers, targetRouteName, isIntermediate, checkingIfActive) {\n    let i, len;\n    let newState = new TransitionState();\n    let objects = this.contexts.slice(0);\n    let invalidateIndex = parsedHandlers.length;\n    // Pivot handlers are provided for refresh transitions\n    if (this.pivotHandler) {\n      for (i = 0, len = parsedHandlers.length; i < len; ++i) {\n        if (parsedHandlers[i].handler === this.pivotHandler._internalName) {\n          invalidateIndex = i;\n          break;\n        }\n      }\n    }\n    for (i = parsedHandlers.length - 1; i >= 0; --i) {\n      let result = parsedHandlers[i];\n      let name = result.handler;\n      let oldHandlerInfo = oldState.routeInfos[i];\n      let newHandlerInfo = null;\n      if (result.names.length > 0) {\n        if (i >= invalidateIndex) {\n          newHandlerInfo = this.createParamHandlerInfo(name, result.names, objects, oldHandlerInfo);\n        } else {\n          newHandlerInfo = this.getHandlerInfoForDynamicSegment(name, result.names, objects, oldHandlerInfo, targetRouteName, i);\n        }\n      } else {\n        // This route has no dynamic segment.\n        // Therefore treat as a param-based handlerInfo\n        // with empty params. This will cause the `model`\n        // hook to be called with empty params, which is desirable.\n        newHandlerInfo = this.createParamHandlerInfo(name, result.names, objects, oldHandlerInfo);\n      }\n      if (checkingIfActive) {\n        // If we're performing an isActive check, we want to\n        // serialize URL params with the provided context, but\n        // ignore mismatches between old and new context.\n        newHandlerInfo = newHandlerInfo.becomeResolved(null,\n        // SAFETY: This seems to imply that it would be resolved, but it's unclear if that's actually the case.\n        newHandlerInfo.context);\n        let oldContext = oldHandlerInfo && oldHandlerInfo.context;\n        if (result.names.length > 0 && oldHandlerInfo.context !== undefined && newHandlerInfo.context === oldContext) {\n          // If contexts match in isActive test, assume params also match.\n          // This allows for flexibility in not requiring that every last\n          // handler provide a `serialize` method\n          newHandlerInfo.params = oldHandlerInfo && oldHandlerInfo.params;\n        }\n        newHandlerInfo.context = oldContext;\n      }\n      let handlerToUse = oldHandlerInfo;\n      if (i >= invalidateIndex || newHandlerInfo.shouldSupersede(oldHandlerInfo)) {\n        invalidateIndex = Math.min(i, invalidateIndex);\n        handlerToUse = newHandlerInfo;\n      }\n      if (isIntermediate && !checkingIfActive) {\n        handlerToUse = handlerToUse.becomeResolved(null,\n        // SAFETY: This seems to imply that it would be resolved, but it's unclear if that's actually the case.\n        handlerToUse.context);\n      }\n      newState.routeInfos.unshift(handlerToUse);\n    }\n    if (objects.length > 0) {\n      throw new Error('More context objects were passed than there are dynamic segments for the route: ' + targetRouteName);\n    }\n    if (!isIntermediate) {\n      this.invalidateChildren(newState.routeInfos, invalidateIndex);\n    }\n    merge(newState.queryParams, this.queryParams || {});\n    if (isIntermediate && oldState.queryParams) {\n      merge(newState.queryParams, oldState.queryParams);\n    }\n    return newState;\n  }\n  invalidateChildren(handlerInfos, invalidateIndex) {\n    for (let i = invalidateIndex, l = handlerInfos.length; i < l; ++i) {\n      let handlerInfo = handlerInfos[i];\n      if (handlerInfo.isResolved) {\n        let {\n          name,\n          params,\n          route,\n          paramNames\n        } = handlerInfos[i];\n        handlerInfos[i] = new UnresolvedRouteInfoByParam(this.router, name, paramNames, params, route);\n      }\n    }\n  }\n  getHandlerInfoForDynamicSegment(name, names, objects, oldHandlerInfo, _targetRouteName, i) {\n    let objectToUse;\n    if (objects.length > 0) {\n      // Use the objects provided for this transition.\n      objectToUse = objects[objects.length - 1];\n      if (isParam(objectToUse)) {\n        return this.createParamHandlerInfo(name, names, objects, oldHandlerInfo);\n      } else {\n        objects.pop();\n      }\n    } else if (oldHandlerInfo && oldHandlerInfo.name === name) {\n      // Reuse the matching oldHandlerInfo\n      return oldHandlerInfo;\n    } else {\n      if (this.preTransitionState) {\n        let preTransitionHandlerInfo = this.preTransitionState.routeInfos[i];\n        objectToUse = preTransitionHandlerInfo === null || preTransitionHandlerInfo === void 0 ? void 0 : preTransitionHandlerInfo.context;\n      } else {\n        // Ideally we should throw this error to provide maximal\n        // information to the user that not enough context objects\n        // were provided, but this proves too cumbersome in Ember\n        // in cases where inner template helpers are evaluated\n        // before parent helpers un-render, in which cases this\n        // error somewhat prematurely fires.\n        //throw new Error(\"Not enough context objects were provided to complete a transition to \" + targetRouteName + \". Specifically, the \" + name + \" route needs an object that can be serialized into its dynamic URL segments [\" + names.join(', ') + \"]\");\n        return oldHandlerInfo;\n      }\n    }\n    return new UnresolvedRouteInfoByObject(this.router, name, names, objectToUse);\n  }\n  createParamHandlerInfo(name, names, objects, oldHandlerInfo) {\n    let params = {};\n    // Soak up all the provided string/numbers\n    let numNames = names.length;\n    let missingParams = [];\n    while (numNames--) {\n      // Only use old params if the names match with the new handler\n      let oldParams = oldHandlerInfo && name === oldHandlerInfo.name && oldHandlerInfo.params || {};\n      let peek = objects[objects.length - 1];\n      let paramName = names[numNames];\n      if (isParam(peek)) {\n        params[paramName] = '' + objects.pop();\n      } else {\n        // If we're here, this means only some of the params\n        // were string/number params, so try and use a param\n        // value from a previous handler.\n        if (oldParams.hasOwnProperty(paramName)) {\n          params[paramName] = oldParams[paramName];\n        } else {\n          missingParams.push(paramName);\n        }\n      }\n    }\n    if (missingParams.length > 0) {\n      throw new Error(`You didn't provide enough string/numeric parameters to satisfy all of the dynamic segments for route ${name}.` + ` Missing params: ${missingParams}`);\n    }\n    return new UnresolvedRouteInfoByParam(this.router, name, names, params);\n  }\n}\n\nclass URLTransitionIntent extends TransitionIntent {\n  constructor(router, url, data) {\n    super(router, data);\n    this.url = url;\n    this.preTransitionState = undefined;\n  }\n  applyToState(oldState) {\n    let newState = new TransitionState();\n    let results = this.router.recognizer.recognize(this.url),\n      i,\n      len;\n    if (!results) {\n      throw new UnrecognizedURLError(this.url);\n    }\n    let statesDiffer = false;\n    let _url = this.url;\n    // Checks if a handler is accessible by URL. If it is not, an error is thrown.\n    // For the case where the handler is loaded asynchronously, the error will be\n    // thrown once it is loaded.\n    function checkHandlerAccessibility(handler) {\n      if (handler && handler.inaccessibleByURL) {\n        throw new UnrecognizedURLError(_url);\n      }\n      return handler;\n    }\n    for (i = 0, len = results.length; i < len; ++i) {\n      let result = results[i];\n      let name = result.handler;\n      let paramNames = [];\n      if (this.router.recognizer.hasRoute(name)) {\n        paramNames = this.router.recognizer.handlersFor(name)[i].names;\n      }\n      let newRouteInfo = new UnresolvedRouteInfoByParam(this.router, name, paramNames, result.params);\n      let route = newRouteInfo.route;\n      if (route) {\n        checkHandlerAccessibility(route);\n      } else {\n        // If the handler is being loaded asynchronously, check if we can\n        // access it after it has resolved\n        newRouteInfo.routePromise = newRouteInfo.routePromise.then(checkHandlerAccessibility);\n      }\n      let oldRouteInfo = oldState.routeInfos[i];\n      if (statesDiffer || newRouteInfo.shouldSupersede(oldRouteInfo)) {\n        statesDiffer = true;\n        newState.routeInfos[i] = newRouteInfo;\n      } else {\n        newState.routeInfos[i] = oldRouteInfo;\n      }\n    }\n    merge(newState.queryParams, results.queryParams);\n    return newState;\n  }\n}\n\nclass Router {\n  constructor(logger) {\n    this._lastQueryParams = {};\n    this.state = undefined;\n    this.oldState = undefined;\n    this.activeTransition = undefined;\n    this.currentRouteInfos = undefined;\n    this._changedQueryParams = undefined;\n    this.currentSequence = 0;\n    this.log = logger;\n    this.recognizer = new RouteRecognizer();\n    this.reset();\n  }\n  /**\n    The main entry point into the router. The API is essentially\n    the same as the `map` method in `route-recognizer`.\n       This method extracts the String handler at the last `.to()`\n    call and uses it as the name of the whole route.\n       @param {Function} callback\n  */\n  map(callback) {\n    this.recognizer.map(callback, function (recognizer, routes) {\n      for (let i = routes.length - 1, proceed = true; i >= 0 && proceed; --i) {\n        let route = routes[i];\n        let handler = route.handler;\n        recognizer.add(routes, {\n          as: handler\n        });\n        proceed = route.path === '/' || route.path === '' || handler.slice(-6) === '.index';\n      }\n    });\n  }\n  hasRoute(route) {\n    return this.recognizer.hasRoute(route);\n  }\n  queryParamsTransition(changelist, wasTransitioning, oldState, newState) {\n    this.fireQueryParamDidChange(newState, changelist);\n    if (!wasTransitioning && this.activeTransition) {\n      // One of the routes in queryParamsDidChange\n      // caused a transition. Just return that transition.\n      return this.activeTransition;\n    } else {\n      // Running queryParamsDidChange didn't change anything.\n      // Just update query params and be on our way.\n      // We have to return a noop transition that will\n      // perform a URL update at the end. This gives\n      // the user the ability to set the url update\n      // method (default is replaceState).\n      let newTransition = new Transition(this, undefined, undefined);\n      newTransition.queryParamsOnly = true;\n      oldState.queryParams = this.finalizeQueryParamChange(newState.routeInfos, newState.queryParams, newTransition);\n      newTransition[QUERY_PARAMS_SYMBOL] = newState.queryParams;\n      this.toReadOnlyInfos(newTransition, newState);\n      this.routeWillChange(newTransition);\n      newTransition.promise = newTransition.promise.then(result => {\n        if (!newTransition.isAborted) {\n          this._updateURL(newTransition, oldState);\n          this.didTransition(this.currentRouteInfos);\n          this.toInfos(newTransition, newState.routeInfos, true);\n          this.routeDidChange(newTransition);\n        }\n        return result;\n      }, null, promiseLabel('Transition complete'));\n      return newTransition;\n    }\n  }\n  transitionByIntent(intent, isIntermediate) {\n    try {\n      return this.getTransitionByIntent(intent, isIntermediate);\n    } catch (e) {\n      return new Transition(this, intent, undefined, e, undefined);\n    }\n  }\n  recognize(url) {\n    let intent = new URLTransitionIntent(this, url);\n    let newState = this.generateNewState(intent);\n    if (newState === null) {\n      return newState;\n    }\n    let readonlyInfos = toReadOnlyRouteInfo(newState.routeInfos, newState.queryParams, {\n      includeAttributes: false,\n      localizeMapUpdates: true\n    });\n    return readonlyInfos[readonlyInfos.length - 1];\n  }\n  recognizeAndLoad(url) {\n    let intent = new URLTransitionIntent(this, url);\n    let newState = this.generateNewState(intent);\n    if (newState === null) {\n      return Promise$1.reject(`URL ${url} was not recognized`);\n    }\n    let newTransition = new Transition(this, intent, newState, undefined);\n    return newTransition.then(() => {\n      let routeInfosWithAttributes = toReadOnlyRouteInfo(newState.routeInfos, newTransition[QUERY_PARAMS_SYMBOL], {\n        includeAttributes: true,\n        localizeMapUpdates: false\n      });\n      return routeInfosWithAttributes[routeInfosWithAttributes.length - 1];\n    });\n  }\n  generateNewState(intent) {\n    try {\n      return intent.applyToState(this.state, false);\n    } catch (e) {\n      return null;\n    }\n  }\n  getTransitionByIntent(intent, isIntermediate) {\n    let wasTransitioning = !!this.activeTransition;\n    let oldState = wasTransitioning ? this.activeTransition[STATE_SYMBOL] : this.state;\n    let newTransition;\n    let newState = intent.applyToState(oldState, isIntermediate);\n    let queryParamChangelist = getChangelist(oldState.queryParams, newState.queryParams);\n    if (routeInfosEqual(newState.routeInfos, oldState.routeInfos)) {\n      // This is a no-op transition. See if query params changed.\n      if (queryParamChangelist) {\n        let newTransition = this.queryParamsTransition(queryParamChangelist, wasTransitioning, oldState, newState);\n        newTransition.queryParamsOnly = true;\n        // SAFETY: The returned OpaqueTransition should actually be this.\n        return newTransition;\n      }\n      // No-op. No need to create a new transition.\n      return this.activeTransition || new Transition(this, undefined, undefined);\n    }\n    if (isIntermediate) {\n      let transition = new Transition(this, undefined, newState);\n      transition.isIntermediate = true;\n      this.toReadOnlyInfos(transition, newState);\n      this.setupContexts(newState, transition);\n      this.routeWillChange(transition);\n      return this.activeTransition;\n    }\n    // Create a new transition to the destination route.\n    newTransition = new Transition(this, intent, newState, undefined, this.activeTransition);\n    // transition is to same route with same params, only query params differ.\n    // not caught above probably because refresh() has been used\n    if (routeInfosSameExceptQueryParams(newState.routeInfos, oldState.routeInfos)) {\n      newTransition.queryParamsOnly = true;\n    }\n    this.toReadOnlyInfos(newTransition, newState);\n    // Abort and usurp any previously active transition.\n    if (this.activeTransition) {\n      this.activeTransition.redirect(newTransition);\n    }\n    this.activeTransition = newTransition;\n    // Transition promises by default resolve with resolved state.\n    // For our purposes, swap out the promise to resolve\n    // after the transition has been finalized.\n    newTransition.promise = newTransition.promise.then(result => {\n      return this.finalizeTransition(newTransition, result);\n    }, null, promiseLabel('Settle transition promise when transition is finalized'));\n    if (!wasTransitioning) {\n      this.notifyExistingHandlers(newState, newTransition);\n    }\n    this.fireQueryParamDidChange(newState, queryParamChangelist);\n    return newTransition;\n  }\n  /**\n  @private\n     Begins and returns a Transition based on the provided\n  arguments. Accepts arguments in the form of both URL\n  transitions and named transitions.\n     @param {Router} router\n  @param {Array[Object]} args arguments passed to transitionTo,\n    replaceWith, or handleURL\n  */\n  doTransition(name, modelsArray = [], isIntermediate = false) {\n    let lastArg = modelsArray[modelsArray.length - 1];\n    let queryParams = {};\n    if (lastArg && Object.prototype.hasOwnProperty.call(lastArg, 'queryParams')) {\n      // We just checked this.\n      // TODO: Use an assertion?\n      queryParams = modelsArray.pop().queryParams;\n    }\n    let intent;\n    if (name === undefined) {\n      log(this, 'Updating query params');\n      // A query param update is really just a transition\n      // into the route you're already on.\n      let {\n        routeInfos\n      } = this.state;\n      intent = new NamedTransitionIntent(this, routeInfos[routeInfos.length - 1].name, undefined, [], queryParams);\n    } else if (name.charAt(0) === '/') {\n      log(this, 'Attempting URL transition to ' + name);\n      intent = new URLTransitionIntent(this, name);\n    } else {\n      log(this, 'Attempting transition to ' + name);\n      intent = new NamedTransitionIntent(this, name, undefined,\n      // SAFETY: We know this to be the case since we removed the last item if it was QPs\n      modelsArray, queryParams);\n    }\n    return this.transitionByIntent(intent, isIntermediate);\n  }\n  /**\n  @private\n     Updates the URL (if necessary) and calls `setupContexts`\n  to update the router's array of `currentRouteInfos`.\n  */\n  finalizeTransition(transition, newState) {\n    try {\n      log(transition.router, transition.sequence, 'Resolved all models on destination route; finalizing transition.');\n      let routeInfos = newState.routeInfos;\n      // Run all the necessary enter/setup/exit hooks\n      this.setupContexts(newState, transition);\n      // Check if a redirect occurred in enter/setup\n      if (transition.isAborted) {\n        // TODO: cleaner way? distinguish b/w targetRouteInfos?\n        this.state.routeInfos = this.currentRouteInfos;\n        return Promise$1.reject(logAbort(transition));\n      }\n      this._updateURL(transition, newState);\n      transition.isActive = false;\n      this.activeTransition = undefined;\n      this.triggerEvent(this.currentRouteInfos, true, 'didTransition', []);\n      this.didTransition(this.currentRouteInfos);\n      this.toInfos(transition, newState.routeInfos, true);\n      this.routeDidChange(transition);\n      log(this, transition.sequence, 'TRANSITION COMPLETE.');\n      // Resolve with the final route.\n      return routeInfos[routeInfos.length - 1].route;\n    } catch (e) {\n      if (!isTransitionAborted(e)) {\n        let infos = transition[STATE_SYMBOL].routeInfos;\n        transition.trigger(true, 'error', e, transition, infos[infos.length - 1].route);\n        transition.abort();\n      }\n      throw e;\n    }\n  }\n  /**\n  @private\n     Takes an Array of `RouteInfo`s, figures out which ones are\n  exiting, entering, or changing contexts, and calls the\n  proper route hooks.\n     For example, consider the following tree of routes. Each route is\n  followed by the URL segment it handles.\n     ```\n  |~index (\"/\")\n  | |~posts (\"/posts\")\n  | | |-showPost (\"/:id\")\n  | | |-newPost (\"/new\")\n  | | |-editPost (\"/edit\")\n  | |~about (\"/about/:id\")\n  ```\n     Consider the following transitions:\n     1. A URL transition to `/posts/1`.\n     1. Triggers the `*model` callbacks on the\n        `index`, `posts`, and `showPost` routes\n     2. Triggers the `enter` callback on the same\n     3. Triggers the `setup` callback on the same\n  2. A direct transition to `newPost`\n     1. Triggers the `exit` callback on `showPost`\n     2. Triggers the `enter` callback on `newPost`\n     3. Triggers the `setup` callback on `newPost`\n  3. A direct transition to `about` with a specified\n     context object\n     1. Triggers the `exit` callback on `newPost`\n        and `posts`\n     2. Triggers the `serialize` callback on `about`\n     3. Triggers the `enter` callback on `about`\n     4. Triggers the `setup` callback on `about`\n     @param {Router} transition\n  @param {TransitionState} newState\n  */\n  setupContexts(newState, transition) {\n    let partition = this.partitionRoutes(this.state, newState);\n    let i, l, route;\n    for (i = 0, l = partition.exited.length; i < l; i++) {\n      route = partition.exited[i].route;\n      delete route.context;\n      if (route !== undefined) {\n        if (route._internalReset !== undefined) {\n          route._internalReset(true, transition);\n        }\n        if (route.exit !== undefined) {\n          route.exit(transition);\n        }\n      }\n    }\n    let oldState = this.oldState = this.state;\n    this.state = newState;\n    let currentRouteInfos = this.currentRouteInfos = partition.unchanged.slice();\n    try {\n      for (i = 0, l = partition.reset.length; i < l; i++) {\n        route = partition.reset[i].route;\n        if (route !== undefined) {\n          if (route._internalReset !== undefined) {\n            route._internalReset(false, transition);\n          }\n        }\n      }\n      for (i = 0, l = partition.updatedContext.length; i < l; i++) {\n        this.routeEnteredOrUpdated(currentRouteInfos, partition.updatedContext[i], false, transition);\n      }\n      for (i = 0, l = partition.entered.length; i < l; i++) {\n        this.routeEnteredOrUpdated(currentRouteInfos, partition.entered[i], true, transition);\n      }\n    } catch (e) {\n      this.state = oldState;\n      this.currentRouteInfos = oldState.routeInfos;\n      throw e;\n    }\n    this.state.queryParams = this.finalizeQueryParamChange(currentRouteInfos, newState.queryParams, transition);\n  }\n  /**\n  @private\n     Fires queryParamsDidChange event\n  */\n  fireQueryParamDidChange(newState, queryParamChangelist) {\n    // If queryParams changed trigger event\n    if (queryParamChangelist) {\n      // This is a little hacky but we need some way of storing\n      // changed query params given that no activeTransition\n      // is guaranteed to have occurred.\n      this._changedQueryParams = queryParamChangelist.all;\n      this.triggerEvent(newState.routeInfos, true, 'queryParamsDidChange', [queryParamChangelist.changed, queryParamChangelist.all, queryParamChangelist.removed]);\n      this._changedQueryParams = undefined;\n    }\n  }\n  /**\n  @private\n     Helper method used by setupContexts. Handles errors or redirects\n  that may happen in enter/setup.\n  */\n  routeEnteredOrUpdated(currentRouteInfos, routeInfo, enter, transition) {\n    let route = routeInfo.route,\n      context = routeInfo.context;\n    function _routeEnteredOrUpdated(route) {\n      if (enter) {\n        if (route.enter !== undefined) {\n          route.enter(transition);\n        }\n      }\n      throwIfAborted(transition);\n      route.context = context;\n      if (route.contextDidChange !== undefined) {\n        route.contextDidChange();\n      }\n      if (route.setup !== undefined) {\n        route.setup(context, transition);\n      }\n      throwIfAborted(transition);\n      currentRouteInfos.push(routeInfo);\n      return route;\n    }\n    // If the route doesn't exist, it means we haven't resolved the route promise yet\n    if (route === undefined) {\n      routeInfo.routePromise = routeInfo.routePromise.then(_routeEnteredOrUpdated);\n    } else {\n      _routeEnteredOrUpdated(route);\n    }\n    return true;\n  }\n  /**\n  @private\n     This function is called when transitioning from one URL to\n  another to determine which routes are no longer active,\n  which routes are newly active, and which routes remain\n  active but have their context changed.\n     Take a list of old routes and new routes and partition\n  them into four buckets:\n     * unchanged: the route was active in both the old and\n    new URL, and its context remains the same\n  * updated context: the route was active in both the\n    old and new URL, but its context changed. The route's\n    `setup` method, if any, will be called with the new\n    context.\n  * exited: the route was active in the old URL, but is\n    no longer active.\n  * entered: the route was not active in the old URL, but\n    is now active.\n     The PartitionedRoutes structure has four fields:\n     * `updatedContext`: a list of `RouteInfo` objects that\n    represent routes that remain active but have a changed\n    context\n  * `entered`: a list of `RouteInfo` objects that represent\n    routes that are newly active\n  * `exited`: a list of `RouteInfo` objects that are no\n    longer active.\n  * `unchanged`: a list of `RouteInfo` objects that remain active.\n     @param {Array[InternalRouteInfo]} oldRoutes a list of the route\n    information for the previous URL (or `[]` if this is the\n    first handled transition)\n  @param {Array[InternalRouteInfo]} newRoutes a list of the route\n    information for the new URL\n     @return {Partition}\n  */\n  partitionRoutes(oldState, newState) {\n    let oldRouteInfos = oldState.routeInfos;\n    let newRouteInfos = newState.routeInfos;\n    let routes = {\n      updatedContext: [],\n      exited: [],\n      entered: [],\n      unchanged: [],\n      reset: []\n    };\n    let routeChanged,\n      contextChanged = false,\n      i,\n      l;\n    for (i = 0, l = newRouteInfos.length; i < l; i++) {\n      let oldRouteInfo = oldRouteInfos[i],\n        newRouteInfo = newRouteInfos[i];\n      if (!oldRouteInfo || oldRouteInfo.route !== newRouteInfo.route) {\n        routeChanged = true;\n      }\n      if (routeChanged) {\n        routes.entered.push(newRouteInfo);\n        if (oldRouteInfo) {\n          routes.exited.unshift(oldRouteInfo);\n        }\n      } else if (contextChanged || oldRouteInfo.context !== newRouteInfo.context) {\n        contextChanged = true;\n        routes.updatedContext.push(newRouteInfo);\n      } else {\n        routes.unchanged.push(oldRouteInfo);\n      }\n    }\n    for (i = newRouteInfos.length, l = oldRouteInfos.length; i < l; i++) {\n      routes.exited.unshift(oldRouteInfos[i]);\n    }\n    routes.reset = routes.updatedContext.slice();\n    routes.reset.reverse();\n    return routes;\n  }\n  _updateURL(transition, state) {\n    let urlMethod = transition.urlMethod;\n    if (!urlMethod) {\n      return;\n    }\n    let {\n      routeInfos\n    } = state;\n    let {\n      name: routeName\n    } = routeInfos[routeInfos.length - 1];\n    let params = {};\n    for (let i = routeInfos.length - 1; i >= 0; --i) {\n      let routeInfo = routeInfos[i];\n      merge(params, routeInfo.params);\n      if (routeInfo.route.inaccessibleByURL) {\n        urlMethod = null;\n      }\n    }\n    if (urlMethod) {\n      params.queryParams = transition._visibleQueryParams || state.queryParams;\n      let url = this.recognizer.generate(routeName, params);\n      // transitions during the initial transition must always use replaceURL.\n      // When the app boots, you are at a url, e.g. /foo. If some route\n      // redirects to bar as part of the initial transition, you don't want to\n      // add a history entry for /foo. If you do, pressing back will immediately\n      // hit the redirect again and take you back to /bar, thus killing the back\n      // button\n      let initial = transition.isCausedByInitialTransition;\n      // say you are at / and you click a link to route /foo. In /foo's\n      // route, the transition is aborted using replaceWith('/bar').\n      // Because the current url is still /, the history entry for / is\n      // removed from the history. Clicking back will take you to the page\n      // you were on before /, which is often not even the app, thus killing\n      // the back button. That's why updateURL is always correct for an\n      // aborting transition that's not the initial transition\n      let replaceAndNotAborting = urlMethod === 'replace' && !transition.isCausedByAbortingTransition;\n      // because calling refresh causes an aborted transition, this needs to be\n      // special cased - if the initial transition is a replace transition, the\n      // urlMethod should be honored here.\n      let isQueryParamsRefreshTransition = transition.queryParamsOnly && urlMethod === 'replace';\n      // say you are at / and you a `replaceWith(/foo)` is called. Then, that\n      // transition is aborted with `replaceWith(/bar)`. At the end, we should\n      // end up with /bar replacing /. We are replacing the replace. We only\n      // will replace the initial route if all subsequent aborts are also\n      // replaces. However, there is some ambiguity around the correct behavior\n      // here.\n      let replacingReplace = urlMethod === 'replace' && transition.isCausedByAbortingReplaceTransition;\n      if (initial || replaceAndNotAborting || isQueryParamsRefreshTransition || replacingReplace) {\n        this.replaceURL(url);\n      } else {\n        this.updateURL(url);\n      }\n    }\n  }\n  finalizeQueryParamChange(resolvedHandlers, newQueryParams, transition) {\n    // We fire a finalizeQueryParamChange event which\n    // gives the new route hierarchy a chance to tell\n    // us which query params it's consuming and what\n    // their final values are. If a query param is\n    // no longer consumed in the final route hierarchy,\n    // its serialized segment will be removed\n    // from the URL.\n    for (let k in newQueryParams) {\n      if (newQueryParams.hasOwnProperty(k) && newQueryParams[k] === null) {\n        delete newQueryParams[k];\n      }\n    }\n    let finalQueryParamsArray = [];\n    this.triggerEvent(resolvedHandlers, true, 'finalizeQueryParamChange', [newQueryParams, finalQueryParamsArray, transition]);\n    if (transition) {\n      transition._visibleQueryParams = {};\n    }\n    let finalQueryParams = {};\n    for (let i = 0, len = finalQueryParamsArray.length; i < len; ++i) {\n      let qp = finalQueryParamsArray[i];\n      finalQueryParams[qp.key] = qp.value;\n      if (transition && qp.visible !== false) {\n        transition._visibleQueryParams[qp.key] = qp.value;\n      }\n    }\n    return finalQueryParams;\n  }\n  toReadOnlyInfos(newTransition, newState) {\n    let oldRouteInfos = this.state.routeInfos;\n    this.fromInfos(newTransition, oldRouteInfos);\n    this.toInfos(newTransition, newState.routeInfos);\n    this._lastQueryParams = newState.queryParams;\n  }\n  fromInfos(newTransition, oldRouteInfos) {\n    if (newTransition !== undefined && oldRouteInfos.length > 0) {\n      let fromInfos = toReadOnlyRouteInfo(oldRouteInfos, Object.assign({}, this._lastQueryParams), {\n        includeAttributes: true,\n        localizeMapUpdates: false\n      });\n      newTransition.from = fromInfos[fromInfos.length - 1] || null;\n    }\n  }\n  toInfos(newTransition, newRouteInfos, includeAttributes = false) {\n    if (newTransition !== undefined && newRouteInfos.length > 0) {\n      let toInfos = toReadOnlyRouteInfo(newRouteInfos, Object.assign({}, newTransition[QUERY_PARAMS_SYMBOL]), {\n        includeAttributes,\n        localizeMapUpdates: false\n      });\n      newTransition.to = toInfos[toInfos.length - 1] || null;\n    }\n  }\n  notifyExistingHandlers(newState, newTransition) {\n    let oldRouteInfos = this.state.routeInfos,\n      i,\n      oldRouteInfoLen,\n      oldHandler,\n      newRouteInfo;\n    oldRouteInfoLen = oldRouteInfos.length;\n    for (i = 0; i < oldRouteInfoLen; i++) {\n      oldHandler = oldRouteInfos[i];\n      newRouteInfo = newState.routeInfos[i];\n      if (!newRouteInfo || oldHandler.name !== newRouteInfo.name) {\n        break;\n      }\n      if (!newRouteInfo.isResolved) ;\n    }\n    this.triggerEvent(oldRouteInfos, true, 'willTransition', [newTransition]);\n    this.routeWillChange(newTransition);\n    this.willTransition(oldRouteInfos, newState.routeInfos, newTransition);\n  }\n  /**\n    Clears the current and target route routes and triggers exit\n    on each of them starting at the leaf and traversing up through\n    its ancestors.\n  */\n  reset() {\n    if (this.state) {\n      forEach(this.state.routeInfos.slice().reverse(), function (routeInfo) {\n        let route = routeInfo.route;\n        if (route !== undefined) {\n          if (route.exit !== undefined) {\n            route.exit();\n          }\n        }\n        return true;\n      });\n    }\n    this.oldState = undefined;\n    this.state = new TransitionState();\n    this.currentRouteInfos = undefined;\n  }\n  /**\n    let handler = routeInfo.handler;\n    The entry point for handling a change to the URL (usually\n    via the back and forward button).\n       Returns an Array of handlers and the parameters associated\n    with those parameters.\n       @param {String} url a URL to process\n       @return {Array} an Array of `[handler, parameter]` tuples\n  */\n  handleURL(url) {\n    // Perform a URL-based transition, but don't change\n    // the URL afterward, since it already happened.\n    if (url.charAt(0) !== '/') {\n      url = '/' + url;\n    }\n    return this.doTransition(url).method(null);\n  }\n  /**\n    Transition into the specified named route.\n       If necessary, trigger the exit callback on any routes\n    that are no longer represented by the target route.\n       @param {String} name the name of the route\n  */\n  transitionTo(name, ...contexts) {\n    if (typeof name === 'object') {\n      contexts.push(name);\n      return this.doTransition(undefined, contexts, false);\n    }\n    return this.doTransition(name, contexts);\n  }\n  intermediateTransitionTo(name, ...args) {\n    return this.doTransition(name, args, true);\n  }\n  refresh(pivotRoute) {\n    let previousTransition = this.activeTransition;\n    let state = previousTransition ? previousTransition[STATE_SYMBOL] : this.state;\n    let routeInfos = state.routeInfos;\n    if (pivotRoute === undefined) {\n      pivotRoute = routeInfos[0].route;\n    }\n    log(this, 'Starting a refresh transition');\n    let name = routeInfos[routeInfos.length - 1].name;\n    let intent = new NamedTransitionIntent(this, name, pivotRoute, [], this._changedQueryParams || state.queryParams);\n    let newTransition = this.transitionByIntent(intent, false);\n    // if the previous transition is a replace transition, that needs to be preserved\n    if (previousTransition && previousTransition.urlMethod === 'replace') {\n      newTransition.method(previousTransition.urlMethod);\n    }\n    return newTransition;\n  }\n  /**\n    Identical to `transitionTo` except that the current URL will be replaced\n    if possible.\n       This method is intended primarily for use with `replaceState`.\n       @param {String} name the name of the route\n  */\n  replaceWith(name) {\n    return this.doTransition(name).method('replace');\n  }\n  /**\n    Take a named route and context objects and generate a\n    URL.\n       @param {String} name the name of the route to generate\n      a URL for\n    @param {...Object} objects a list of objects to serialize\n       @return {String} a URL\n  */\n  generate(routeName, ...args) {\n    let partitionedArgs = extractQueryParams(args),\n      suppliedParams = partitionedArgs[0],\n      queryParams = partitionedArgs[1];\n    // Construct a TransitionIntent with the provided params\n    // and apply it to the present state of the router.\n    let intent = new NamedTransitionIntent(this, routeName, undefined, suppliedParams);\n    let state = intent.applyToState(this.state, false);\n    let params = {};\n    for (let i = 0, len = state.routeInfos.length; i < len; ++i) {\n      let routeInfo = state.routeInfos[i];\n      let routeParams = routeInfo.serialize();\n      merge(params, routeParams);\n    }\n    params.queryParams = queryParams;\n    return this.recognizer.generate(routeName, params);\n  }\n  applyIntent(routeName, contexts) {\n    let intent = new NamedTransitionIntent(this, routeName, undefined, contexts);\n    let state = this.activeTransition && this.activeTransition[STATE_SYMBOL] || this.state;\n    return intent.applyToState(state, false);\n  }\n  isActiveIntent(routeName, contexts, queryParams, _state) {\n    let state = _state || this.state,\n      targetRouteInfos = state.routeInfos,\n      routeInfo,\n      len;\n    if (!targetRouteInfos.length) {\n      return false;\n    }\n    let targetHandler = targetRouteInfos[targetRouteInfos.length - 1].name;\n    let recognizerHandlers = this.recognizer.handlersFor(targetHandler);\n    let index = 0;\n    for (len = recognizerHandlers.length; index < len; ++index) {\n      routeInfo = targetRouteInfos[index];\n      if (routeInfo.name === routeName) {\n        break;\n      }\n    }\n    if (index === recognizerHandlers.length) {\n      // The provided route name isn't even in the route hierarchy.\n      return false;\n    }\n    let testState = new TransitionState();\n    testState.routeInfos = targetRouteInfos.slice(0, index + 1);\n    recognizerHandlers = recognizerHandlers.slice(0, index + 1);\n    let intent = new NamedTransitionIntent(this, targetHandler, undefined, contexts);\n    let newState = intent.applyToHandlers(testState, recognizerHandlers, targetHandler, true, true);\n    let routesEqual = routeInfosEqual(newState.routeInfos, testState.routeInfos);\n    if (!queryParams || !routesEqual) {\n      return routesEqual;\n    }\n    // Get a hash of QPs that will still be active on new route\n    let activeQPsOnNewHandler = {};\n    merge(activeQPsOnNewHandler, queryParams);\n    let activeQueryParams = state.queryParams;\n    for (let key in activeQueryParams) {\n      if (activeQueryParams.hasOwnProperty(key) && activeQPsOnNewHandler.hasOwnProperty(key)) {\n        activeQPsOnNewHandler[key] = activeQueryParams[key];\n      }\n    }\n    return routesEqual && !getChangelist(activeQPsOnNewHandler, queryParams);\n  }\n  isActive(routeName, ...args) {\n    let [contexts, queryParams] = extractQueryParams(args);\n    return this.isActiveIntent(routeName, contexts, queryParams);\n  }\n  trigger(name, ...args) {\n    this.triggerEvent(this.currentRouteInfos, false, name, args);\n  }\n}\nfunction routeInfosEqual(routeInfos, otherRouteInfos) {\n  if (routeInfos.length !== otherRouteInfos.length) {\n    return false;\n  }\n  for (let i = 0, len = routeInfos.length; i < len; ++i) {\n    // SAFETY: Just casting for comparison\n    if (routeInfos[i] !== otherRouteInfos[i]) {\n      return false;\n    }\n  }\n  return true;\n}\nfunction routeInfosSameExceptQueryParams(routeInfos, otherRouteInfos) {\n  if (routeInfos.length !== otherRouteInfos.length) {\n    return false;\n  }\n  for (let i = 0, len = routeInfos.length; i < len; ++i) {\n    if (routeInfos[i].name !== otherRouteInfos[i].name) {\n      return false;\n    }\n    if (!paramsEqual(routeInfos[i].params, otherRouteInfos[i].params)) {\n      return false;\n    }\n  }\n  return true;\n}\nfunction paramsEqual(params, otherParams) {\n  if (params === otherParams) {\n    // Both identical or both undefined\n    return true;\n  }\n  if (!params || !otherParams) {\n    // One is falsy but other is not\n    return false;\n  }\n  let keys = Object.keys(params);\n  let otherKeys = Object.keys(otherParams);\n  if (keys.length !== otherKeys.length) {\n    return false;\n  }\n  for (let i = 0, len = keys.length; i < len; ++i) {\n    let key = keys[i];\n    if (params[key] !== otherParams[key]) {\n      return false;\n    }\n  }\n  return true;\n}\n\nexport { InternalRouteInfo as I, Router as R, TransitionError as T, TransitionState as a };\n","function callbacksFor(object) {\n  let callbacks = object._promiseCallbacks;\n  if (!callbacks) {\n    callbacks = object._promiseCallbacks = {};\n  }\n  return callbacks;\n}\n\n/**\n  @class EventTarget\n  @for rsvp\n  @public\n*/\nconst EventTarget = {\n  /**\n    `EventTarget.mixin` extends an object with EventTarget methods. For\n    Example:\n     ```javascript\n    import EventTarget from 'rsvp';\n     let object = {};\n     EventTarget.mixin(object);\n     object.on('finished', function(event) {\n      // handle event\n    });\n     object.trigger('finished', { detail: value });\n    ```\n     `EventTarget.mixin` also works with prototypes:\n     ```javascript\n    import EventTarget from 'rsvp';\n     let Person = function() {};\n    EventTarget.mixin(Person.prototype);\n     let yehuda = new Person();\n    let tom = new Person();\n     yehuda.on('poke', function(event) {\n      console.log('Yehuda says OW');\n    });\n     tom.on('poke', function(event) {\n      console.log('Tom says OW');\n    });\n     yehuda.trigger('poke');\n    tom.trigger('poke');\n    ```\n     @method mixin\n    @for rsvp\n    @private\n    @param {Object} object object to extend with EventTarget methods\n  */\n  mixin(object) {\n    object.on = this.on;\n    object.off = this.off;\n    object.trigger = this.trigger;\n    object._promiseCallbacks = undefined;\n    return object;\n  },\n  /**\n    Registers a callback to be executed when `eventName` is triggered\n     ```javascript\n    object.on('event', function(eventInfo){\n      // handle the event\n    });\n     object.trigger('event');\n    ```\n     @method on\n    @for EventTarget\n    @private\n    @param {String} eventName name of the event to listen for\n    @param {Function} callback function to be called when the event is triggered.\n  */\n  on(eventName, callback) {\n    if (typeof callback !== 'function') {\n      throw new TypeError('Callback must be a function');\n    }\n    let allCallbacks = callbacksFor(this);\n    let callbacks = allCallbacks[eventName];\n    if (!callbacks) {\n      callbacks = allCallbacks[eventName] = [];\n    }\n    if (callbacks.indexOf(callback) === -1) {\n      callbacks.push(callback);\n    }\n  },\n  /**\n    You can use `off` to stop firing a particular callback for an event:\n     ```javascript\n    function doStuff() { // do stuff! }\n    object.on('stuff', doStuff);\n     object.trigger('stuff'); // doStuff will be called\n     // Unregister ONLY the doStuff callback\n    object.off('stuff', doStuff);\n    object.trigger('stuff'); // doStuff will NOT be called\n    ```\n     If you don't pass a `callback` argument to `off`, ALL callbacks for the\n    event will not be executed when the event fires. For example:\n     ```javascript\n    let callback1 = function(){};\n    let callback2 = function(){};\n     object.on('stuff', callback1);\n    object.on('stuff', callback2);\n     object.trigger('stuff'); // callback1 and callback2 will be executed.\n     object.off('stuff');\n    object.trigger('stuff'); // callback1 and callback2 will not be executed!\n    ```\n     @method off\n    @for rsvp\n    @private\n    @param {String} eventName event to stop listening to\n    @param {Function} [callback] optional argument. If given, only the function\n    given will be removed from the event's callback queue. If no `callback`\n    argument is given, all callbacks will be removed from the event's callback\n    queue.\n  */\n  off(eventName, callback) {\n    let allCallbacks = callbacksFor(this);\n    if (!callback) {\n      allCallbacks[eventName] = [];\n      return;\n    }\n    let callbacks = allCallbacks[eventName];\n    let index = callbacks.indexOf(callback);\n    if (index !== -1) {\n      callbacks.splice(index, 1);\n    }\n  },\n  /**\n    Use `trigger` to fire custom events. For example:\n     ```javascript\n    object.on('foo', function(){\n      console.log('foo event happened!');\n    });\n    object.trigger('foo');\n    // 'foo event happened!' logged to the console\n    ```\n     You can also pass a value as a second argument to `trigger` that will be\n    passed as an argument to all event listeners for the event:\n     ```javascript\n    object.on('foo', function(value){\n      console.log(value.name);\n    });\n     object.trigger('foo', { name: 'bar' });\n    // 'bar' logged to the console\n    ```\n     @method trigger\n    @for rsvp\n    @private\n    @param {String} eventName name of the event to be triggered\n    @param {*} [options] optional value to be passed to any event handlers for\n    the given `eventName`\n  */\n  trigger(eventName, options, label) {\n    let allCallbacks = callbacksFor(this);\n    let callbacks = allCallbacks[eventName];\n    if (callbacks) {\n      // Don't cache the callbacks.length since it may grow\n      let callback;\n      for (let i = 0; i < callbacks.length; i++) {\n        callback = callbacks[i];\n        callback(options, label);\n      }\n    }\n  }\n};\n\nconst config = {\n  instrument: false\n};\nEventTarget['mixin'](config);\nfunction configure(name, value) {\n  if (arguments.length === 2) {\n    config[name] = value;\n  } else {\n    return config[name];\n  }\n}\n\nconst queue$1 = [];\nfunction scheduleFlush$1() {\n  setTimeout(() => {\n    for (let i = 0; i < queue$1.length; i++) {\n      let entry = queue$1[i];\n      let payload = entry.payload;\n      payload.guid = payload.key + payload.id;\n      payload.childGuid = payload.key + payload.childId;\n      if (payload.error) {\n        payload.stack = payload.error.stack;\n      }\n      config['trigger'](entry.name, entry.payload);\n    }\n    queue$1.length = 0;\n  }, 50);\n}\nfunction instrument(eventName, promise, child) {\n  if (1 === queue$1.push({\n    name: eventName,\n    payload: {\n      key: promise._guidKey,\n      id: promise._id,\n      eventName: eventName,\n      detail: promise._result,\n      childId: child && child._id,\n      label: promise._label,\n      timeStamp: Date.now(),\n      error: config[\"instrument-with-stack\"] ? new Error(promise._label) : null\n    }\n  })) {\n    scheduleFlush$1();\n  }\n}\n\n/**\n  `Promise.resolve` returns a promise that will become resolved with the\n  passed `value`. It is shorthand for the following:\n\n  ```javascript\n  import Promise from 'rsvp';\n\n  let promise = new Promise(function(resolve, reject){\n    resolve(1);\n  });\n\n  promise.then(function(value){\n    // value === 1\n  });\n  ```\n\n  Instead of writing the above, your code now simply becomes the following:\n\n  ```javascript\n  import Promise from 'rsvp';\n\n  let promise = RSVP.Promise.resolve(1);\n\n  promise.then(function(value){\n    // value === 1\n  });\n  ```\n\n  @method resolve\n  @for Promise\n  @static\n  @param {*} object value that the returned promise will be resolved with\n  @param {String} [label] optional string for identifying the returned promise.\n  Useful for tooling.\n  @return {Promise} a promise that will become fulfilled with the given\n  `value`\n*/\nfunction resolve$2(object, label) {\n  /*jshint validthis:true */\n  let Constructor = this;\n  if (object && typeof object === 'object' && object.constructor === Constructor) {\n    return object;\n  }\n  let promise = new Constructor(noop, label);\n  resolve$1(promise, object);\n  return promise;\n}\n\nfunction withOwnPromise() {\n  return new TypeError('A promises callback cannot return that same promise.');\n}\nfunction objectOrFunction(x) {\n  let type = typeof x;\n  return x !== null && (type === 'object' || type === 'function');\n}\nfunction noop() {}\nconst PENDING = void 0;\nconst FULFILLED = 1;\nconst REJECTED = 2;\nfunction tryThen(then, value, fulfillmentHandler, rejectionHandler) {\n  try {\n    then.call(value, fulfillmentHandler, rejectionHandler);\n  } catch (e) {\n    return e;\n  }\n}\nfunction handleForeignThenable(promise, thenable, then) {\n  config.async(promise => {\n    let sealed = false;\n    let error = tryThen(then, thenable, value => {\n      if (sealed) {\n        return;\n      }\n      sealed = true;\n      if (thenable === value) {\n        fulfill(promise, value);\n      } else {\n        resolve$1(promise, value);\n      }\n    }, reason => {\n      if (sealed) {\n        return;\n      }\n      sealed = true;\n      reject$2(promise, reason);\n    }, 'Settle: ' + (promise._label || ' unknown promise'));\n    if (!sealed && error) {\n      sealed = true;\n      reject$2(promise, error);\n    }\n  }, promise);\n}\nfunction handleOwnThenable(promise, thenable) {\n  if (thenable._state === FULFILLED) {\n    fulfill(promise, thenable._result);\n  } else if (thenable._state === REJECTED) {\n    thenable._onError = null;\n    reject$2(promise, thenable._result);\n  } else {\n    subscribe(thenable, undefined, value => {\n      if (thenable === value) {\n        fulfill(promise, value);\n      } else {\n        resolve$1(promise, value);\n      }\n    }, reason => reject$2(promise, reason));\n  }\n}\nfunction handleMaybeThenable(promise, maybeThenable, then$1) {\n  let isOwnThenable = maybeThenable.constructor === promise.constructor && then$1 === then && promise.constructor.resolve === resolve$2;\n  if (isOwnThenable) {\n    handleOwnThenable(promise, maybeThenable);\n  } else if (typeof then$1 === 'function') {\n    handleForeignThenable(promise, maybeThenable, then$1);\n  } else {\n    fulfill(promise, maybeThenable);\n  }\n}\nfunction resolve$1(promise, value) {\n  if (promise === value) {\n    fulfill(promise, value);\n  } else if (objectOrFunction(value)) {\n    let then;\n    try {\n      then = value.then;\n    } catch (error) {\n      reject$2(promise, error);\n      return;\n    }\n    handleMaybeThenable(promise, value, then);\n  } else {\n    fulfill(promise, value);\n  }\n}\nfunction publishRejection(promise) {\n  if (promise._onError) {\n    promise._onError(promise._result);\n  }\n  publish(promise);\n}\nfunction fulfill(promise, value) {\n  if (promise._state !== PENDING) {\n    return;\n  }\n  promise._result = value;\n  promise._state = FULFILLED;\n  if (promise._subscribers.length === 0) {\n    if (config.instrument) {\n      instrument('fulfilled', promise);\n    }\n  } else {\n    config.async(publish, promise);\n  }\n}\nfunction reject$2(promise, reason) {\n  if (promise._state !== PENDING) {\n    return;\n  }\n  promise._state = REJECTED;\n  promise._result = reason;\n  config.async(publishRejection, promise);\n}\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n  let subscribers = parent._subscribers;\n  let length = subscribers.length;\n  parent._onError = null;\n  subscribers[length] = child;\n  subscribers[length + FULFILLED] = onFulfillment;\n  subscribers[length + REJECTED] = onRejection;\n  if (length === 0 && parent._state) {\n    config.async(publish, parent);\n  }\n}\nfunction publish(promise) {\n  let subscribers = promise._subscribers;\n  let settled = promise._state;\n  if (config.instrument) {\n    instrument(settled === FULFILLED ? 'fulfilled' : 'rejected', promise);\n  }\n  if (subscribers.length === 0) {\n    return;\n  }\n  let child,\n    callback,\n    result = promise._result;\n  for (let i = 0; i < subscribers.length; i += 3) {\n    child = subscribers[i];\n    callback = subscribers[i + settled];\n    if (child) {\n      invokeCallback(settled, child, callback, result);\n    } else {\n      callback(result);\n    }\n  }\n  promise._subscribers.length = 0;\n}\nfunction invokeCallback(state, promise, callback, result) {\n  let hasCallback = typeof callback === 'function';\n  let value,\n    succeeded = true,\n    error;\n  if (hasCallback) {\n    try {\n      value = callback(result);\n    } catch (e) {\n      succeeded = false;\n      error = e;\n    }\n  } else {\n    value = result;\n  }\n  if (promise._state !== PENDING) ; else if (value === promise) {\n    reject$2(promise, withOwnPromise());\n  } else if (succeeded === false) {\n    reject$2(promise, error);\n  } else if (hasCallback) {\n    resolve$1(promise, value);\n  } else if (state === FULFILLED) {\n    fulfill(promise, value);\n  } else if (state === REJECTED) {\n    reject$2(promise, value);\n  }\n}\nfunction initializePromise(promise, resolver) {\n  let resolved = false;\n  try {\n    resolver(value => {\n      if (resolved) {\n        return;\n      }\n      resolved = true;\n      resolve$1(promise, value);\n    }, reason => {\n      if (resolved) {\n        return;\n      }\n      resolved = true;\n      reject$2(promise, reason);\n    });\n  } catch (e) {\n    reject$2(promise, e);\n  }\n}\n\nfunction then(onFulfillment, onRejection, label) {\n  let parent = this;\n  let state = parent._state;\n  if (state === FULFILLED && !onFulfillment || state === REJECTED && !onRejection) {\n    config.instrument && instrument('chained', parent, parent);\n    return parent;\n  }\n  parent._onError = null;\n  let child = new parent.constructor(noop, label);\n  let result = parent._result;\n  config.instrument && instrument('chained', parent, child);\n  if (state === PENDING) {\n    subscribe(parent, child, onFulfillment, onRejection);\n  } else {\n    let callback = state === FULFILLED ? onFulfillment : onRejection;\n    config.async(() => invokeCallback(state, child, callback, result));\n  }\n  return child;\n}\n\nclass Enumerator {\n  constructor(Constructor, input, abortOnReject, label) {\n    this._instanceConstructor = Constructor;\n    this.promise = new Constructor(noop, label);\n    this._abortOnReject = abortOnReject;\n    this._isUsingOwnPromise = Constructor === Promise$1;\n    this._isUsingOwnResolve = Constructor.resolve === resolve$2;\n    this._init(...arguments);\n  }\n  _init(Constructor, input) {\n    let len = input.length || 0;\n    this.length = len;\n    this._remaining = len;\n    this._result = new Array(len);\n    this._enumerate(input);\n  }\n  _enumerate(input) {\n    let length = this.length;\n    let promise = this.promise;\n    for (let i = 0; promise._state === PENDING && i < length; i++) {\n      this._eachEntry(input[i], i, true);\n    }\n    this._checkFullfillment();\n  }\n  _checkFullfillment() {\n    if (this._remaining === 0) {\n      let result = this._result;\n      fulfill(this.promise, result);\n      this._result = null;\n    }\n  }\n  _settleMaybeThenable(entry, i, firstPass) {\n    let c = this._instanceConstructor;\n    if (this._isUsingOwnResolve) {\n      let then$1,\n        error,\n        succeeded = true;\n      try {\n        then$1 = entry.then;\n      } catch (e) {\n        succeeded = false;\n        error = e;\n      }\n      if (then$1 === then && entry._state !== PENDING) {\n        entry._onError = null;\n        this._settledAt(entry._state, i, entry._result, firstPass);\n      } else if (typeof then$1 !== 'function') {\n        this._settledAt(FULFILLED, i, entry, firstPass);\n      } else if (this._isUsingOwnPromise) {\n        let promise = new c(noop);\n        if (succeeded === false) {\n          reject$2(promise, error);\n        } else {\n          handleMaybeThenable(promise, entry, then$1);\n          this._willSettleAt(promise, i, firstPass);\n        }\n      } else {\n        this._willSettleAt(new c(resolve => resolve(entry)), i, firstPass);\n      }\n    } else {\n      this._willSettleAt(c.resolve(entry), i, firstPass);\n    }\n  }\n  _eachEntry(entry, i, firstPass) {\n    if (entry !== null && typeof entry === 'object') {\n      this._settleMaybeThenable(entry, i, firstPass);\n    } else {\n      this._setResultAt(FULFILLED, i, entry, firstPass);\n    }\n  }\n  _settledAt(state, i, value, firstPass) {\n    let promise = this.promise;\n    if (promise._state === PENDING) {\n      if (this._abortOnReject && state === REJECTED) {\n        reject$2(promise, value);\n      } else {\n        this._setResultAt(state, i, value, firstPass);\n        this._checkFullfillment();\n      }\n    }\n  }\n  _setResultAt(state, i, value, firstPass) {\n    this._remaining--;\n    this._result[i] = value;\n  }\n  _willSettleAt(promise, i, firstPass) {\n    subscribe(promise, undefined, value => this._settledAt(FULFILLED, i, value, firstPass), reason => this._settledAt(REJECTED, i, reason, firstPass));\n  }\n}\nfunction setSettledResult(state, i, value) {\n  this._remaining--;\n  if (state === FULFILLED) {\n    this._result[i] = {\n      state: 'fulfilled',\n      value: value\n    };\n  } else {\n    this._result[i] = {\n      state: 'rejected',\n      reason: value\n    };\n  }\n}\n\n/**\n  `Promise.all` accepts an array of promises, and returns a new promise which\n  is fulfilled with an array of fulfillment values for the passed promises, or\n  rejected with the reason of the first passed promise to be rejected. It casts all\n  elements of the passed iterable to promises as it runs this algorithm.\n\n  Example:\n\n  ```javascript\n  import Promise, { resolve } from 'rsvp';\n\n  let promise1 = resolve(1);\n  let promise2 = resolve(2);\n  let promise3 = resolve(3);\n  let promises = [ promise1, promise2, promise3 ];\n\n  Promise.all(promises).then(function(array){\n    // The array here would be [ 1, 2, 3 ];\n  });\n  ```\n\n  If any of the `promises` given to `RSVP.all` are rejected, the first promise\n  that is rejected will be given as an argument to the returned promises's\n  rejection handler. For example:\n\n  Example:\n\n  ```javascript\n  import Promise, { resolve, reject } from 'rsvp';\n\n  let promise1 = resolve(1);\n  let promise2 = reject(new Error(\"2\"));\n  let promise3 = reject(new Error(\"3\"));\n  let promises = [ promise1, promise2, promise3 ];\n\n  Promise.all(promises).then(function(array){\n    // Code here never runs because there are rejected promises!\n  }, function(error) {\n    // error.message === \"2\"\n  });\n  ```\n\n  @method all\n  @for Promise\n  @param {Array} entries array of promises\n  @param {String} [label] optional string for labeling the promise.\n  Useful for tooling.\n  @return {Promise} promise that is fulfilled when all `promises` have been\n  fulfilled, or rejected if any of them become rejected.\n  @static\n*/\nfunction all$1(entries, label) {\n  if (!Array.isArray(entries)) {\n    return this.reject(new TypeError(\"Promise.all must be called with an array\"), label);\n  }\n  return new Enumerator(this, entries, true /* abort on reject */, label).promise;\n}\n\n/**\n  `Promise.race` returns a new promise which is settled in the same way as the\n  first passed promise to settle.\n\n  Example:\n\n  ```javascript\n  import Promise from 'rsvp';\n\n  let promise1 = new Promise(function(resolve, reject){\n    setTimeout(function(){\n      resolve('promise 1');\n    }, 200);\n  });\n\n  let promise2 = new Promise(function(resolve, reject){\n    setTimeout(function(){\n      resolve('promise 2');\n    }, 100);\n  });\n\n  Promise.race([promise1, promise2]).then(function(result){\n    // result === 'promise 2' because it was resolved before promise1\n    // was resolved.\n  });\n  ```\n\n  `Promise.race` is deterministic in that only the state of the first\n  settled promise matters. For example, even if other promises given to the\n  `promises` array argument are resolved, but the first settled promise has\n  become rejected before the other promises became fulfilled, the returned\n  promise will become rejected:\n\n  ```javascript\n  import Promise from 'rsvp';\n\n  let promise1 = new Promise(function(resolve, reject){\n    setTimeout(function(){\n      resolve('promise 1');\n    }, 200);\n  });\n\n  let promise2 = new Promise(function(resolve, reject){\n    setTimeout(function(){\n      reject(new Error('promise 2'));\n    }, 100);\n  });\n\n  Promise.race([promise1, promise2]).then(function(result){\n    // Code here never runs\n  }, function(reason){\n    // reason.message === 'promise 2' because promise 2 became rejected before\n    // promise 1 became fulfilled\n  });\n  ```\n\n  An example real-world use case is implementing timeouts:\n\n  ```javascript\n  import Promise from 'rsvp';\n\n  Promise.race([ajax('foo.json'), timeout(5000)])\n  ```\n\n  @method race\n  @for Promise\n  @static\n  @param {Array} entries array of promises to observe\n  @param {String} [label] optional string for describing the promise returned.\n  Useful for tooling.\n  @return {Promise} a promise which settles in the same way as the first passed\n  promise to settle.\n*/\nfunction race$1(entries, label) {\n  /*jshint validthis:true */\n  let Constructor = this;\n  let promise = new Constructor(noop, label);\n  if (!Array.isArray(entries)) {\n    reject$2(promise, new TypeError('Promise.race must be called with an array'));\n    return promise;\n  }\n  for (let i = 0; promise._state === PENDING && i < entries.length; i++) {\n    subscribe(Constructor.resolve(entries[i]), undefined, value => resolve$1(promise, value), reason => reject$2(promise, reason));\n  }\n  return promise;\n}\n\n/**\n  `Promise.reject` returns a promise rejected with the passed `reason`.\n  It is shorthand for the following:\n\n  ```javascript\n  import Promise from 'rsvp';\n\n  let promise = new Promise(function(resolve, reject){\n    reject(new Error('WHOOPS'));\n  });\n\n  promise.then(function(value){\n    // Code here doesn't run because the promise is rejected!\n  }, function(reason){\n    // reason.message === 'WHOOPS'\n  });\n  ```\n\n  Instead of writing the above, your code now simply becomes the following:\n\n  ```javascript\n  import Promise from 'rsvp';\n\n  let promise = Promise.reject(new Error('WHOOPS'));\n\n  promise.then(function(value){\n    // Code here doesn't run because the promise is rejected!\n  }, function(reason){\n    // reason.message === 'WHOOPS'\n  });\n  ```\n\n  @method reject\n  @for Promise\n  @static\n  @param {*} reason value that the returned promise will be rejected with.\n  @param {String} [label] optional string for identifying the returned promise.\n  Useful for tooling.\n  @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject$1(reason, label) {\n  /*jshint validthis:true */\n  let Constructor = this;\n  let promise = new Constructor(noop, label);\n  reject$2(promise, reason);\n  return promise;\n}\n\nconst guidKey = 'rsvp_' + Date.now() + '-';\nlet counter = 0;\nfunction needsResolver() {\n  throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\nfunction needsNew() {\n  throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n  Promise objects represent the eventual result of an asynchronous operation. The\n  primary way of interacting with a promise is through its `then` method, which\n  registers callbacks to receive either a promise’s eventual value or the reason\n  why the promise cannot be fulfilled.\n\n  Terminology\n  -----------\n\n  - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n  - `thenable` is an object or function that defines a `then` method.\n  - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n  - `exception` is a value that is thrown using the throw statement.\n  - `reason` is a value that indicates why a promise was rejected.\n  - `settled` the final resting state of a promise, fulfilled or rejected.\n\n  A promise can be in one of three states: pending, fulfilled, or rejected.\n\n  Promises that are fulfilled have a fulfillment value and are in the fulfilled\n  state.  Promises that are rejected have a rejection reason and are in the\n  rejected state.  A fulfillment value is never a thenable.\n\n  Promises can also be said to *resolve* a value.  If this value is also a\n  promise, then the original promise's settled state will match the value's\n  settled state.  So a promise that *resolves* a promise that rejects will\n  itself reject, and a promise that *resolves* a promise that fulfills will\n  itself fulfill.\n\n\n  Basic Usage:\n  ------------\n\n  ```js\n  let promise = new Promise(function(resolve, reject) {\n    // on success\n    resolve(value);\n\n    // on failure\n    reject(reason);\n  });\n\n  promise.then(function(value) {\n    // on fulfillment\n  }, function(reason) {\n    // on rejection\n  });\n  ```\n\n  Advanced Usage:\n  ---------------\n\n  Promises shine when abstracting away asynchronous interactions such as\n  `XMLHttpRequest`s.\n\n  ```js\n  function getJSON(url) {\n    return new Promise(function(resolve, reject){\n      let xhr = new XMLHttpRequest();\n\n      xhr.open('GET', url);\n      xhr.onreadystatechange = handler;\n      xhr.responseType = 'json';\n      xhr.setRequestHeader('Accept', 'application/json');\n      xhr.send();\n\n      function handler() {\n        if (this.readyState === this.DONE) {\n          if (this.status === 200) {\n            resolve(this.response);\n          } else {\n            reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n          }\n        }\n      };\n    });\n  }\n\n  getJSON('/posts.json').then(function(json) {\n    // on fulfillment\n  }, function(reason) {\n    // on rejection\n  });\n  ```\n\n  Unlike callbacks, promises are great composable primitives.\n\n  ```js\n  Promise.all([\n    getJSON('/posts'),\n    getJSON('/comments')\n  ]).then(function(values){\n    values[0] // => postsJSON\n    values[1] // => commentsJSON\n\n    return values;\n  });\n  ```\n\n  @class Promise\n  @public\n  @param {function} resolver\n  @param {String} [label] optional string for labeling the promise.\n  Useful for tooling.\n  @constructor\n*/\nlet Promise$1 = class Promise {\n  constructor(resolver, label) {\n    this._id = counter++;\n    this._label = label;\n    this._state = undefined;\n    this._result = undefined;\n    this._subscribers = [];\n    config.instrument && instrument('created', this);\n    if (noop !== resolver) {\n      typeof resolver !== 'function' && needsResolver();\n      this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n    }\n  }\n  _onError(reason) {\n    config.after(() => {\n      if (this._onError) {\n        config.trigger('error', reason, this._label);\n      }\n    });\n  }\n\n  /**\n    `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n    as the catch block of a try/catch statement.\n  \n    ```js\n    function findAuthor(){\n      throw new Error('couldn\\'t find that author');\n    }\n  \n    // synchronous\n    try {\n      findAuthor();\n    } catch(reason) {\n      // something went wrong\n    }\n  \n    // async with promises\n    findAuthor().catch(function(reason){\n      // something went wrong\n    });\n    ```\n  \n    @method catch\n    @param {Function} onRejection\n    @param {String} [label] optional string for labeling the promise.\n    Useful for tooling.\n    @return {Promise}\n  */\n  catch(onRejection, label) {\n    return this.then(undefined, onRejection, label);\n  }\n\n  /**\n    `finally` will be invoked regardless of the promise's fate just as native\n    try/catch/finally behaves\n  \n    Synchronous example:\n  \n    ```js\n    findAuthor() {\n      if (Math.random() > 0.5) {\n        throw new Error();\n      }\n      return new Author();\n    }\n  \n    try {\n      return findAuthor(); // succeed or fail\n    } catch(error) {\n      return findOtherAuthor();\n    } finally {\n      // always runs\n      // doesn't affect the return value\n    }\n    ```\n  \n    Asynchronous example:\n  \n    ```js\n    findAuthor().catch(function(reason){\n      return findOtherAuthor();\n    }).finally(function(){\n      // author was either found, or not\n    });\n    ```\n  \n    @method finally\n    @param {Function} callback\n    @param {String} [label] optional string for labeling the promise.\n    Useful for tooling.\n    @return {Promise}\n  */\n  finally(callback, label) {\n    let promise = this;\n    let constructor = promise.constructor;\n    if (typeof callback === 'function') {\n      return promise.then(value => constructor.resolve(callback()).then(() => value), reason => constructor.resolve(callback()).then(() => {\n        throw reason;\n      }));\n    }\n    return promise.then(callback, callback);\n  }\n};\nPromise$1.cast = resolve$2; // deprecated\nPromise$1.all = all$1;\nPromise$1.race = race$1;\nPromise$1.resolve = resolve$2;\nPromise$1.reject = reject$1;\nPromise$1.prototype._guidKey = guidKey;\n\n/**\n  The primary way of interacting with a promise is through its `then` method,\n  which registers callbacks to receive either a promise's eventual value or the\n  reason why the promise cannot be fulfilled.\n\n  ```js\n  findUser().then(function(user){\n    // user is available\n  }, function(reason){\n    // user is unavailable, and you are given the reason why\n  });\n  ```\n\n  Chaining\n  --------\n\n  The return value of `then` is itself a promise.  This second, 'downstream'\n  promise is resolved with the return value of the first promise's fulfillment\n  or rejection handler, or rejected if the handler throws an exception.\n\n  ```js\n  findUser().then(function (user) {\n    return user.name;\n  }, function (reason) {\n    return 'default name';\n  }).then(function (userName) {\n    // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n    // will be `'default name'`\n  });\n\n  findUser().then(function (user) {\n    throw new Error('Found user, but still unhappy');\n  }, function (reason) {\n    throw new Error('`findUser` rejected and we\\'re unhappy');\n  }).then(function (value) {\n    // never reached\n  }, function (reason) {\n    // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n    // If `findUser` rejected, `reason` will be '`findUser` rejected and we\\'re unhappy'.\n  });\n  ```\n  If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n\n  ```js\n  findUser().then(function (user) {\n    throw new PedagogicalException('Upstream error');\n  }).then(function (value) {\n    // never reached\n  }).then(function (value) {\n    // never reached\n  }, function (reason) {\n    // The `PedgagocialException` is propagated all the way down to here\n  });\n  ```\n\n  Assimilation\n  ------------\n\n  Sometimes the value you want to propagate to a downstream promise can only be\n  retrieved asynchronously. This can be achieved by returning a promise in the\n  fulfillment or rejection handler. The downstream promise will then be pending\n  until the returned promise is settled. This is called *assimilation*.\n\n  ```js\n  findUser().then(function (user) {\n    return findCommentsByAuthor(user);\n  }).then(function (comments) {\n    // The user's comments are now available\n  });\n  ```\n\n  If the assimliated promise rejects, then the downstream promise will also reject.\n\n  ```js\n  findUser().then(function (user) {\n    return findCommentsByAuthor(user);\n  }).then(function (comments) {\n    // If `findCommentsByAuthor` fulfills, we'll have the value here\n  }, function (reason) {\n    // If `findCommentsByAuthor` rejects, we'll have the reason here\n  });\n  ```\n\n  Simple Example\n  --------------\n\n  Synchronous Example\n\n  ```javascript\n  let result;\n\n  try {\n    result = findResult();\n    // success\n  } catch(reason) {\n    // failure\n  }\n  ```\n\n  Errback Example\n\n  ```js\n  findResult(function(result, err){\n    if (err) {\n      // failure\n    } else {\n      // success\n    }\n  });\n  ```\n\n  Promise Example;\n\n  ```javascript\n  findResult().then(function(result){\n    // success\n  }, function(reason){\n    // failure\n  });\n  ```\n\n  Advanced Example\n  --------------\n\n  Synchronous Example\n\n  ```javascript\n  let author, books;\n\n  try {\n    author = findAuthor();\n    books  = findBooksByAuthor(author);\n    // success\n  } catch(reason) {\n    // failure\n  }\n  ```\n\n  Errback Example\n\n  ```js\n\n  function foundBooks(books) {\n\n  }\n\n  function failure(reason) {\n\n  }\n\n  findAuthor(function(author, err){\n    if (err) {\n      failure(err);\n      // failure\n    } else {\n      try {\n        findBoooksByAuthor(author, function(books, err) {\n          if (err) {\n            failure(err);\n          } else {\n            try {\n              foundBooks(books);\n            } catch(reason) {\n              failure(reason);\n            }\n          }\n        });\n      } catch(error) {\n        failure(err);\n      }\n      // success\n    }\n  });\n  ```\n\n  Promise Example;\n\n  ```javascript\n  findAuthor().\n    then(findBooksByAuthor).\n    then(function(books){\n      // found books\n  }).catch(function(reason){\n    // something went wrong\n  });\n  ```\n\n  @method then\n  @param {Function} onFulfillment\n  @param {Function} onRejection\n  @param {String} [label] optional string for labeling the promise.\n  Useful for tooling.\n  @return {Promise}\n*/\nPromise$1.prototype.then = then;\n\nfunction makeObject(_, argumentNames) {\n  let obj = {};\n  let length = _.length;\n  let args = new Array(length);\n  for (let x = 0; x < length; x++) {\n    args[x] = _[x];\n  }\n  for (let i = 0; i < argumentNames.length; i++) {\n    let name = argumentNames[i];\n    obj[name] = args[i + 1];\n  }\n  return obj;\n}\nfunction arrayResult(_) {\n  let length = _.length;\n  let args = new Array(length - 1);\n  for (let i = 1; i < length; i++) {\n    args[i - 1] = _[i];\n  }\n  return args;\n}\nfunction wrapThenable(then, promise) {\n  return {\n    then(onFulFillment, onRejection) {\n      return then.call(promise, onFulFillment, onRejection);\n    }\n  };\n}\n\n/**\n  `denodeify` takes a 'node-style' function and returns a function that\n  will return an `Promise`. You can use `denodeify` in Node.js or the\n  browser when you'd prefer to use promises over using callbacks. For example,\n  `denodeify` transforms the following:\n\n  ```javascript\n  let fs = require('fs');\n\n  fs.readFile('myfile.txt', function(err, data){\n    if (err) return handleError(err);\n    handleData(data);\n  });\n  ```\n\n  into:\n\n  ```javascript\n  let fs = require('fs');\n  let readFile = denodeify(fs.readFile);\n\n  readFile('myfile.txt').then(handleData, handleError);\n  ```\n\n  If the node function has multiple success parameters, then `denodeify`\n  just returns the first one:\n\n  ```javascript\n  let request = denodeify(require('request'));\n\n  request('http://example.com').then(function(res) {\n    // ...\n  });\n  ```\n\n  However, if you need all success parameters, setting `denodeify`'s\n  second parameter to `true` causes it to return all success parameters\n  as an array:\n\n  ```javascript\n  let request = denodeify(require('request'), true);\n\n  request('http://example.com').then(function(result) {\n    // result[0] -> res\n    // result[1] -> body\n  });\n  ```\n\n  Or if you pass it an array with names it returns the parameters as a hash:\n\n  ```javascript\n  let request = denodeify(require('request'), ['res', 'body']);\n\n  request('http://example.com').then(function(result) {\n    // result.res\n    // result.body\n  });\n  ```\n\n  Sometimes you need to retain the `this`:\n\n  ```javascript\n  let app = require('express')();\n  let render = denodeify(app.render.bind(app));\n  ```\n\n  The denodified function inherits from the original function. It works in all\n  environments, except IE 10 and below. Consequently all properties of the original\n  function are available to you. However, any properties you change on the\n  denodeified function won't be changed on the original function. Example:\n\n  ```javascript\n  let request = denodeify(require('request')),\n      cookieJar = request.jar(); // <- Inheritance is used here\n\n  request('http://example.com', {jar: cookieJar}).then(function(res) {\n    // cookieJar.cookies holds now the cookies returned by example.com\n  });\n  ```\n\n  Using `denodeify` makes it easier to compose asynchronous operations instead\n  of using callbacks. For example, instead of:\n\n  ```javascript\n  let fs = require('fs');\n\n  fs.readFile('myfile.txt', function(err, data){\n    if (err) { ... } // Handle error\n    fs.writeFile('myfile2.txt', data, function(err){\n      if (err) { ... } // Handle error\n      console.log('done')\n    });\n  });\n  ```\n\n  you can chain the operations together using `then` from the returned promise:\n\n  ```javascript\n  let fs = require('fs');\n  let readFile = denodeify(fs.readFile);\n  let writeFile = denodeify(fs.writeFile);\n\n  readFile('myfile.txt').then(function(data){\n    return writeFile('myfile2.txt', data);\n  }).then(function(){\n    console.log('done')\n  }).catch(function(error){\n    // Handle error\n  });\n  ```\n\n  @method denodeify\n  @public\n  @static\n  @for rsvp\n  @param {Function} nodeFunc a 'node-style' function that takes a callback as\n  its last argument. The callback expects an error to be passed as its first\n  argument (if an error occurred, otherwise null), and the value from the\n  operation as its second argument ('function(err, value){ }').\n  @param {Boolean|Array} [options] An optional paramter that if set\n  to `true` causes the promise to fulfill with the callback's success arguments\n  as an array. This is useful if the node function has multiple success\n  paramters. If you set this paramter to an array with names, the promise will\n  fulfill with a hash with these names as keys and the success parameters as\n  values.\n  @return {Function} a function that wraps `nodeFunc` to return a `Promise`\n*/\nfunction denodeify(nodeFunc, options) {\n  let fn = function () {\n    let l = arguments.length;\n    let args = new Array(l + 1);\n    let promiseInput = false;\n    for (let i = 0; i < l; ++i) {\n      let arg = arguments[i];\n\n      // TODO: this code really needs to be cleaned up\n      if (!promiseInput) {\n        if (arg !== null && typeof arg === 'object') {\n          if (arg.constructor === Promise$1) {\n            promiseInput = true;\n          } else {\n            try {\n              promiseInput = arg.then;\n            } catch (error) {\n              let p = new Promise$1(noop);\n              reject$2(p, error);\n              return p;\n            }\n          }\n        } else {\n          promiseInput = false;\n        }\n        if (promiseInput && promiseInput !== true) {\n          arg = wrapThenable(promiseInput, arg);\n        }\n      }\n      args[i] = arg;\n    }\n    let promise = new Promise$1(noop);\n    args[l] = function (err, val) {\n      if (err) {\n        reject$2(promise, err);\n      } else if (options === undefined) {\n        resolve$1(promise, val);\n      } else if (options === true) {\n        resolve$1(promise, arrayResult(arguments));\n      } else if (Array.isArray(options)) {\n        resolve$1(promise, makeObject(arguments, options));\n      } else {\n        resolve$1(promise, val);\n      }\n    };\n    if (promiseInput) {\n      return handlePromiseInput(promise, args, nodeFunc, this);\n    } else {\n      return handleValueInput(promise, args, nodeFunc, this);\n    }\n  };\n  fn.__proto__ = nodeFunc;\n  return fn;\n}\nfunction handleValueInput(promise, args, nodeFunc, self) {\n  try {\n    nodeFunc.apply(self, args);\n  } catch (error) {\n    reject$2(promise, error);\n  }\n  return promise;\n}\nfunction handlePromiseInput(promise, args, nodeFunc, self) {\n  return Promise$1.all(args).then(args => handleValueInput(promise, args, nodeFunc, self));\n}\n\n/**\n  This is a convenient alias for `Promise.all`.\n\n  @method all\n  @public\n  @static\n  @for rsvp\n  @param {Array} array Array of promises.\n  @param {String} [label] An optional label. This is useful\n  for tooling.\n*/\nfunction all(array, label) {\n  return Promise$1.all(array, label);\n}\n\n/**\n@module rsvp\n@public\n**/\n\nclass AllSettled extends Enumerator {\n  constructor(Constructor, entries, label) {\n    super(Constructor, entries, false /* don't abort on reject */, label);\n  }\n}\nAllSettled.prototype._setResultAt = setSettledResult;\n\n/**\n`RSVP.allSettled` is similar to `RSVP.all`, but instead of implementing\na fail-fast method, it waits until all the promises have returned and\nshows you all the results. This is useful if you want to handle multiple\npromises' failure states together as a set.\n Returns a promise that is fulfilled when all the given promises have been\nsettled. The return promise is fulfilled with an array of the states of\nthe promises passed into the `promises` array argument.\n Each state object will either indicate fulfillment or rejection, and\nprovide the corresponding value or reason. The states will take one of\nthe following formats:\n ```javascript\n{ state: 'fulfilled', value: value }\n  or\n{ state: 'rejected', reason: reason }\n```\n Example:\n ```javascript\nlet promise1 = RSVP.Promise.resolve(1);\nlet promise2 = RSVP.Promise.reject(new Error('2'));\nlet promise3 = RSVP.Promise.reject(new Error('3'));\nlet promises = [ promise1, promise2, promise3 ];\n RSVP.allSettled(promises).then(function(array){\n  // array == [\n  //   { state: 'fulfilled', value: 1 },\n  //   { state: 'rejected', reason: Error },\n  //   { state: 'rejected', reason: Error }\n  // ]\n  // Note that for the second item, reason.message will be '2', and for the\n  // third item, reason.message will be '3'.\n}, function(error) {\n  // Not run. (This block would only be called if allSettled had failed,\n  // for instance if passed an incorrect argument type.)\n});\n```\n @method allSettled\n@public\n@static\n@for rsvp\n@param {Array} entries\n@param {String} [label] - optional string that describes the promise.\nUseful for tooling.\n@return {Promise} promise that is fulfilled with an array of the settled\nstates of the constituent promises.\n*/\n\nfunction allSettled(entries, label) {\n  if (!Array.isArray(entries)) {\n    return Promise$1.reject(new TypeError(\"Promise.allSettled must be called with an array\"), label);\n  }\n  return new AllSettled(Promise$1, entries, label).promise;\n}\n\n/**\n  This is a convenient alias for `Promise.race`.\n\n  @method race\n  @public\n  @static\n  @for rsvp\n  @param {Array} array Array of promises.\n  @param {String} [label] An optional label. This is useful\n  for tooling.\n */\nfunction race(array, label) {\n  return Promise$1.race(array, label);\n}\n\nclass PromiseHash extends Enumerator {\n  constructor(Constructor, object, abortOnReject = true, label) {\n    super(Constructor, object, abortOnReject, label);\n  }\n  _init(Constructor, object) {\n    this._result = {};\n    this._enumerate(object);\n  }\n  _enumerate(input) {\n    let keys = Object.keys(input);\n    let length = keys.length;\n    let promise = this.promise;\n    this._remaining = length;\n    let key, val;\n    for (let i = 0; promise._state === PENDING && i < length; i++) {\n      key = keys[i];\n      val = input[key];\n      this._eachEntry(val, key, true);\n    }\n    this._checkFullfillment();\n  }\n}\n\n/**\n  `hash` is similar to `all`, but takes an object instead of an array\n  for its `promises` argument.\n\n  Returns a promise that is fulfilled when all the given promises have been\n  fulfilled, or rejected if any of them become rejected. The returned promise\n  is fulfilled with a hash that has the same key names as the `promises` object\n  argument. If any of the values in the object are not promises, they will\n  simply be copied over to the fulfilled object.\n\n  Example:\n\n  ```javascript\n  let promises = {\n    myPromise: resolve(1),\n    yourPromise: resolve(2),\n    theirPromise: resolve(3),\n    notAPromise: 4\n  };\n\n  hash(promises).then(function(hash){\n    // hash here is an object that looks like:\n    // {\n    //   myPromise: 1,\n    //   yourPromise: 2,\n    //   theirPromise: 3,\n    //   notAPromise: 4\n    // }\n  });\n  ```\n\n  If any of the `promises` given to `hash` are rejected, the first promise\n  that is rejected will be given as the reason to the rejection handler.\n\n  Example:\n\n  ```javascript\n  let promises = {\n    myPromise: resolve(1),\n    rejectedPromise: reject(new Error('rejectedPromise')),\n    anotherRejectedPromise: reject(new Error('anotherRejectedPromise')),\n  };\n\n  hash(promises).then(function(hash){\n    // Code here never runs because there are rejected promises!\n  }, function(reason) {\n    // reason.message === 'rejectedPromise'\n  });\n  ```\n\n  An important note: `hash` is intended for plain JavaScript objects that\n  are just a set of keys and values. `hash` will NOT preserve prototype\n  chains.\n\n  Example:\n\n  ```javascript\n  import { hash, resolve } from 'rsvp';\n  function MyConstructor(){\n    this.example = resolve('Example');\n  }\n\n  MyConstructor.prototype = {\n    protoProperty: resolve('Proto Property')\n  };\n\n  let myObject = new MyConstructor();\n\n  hash(myObject).then(function(hash){\n    // protoProperty will not be present, instead you will just have an\n    // object that looks like:\n    // {\n    //   example: 'Example'\n    // }\n    //\n    // hash.hasOwnProperty('protoProperty'); // false\n    // 'undefined' === typeof hash.protoProperty\n  });\n  ```\n\n  @method hash\n  @public\n  @static\n  @for rsvp\n  @param {Object} object\n  @param {String} [label] optional string that describes the promise.\n  Useful for tooling.\n  @return {Promise} promise that is fulfilled when all properties of `promises`\n  have been fulfilled, or rejected if any of them become rejected.\n*/\nfunction hash(object, label) {\n  return Promise$1.resolve(object, label).then(function (object) {\n    if (object === null || typeof object !== 'object') {\n      throw new TypeError(\"Promise.hash must be called with an object\");\n    }\n    return new PromiseHash(Promise$1, object, label).promise;\n  });\n}\n\nclass HashSettled extends PromiseHash {\n  constructor(Constructor, object, label) {\n    super(Constructor, object, false, label);\n  }\n}\nHashSettled.prototype._setResultAt = setSettledResult;\n\n/**\n  `hashSettled` is similar to `allSettled`, but takes an object\n  instead of an array for its `promises` argument.\n\n  Unlike `all` or `hash`, which implement a fail-fast method,\n  but like `allSettled`, `hashSettled` waits until all the\n  constituent promises have returned and then shows you all the results\n  with their states and values/reasons. This is useful if you want to\n  handle multiple promises' failure states together as a set.\n\n  Returns a promise that is fulfilled when all the given promises have been\n  settled, or rejected if the passed parameters are invalid.\n\n  The returned promise is fulfilled with a hash that has the same key names as\n  the `promises` object argument. If any of the values in the object are not\n  promises, they will be copied over to the fulfilled object and marked with state\n  'fulfilled'.\n\n  Example:\n\n  ```javascript\n  import { hashSettled, resolve } from 'rsvp';\n\n  let promises = {\n    myPromise: resolve(1),\n    yourPromise: resolve(2),\n    theirPromise: resolve(3),\n    notAPromise: 4\n  };\n\n  hashSettled(promises).then(function(hash){\n    // hash here is an object that looks like:\n    // {\n    //   myPromise: { state: 'fulfilled', value: 1 },\n    //   yourPromise: { state: 'fulfilled', value: 2 },\n    //   theirPromise: { state: 'fulfilled', value: 3 },\n    //   notAPromise: { state: 'fulfilled', value: 4 }\n    // }\n  });\n  ```\n\n  If any of the `promises` given to `hash` are rejected, the state will\n  be set to 'rejected' and the reason for rejection provided.\n\n  Example:\n\n  ```javascript\n  import { hashSettled, reject, resolve } from 'rsvp';\n\n  let promises = {\n    myPromise: resolve(1),\n    rejectedPromise: reject(new Error('rejection')),\n    anotherRejectedPromise: reject(new Error('more rejection')),\n  };\n\n  hashSettled(promises).then(function(hash){\n    // hash here is an object that looks like:\n    // {\n    //   myPromise:              { state: 'fulfilled', value: 1 },\n    //   rejectedPromise:        { state: 'rejected', reason: Error },\n    //   anotherRejectedPromise: { state: 'rejected', reason: Error },\n    // }\n    // Note that for rejectedPromise, reason.message == 'rejection',\n    // and for anotherRejectedPromise, reason.message == 'more rejection'.\n  });\n  ```\n\n  An important note: `hashSettled` is intended for plain JavaScript objects that\n  are just a set of keys and values. `hashSettled` will NOT preserve prototype\n  chains.\n\n  Example:\n\n  ```javascript\n  import Promise, { hashSettled, resolve } from 'rsvp';\n\n  function MyConstructor(){\n    this.example = resolve('Example');\n  }\n\n  MyConstructor.prototype = {\n    protoProperty: Promise.resolve('Proto Property')\n  };\n\n  let myObject = new MyConstructor();\n\n  hashSettled(myObject).then(function(hash){\n    // protoProperty will not be present, instead you will just have an\n    // object that looks like:\n    // {\n    //   example: { state: 'fulfilled', value: 'Example' }\n    // }\n    //\n    // hash.hasOwnProperty('protoProperty'); // false\n    // 'undefined' === typeof hash.protoProperty\n  });\n  ```\n\n  @method hashSettled\n  @public\n  @for rsvp\n  @param {Object} object\n  @param {String} [label] optional string that describes the promise.\n  Useful for tooling.\n  @return {Promise} promise that is fulfilled when when all properties of `promises`\n  have been settled.\n  @static\n*/\n\nfunction hashSettled(object, label) {\n  return Promise$1.resolve(object, label).then(function (object) {\n    if (object === null || typeof object !== 'object') {\n      throw new TypeError(\"hashSettled must be called with an object\");\n    }\n    return new HashSettled(Promise$1, object, false, label).promise;\n  });\n}\n\n/**\n  `rethrow` will rethrow an error on the next turn of the JavaScript event\n  loop in order to aid debugging.\n\n  Promises A+ specifies that any exceptions that occur with a promise must be\n  caught by the promises implementation and bubbled to the last handler. For\n  this reason, it is recommended that you always specify a second rejection\n  handler function to `then`. However, `rethrow` will throw the exception\n  outside of the promise, so it bubbles up to your console if in the browser,\n  or domain/cause uncaught exception in Node. `rethrow` will also throw the\n  error again so the error can be handled by the promise per the spec.\n\n  ```javascript\n  import { rethrow } from 'rsvp';\n\n  function throws(){\n    throw new Error('Whoops!');\n  }\n\n  let promise = new Promise(function(resolve, reject){\n    throws();\n  });\n\n  promise.catch(rethrow).then(function(){\n    // Code here doesn't run because the promise became rejected due to an\n    // error!\n  }, function (err){\n    // handle the error here\n  });\n  ```\n\n  The 'Whoops' error will be thrown on the next turn of the event loop\n  and you can watch for it in your console. You can also handle it using a\n  rejection handler given to `.then` or `.catch` on the returned promise.\n\n  @method rethrow\n  @public\n  @static\n  @for rsvp\n  @param {Error} reason reason the promise became rejected.\n  @throws Error\n  @static\n*/\nfunction rethrow(reason) {\n  setTimeout(() => {\n    throw reason;\n  });\n  throw reason;\n}\n\n/**\n  `defer` returns an object similar to jQuery's `$.Deferred`.\n  `defer` should be used when porting over code reliant on `$.Deferred`'s\n  interface. New code should use the `Promise` constructor instead.\n\n  The object returned from `defer` is a plain object with three properties:\n\n  * promise - an `Promise`.\n  * reject - a function that causes the `promise` property on this object to\n    become rejected\n  * resolve - a function that causes the `promise` property on this object to\n    become fulfilled.\n\n  Example:\n\n   ```javascript\n   let deferred = defer();\n\n   deferred.resolve(\"Success!\");\n\n   deferred.promise.then(function(value){\n     // value here is \"Success!\"\n   });\n   ```\n\n  @method defer\n  @public\n  @static\n  @for rsvp\n  @param {String} [label] optional string for labeling the promise.\n  Useful for tooling.\n  @return {Object}\n */\n\nfunction defer(label) {\n  let deferred = {\n    resolve: undefined,\n    reject: undefined\n  };\n  deferred.promise = new Promise$1((resolve, reject) => {\n    deferred.resolve = resolve;\n    deferred.reject = reject;\n  }, label);\n  return deferred;\n}\n\nclass MapEnumerator extends Enumerator {\n  constructor(Constructor, entries, mapFn, label) {\n    super(Constructor, entries, true, label, mapFn);\n  }\n  _init(Constructor, input, bool, label, mapFn) {\n    let len = input.length || 0;\n    this.length = len;\n    this._remaining = len;\n    this._result = new Array(len);\n    this._mapFn = mapFn;\n    this._enumerate(input);\n  }\n  _setResultAt(state, i, value, firstPass) {\n    if (firstPass) {\n      try {\n        this._eachEntry(this._mapFn(value, i), i, false);\n      } catch (error) {\n        this._settledAt(REJECTED, i, error, false);\n      }\n    } else {\n      this._remaining--;\n      this._result[i] = value;\n    }\n  }\n}\n\n/**\n `map` is similar to JavaScript's native `map` method. `mapFn` is eagerly called\n  meaning that as soon as any promise resolves its value will be passed to `mapFn`.\n  `map` returns a promise that will become fulfilled with the result of running\n  `mapFn` on the values the promises become fulfilled with.\n\n  For example:\n\n  ```javascript\n  import { map, resolve } from 'rsvp';\n\n  let promise1 = resolve(1);\n  let promise2 = resolve(2);\n  let promise3 = resolve(3);\n  let promises = [ promise1, promise2, promise3 ];\n\n  let mapFn = function(item){\n    return item + 1;\n  };\n\n  map(promises, mapFn).then(function(result){\n    // result is [ 2, 3, 4 ]\n  });\n  ```\n\n  If any of the `promises` given to `map` are rejected, the first promise\n  that is rejected will be given as an argument to the returned promise's\n  rejection handler. For example:\n\n  ```javascript\n  import { map, reject, resolve } from 'rsvp';\n\n  let promise1 = resolve(1);\n  let promise2 = reject(new Error('2'));\n  let promise3 = reject(new Error('3'));\n  let promises = [ promise1, promise2, promise3 ];\n\n  let mapFn = function(item){\n    return item + 1;\n  };\n\n  map(promises, mapFn).then(function(array){\n    // Code here never runs because there are rejected promises!\n  }, function(reason) {\n    // reason.message === '2'\n  });\n  ```\n\n  `map` will also wait if a promise is returned from `mapFn`. For example,\n  say you want to get all comments from a set of blog posts, but you need\n  the blog posts first because they contain a url to those comments.\n\n  ```javscript\n  import { map } from 'rsvp';\n\n  let mapFn = function(blogPost){\n    // getComments does some ajax and returns an Promise that is fulfilled\n    // with some comments data\n    return getComments(blogPost.comments_url);\n  };\n\n  // getBlogPosts does some ajax and returns an Promise that is fulfilled\n  // with some blog post data\n  map(getBlogPosts(), mapFn).then(function(comments){\n    // comments is the result of asking the server for the comments\n    // of all blog posts returned from getBlogPosts()\n  });\n  ```\n\n  @method map\n  @public\n  @static\n  @for rsvp\n  @param {Array} promises\n  @param {Function} mapFn function to be called on each fulfilled promise.\n  @param {String} [label] optional string for labeling the promise.\n  Useful for tooling.\n  @return {Promise} promise that is fulfilled with the result of calling\n  `mapFn` on each fulfilled promise or value when they become fulfilled.\n   The promise will be rejected if any of the given `promises` become rejected.\n*/\nfunction map(promises, mapFn, label) {\n  if (typeof mapFn !== 'function') {\n    return Promise$1.reject(new TypeError(\"map expects a function as a second argument\"), label);\n  }\n  return Promise$1.resolve(promises, label).then(function (promises) {\n    if (!Array.isArray(promises)) {\n      throw new TypeError(\"map must be called with an array\");\n    }\n    return new MapEnumerator(Promise$1, promises, mapFn, label).promise;\n  });\n}\n\n/**\n  This is a convenient alias for `Promise.resolve`.\n\n  @method resolve\n  @public\n  @static\n  @for rsvp\n  @param {*} value value that the returned promise will be resolved with\n  @param {String} [label] optional string for identifying the returned promise.\n  Useful for tooling.\n  @return {Promise} a promise that will become fulfilled with the given\n  `value`\n*/\nfunction resolve(value, label) {\n  return Promise$1.resolve(value, label);\n}\n\n/**\n  This is a convenient alias for `Promise.reject`.\n\n  @method reject\n  @public\n  @static\n  @for rsvp\n  @param {*} reason value that the returned promise will be rejected with.\n  @param {String} [label] optional string for identifying the returned promise.\n  Useful for tooling.\n  @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject(reason, label) {\n  return Promise$1.reject(reason, label);\n}\n\nconst EMPTY_OBJECT = {};\nclass FilterEnumerator extends MapEnumerator {\n  _checkFullfillment() {\n    if (this._remaining === 0 && this._result !== null) {\n      let result = this._result.filter(val => val !== EMPTY_OBJECT);\n      fulfill(this.promise, result);\n      this._result = null;\n    }\n  }\n  _setResultAt(state, i, value, firstPass) {\n    if (firstPass) {\n      this._result[i] = value;\n      let val,\n        succeeded = true;\n      try {\n        val = this._mapFn(value, i);\n      } catch (error) {\n        succeeded = false;\n        this._settledAt(REJECTED, i, error, false);\n      }\n      if (succeeded) {\n        this._eachEntry(val, i, false);\n      }\n    } else {\n      this._remaining--;\n      if (!value) {\n        this._result[i] = EMPTY_OBJECT;\n      }\n    }\n  }\n}\n\n/**\n `filter` is similar to JavaScript's native `filter` method.\n `filterFn` is eagerly called meaning that as soon as any promise\n  resolves its value will be passed to `filterFn`. `filter` returns\n  a promise that will become fulfilled with the result of running\n  `filterFn` on the values the promises become fulfilled with.\n\n  For example:\n\n  ```javascript\n  import { filter, resolve } from 'rsvp';\n\n  let promise1 = resolve(1);\n  let promise2 = resolve(2);\n  let promise3 = resolve(3);\n\n  let promises = [promise1, promise2, promise3];\n\n  let filterFn = function(item){\n    return item > 1;\n  };\n\n  filter(promises, filterFn).then(function(result){\n    // result is [ 2, 3 ]\n  });\n  ```\n\n  If any of the `promises` given to `filter` are rejected, the first promise\n  that is rejected will be given as an argument to the returned promise's\n  rejection handler. For example:\n\n  ```javascript\n  import { filter, reject, resolve } from 'rsvp';\n\n  let promise1 = resolve(1);\n  let promise2 = reject(new Error('2'));\n  let promise3 = reject(new Error('3'));\n  let promises = [ promise1, promise2, promise3 ];\n\n  let filterFn = function(item){\n    return item > 1;\n  };\n\n  filter(promises, filterFn).then(function(array){\n    // Code here never runs because there are rejected promises!\n  }, function(reason) {\n    // reason.message === '2'\n  });\n  ```\n\n  `filter` will also wait for any promises returned from `filterFn`.\n  For instance, you may want to fetch a list of users then return a subset\n  of those users based on some asynchronous operation:\n\n  ```javascript\n  import { filter, resolve } from 'rsvp';\n\n  let alice = { name: 'alice' };\n  let bob   = { name: 'bob' };\n  let users = [ alice, bob ];\n\n  let promises = users.map(function(user){\n    return resolve(user);\n  });\n\n  let filterFn = function(user){\n    // Here, Alice has permissions to create a blog post, but Bob does not.\n    return getPrivilegesForUser(user).then(function(privs){\n      return privs.can_create_blog_post === true;\n    });\n  };\n  filter(promises, filterFn).then(function(users){\n    // true, because the server told us only Alice can create a blog post.\n    users.length === 1;\n    // false, because Alice is the only user present in `users`\n    users[0] === bob;\n  });\n  ```\n\n  @method filter\n  @public\n  @static\n  @for rsvp\n  @param {Array} promises\n  @param {Function} filterFn - function to be called on each resolved value to\n  filter the final results.\n  @param {String} [label] optional string describing the promise. Useful for\n  tooling.\n  @return {Promise}\n*/\n\nfunction filter(promises, filterFn, label) {\n  if (typeof filterFn !== 'function') {\n    return Promise$1.reject(new TypeError(\"filter expects function as a second argument\"), label);\n  }\n  return Promise$1.resolve(promises, label).then(function (promises) {\n    if (!Array.isArray(promises)) {\n      throw new TypeError(\"filter must be called with an array\");\n    }\n    return new FilterEnumerator(Promise$1, promises, filterFn, label).promise;\n  });\n}\n\nlet len = 0;\nlet vertxNext;\nfunction asap(callback, arg) {\n  queue[len] = callback;\n  queue[len + 1] = arg;\n  len += 2;\n  if (len === 2) {\n    // If len is 1, that means that we need to schedule an async flush.\n    // If additional callbacks are queued before the queue is flushed, they\n    // will be processed by this flush that we are scheduling.\n    scheduleFlush();\n  }\n}\nconst browserWindow = typeof window !== 'undefined' ? window : undefined;\nconst browserGlobal = browserWindow || {};\nconst BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nconst isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nconst isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n  let nextTick = process.nextTick;\n  // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n  // setImmediate should be used instead instead\n  let version = process.versions.node.match(/^(?:(\\d+)\\.)?(?:(\\d+)\\.)?(\\*|\\d+)$/);\n  if (Array.isArray(version) && version[1] === '0' && version[2] === '10') {\n    nextTick = setImmediate;\n  }\n  return () => nextTick(flush);\n}\n\n// vertx\nfunction useVertxTimer() {\n  if (typeof vertxNext !== 'undefined') {\n    return function () {\n      vertxNext(flush);\n    };\n  }\n  return useSetTimeout();\n}\nfunction useMutationObserver() {\n  let iterations = 0;\n  let observer = new BrowserMutationObserver(flush);\n  let node = document.createTextNode('');\n  observer.observe(node, {\n    characterData: true\n  });\n  return () => node.data = iterations = ++iterations % 2;\n}\n\n// web worker\nfunction useMessageChannel() {\n  let channel = new MessageChannel();\n  channel.port1.onmessage = flush;\n  return () => channel.port2.postMessage(0);\n}\nfunction useSetTimeout() {\n  return () => setTimeout(flush, 1);\n}\nconst queue = new Array(1000);\nfunction flush() {\n  for (let i = 0; i < len; i += 2) {\n    let callback = queue[i];\n    let arg = queue[i + 1];\n    callback(arg);\n    queue[i] = undefined;\n    queue[i + 1] = undefined;\n  }\n  len = 0;\n}\nfunction attemptVertex() {\n  try {\n    const vertx = Function('return this')().require('vertx');\n    vertxNext = vertx.runOnLoop || vertx.runOnContext;\n    return useVertxTimer();\n  } catch (e) {\n    return useSetTimeout();\n  }\n}\nlet scheduleFlush;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n  scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n  scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n  scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n  scheduleFlush = attemptVertex();\n} else {\n  scheduleFlush = useSetTimeout();\n}\n\n// defaults\nconfig.async = asap;\nconfig.after = cb => setTimeout(cb, 0);\nconst cast = resolve;\nconst async = (callback, arg) => config.async(callback, arg);\nfunction on() {\n  config.on(...arguments);\n}\nfunction off() {\n  config.off(...arguments);\n}\n\n// Set up instrumentation through `window.__PROMISE_INTRUMENTATION__`\nif (typeof window !== 'undefined' && typeof window['__PROMISE_INSTRUMENTATION__'] === 'object') {\n  let callbacks = window['__PROMISE_INSTRUMENTATION__'];\n  configure('instrument', true);\n  for (let eventName in callbacks) {\n    if (callbacks.hasOwnProperty(eventName)) {\n      on(eventName, callbacks[eventName]);\n    }\n  }\n}\n\n// the default export here is for backwards compat:\n//   https://github.com/tildeio/rsvp.js/issues/434\nconst RSVP = {\n  asap,\n  cast,\n  Promise: Promise$1,\n  EventTarget,\n  all,\n  allSettled,\n  race,\n  hash,\n  hashSettled,\n  rethrow,\n  defer,\n  denodeify,\n  configure,\n  on,\n  off,\n  resolve,\n  reject,\n  map,\n  async,\n  filter\n};\n\nconst RSVP$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({\n  __proto__: null,\n  EventTarget,\n  Promise: Promise$1,\n  all,\n  allSettled,\n  asap,\n  async,\n  cast,\n  configure,\n  default: RSVP,\n  defer,\n  denodeify,\n  filter,\n  hash,\n  hashSettled,\n  map,\n  off,\n  on,\n  race,\n  reject,\n  resolve,\n  rethrow\n}, Symbol.toStringTag, { value: 'Module' }));\n\nexport { EventTarget as E, Promise$1 as P, RSVP$1 as R, RSVP as a, all as b, configure as c, allSettled as d, asap as e, async as f, cast as g, defer as h, denodeify as i, filter as j, hash as k, hashSettled as l, map as m, off as n, on as o, reject as p, resolve as q, race as r, rethrow as s };\n","import './capabilities-DHiXCCuB.js';\nimport './debug-to-string-BsFOvUtQ.js';\nimport '@embroider/macros';\nimport '../@glimmer/global-context/index.js';\nimport '../@glimmer/validator/index.js';\nimport './reference-B6HMX4y0.js';\nimport { C as ConcreteBounds } from './dynamic-CuBsUXX8.js';\nimport './constants-oDhF27qL.js';\nimport '../@glimmer/destroyable/index.js';\nimport { N as NewTreeBuilder } from './element-builder-BuVym8EM.js';\n\n/* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */\n\nconst TEXT_NODE = 3;\nconst NEEDS_EXTRA_CLOSE = new WeakMap();\nfunction currentNode(cursor) {\n  let {\n    element,\n    nextSibling\n  } = cursor;\n  if (nextSibling === null) {\n    return element.lastChild;\n  } else {\n    return nextSibling.previousSibling;\n  }\n}\nclass SerializeBuilder extends NewTreeBuilder {\n  serializeBlockDepth = 0;\n  __openBlock() {\n    let {\n      tagName\n    } = this.element;\n    if (tagName !== 'TITLE' && tagName !== 'SCRIPT' && tagName !== 'STYLE') {\n      let depth = this.serializeBlockDepth++;\n      this.__appendComment(`%+b:${depth}%`);\n    }\n    super.__openBlock();\n  }\n  __closeBlock() {\n    let {\n      tagName\n    } = this.element;\n    super.__closeBlock();\n    if (tagName !== 'TITLE' && tagName !== 'SCRIPT' && tagName !== 'STYLE') {\n      let depth = --this.serializeBlockDepth;\n      this.__appendComment(`%-b:${depth}%`);\n    }\n  }\n  __appendHTML(html) {\n    let {\n      tagName\n    } = this.element;\n    if (tagName === 'TITLE' || tagName === 'SCRIPT' || tagName === 'STYLE') {\n      return super.__appendHTML(html);\n    }\n\n    // Do we need to run the html tokenizer here?\n    let first = this.__appendComment('%glmr%');\n    if (tagName === 'TABLE') {\n      let openIndex = html.indexOf('<');\n      if (openIndex > -1) {\n        let tr = html.slice(openIndex + 1, openIndex + 3);\n        if (tr === 'tr') {\n          html = `<tbody>${html}</tbody>`;\n        }\n      }\n    }\n    if (html === '') {\n      this.__appendComment('% %');\n    } else {\n      super.__appendHTML(html);\n    }\n    let last = this.__appendComment('%glmr%');\n    return new ConcreteBounds(this.element, first, last);\n  }\n  __appendText(string) {\n    let {\n      tagName\n    } = this.element;\n    let current = currentNode(this);\n    if (tagName === 'TITLE' || tagName === 'SCRIPT' || tagName === 'STYLE') {\n      return super.__appendText(string);\n    } else if (string === '') {\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      return this.__appendComment('% %');\n    } else if (current && current.nodeType === TEXT_NODE) {\n      this.__appendComment('%|%');\n    }\n    return super.__appendText(string);\n  }\n  closeElement() {\n    if (NEEDS_EXTRA_CLOSE.has(this.element)) {\n      NEEDS_EXTRA_CLOSE.delete(this.element);\n      super.closeElement();\n    }\n    return super.closeElement();\n  }\n  openElement(tag) {\n    if (tag === 'tr') {\n      if (this.element.tagName !== 'TBODY' && this.element.tagName !== 'THEAD' && this.element.tagName !== 'TFOOT') {\n        this.openElement('tbody');\n        // This prevents the closeBlock comment from being re-parented\n        // under the auto inserted tbody. Rehydration builder needs to\n        // account for the insertion since it is injected here and not\n        // really in the template.\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n        NEEDS_EXTRA_CLOSE.set(this.constructing, true);\n        this.flushElement(null);\n      }\n    }\n    return super.openElement(tag);\n  }\n  pushRemoteElement(element, cursorId, insertBefore = null) {\n    let {\n      dom\n    } = this;\n    let script = dom.createElement('script');\n    script.setAttribute('glmr', cursorId);\n    dom.insertBefore(element, script, insertBefore);\n    return super.pushRemoteElement(element, cursorId, insertBefore);\n  }\n}\nfunction serializeBuilder(env, cursor) {\n  return SerializeBuilder.forInitialRender(env, cursor);\n}\n\nexport { serializeBuilder as s };\n","import { g as get, T as changeProperties } from './observers-DhgQ6ba5.js';\nimport { s as set } from './property_set-DrZnfGQ7.js';\n\n/**\n @module @ember/object\n*/\n\n/**\n  To get multiple properties at once, call `getProperties`\n  with an object followed by a list of strings or an array:\n\n  ```javascript\n  import { getProperties } from '@ember/object';\n\n  getProperties(record, 'firstName', 'lastName', 'zipCode');\n  // { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n  ```\n\n  is equivalent to:\n\n  ```javascript\n  import { getProperties } from '@ember/object';\n\n  getProperties(record, ['firstName', 'lastName', 'zipCode']);\n  // { firstName: 'John', lastName: 'Doe', zipCode: '10011' }\n  ```\n\n  @method getProperties\n  @static\n  @for @ember/object\n  @param {Object} obj\n  @param {String...|Array} list of keys to get\n  @return {Object}\n  @public\n*/\n\nfunction getProperties(obj, keys) {\n  let ret = {};\n  let propertyNames;\n  let i = 1;\n  if (arguments.length === 2 && Array.isArray(keys)) {\n    i = 0;\n    propertyNames = arguments[1];\n  } else {\n    propertyNames = Array.from(arguments);\n  }\n  for (; i < propertyNames.length; i++) {\n    // SAFETY: we are just walking the list of property names, so we know the\n    // index access never produces `undefined`.\n    let name = propertyNames[i];\n    ret[name] = get(obj, name);\n  }\n  return ret;\n}\n\n/**\n @module @ember/object\n*/\n/**\n  Set a list of properties on an object. These properties are set inside\n  a single `beginPropertyChanges` and `endPropertyChanges` batch, so\n  observers will be buffered.\n\n  ```javascript\n  import EmberObject from '@ember/object';\n  let anObject = EmberObject.create();\n\n  anObject.setProperties({\n    firstName: 'Stanley',\n    lastName: 'Stuart',\n    age: 21\n  });\n  ```\n\n  @method setProperties\n  @static\n  @for @ember/object\n  @param obj\n  @param {Object} properties\n  @return properties\n  @public\n*/\n\nfunction setProperties(obj, properties) {\n  if (properties === null || typeof properties !== 'object') {\n    return properties;\n  }\n  changeProperties(() => {\n    let props = Object.keys(properties);\n    for (let propertyName of props) {\n      // SAFETY: casting `properties` this way is safe because any object in JS\n      // can be indexed this way, and the result will be `unknown`, making it\n      // safe for callers.\n      set(obj, propertyName, properties[propertyName]);\n    }\n  });\n  return properties;\n}\n\nexport { getProperties as g, setProperties as s };\n","import { p as privatize } from './registry-XY5cfmbH.js';\nimport { getOwner } from '../@ember/-internals/owner/index.js';\nimport '../@ember/debug/index.js';\nimport { O as OutletView, f as OutletTemplate, I as Input, L as LinkTo, T as Textarea, a as RootTemplate, R as Renderer } from './index-ByyoGpfz.js';\nimport './capabilities-DHiXCCuB.js';\nimport './debug-to-string-BsFOvUtQ.js';\nimport { isDevelopingApp } from '@embroider/macros';\nimport '../@glimmer/global-context/index.js';\nimport '../@glimmer/validator/index.js';\nimport './reference-B6HMX4y0.js';\nimport './dynamic-CuBsUXX8.js';\nimport './constants-oDhF27qL.js';\nimport '../@glimmer/destroyable/index.js';\nimport { c as clientBuilder } from './element-builder-BuVym8EM.js';\nimport { rehydrationBuilder } from '../@glimmer/runtime/index.js';\nimport { s as serializeBuilder } from './serialize-builder-DEgRJgNQ.js';\nimport { assert } from '../@ember/debug/lib/assert.js';\n\nfunction setupApplicationRegistry(registry) {\n  // because we are using injections we can't use instantiate false\n  // we need to use bind() to copy the function so factory for\n  // association won't leak\n  registry.register('service:-dom-builder', {\n    // Additionally, we *must* constrain this to require `props` on create, else\n    // we *know* it cannot have an owner.\n    create(props) {\n      let owner = getOwner(props);\n      (isDevelopingApp() && !(owner) && assert('DomBuilderService is unexpectedly missing an owner', owner));\n      let env = owner.lookup('-environment:main');\n      switch (env._renderMode) {\n        case 'serialize':\n          return serializeBuilder.bind(null);\n        case 'rehydrate':\n          return rehydrationBuilder.bind(null);\n        default:\n          return clientBuilder.bind(null);\n      }\n    }\n  });\n  registry.register(privatize`template:-root`, RootTemplate);\n  registry.register('renderer:-dom', Renderer);\n}\nfunction setupEngineRegistry(registry) {\n  registry.optionsForType('template', {\n    instantiate: false\n  });\n  registry.register('view:-outlet', OutletView);\n  registry.register('template:-outlet', OutletTemplate);\n  registry.optionsForType('helper', {\n    instantiate: false\n  });\n  registry.register('component:input', Input);\n  registry.register('component:link-to', LinkTo);\n  registry.register('component:textarea', Textarea);\n}\n\nexport { setupEngineRegistry as a, setupApplicationRegistry as s };\n","function castToSimple(node) {\n  if (isDocument(node)) {\n    return node;\n  } else if (isSimpleElement(node)) {\n    return node;\n  } else {\n    return node;\n  }\n}\n\n// If passed a document, verify we're in the browser and return it as a Document\n\n// If we don't know what this is, but the check requires it to be an element,\n// the cast will mandate that it's a browser element\n\n// Finally, if it's a more generic check, the cast will mandate that it's a\n// browser node and return a BrowserNodeUtils corresponding to the check\n\nfunction castToBrowser(node, sugaryCheck) {\n  {\n    return node;\n  }\n}\nconst ELEMENT_NODE = 1;\nconst DOCUMENT_NODE = 9;\nfunction isDocument(node) {\n  return node.nodeType === DOCUMENT_NODE;\n}\nfunction isSimpleElement(node) {\n  return node?.nodeType === ELEMENT_NODE;\n}\n\nexport { castToSimple as a, castToBrowser as c };\n","// STATE within a module is frowned upon, this exists\n// to support Ember.TEMPLATES but shield ember internals from this legacy\n// global API.\n\nlet TEMPLATES = {};\nfunction setTemplates(templates) {\n  TEMPLATES = templates;\n}\nfunction getTemplates() {\n  return TEMPLATES;\n}\nfunction getTemplate(name) {\n  if (Object.prototype.hasOwnProperty.call(TEMPLATES, name)) {\n    return TEMPLATES[name];\n  }\n}\nfunction hasTemplate(name) {\n  return Object.prototype.hasOwnProperty.call(TEMPLATES, name);\n}\nfunction setTemplate(name, template) {\n  return TEMPLATES[name] = template;\n}\n\nexport { getTemplates as a, setTemplates as b, getTemplate as g, hasTemplate as h, setTemplate as s };\n","import { G as GUID_KEY, i as intern } from './mandatory-setter-DLKyVs4Q.js';\nimport { isDevelopingApp } from '@embroider/macros';\n\nconst GENERATED_SYMBOLS = [];\nfunction isInternalSymbol(possibleSymbol) {\n  return GENERATED_SYMBOLS.indexOf(possibleSymbol) !== -1;\n}\n\n// Some legacy symbols still need to be enumerable for a variety of reasons.\n// This code exists for that, and as a fallback in IE11. In general, prefer\n// `symbol` below when creating a new symbol.\nfunction enumerableSymbol(debugName) {\n  // TODO: Investigate using platform symbols, but we do not\n  // want to require non-enumerability for this API, which\n  // would introduce a large cost.\n  let id = GUID_KEY + Math.floor(Math.random() * Date.now()).toString();\n  let symbol = intern(`__${debugName}${id}__`);\n  if (isDevelopingApp()) {\n    GENERATED_SYMBOLS.push(symbol);\n  }\n  return symbol;\n}\nconst symbol = Symbol;\n\nconst objectToString = Object.prototype.toString;\nfunction isNone(obj) {\n  return obj === null || obj === undefined;\n}\n\n/*\n A `toString` util function that supports objects without a `toString`\n method, e.g. an object created with `Object.create(null)`.\n*/\nfunction toString(obj) {\n  if (typeof obj === 'string') {\n    return obj;\n  }\n  if (null === obj) return 'null';\n  if (undefined === obj) return 'undefined';\n  if (Array.isArray(obj)) {\n    // Reimplement Array.prototype.join according to spec (22.1.3.13)\n    // Changing ToString(element) with this safe version of ToString.\n    let r = '';\n    for (let k = 0; k < obj.length; k++) {\n      if (k > 0) {\n        r += ',';\n      }\n      if (!isNone(obj[k])) {\n        r += toString(obj[k]);\n      }\n    }\n    return r;\n  }\n  if (typeof obj.toString === 'function') {\n    return obj.toString();\n  }\n  return objectToString.call(obj);\n}\n\nexport { enumerableSymbol as e, isInternalSymbol as i, symbol as s, toString as t };\n","import { P as Promise$1 } from './rsvp-CnCSY930.js';\nimport { isDevelopingApp } from '@embroider/macros';\n\nfunction buildTransitionAborted() {\n  let error = new Error('TransitionAborted');\n  error.name = 'TransitionAborted';\n  error.code = 'TRANSITION_ABORTED';\n  return error;\n}\nfunction isTransitionAborted(maybeError) {\n  return typeof maybeError === 'object' && maybeError !== null && maybeError.code === 'TRANSITION_ABORTED';\n}\nfunction isAbortable(maybeAbortable) {\n  return typeof maybeAbortable === 'object' && maybeAbortable !== null && typeof maybeAbortable.isAborted === 'boolean';\n}\nfunction throwIfAborted(maybe) {\n  if (isAbortable(maybe) && maybe.isAborted) {\n    throw buildTransitionAborted();\n  }\n}\n\nconst slice = Array.prototype.slice;\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n  Determines if an object is Promise by checking if it is \"thenable\".\n**/\nfunction isPromise(p) {\n  return p !== null && typeof p === 'object' && typeof p.then === 'function';\n}\nfunction merge(hash, other) {\n  for (let prop in other) {\n    if (hasOwnProperty.call(other, prop)) {\n      hash[prop] = other[prop];\n    }\n  }\n}\n/**\n  @private\n\n  Extracts query params from the end of an array\n**/\nfunction extractQueryParams(array) {\n  let len = array && array.length,\n    head,\n    queryParams;\n  if (len && len > 0) {\n    let obj = array[len - 1];\n    if (isQueryParamsContainer(obj)) {\n      queryParams = obj.queryParams;\n      head = slice.call(array, 0, len - 1);\n      return [head, queryParams];\n    }\n  }\n  // SAFETY: We confirmed that the last item isn't a QP container\n  return [array, null];\n}\n// TODO: Actually check that Dict is QueryParams\nfunction isQueryParamsContainer(obj) {\n  if (obj && typeof obj === 'object') {\n    let cast = obj;\n    return 'queryParams' in cast && Object.keys(cast.queryParams).every(k => typeof k === 'string');\n  }\n  return false;\n}\n/**\n  @private\n\n  Coerces query param properties and array elements into strings.\n**/\nfunction coerceQueryParamsToString(queryParams) {\n  for (let key in queryParams) {\n    let val = queryParams[key];\n    if (typeof val === 'number') {\n      queryParams[key] = '' + val;\n    } else if (Array.isArray(val)) {\n      for (let i = 0, l = val.length; i < l; i++) {\n        val[i] = '' + val[i];\n      }\n    }\n  }\n}\n/**\n  @private\n */\nfunction log(router, ...args) {\n  if (!router.log) {\n    return;\n  }\n  if (args.length === 2) {\n    let [sequence, msg] = args;\n    router.log('Transition #' + sequence + ': ' + msg);\n  } else {\n    let [msg] = args;\n    router.log(msg);\n  }\n}\nfunction isParam(object) {\n  return typeof object === 'string' || object instanceof String || typeof object === 'number' || object instanceof Number;\n}\nfunction forEach(array, callback) {\n  for (let i = 0, l = array.length; i < l && callback(array[i]) !== false; i++) {\n    // empty intentionally\n  }\n}\nfunction getChangelist(oldObject, newObject) {\n  let key;\n  let results = {\n    all: {},\n    changed: {},\n    removed: {}\n  };\n  merge(results.all, newObject);\n  let didChange = false;\n  coerceQueryParamsToString(oldObject);\n  coerceQueryParamsToString(newObject);\n  // Calculate removals\n  for (key in oldObject) {\n    if (hasOwnProperty.call(oldObject, key)) {\n      if (!hasOwnProperty.call(newObject, key)) {\n        didChange = true;\n        results.removed[key] = oldObject[key];\n      }\n    }\n  }\n  // Calculate changes\n  for (key in newObject) {\n    if (hasOwnProperty.call(newObject, key)) {\n      let oldElement = oldObject[key];\n      let newElement = newObject[key];\n      if (isArray(oldElement) && isArray(newElement)) {\n        if (oldElement.length !== newElement.length) {\n          results.changed[key] = newObject[key];\n          didChange = true;\n        } else {\n          for (let i = 0, l = oldElement.length; i < l; i++) {\n            if (oldElement[i] !== newElement[i]) {\n              results.changed[key] = newObject[key];\n              didChange = true;\n            }\n          }\n        }\n      } else if (oldObject[key] !== newObject[key]) {\n        results.changed[key] = newObject[key];\n        didChange = true;\n      }\n    }\n  }\n  return didChange ? results : undefined;\n}\nfunction isArray(obj) {\n  return Array.isArray(obj);\n}\nfunction promiseLabel(label) {\n  return 'Router: ' + label;\n}\n\nconst STATE_SYMBOL = `__STATE__-2619860001345920-3322w3`;\nconst PARAMS_SYMBOL = `__PARAMS__-261986232992830203-23323`;\nconst QUERY_PARAMS_SYMBOL = `__QPS__-2619863929824844-32323`;\nconst REDIRECT_DESTINATION_SYMBOL = `__RDS__-2619863929824844-32323`;\n/**\n  A Transition is a thenable (a promise-like object) that represents\n  an attempt to transition to another route. It can be aborted, either\n  explicitly via `abort` or by attempting another transition while a\n  previous one is still underway. An aborted transition can also\n  be `retry()`d later.\n\n  @class Transition\n  @constructor\n  @param {Object} router\n  @param {Object} intent\n  @param {Object} state\n  @param {Object} error\n  @private\n */\nclass Transition {\n  constructor(router, intent, state, error = undefined, previousTransition = undefined) {\n    this.from = null;\n    this.to = undefined;\n    this.isAborted = false;\n    this.isActive = true;\n    this.urlMethod = 'update';\n    this.resolveIndex = 0;\n    this.queryParamsOnly = false;\n    this.isTransition = true;\n    this.isCausedByAbortingTransition = false;\n    this.isCausedByInitialTransition = false;\n    this.isCausedByAbortingReplaceTransition = false;\n    this._visibleQueryParams = {};\n    this.isIntermediate = false;\n    this[STATE_SYMBOL] = state || router.state;\n    this.intent = intent;\n    this.router = router;\n    this.data = intent && intent.data || {};\n    this.resolvedModels = {};\n    this[QUERY_PARAMS_SYMBOL] = {};\n    this.promise = undefined;\n    this.error = undefined;\n    this[PARAMS_SYMBOL] = {};\n    this.routeInfos = [];\n    this.targetName = undefined;\n    this.pivotHandler = undefined;\n    this.sequence = -1;\n    if (isDevelopingApp()) {\n      let error = new Error(`Transition creation stack`);\n      this.debugCreationStack = () => error.stack;\n      // not aborted yet, will be replaced when `this.isAborted` is set\n      this.debugAbortStack = () => undefined;\n      this.debugPreviousTransition = previousTransition;\n    }\n    if (error) {\n      this.promise = Promise$1.reject(error);\n      this.error = error;\n      return;\n    }\n    // if you're doing multiple redirects, need the new transition to know if it\n    // is actually part of the first transition or not. Any further redirects\n    // in the initial transition also need to know if they are part of the\n    // initial transition\n    this.isCausedByAbortingTransition = !!previousTransition;\n    this.isCausedByInitialTransition = !!previousTransition && (previousTransition.isCausedByInitialTransition || previousTransition.sequence === 0);\n    // Every transition in the chain is a replace\n    this.isCausedByAbortingReplaceTransition = !!previousTransition && previousTransition.urlMethod === 'replace' && (!previousTransition.isCausedByAbortingTransition || previousTransition.isCausedByAbortingReplaceTransition);\n    if (state) {\n      this[PARAMS_SYMBOL] = state.params;\n      this[QUERY_PARAMS_SYMBOL] = state.queryParams;\n      this.routeInfos = state.routeInfos;\n      let len = state.routeInfos.length;\n      if (len) {\n        this.targetName = state.routeInfos[len - 1].name;\n      }\n      for (let i = 0; i < len; ++i) {\n        let handlerInfo = state.routeInfos[i];\n        // TODO: this all seems hacky\n        if (!handlerInfo.isResolved) {\n          break;\n        }\n        this.pivotHandler = handlerInfo.route;\n      }\n      this.sequence = router.currentSequence++;\n      this.promise = state.resolve(this).catch(result => {\n        let error = this.router.transitionDidError(result, this);\n        throw error;\n      }, promiseLabel('Handle Abort'));\n    } else {\n      this.promise = Promise$1.resolve(this[STATE_SYMBOL]);\n      this[PARAMS_SYMBOL] = {};\n    }\n  }\n  /**\n    The Transition's internal promise. Calling `.then` on this property\n    is that same as calling `.then` on the Transition object itself, but\n    this property is exposed for when you want to pass around a\n    Transition's promise, but not the Transition object itself, since\n    Transition object can be externally `abort`ed, while the promise\n    cannot.\n       @property promise\n    @type {Object}\n    @public\n   */\n  /**\n    Custom state can be stored on a Transition's `data` object.\n    This can be useful for decorating a Transition within an earlier\n    hook and shared with a later hook. Properties set on `data` will\n    be copied to new transitions generated by calling `retry` on this\n    transition.\n       @property data\n    @type {Object}\n    @public\n   */\n  /**\n    A standard promise hook that resolves if the transition\n    succeeds and rejects if it fails/redirects/aborts.\n       Forwards to the internal `promise` property which you can\n    use in situations where you want to pass around a thenable,\n    but not the Transition itself.\n       @method then\n    @param {Function} onFulfilled\n    @param {Function} onRejected\n    @param {String} label optional string for labeling the promise.\n    Useful for tooling.\n    @return {Promise}\n    @public\n   */\n  then(onFulfilled, onRejected, label) {\n    return this.promise.then(onFulfilled, onRejected, label);\n  }\n  /**\n       Forwards to the internal `promise` property which you can\n    use in situations where you want to pass around a thennable,\n    but not the Transition itself.\n       @method catch\n    @param {Function} onRejection\n    @param {String} label optional string for labeling the promise.\n    Useful for tooling.\n    @return {Promise}\n    @public\n   */\n  catch(onRejection, label) {\n    return this.promise.catch(onRejection, label);\n  }\n  /**\n       Forwards to the internal `promise` property which you can\n    use in situations where you want to pass around a thenable,\n    but not the Transition itself.\n       @method finally\n    @param {Function} callback\n    @param {String} label optional string for labeling the promise.\n    Useful for tooling.\n    @return {Promise}\n    @public\n   */\n  finally(callback, label) {\n    return this.promise.finally(callback, label);\n  }\n  /**\n    Aborts the Transition. Note you can also implicitly abort a transition\n    by initiating another transition while a previous one is underway.\n       @method abort\n    @return {Transition} this transition\n    @public\n   */\n  abort() {\n    this.rollback();\n    let transition = new Transition(this.router, undefined, undefined, undefined);\n    transition.to = this.from;\n    transition.from = this.from;\n    transition.isAborted = true;\n    this.router.routeWillChange(transition);\n    this.router.routeDidChange(transition);\n    return this;\n  }\n  rollback() {\n    if (!this.isAborted) {\n      log(this.router, this.sequence, this.targetName + ': transition was aborted');\n      if (isDevelopingApp()) {\n        let error = new Error(`Transition aborted stack`);\n        this.debugAbortStack = () => error.stack;\n      }\n      if (this.intent !== undefined && this.intent !== null) {\n        this.intent.preTransitionState = this.router.state;\n      }\n      this.isAborted = true;\n      this.isActive = false;\n      this.router.activeTransition = undefined;\n    }\n  }\n  redirect(newTransition) {\n    this[REDIRECT_DESTINATION_SYMBOL] = newTransition;\n    this.rollback();\n    this.router.routeWillChange(newTransition);\n  }\n  /**\n       Retries a previously-aborted transition (making sure to abort the\n    transition if it's still active). Returns a new transition that\n    represents the new attempt to transition.\n       @method retry\n    @return {Transition} new transition\n    @public\n   */\n  retry() {\n    // TODO: add tests for merged state retry()s\n    this.abort();\n    let newTransition = this.router.transitionByIntent(this.intent, false);\n    // inheriting a `null` urlMethod is not valid\n    // the urlMethod is only set to `null` when\n    // the transition is initiated *after* the url\n    // has been updated (i.e. `router.handleURL`)\n    //\n    // in that scenario, the url method cannot be\n    // inherited for a new transition because then\n    // the url would not update even though it should\n    if (this.urlMethod !== null) {\n      newTransition.method(this.urlMethod);\n    }\n    return newTransition;\n  }\n  /**\n       Sets the URL-changing method to be employed at the end of a\n    successful transition. By default, a new Transition will just\n    use `updateURL`, but passing 'replace' to this method will\n    cause the URL to update using 'replaceWith' instead. Omitting\n    a parameter will disable the URL change, allowing for transitions\n    that don't update the URL at completion (this is also used for\n    handleURL, since the URL has already changed before the\n    transition took place).\n       @method method\n    @param {String} method the type of URL-changing method to use\n      at the end of a transition. Accepted values are 'replace',\n      falsy values, or any other non-falsy value (which is\n      interpreted as an updateURL transition).\n       @return {Transition} this transition\n    @public\n   */\n  method(method) {\n    this.urlMethod = method;\n    return this;\n  }\n  // Alias 'trigger' as 'send'\n  send(ignoreFailure = false, _name, err, transition, handler) {\n    this.trigger(ignoreFailure, _name, err, transition, handler);\n  }\n  /**\n       Fires an event on the current list of resolved/resolving\n    handlers within this transition. Useful for firing events\n    on route hierarchies that haven't fully been entered yet.\n       Note: This method is also aliased as `send`\n       @method trigger\n    @param {Boolean} [ignoreFailure=false] a boolean specifying whether unhandled events throw an error\n    @param {String} name the name of the event to fire\n    @public\n   */\n  trigger(ignoreFailure = false, name, ...args) {\n    // TODO: Deprecate the current signature\n    if (typeof ignoreFailure === 'string') {\n      name = ignoreFailure;\n      ignoreFailure = false;\n    }\n    this.router.triggerEvent(this[STATE_SYMBOL].routeInfos.slice(0, this.resolveIndex + 1), ignoreFailure, name, args);\n  }\n  /**\n    Transitions are aborted and their promises rejected\n    when redirects occur; this method returns a promise\n    that will follow any redirects that occur and fulfill\n    with the value fulfilled by any redirecting transitions\n    that occur.\n       @method followRedirects\n    @return {Promise} a promise that fulfills with the same\n      value that the final redirecting transition fulfills with\n    @public\n   */\n  followRedirects() {\n    return this.promise.catch(reason => {\n      if (this[REDIRECT_DESTINATION_SYMBOL]) {\n        return this[REDIRECT_DESTINATION_SYMBOL].followRedirects();\n      }\n      return Promise$1.reject(reason);\n    });\n  }\n  toString() {\n    return 'Transition (sequence ' + this.sequence + ')';\n  }\n  /**\n    @private\n   */\n  log(message) {\n    log(this.router, this.sequence, message);\n  }\n}\n/**\n  @private\n\n  Logs and returns an instance of TransitionAborted.\n */\nfunction logAbort(transition) {\n  log(transition.router, transition.sequence, 'detected abort.');\n  return buildTransitionAborted();\n}\nfunction isTransition(obj) {\n  return typeof obj === 'object' && obj instanceof Transition && obj.isTransition;\n}\nfunction prepareResult(obj) {\n  if (isTransition(obj)) {\n    return null;\n  }\n  return obj;\n}\n\nconst UnrecognizedURLError = function () {\n  UnrecognizedURLError.prototype = Object.create(Error.prototype);\n  UnrecognizedURLError.prototype.constructor = UnrecognizedURLError;\n  function UnrecognizedURLError(message) {\n    let error = Error.call(this, message);\n    this.name = 'UnrecognizedURLError';\n    this.message = message || 'UnrecognizedURL';\n    if (Error.captureStackTrace) {\n      Error.captureStackTrace(this, UnrecognizedURLError);\n    } else {\n      this.stack = error.stack;\n    }\n  }\n  return UnrecognizedURLError;\n}();\n\nexport { PARAMS_SYMBOL as P, QUERY_PARAMS_SYMBOL as Q, STATE_SYMBOL as S, Transition as T, UnrecognizedURLError as U, isParam as a, isPromise as b, promiseLabel as c, log as d, isTransitionAborted as e, forEach as f, getChangelist as g, extractQueryParams as h, isTransition as i, logAbort as l, merge as m, prepareResult as p, throwIfAborted as t };\n","import Modifier from 'ember-modifier';\nimport { assert } from '@ember/debug';\nimport { typeOf } from '@ember/utils';\nimport type * as CSS from 'csstype';\n\n// Cannot be typed as `Partial<CSSStyleDeclaration>` because `CSSStyleDeclaration`\n// interface does _not_ included dashed CSS property names. It only includes the\n// camelCase version of a CSS property.\n// https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1672\ntype CSSStyles =\n  | Partial<CSS.Properties>\n  | Partial<CSS.PropertiesHyphen>\n  | { readonly [key: `--${string}`]: string };\n\nfunction isObject(o: unknown): boolean {\n  return typeof o === 'object' && Boolean(o);\n}\n\nconst DASHERIZE_REGEX = /([a-z\\d])([A-Z])/g;\nconst DASHERIZE_REPLACEMENT = '$1-$2';\n\nfunction dasherize(str: string): string {\n  return str.replace(DASHERIZE_REGEX, DASHERIZE_REPLACEMENT).toLowerCase();\n}\n\n/**\n * Returns a two-dimensional array, like:\n *\n * ```js\n * [\n *   ['font-size', '16px'],\n *   ['text-align', 'center'],\n *   ['color', 'red']\n * ]\n * ```\n *\n * This data structure is slightly faster to process than an object / dictionary.\n */\nfunction compileStyles(\n  positional: CSSStyles[],\n  named: CSSStyles,\n): [string, string][] {\n  return [...positional.filter(isObject), named]\n    .map((obj) =>\n      Object.entries(obj).map(\n        ([k, v]) => [dasherize(k), v] as [string, string],\n      ),\n    )\n    .flat();\n}\n\nexport interface StyleModifierSignature {\n  Element: Element & ElementCSSInlineStyle;\n  Args: {\n    Positional: CSSStyles[];\n    Named: CSSStyles;\n  };\n}\n\nexport default class StyleModifier extends Modifier<StyleModifierSignature> {\n  existingStyles: Set<string> = new Set();\n\n  setStyles(\n    element: StyleModifierSignature['Element'],\n    newStyles: [string, string][],\n  ) {\n    const { existingStyles } = this;\n    const rulesToRemove: Set<string> = new Set(existingStyles);\n\n    // clear cache of existing styles\n    existingStyles.clear();\n\n    newStyles.forEach(([property, value]) => {\n      assert(\n        `Your given value for property '${property}' is ${value} (${typeOf(\n          value,\n        )}). ` +\n          'Accepted types are string and undefined. Please change accordingly.',\n        typeof value === 'undefined' || typeOf(value) === 'string',\n      );\n\n      // priority must be specified as separate argument\n      // value must not contain \"!important\"\n      let priority = '';\n      if (value && value.includes('!important')) {\n        priority = 'important';\n        value = value.replace('!important', '');\n      }\n\n      // update CSSOM\n      element.style.setProperty(property, value, priority);\n\n      // should not remove rules that have been updated in this cycle\n      rulesToRemove.delete(property);\n\n      // cache styles that have been set for potential clean-up when argument changes\n      existingStyles.add(property);\n    });\n\n    // remove rules that were present in last cycle but aren't present in this one\n    rulesToRemove.forEach((rule) => element.style.removeProperty(rule));\n  }\n\n  modify(\n    element: StyleModifierSignature['Element'],\n    positional: [CSSStyles] | [],\n    named: CSSStyles,\n  ) {\n    this.setStyles(element, compileStyles(positional, named));\n  }\n}\n","//! moment.js locale configuration\n//! locale : Arabic [ar]\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n\n;(function (global, factory) {\n   typeof exports === 'object' && typeof module !== 'undefined'\n       && typeof require === 'function' ? factory(require('../moment')) :\n   typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n   factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n    //! moment.js locale configuration\n\n    var symbolMap = {\n            1: '١',\n            2: '٢',\n            3: '٣',\n            4: '٤',\n            5: '٥',\n            6: '٦',\n            7: '٧',\n            8: '٨',\n            9: '٩',\n            0: '٠',\n        },\n        numberMap = {\n            '١': '1',\n            '٢': '2',\n            '٣': '3',\n            '٤': '4',\n            '٥': '5',\n            '٦': '6',\n            '٧': '7',\n            '٨': '8',\n            '٩': '9',\n            '٠': '0',\n        },\n        pluralForm = function (n) {\n            return n === 0\n                ? 0\n                : n === 1\n                  ? 1\n                  : n === 2\n                    ? 2\n                    : n % 100 >= 3 && n % 100 <= 10\n                      ? 3\n                      : n % 100 >= 11\n                        ? 4\n                        : 5;\n        },\n        plurals = {\n            s: [\n                'أقل من ثانية',\n                'ثانية واحدة',\n                ['ثانيتان', 'ثانيتين'],\n                '%d ثوان',\n                '%d ثانية',\n                '%d ثانية',\n            ],\n            m: [\n                'أقل من دقيقة',\n                'دقيقة واحدة',\n                ['دقيقتان', 'دقيقتين'],\n                '%d دقائق',\n                '%d دقيقة',\n                '%d دقيقة',\n            ],\n            h: [\n                'أقل من ساعة',\n                'ساعة واحدة',\n                ['ساعتان', 'ساعتين'],\n                '%d ساعات',\n                '%d ساعة',\n                '%d ساعة',\n            ],\n            d: [\n                'أقل من يوم',\n                'يوم واحد',\n                ['يومان', 'يومين'],\n                '%d أيام',\n                '%d يومًا',\n                '%d يوم',\n            ],\n            M: [\n                'أقل من شهر',\n                'شهر واحد',\n                ['شهران', 'شهرين'],\n                '%d أشهر',\n                '%d شهرا',\n                '%d شهر',\n            ],\n            y: [\n                'أقل من عام',\n                'عام واحد',\n                ['عامان', 'عامين'],\n                '%d أعوام',\n                '%d عامًا',\n                '%d عام',\n            ],\n        },\n        pluralize = function (u) {\n            return function (number, withoutSuffix, string, isFuture) {\n                var f = pluralForm(number),\n                    str = plurals[u][pluralForm(number)];\n                if (f === 2) {\n                    str = str[withoutSuffix ? 0 : 1];\n                }\n                return str.replace(/%d/i, number);\n            };\n        },\n        months = [\n            'يناير',\n            'فبراير',\n            'مارس',\n            'أبريل',\n            'مايو',\n            'يونيو',\n            'يوليو',\n            'أغسطس',\n            'سبتمبر',\n            'أكتوبر',\n            'نوفمبر',\n            'ديسمبر',\n        ];\n\n    var ar = moment.defineLocale('ar', {\n        months: months,\n        monthsShort: months,\n        weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n        weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n        weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n        weekdaysParseExact: true,\n        longDateFormat: {\n            LT: 'HH:mm',\n            LTS: 'HH:mm:ss',\n            L: 'D/\\u200FM/\\u200FYYYY',\n            LL: 'D MMMM YYYY',\n            LLL: 'D MMMM YYYY HH:mm',\n            LLLL: 'dddd D MMMM YYYY HH:mm',\n        },\n        meridiemParse: /ص|م/,\n        isPM: function (input) {\n            return 'م' === input;\n        },\n        meridiem: function (hour, minute, isLower) {\n            if (hour < 12) {\n                return 'ص';\n            } else {\n                return 'م';\n            }\n        },\n        calendar: {\n            sameDay: '[اليوم عند الساعة] LT',\n            nextDay: '[غدًا عند الساعة] LT',\n            nextWeek: 'dddd [عند الساعة] LT',\n            lastDay: '[أمس عند الساعة] LT',\n            lastWeek: 'dddd [عند الساعة] LT',\n            sameElse: 'L',\n        },\n        relativeTime: {\n            future: 'بعد %s',\n            past: 'منذ %s',\n            s: pluralize('s'),\n            ss: pluralize('s'),\n            m: pluralize('m'),\n            mm: pluralize('m'),\n            h: pluralize('h'),\n            hh: pluralize('h'),\n            d: pluralize('d'),\n            dd: pluralize('d'),\n            M: pluralize('M'),\n            MM: pluralize('M'),\n            y: pluralize('y'),\n            yy: pluralize('y'),\n        },\n        preparse: function (string) {\n            return string\n                .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n                    return numberMap[match];\n                })\n                .replace(/،/g, ',');\n        },\n        postformat: function (string) {\n            return string\n                .replace(/\\d/g, function (match) {\n                    return symbolMap[match];\n                })\n                .replace(/,/g, '،');\n        },\n        week: {\n            dow: 6, // Saturday is the first day of the week.\n            doy: 12, // The week that contains Jan 12th is the first week of the year.\n        },\n    });\n\n    return ar;\n\n})));\n","//! moment.js\n//! version : 2.31.0\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n    typeof define === 'function' && define.amd ? define(factory) :\n    global.moment = factory()\n}(this, (function () { 'use strict';\n\n    var hookCallback;\n\n    function hooks() {\n        return hookCallback.apply(null, arguments);\n    }\n\n    // This is done to register the method called with moment()\n    // without creating circular dependencies.\n    function setHookCallback(callback) {\n        hookCallback = callback;\n    }\n\n    function isArray(input) {\n        return (\n            input instanceof Array ||\n            Object.prototype.toString.call(input) === '[object Array]'\n        );\n    }\n\n    function isObject(input) {\n        // IE8 will treat undefined and null as object if it wasn't for\n        // input != null\n        return (\n            input != null &&\n            Object.prototype.toString.call(input) === '[object Object]'\n        );\n    }\n\n    function hasOwnProp(a, b) {\n        return Object.prototype.hasOwnProperty.call(a, b);\n    }\n\n    function isObjectEmpty(obj) {\n        if (Object.getOwnPropertyNames) {\n            return Object.getOwnPropertyNames(obj).length === 0;\n        } else {\n            var k;\n            for (k in obj) {\n                if (hasOwnProp(obj, k)) {\n                    return false;\n                }\n            }\n            return true;\n        }\n    }\n\n    function isUndefined(input) {\n        return input === void 0;\n    }\n\n    function isNumber(input) {\n        return (\n            typeof input === 'number' ||\n            Object.prototype.toString.call(input) === '[object Number]'\n        );\n    }\n\n    function isDate(input) {\n        return (\n            input instanceof Date ||\n            Object.prototype.toString.call(input) === '[object Date]'\n        );\n    }\n\n    function map(arr, fn) {\n        var res = [],\n            i,\n            arrLen = arr.length;\n        for (i = 0; i < arrLen; ++i) {\n            res.push(fn(arr[i], i));\n        }\n        return res;\n    }\n\n    function extend(a, b) {\n        for (var i in b) {\n            if (hasOwnProp(b, i)) {\n                a[i] = b[i];\n            }\n        }\n\n        if (hasOwnProp(b, 'toString')) {\n            a.toString = b.toString;\n        }\n\n        if (hasOwnProp(b, 'valueOf')) {\n            a.valueOf = b.valueOf;\n        }\n\n        return a;\n    }\n\n    function createUTC(input, format, locale, strict) {\n        return createLocalOrUTC(input, format, locale, strict, true).utc();\n    }\n\n    function defaultParsingFlags() {\n        // We need to deep clone this object.\n        return {\n            empty: false,\n            unusedTokens: [],\n            unusedInput: [],\n            overflow: -2,\n            charsLeftOver: 0,\n            nullInput: false,\n            invalidEra: null,\n            invalidMonth: null,\n            invalidOffset: null,\n            invalidFormat: false,\n            userInvalidated: false,\n            iso: false,\n            parsedDateParts: [],\n            era: null,\n            meridiem: null,\n            rfc2822: false,\n            weekdayMismatch: false,\n        };\n    }\n\n    function getParsingFlags(m) {\n        if (m._pf == null) {\n            m._pf = defaultParsingFlags();\n        }\n        return m._pf;\n    }\n\n    var some;\n    if (Array.prototype.some) {\n        some = Array.prototype.some;\n    } else {\n        some = function (fun) {\n            var t = Object(this),\n                len = t.length >>> 0,\n                i;\n\n            for (i = 0; i < len; i++) {\n                if (i in t && fun.call(this, t[i], i, t)) {\n                    return true;\n                }\n            }\n\n            return false;\n        };\n    }\n\n    function isValid$2(m) {\n        var flags = null,\n            parsedParts = false,\n            isNowValid = m._d && !isNaN(m._d.getTime());\n        if (isNowValid) {\n            flags = getParsingFlags(m);\n            parsedParts = some.call(flags.parsedDateParts, function (i) {\n                return i != null;\n            });\n            isNowValid =\n                flags.overflow < 0 &&\n                !flags.empty &&\n                !flags.invalidEra &&\n                !flags.invalidMonth &&\n                !flags.invalidOffset &&\n                !flags.invalidWeekday &&\n                !flags.weekdayMismatch &&\n                !flags.nullInput &&\n                !flags.invalidFormat &&\n                !flags.userInvalidated &&\n                (!flags.meridiem || (flags.meridiem && parsedParts));\n            if (m._strict) {\n                isNowValid =\n                    isNowValid &&\n                    flags.charsLeftOver === 0 &&\n                    flags.unusedTokens.length === 0 &&\n                    flags.bigHour === undefined;\n            }\n        }\n        if (Object.isFrozen == null || !Object.isFrozen(m)) {\n            m._isValid = isNowValid;\n        } else {\n            return isNowValid;\n        }\n        return m._isValid;\n    }\n\n    function createInvalid$1(flags) {\n        var m = createUTC(NaN);\n        if (flags != null) {\n            extend(getParsingFlags(m), flags);\n        } else {\n            getParsingFlags(m).userInvalidated = true;\n        }\n\n        return m;\n    }\n\n    // Plugins that add properties should also add the key here (null value),\n    // so we can properly clone ourselves.\n    var momentProperties = (hooks.momentProperties = []),\n        updateInProgress = false;\n\n    function copyConfig(to, from) {\n        var i,\n            prop,\n            val,\n            momentPropertiesLen = momentProperties.length;\n\n        if (!isUndefined(from._isAMomentObject)) {\n            to._isAMomentObject = from._isAMomentObject;\n        }\n        if (!isUndefined(from._i)) {\n            to._i = from._i;\n        }\n        if (!isUndefined(from._f)) {\n            to._f = from._f;\n        }\n        if (!isUndefined(from._l)) {\n            to._l = from._l;\n        }\n        if (!isUndefined(from._strict)) {\n            to._strict = from._strict;\n        }\n        if (!isUndefined(from._tzm)) {\n            to._tzm = from._tzm;\n        }\n        if (!isUndefined(from._isUTC)) {\n            to._isUTC = from._isUTC;\n        }\n        if (!isUndefined(from._offset)) {\n            to._offset = from._offset;\n        }\n        if (!isUndefined(from._pf)) {\n            to._pf = getParsingFlags(from);\n        }\n        if (!isUndefined(from._locale)) {\n            to._locale = from._locale;\n        }\n\n        if (momentPropertiesLen > 0) {\n            for (i = 0; i < momentPropertiesLen; i++) {\n                prop = momentProperties[i];\n                val = from[prop];\n                if (!isUndefined(val)) {\n                    to[prop] = val;\n                }\n            }\n        }\n\n        return to;\n    }\n\n    // Moment prototype object\n    function Moment(config) {\n        copyConfig(this, config);\n        this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n        if (!this.isValid()) {\n            this._d = new Date(NaN);\n        }\n        // Prevent infinite loop in case updateOffset creates new moment\n        // objects.\n        if (updateInProgress === false) {\n            updateInProgress = true;\n            hooks.updateOffset(this);\n            updateInProgress = false;\n        }\n    }\n\n    function isMoment(obj) {\n        return (\n            obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n        );\n    }\n\n    function warn(msg) {\n        if (\n            hooks.suppressDeprecationWarnings === false &&\n            typeof console !== 'undefined' &&\n            console.warn\n        ) {\n            console.warn('Deprecation warning: ' + msg);\n        }\n    }\n\n    function deprecate(msg, fn) {\n        var firstTime = true;\n\n        return extend(function () {\n            if (hooks.deprecationHandler != null) {\n                hooks.deprecationHandler(null, msg);\n            }\n            if (firstTime) {\n                var args = [],\n                    arg,\n                    i,\n                    key,\n                    argLen = arguments.length;\n                for (i = 0; i < argLen; i++) {\n                    arg = '';\n                    if (typeof arguments[i] === 'object') {\n                        arg += '\\n[' + i + '] ';\n                        for (key in arguments[0]) {\n                            if (hasOwnProp(arguments[0], key)) {\n                                arg += key + ': ' + arguments[0][key] + ', ';\n                            }\n                        }\n                        arg = arg.slice(0, -2); // Remove trailing comma and space\n                    } else {\n                        arg = arguments[i];\n                    }\n                    args.push(arg);\n                }\n                warn(\n                    msg +\n                        '\\nArguments: ' +\n                        Array.prototype.slice.call(args).join('') +\n                        '\\n' +\n                        new Error().stack\n                );\n                firstTime = false;\n            }\n            return fn.apply(this, arguments);\n        }, fn);\n    }\n\n    var deprecations = {};\n\n    function deprecateSimple(name, msg) {\n        if (hooks.deprecationHandler != null) {\n            hooks.deprecationHandler(name, msg);\n        }\n        if (!deprecations[name]) {\n            warn(msg + '\\n' + new Error().stack);\n            deprecations[name] = true;\n        }\n    }\n\n    hooks.suppressDeprecationWarnings = false;\n    hooks.deprecationHandler = null;\n\n    function isFunction(input) {\n        return (\n            (typeof Function !== 'undefined' && input instanceof Function) ||\n            Object.prototype.toString.call(input) === '[object Function]'\n        );\n    }\n\n    var aliases = {\n        D: 'date',\n        dates: 'date',\n        date: 'date',\n        d: 'day',\n        days: 'day',\n        day: 'day',\n        e: 'weekday',\n        weekdays: 'weekday',\n        weekday: 'weekday',\n        E: 'isoWeekday',\n        isoweekdays: 'isoWeekday',\n        isoweekday: 'isoWeekday',\n        DDD: 'dayOfYear',\n        dayofyears: 'dayOfYear',\n        dayofyear: 'dayOfYear',\n        h: 'hour',\n        hours: 'hour',\n        hour: 'hour',\n        ms: 'millisecond',\n        milliseconds: 'millisecond',\n        millisecond: 'millisecond',\n        m: 'minute',\n        minutes: 'minute',\n        minute: 'minute',\n        M: 'month',\n        months: 'month',\n        month: 'month',\n        Q: 'quarter',\n        quarters: 'quarter',\n        quarter: 'quarter',\n        s: 'second',\n        seconds: 'second',\n        second: 'second',\n        gg: 'weekYear',\n        weekyears: 'weekYear',\n        weekyear: 'weekYear',\n        GG: 'isoWeekYear',\n        isoweekyears: 'isoWeekYear',\n        isoweekyear: 'isoWeekYear',\n        w: 'week',\n        weeks: 'week',\n        week: 'week',\n        W: 'isoWeek',\n        isoweeks: 'isoWeek',\n        isoweek: 'isoWeek',\n        y: 'year',\n        years: 'year',\n        year: 'year',\n    };\n\n    function normalizeUnits(units) {\n        return typeof units === 'string'\n            ? aliases[units] || aliases[units.toLowerCase()]\n            : undefined;\n    }\n\n    function normalizeObjectUnits(inputObject) {\n        var normalizedInput = {},\n            normalizedProp,\n            prop;\n\n        for (prop in inputObject) {\n            if (hasOwnProp(inputObject, prop)) {\n                normalizedProp = normalizeUnits(prop);\n                if (normalizedProp) {\n                    normalizedInput[normalizedProp] = inputObject[prop];\n                }\n            }\n        }\n\n        return normalizedInput;\n    }\n\n    var priorities = {\n        date: 9,\n        day: 11,\n        weekday: 11,\n        isoWeekday: 11,\n        dayOfYear: 4,\n        hour: 13,\n        millisecond: 16,\n        minute: 14,\n        month: 8,\n        quarter: 7,\n        second: 15,\n        weekYear: 1,\n        isoWeekYear: 1,\n        week: 5,\n        isoWeek: 5,\n        year: 1,\n    };\n\n    function getPrioritizedUnits(unitsObj) {\n        var units = [],\n            u;\n        for (u in unitsObj) {\n            if (hasOwnProp(unitsObj, u)) {\n                units.push({ unit: u, priority: priorities[u] });\n            }\n        }\n        units.sort(function (a, b) {\n            return a.priority - b.priority;\n        });\n        return units;\n    }\n\n    function zeroFill(number, targetLength, forceSign) {\n        var absNumber = '' + Math.abs(number),\n            zerosToFill = targetLength - absNumber.length,\n            sign = number >= 0;\n        return (\n            (sign ? (forceSign ? '+' : '') : '-') +\n            Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n            absNumber\n        );\n    }\n\n    var formattingTokens =\n            /(\\[[^\\[]*\\])|(\\\\e)|(\\\\)?(eHHmm|[Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n        localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n        formatFunctions = {},\n        formatTokenFunctions = {};\n\n    // token:    'M'\n    // padded:   ['MM', 2]\n    // ordinal:  'Mo'\n    // callback: function () { this.month() + 1 }\n    function addFormatToken(token, padded, ordinal, callback) {\n        var func = callback;\n        if (typeof callback === 'string') {\n            func = function () {\n                return this[callback]();\n            };\n        }\n        if (token) {\n            formatTokenFunctions[token] = func;\n        }\n        if (padded) {\n            formatTokenFunctions[padded[0]] = function () {\n                return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n            };\n        }\n        if (ordinal) {\n            formatTokenFunctions[ordinal] = function () {\n                return this.localeData().ordinal(\n                    func.apply(this, arguments),\n                    token\n                );\n            };\n        }\n    }\n\n    function removeFormattingTokens(input) {\n        if (input.match(/\\[[\\s\\S]/)) {\n            return input.replace(/^\\[|\\]$/g, '');\n        }\n        return input.replace(/\\\\/g, '');\n    }\n\n    function makeFormatFunction(format) {\n        var array = format.match(formattingTokens),\n            i,\n            length;\n\n        for (i = 0, length = array.length; i < length; i++) {\n            if (formatTokenFunctions[array[i]]) {\n                array[i] = formatTokenFunctions[array[i]];\n            } else {\n                array[i] = removeFormattingTokens(array[i]);\n            }\n        }\n\n        return function (mom) {\n            var output = '',\n                i;\n            for (i = 0; i < length; i++) {\n                output += isFunction(array[i])\n                    ? array[i].call(mom, format)\n                    : array[i];\n            }\n            return output;\n        };\n    }\n\n    // format date using native date object\n    function formatMoment(m, format) {\n        if (!m.isValid()) {\n            return m.localeData().invalidDate();\n        }\n\n        format = expandFormat(format, m.localeData());\n        var cacheKey = '$' + format;\n        if (!hasOwnProp(formatFunctions, cacheKey)) {\n            formatFunctions[cacheKey] = makeFormatFunction(format);\n        }\n\n        return formatFunctions[cacheKey](m);\n    }\n\n    function expandFormat(format, locale) {\n        var i = 5;\n\n        function replaceLongDateFormatTokens(input) {\n            return locale.longDateFormat(input) || input;\n        }\n\n        localFormattingTokens.lastIndex = 0;\n        while (i >= 0 && localFormattingTokens.test(format)) {\n            format = format.replace(\n                localFormattingTokens,\n                replaceLongDateFormatTokens\n            );\n            localFormattingTokens.lastIndex = 0;\n            i -= 1;\n        }\n\n        return format;\n    }\n\n    var match1 = /\\d/, //       0 - 9\n        match2 = /\\d\\d/, //      00 - 99\n        match3 = /\\d{3}/, //     000 - 999\n        match4 = /\\d{4}/, //    0000 - 9999\n        match6 = /[+-]?\\d{6}/, // -999999 - 999999\n        match1to2 = /\\d\\d?/, //       0 - 99\n        match3to4 = /\\d\\d\\d\\d?/, //     999 - 9999\n        match5to6 = /\\d\\d\\d\\d\\d\\d?/, //   99999 - 999999\n        match1to3 = /\\d{1,3}/, //       0 - 999\n        match1to4 = /\\d{1,4}/, //       0 - 9999\n        match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n        matchUnsigned = /\\d+/, //       0 - inf\n        matchSigned = /[+-]?\\d+/, //    -inf - inf\n        matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n        matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n        matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n        // any word (or two) characters or numbers including two/three word month in arabic.\n        // includes scottish gaelic two word and hyphenated months\n        matchWord =\n            /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n        match1to2NoLeadingZero = /^[1-9]\\d?/, //         1-99\n        match1to2HasZero = /^([1-9]\\d|\\d)/, //           0-99\n        regexes;\n\n    regexes = {};\n\n    function addRegexToken(token, regex, strictRegex) {\n        regexes[token] = isFunction(regex)\n            ? regex\n            : function (isStrict, localeData) {\n                  return isStrict && strictRegex ? strictRegex : regex;\n              };\n    }\n\n    function getParseRegexForToken(token, config) {\n        if (!hasOwnProp(regexes, token)) {\n            return new RegExp(unescapeFormat(token));\n        }\n\n        return regexes[token](config._strict, config._locale);\n    }\n\n    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n    function unescapeFormat(s) {\n        return regexEscape(\n            s\n                .replace('\\\\', '')\n                .replace(\n                    /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n                    function (matched, p1, p2, p3, p4) {\n                        return p1 || p2 || p3 || p4;\n                    }\n                )\n        );\n    }\n\n    function regexEscape(s) {\n        return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n    }\n\n    function absFloor(number) {\n        if (number < 0) {\n            // -0 -> 0\n            return Math.ceil(number) || 0;\n        } else {\n            return Math.floor(number);\n        }\n    }\n\n    function toInt(argumentForCoercion) {\n        var coercedNumber = +argumentForCoercion,\n            value = 0;\n\n        if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n            value = absFloor(coercedNumber);\n        }\n\n        return value;\n    }\n\n    var tokens = {};\n\n    function addParseToken(token, callback) {\n        var i,\n            func = callback,\n            tokenLen;\n        if (typeof token === 'string') {\n            token = [token];\n        }\n        if (isNumber(callback)) {\n            func = function (input, array) {\n                array[callback] = toInt(input);\n            };\n        }\n        tokenLen = token.length;\n        for (i = 0; i < tokenLen; i++) {\n            tokens[token[i]] = func;\n        }\n    }\n\n    function addWeekParseToken(token, callback) {\n        addParseToken(token, function (input, array, config, token) {\n            config._w = config._w || {};\n            callback(input, config._w, config, token);\n        });\n    }\n\n    function addTimeToArrayFromToken(token, input, config) {\n        if (input != null && hasOwnProp(tokens, token)) {\n            tokens[token](input, config._a, config, token);\n        }\n    }\n\n    function isLeapYear(year) {\n        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n    }\n\n    var YEAR = 0,\n        MONTH = 1,\n        DATE = 2,\n        HOUR = 3,\n        MINUTE = 4,\n        SECOND = 5,\n        MILLISECOND = 6,\n        WEEK = 7,\n        WEEKDAY = 8;\n\n    // FORMATTING\n\n    addFormatToken('Y', 0, 0, function () {\n        var y = this.year();\n        return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n    });\n\n    addFormatToken(0, ['YY', 2], 0, function () {\n        return this.year() % 100;\n    });\n\n    addFormatToken(0, ['YYYY', 4], 0, 'year');\n    addFormatToken(0, ['YYYYY', 5], 0, 'year');\n    addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n    // PARSING\n\n    addRegexToken('Y', matchSigned);\n    addRegexToken('YY', match1to2, match2);\n    addRegexToken('YYYY', match1to4, match4);\n    addRegexToken('YYYYY', match1to6, match6);\n    addRegexToken('YYYYYY', match1to6, match6);\n\n    addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n    addParseToken('YYYY', function (input, array) {\n        array[YEAR] =\n            input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n    });\n    addParseToken('YY', function (input, array) {\n        array[YEAR] = hooks.parseTwoDigitYear(input);\n    });\n    addParseToken('Y', function (input, array) {\n        array[YEAR] = parseInt(input, 10);\n    });\n\n    // HELPERS\n\n    function daysInYear(year) {\n        return isLeapYear(year) ? 366 : 365;\n    }\n\n    // HOOKS\n\n    hooks.parseTwoDigitYear = function (input) {\n        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n    };\n\n    // MOMENTS\n\n    var getSetYear = makeGetSet('FullYear', true);\n\n    function getIsLeapYear() {\n        return isLeapYear(this.year());\n    }\n\n    function makeGetSet(unit, keepTime) {\n        return function (value) {\n            if (value != null) {\n                set$1(this, unit, value);\n                hooks.updateOffset(this, keepTime);\n                return this;\n            } else {\n                return get$2(this, unit);\n            }\n        };\n    }\n\n    function get$2(mom, unit) {\n        if (!mom.isValid()) {\n            return NaN;\n        }\n\n        var d = mom._d,\n            isUTC = mom._isUTC;\n\n        switch (unit) {\n            case 'Milliseconds':\n                return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();\n            case 'Seconds':\n                return isUTC ? d.getUTCSeconds() : d.getSeconds();\n            case 'Minutes':\n                return isUTC ? d.getUTCMinutes() : d.getMinutes();\n            case 'Hours':\n                return isUTC ? d.getUTCHours() : d.getHours();\n            case 'Date':\n                return isUTC ? d.getUTCDate() : d.getDate();\n            case 'Day':\n                return isUTC ? d.getUTCDay() : d.getDay();\n            case 'Month':\n                return isUTC ? d.getUTCMonth() : d.getMonth();\n            case 'FullYear':\n                return isUTC ? d.getUTCFullYear() : d.getFullYear();\n            default:\n                return NaN; // Just in case\n        }\n    }\n\n    function set$1(mom, unit, value) {\n        var d, isUTC, year, month, date;\n\n        if (!mom.isValid() || isNaN(value)) {\n            return;\n        }\n\n        d = mom._d;\n        isUTC = mom._isUTC;\n\n        switch (unit) {\n            case 'Milliseconds':\n                return void (isUTC\n                    ? d.setUTCMilliseconds(value)\n                    : d.setMilliseconds(value));\n            case 'Seconds':\n                return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));\n            case 'Minutes':\n                return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));\n            case 'Hours':\n                return void (isUTC ? d.setUTCHours(value) : d.setHours(value));\n            case 'Date':\n                return void (isUTC ? d.setUTCDate(value) : d.setDate(value));\n            // case 'Day': // Not real\n            //    return void (isUTC ? d.setUTCDay(value) : d.setDay(value));\n            // case 'Month': // Not used because we need to pass two variables\n            //     return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));\n            case 'FullYear':\n                break; // See below ...\n            default:\n                return; // Just in case\n        }\n\n        year = value;\n        month = mom.month();\n        date = mom.date();\n        date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;\n        void (isUTC\n            ? d.setUTCFullYear(year, month, date)\n            : d.setFullYear(year, month, date));\n    }\n\n    // MOMENTS\n\n    function stringGet(units) {\n        units = normalizeUnits(units);\n        if (isFunction(this[units])) {\n            return this[units]();\n        }\n        return this;\n    }\n\n    function stringSet(units, value) {\n        if (typeof units === 'object') {\n            units = normalizeObjectUnits(units);\n            var prioritized = getPrioritizedUnits(units),\n                i,\n                prioritizedLen = prioritized.length;\n            for (i = 0; i < prioritizedLen; i++) {\n                this[prioritized[i].unit](units[prioritized[i].unit]);\n            }\n        } else {\n            units = normalizeUnits(units);\n            if (isFunction(this[units])) {\n                return this[units](value);\n            }\n        }\n        return this;\n    }\n\n    function mod$1(n, x) {\n        return ((n % x) + x) % x;\n    }\n\n    var indexOf;\n\n    if (Array.prototype.indexOf) {\n        indexOf = Array.prototype.indexOf;\n    } else {\n        indexOf = function (o) {\n            // I know\n            var i;\n            for (i = 0; i < this.length; ++i) {\n                if (this[i] === o) {\n                    return i;\n                }\n            }\n            return -1;\n        };\n    }\n\n    function daysInMonth(year, month) {\n        if (isNaN(year) || isNaN(month)) {\n            return NaN;\n        }\n        var modMonth = mod$1(month, 12);\n        year += (month - modMonth) / 12;\n        return modMonth === 1\n            ? isLeapYear(year)\n                ? 29\n                : 28\n            : 31 - ((modMonth % 7) % 2);\n    }\n\n    // FORMATTING\n\n    addFormatToken('M', ['MM', 2], 'Mo', function () {\n        return this.month() + 1;\n    });\n\n    addFormatToken('MMM', 0, 0, function (format) {\n        return this.localeData().monthsShort(this, format);\n    });\n\n    addFormatToken('MMMM', 0, 0, function (format) {\n        return this.localeData().months(this, format);\n    });\n\n    // PARSING\n\n    addRegexToken('M', match1to2, match1to2NoLeadingZero);\n    addRegexToken('MM', match1to2, match2);\n    addRegexToken('MMM', function (isStrict, locale) {\n        return locale.monthsShortRegex(isStrict);\n    });\n    addRegexToken('MMMM', function (isStrict, locale) {\n        return locale.monthsRegex(isStrict);\n    });\n\n    addParseToken(['M', 'MM'], function (input, array) {\n        array[MONTH] = toInt(input) - 1;\n    });\n\n    addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n        var month = config._locale.monthsParse(input, token, config._strict);\n        // if we didn't find a month name, mark the date as invalid.\n        if (month != null) {\n            array[MONTH] = month;\n        } else {\n            getParsingFlags(config).invalidMonth = input;\n        }\n    });\n\n    // LOCALES\n\n    var defaultLocaleMonths =\n            'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n                '_'\n            ),\n        defaultLocaleMonthsShort =\n            'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n        MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n        defaultMonthsShortRegex = matchWord,\n        defaultMonthsRegex = matchWord,\n        monthsParseProperties = [\n            'monthsParse',\n            'longMonthsParse',\n            'shortMonthsParse',\n            'monthsRegex',\n            'monthsShortRegex',\n            'monthsStrictRegex',\n            'monthsShortStrictRegex',\n        ];\n\n    function clearMonthsParseCache(locale, config) {\n        var i, prop;\n        for (i = 0; i < monthsParseProperties.length; i++) {\n            prop = monthsParseProperties[i];\n            if (!hasOwnProp(config, prop)) {\n                delete locale['_' + prop];\n            }\n        }\n    }\n\n    function localeMonths(m, format) {\n        if (!m) {\n            return isArray(this._months)\n                ? this._months\n                : this._months['standalone'];\n        }\n        return isArray(this._months)\n            ? this._months[m.month()]\n            : this._months[\n                  (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n                      ? 'format'\n                      : 'standalone'\n              ][m.month()];\n    }\n\n    function localeMonthsShort(m, format) {\n        if (!m) {\n            return isArray(this._monthsShort)\n                ? this._monthsShort\n                : this._monthsShort['standalone'];\n        }\n        return isArray(this._monthsShort)\n            ? this._monthsShort[m.month()]\n            : this._monthsShort[\n                  MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n              ][m.month()];\n    }\n\n    function handleStrictParse$1(monthName, format, strict) {\n        var i,\n            ii,\n            mom,\n            llc = monthName.toLocaleLowerCase();\n        if (!this._monthsParse) {\n            // this is not used\n            this._monthsParse = [];\n            this._longMonthsParse = [];\n            this._shortMonthsParse = [];\n            for (i = 0; i < 12; ++i) {\n                mom = createUTC([2000, i]);\n                this._shortMonthsParse[i] = this.monthsShort(\n                    mom,\n                    ''\n                ).toLocaleLowerCase();\n                this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n            }\n        }\n\n        if (strict) {\n            if (format === 'MMM') {\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._longMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        } else {\n            if (format === 'MMM') {\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._longMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._longMonthsParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortMonthsParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        }\n    }\n\n    function localeMonthsParse(monthName, format, strict) {\n        var i, mom, regex;\n\n        if (this._monthsParseExact) {\n            return handleStrictParse$1.call(this, monthName, format, strict);\n        }\n\n        if (!this._monthsParse) {\n            this._monthsParse = [];\n            this._longMonthsParse = [];\n            this._shortMonthsParse = [];\n        }\n\n        // TODO: add sorting\n        // Sorting makes sure if one month (or abbr) is a prefix of another\n        // see sorting in computeMonthsParse\n        for (i = 0; i < 12; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, i]);\n            if (strict && !this._longMonthsParse[i]) {\n                this._longMonthsParse[i] = new RegExp(\n                    '^' + this.months(mom, '').replace('.', '') + '$',\n                    'i'\n                );\n                this._shortMonthsParse[i] = new RegExp(\n                    '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n                    'i'\n                );\n            }\n            if (!strict && !this._monthsParse[i]) {\n                regex =\n                    '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n                this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n            }\n            // test the regex\n            if (\n                strict &&\n                format === 'MMMM' &&\n                this._longMonthsParse[i].test(monthName)\n            ) {\n                return i;\n            } else if (\n                strict &&\n                format === 'MMM' &&\n                this._shortMonthsParse[i].test(monthName)\n            ) {\n                return i;\n            } else if (!strict && this._monthsParse[i].test(monthName)) {\n                return i;\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function setMonth(mom, value) {\n        if (!mom.isValid()) {\n            // No op\n            return mom;\n        }\n\n        if (typeof value === 'string') {\n            if (/^\\d+$/.test(value)) {\n                value = toInt(value);\n            } else {\n                value = mom.localeData().monthsParse(value);\n                // TODO: Another silent failure?\n                if (!isNumber(value)) {\n                    return mom;\n                }\n            }\n        }\n\n        var month = value,\n            date = mom.date();\n\n        date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));\n        void (mom._isUTC\n            ? mom._d.setUTCMonth(month, date)\n            : mom._d.setMonth(month, date));\n        return mom;\n    }\n\n    function getSetMonth(value) {\n        if (value != null) {\n            setMonth(this, value);\n            hooks.updateOffset(this, true);\n            return this;\n        } else {\n            return get$2(this, 'Month');\n        }\n    }\n\n    function getDaysInMonth() {\n        return daysInMonth(this.year(), this.month());\n    }\n\n    function monthsShortRegex(isStrict) {\n        if (this._monthsParseExact) {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                computeMonthsParse.call(this);\n            }\n            if (isStrict) {\n                return this._monthsShortStrictRegex;\n            } else {\n                return this._monthsShortRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_monthsShortRegex')) {\n                this._monthsShortRegex = defaultMonthsShortRegex;\n            }\n            return this._monthsShortStrictRegex && isStrict\n                ? this._monthsShortStrictRegex\n                : this._monthsShortRegex;\n        }\n    }\n\n    function monthsRegex(isStrict) {\n        if (this._monthsParseExact) {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                computeMonthsParse.call(this);\n            }\n            if (isStrict) {\n                return this._monthsStrictRegex;\n            } else {\n                return this._monthsRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_monthsRegex')) {\n                this._monthsRegex = defaultMonthsRegex;\n            }\n            return this._monthsStrictRegex && isStrict\n                ? this._monthsStrictRegex\n                : this._monthsRegex;\n        }\n    }\n\n    function computeMonthsParse() {\n        function cmpLenRev(a, b) {\n            return b.length - a.length;\n        }\n\n        var shortPieces = [],\n            longPieces = [],\n            mixedPieces = [],\n            i,\n            mom,\n            shortP,\n            longP;\n        for (i = 0; i < 12; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, i]);\n            shortP = regexEscape(this.monthsShort(mom, ''));\n            longP = regexEscape(this.months(mom, ''));\n            shortPieces.push(shortP);\n            longPieces.push(longP);\n            mixedPieces.push(longP);\n            mixedPieces.push(shortP);\n        }\n        // Sorting makes sure if one month (or abbr) is a prefix of another it\n        // will match the longer piece.\n        shortPieces.sort(cmpLenRev);\n        longPieces.sort(cmpLenRev);\n        mixedPieces.sort(cmpLenRev);\n\n        this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._monthsShortRegex = this._monthsRegex;\n        this._monthsStrictRegex = new RegExp(\n            '^(' + longPieces.join('|') + ')',\n            'i'\n        );\n        this._monthsShortStrictRegex = new RegExp(\n            '^(' + shortPieces.join('|') + ')',\n            'i'\n        );\n    }\n\n    // FORMATTING\n\n    addFormatToken('d', 0, 'do', 'day');\n\n    addFormatToken('dd', 0, 0, function (format) {\n        return this.localeData().weekdaysMin(this, format);\n    });\n\n    addFormatToken('ddd', 0, 0, function (format) {\n        return this.localeData().weekdaysShort(this, format);\n    });\n\n    addFormatToken('dddd', 0, 0, function (format) {\n        return this.localeData().weekdays(this, format);\n    });\n\n    addFormatToken('e', 0, 0, 'weekday');\n    addFormatToken('E', 0, 0, 'isoWeekday');\n    addFormatToken('eHHmm', 0, 0, function () {\n        return (\n            '' +\n            this.weekday() +\n            zeroFill(this.hours(), 2) +\n            zeroFill(this.minutes(), 2)\n        );\n    });\n\n    // PARSING\n\n    addRegexToken('d', match1to2);\n    addRegexToken('e', match1to2);\n    addRegexToken('E', match1to2);\n    addRegexToken('eHHmm', match5to6);\n    addRegexToken('dd', function (isStrict, locale) {\n        return locale.weekdaysMinRegex(isStrict);\n    });\n    addRegexToken('ddd', function (isStrict, locale) {\n        return locale.weekdaysShortRegex(isStrict);\n    });\n    addRegexToken('dddd', function (isStrict, locale) {\n        return locale.weekdaysRegex(isStrict);\n    });\n\n    addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n        var weekday = config._locale.weekdaysParse(input, token, config._strict);\n        // if we didn't get a weekday name, mark the date as invalid\n        if (weekday != null) {\n            week.d = weekday;\n        } else {\n            getParsingFlags(config).invalidWeekday = input;\n        }\n    });\n\n    addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n        week[token] = toInt(input);\n    });\n\n    addWeekParseToken('eHHmm', function (input, week, config) {\n        var weekdayEnd = input.length - 4;\n\n        week.e = toInt(input.substr(0, weekdayEnd));\n        config._a[HOUR] = toInt(input.substr(weekdayEnd, 2));\n        config._a[MINUTE] = toInt(input.substr(weekdayEnd + 2));\n    });\n\n    // HELPERS\n\n    function parseWeekday(input, locale) {\n        if (typeof input !== 'string') {\n            return input;\n        }\n\n        if (!isNaN(input)) {\n            return parseInt(input, 10);\n        }\n\n        input = locale.weekdaysParse(input);\n        if (typeof input === 'number') {\n            return input;\n        }\n\n        return null;\n    }\n\n    function parseIsoWeekday(input, locale) {\n        if (typeof input === 'string') {\n            return locale.weekdaysParse(input) % 7 || 7;\n        }\n        return isNaN(input) ? null : input;\n    }\n\n    // LOCALES\n    function shiftWeekdays(ws, n) {\n        return ws.slice(n, 7).concat(ws.slice(0, n));\n    }\n\n    var defaultLocaleWeekdays =\n            'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n        defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n        defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n        defaultWeekdaysRegex = matchWord,\n        defaultWeekdaysShortRegex = matchWord,\n        defaultWeekdaysMinRegex = matchWord,\n        weekdaysParseProperties = [\n            'weekdaysParse',\n            'fullWeekdaysParse',\n            'shortWeekdaysParse',\n            'minWeekdaysParse',\n            'weekdaysRegex',\n            'weekdaysShortRegex',\n            'weekdaysMinRegex',\n            'weekdaysStrictRegex',\n            'weekdaysShortStrictRegex',\n            'weekdaysMinStrictRegex',\n        ];\n\n    function clearWeekdaysParseCache(locale, config) {\n        var i, prop;\n        for (i = 0; i < weekdaysParseProperties.length; i++) {\n            prop = weekdaysParseProperties[i];\n            if (!hasOwnProp(config, prop)) {\n                delete locale['_' + prop];\n            }\n        }\n    }\n\n    function localeWeekdays(m, format) {\n        var weekdays = isArray(this._weekdays)\n            ? this._weekdays\n            : this._weekdays[\n                  m && m !== true && this._weekdays.isFormat.test(format)\n                      ? 'format'\n                      : 'standalone'\n              ];\n        return m === true\n            ? shiftWeekdays(weekdays, this._week.dow)\n            : m\n              ? weekdays[m.day()]\n              : weekdays;\n    }\n\n    function localeWeekdaysShort(m) {\n        return m === true\n            ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n            : m\n              ? this._weekdaysShort[m.day()]\n              : this._weekdaysShort;\n    }\n\n    function localeWeekdaysMin(m) {\n        return m === true\n            ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n            : m\n              ? this._weekdaysMin[m.day()]\n              : this._weekdaysMin;\n    }\n\n    function handleStrictParse(weekdayName, format, strict) {\n        var i,\n            ii,\n            mom,\n            llc = weekdayName.toLocaleLowerCase();\n        if (!this._weekdaysParse) {\n            this._weekdaysParse = [];\n            this._shortWeekdaysParse = [];\n            this._minWeekdaysParse = [];\n\n            for (i = 0; i < 7; ++i) {\n                mom = createUTC([2000, 1]).day(i);\n                this._minWeekdaysParse[i] = this.weekdaysMin(\n                    mom,\n                    ''\n                ).toLocaleLowerCase();\n                this._shortWeekdaysParse[i] = this.weekdaysShort(\n                    mom,\n                    ''\n                ).toLocaleLowerCase();\n                this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n            }\n        }\n\n        if (strict) {\n            if (format === 'dddd') {\n                ii = indexOf.call(this._weekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else if (format === 'ddd') {\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        } else {\n            if (format === 'dddd') {\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else if (format === 'ddd') {\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            } else {\n                ii = indexOf.call(this._minWeekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._weekdaysParse, llc);\n                if (ii !== -1) {\n                    return ii;\n                }\n                ii = indexOf.call(this._shortWeekdaysParse, llc);\n                return ii !== -1 ? ii : null;\n            }\n        }\n    }\n\n    function localeWeekdaysParse(weekdayName, format, strict) {\n        var i, mom, regex;\n\n        if (this._weekdaysParseExact) {\n            return handleStrictParse.call(this, weekdayName, format, strict);\n        }\n\n        if (!this._weekdaysParse) {\n            this._weekdaysParse = [];\n            this._minWeekdaysParse = [];\n            this._shortWeekdaysParse = [];\n            this._fullWeekdaysParse = [];\n        }\n\n        for (i = 0; i < 7; i++) {\n            // make the regex if we don't have it already\n\n            mom = createUTC([2000, 1]).day(i);\n            if (strict && !this._fullWeekdaysParse[i]) {\n                this._fullWeekdaysParse[i] = new RegExp(\n                    '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n                    'i'\n                );\n                this._shortWeekdaysParse[i] = new RegExp(\n                    '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n                    'i'\n                );\n                this._minWeekdaysParse[i] = new RegExp(\n                    '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n                    'i'\n                );\n            }\n            if (!this._weekdaysParse[i]) {\n                regex =\n                    '^' +\n                    this.weekdays(mom, '') +\n                    '|^' +\n                    this.weekdaysShort(mom, '') +\n                    '|^' +\n                    this.weekdaysMin(mom, '');\n                this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n            }\n            // test the regex\n            if (\n                strict &&\n                format === 'dddd' &&\n                this._fullWeekdaysParse[i].test(weekdayName)\n            ) {\n                return i;\n            } else if (\n                strict &&\n                format === 'ddd' &&\n                this._shortWeekdaysParse[i].test(weekdayName)\n            ) {\n                return i;\n            } else if (\n                strict &&\n                format === 'dd' &&\n                this._minWeekdaysParse[i].test(weekdayName)\n            ) {\n                return i;\n            } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n                return i;\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function getSetDayOfWeek(input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n\n        var day = get$2(this, 'Day');\n        if (input != null) {\n            input = parseWeekday(input, this.localeData());\n            return this.add(input - day, 'd');\n        } else {\n            return day;\n        }\n    }\n\n    function getSetLocaleDayOfWeek(input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n        return input == null ? weekday : this.add(input - weekday, 'd');\n    }\n\n    function getSetISODayOfWeek(input) {\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n\n        // behaves the same as moment#day except\n        // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n        // as a setter, sunday should belong to the previous week.\n\n        if (input != null) {\n            var weekday = parseIsoWeekday(input, this.localeData());\n            return this.day(this.day() % 7 ? weekday : weekday - 7);\n        } else {\n            return this.day() || 7;\n        }\n    }\n\n    function weekdaysRegex(isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysStrictRegex;\n            } else {\n                return this._weekdaysRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                this._weekdaysRegex = defaultWeekdaysRegex;\n            }\n            return this._weekdaysStrictRegex && isStrict\n                ? this._weekdaysStrictRegex\n                : this._weekdaysRegex;\n        }\n    }\n\n    function weekdaysShortRegex(isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysShortStrictRegex;\n            } else {\n                return this._weekdaysShortRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n                this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n            }\n            return this._weekdaysShortStrictRegex && isStrict\n                ? this._weekdaysShortStrictRegex\n                : this._weekdaysShortRegex;\n        }\n    }\n\n    function weekdaysMinRegex(isStrict) {\n        if (this._weekdaysParseExact) {\n            if (!hasOwnProp(this, '_weekdaysRegex')) {\n                computeWeekdaysParse.call(this);\n            }\n            if (isStrict) {\n                return this._weekdaysMinStrictRegex;\n            } else {\n                return this._weekdaysMinRegex;\n            }\n        } else {\n            if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n                this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n            }\n            return this._weekdaysMinStrictRegex && isStrict\n                ? this._weekdaysMinStrictRegex\n                : this._weekdaysMinRegex;\n        }\n    }\n\n    function computeWeekdaysParse() {\n        function cmpLenRev(a, b) {\n            return b.length - a.length;\n        }\n\n        var minPieces = [],\n            shortPieces = [],\n            longPieces = [],\n            mixedPieces = [],\n            i,\n            mom,\n            minp,\n            shortp,\n            longp;\n        for (i = 0; i < 7; i++) {\n            // make the regex if we don't have it already\n            mom = createUTC([2000, 1]).day(i);\n            minp = regexEscape(this.weekdaysMin(mom, ''));\n            shortp = regexEscape(this.weekdaysShort(mom, ''));\n            longp = regexEscape(this.weekdays(mom, ''));\n            minPieces.push(minp);\n            shortPieces.push(shortp);\n            longPieces.push(longp);\n            mixedPieces.push(minp);\n            mixedPieces.push(shortp);\n            mixedPieces.push(longp);\n        }\n        // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n        // will match the longer piece.\n        minPieces.sort(cmpLenRev);\n        shortPieces.sort(cmpLenRev);\n        longPieces.sort(cmpLenRev);\n        mixedPieces.sort(cmpLenRev);\n\n        this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._weekdaysShortRegex = this._weekdaysRegex;\n        this._weekdaysMinRegex = this._weekdaysRegex;\n\n        this._weekdaysStrictRegex = new RegExp(\n            '^(' + longPieces.join('|') + ')',\n            'i'\n        );\n        this._weekdaysShortStrictRegex = new RegExp(\n            '^(' + shortPieces.join('|') + ')',\n            'i'\n        );\n        this._weekdaysMinStrictRegex = new RegExp(\n            '^(' + minPieces.join('|') + ')',\n            'i'\n        );\n    }\n\n    function set(config) {\n        var prop, i;\n        clearMonthsParseCache(this, config);\n        clearWeekdaysParseCache(this, config);\n        for (i in config) {\n            if (hasOwnProp(config, i)) {\n                prop = config[i];\n                if (isFunction(prop)) {\n                    this[i] = prop;\n                } else {\n                    this['_' + i] = prop;\n                }\n            }\n        }\n        this._config = config;\n        // Lenient ordinal parsing accepts just a number in addition to\n        // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n        // TODO: Remove \"ordinalParse\" fallback in next major release.\n        this._dayOfMonthOrdinalParseLenient = new RegExp(\n            (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n                '|' +\n                /\\d{1,2}/.source\n        );\n    }\n\n    function mergeConfigs(parentConfig, childConfig) {\n        var res = extend({}, parentConfig),\n            prop;\n        for (prop in childConfig) {\n            if (hasOwnProp(childConfig, prop)) {\n                if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n                    res[prop] = {};\n                    extend(res[prop], parentConfig[prop]);\n                    extend(res[prop], childConfig[prop]);\n                } else if (childConfig[prop] != null) {\n                    res[prop] = childConfig[prop];\n                } else {\n                    delete res[prop];\n                }\n            }\n        }\n        for (prop in parentConfig) {\n            if (\n                hasOwnProp(parentConfig, prop) &&\n                !hasOwnProp(childConfig, prop) &&\n                isObject(parentConfig[prop])\n            ) {\n                // make sure changes to properties don't modify parent config\n                res[prop] = extend({}, res[prop]);\n            }\n        }\n        return res;\n    }\n\n    function Locale(config) {\n        if (config != null) {\n            this.set(config);\n        }\n    }\n\n    var keys;\n\n    if (Object.keys) {\n        keys = Object.keys;\n    } else {\n        keys = function (obj) {\n            var i,\n                res = [];\n            for (i in obj) {\n                if (hasOwnProp(obj, i)) {\n                    res.push(i);\n                }\n            }\n            return res;\n        };\n    }\n\n    var defaultCalendar = {\n        sameDay: '[Today at] LT',\n        nextDay: '[Tomorrow at] LT',\n        nextWeek: 'dddd [at] LT',\n        lastDay: '[Yesterday at] LT',\n        lastWeek: '[Last] dddd [at] LT',\n        sameElse: 'L',\n    };\n\n    function calendar$1(key, mom, now) {\n        var output = this._calendar[key] || this._calendar['sameElse'];\n        return isFunction(output) ? output.call(mom, now) : output;\n    }\n\n    var defaultLongDateFormat = {\n        LTS: 'h:mm:ss A',\n        LT: 'h:mm A',\n        L: 'MM/DD/YYYY',\n        LL: 'MMMM D, YYYY',\n        LLL: 'MMMM D, YYYY h:mm A',\n        LLLL: 'dddd, MMMM D, YYYY h:mm A',\n    };\n\n    function longDateFormat(key) {\n        var format = this._longDateFormat[key],\n            formatUpper = this._longDateFormat[key.toUpperCase()],\n            formatCache = this._longDateFormatCache;\n\n        if (format || !formatUpper) {\n            return format;\n        }\n\n        if (\n            formatCache &&\n            formatCache[key] &&\n            formatCache[key].formatUpper === formatUpper\n        ) {\n            return formatCache[key].format;\n        }\n\n        format = formatUpper\n            .match(formattingTokens)\n            .map(function (tok) {\n                if (\n                    tok === 'MMMM' ||\n                    tok === 'MM' ||\n                    tok === 'DD' ||\n                    tok === 'dddd'\n                ) {\n                    return tok.slice(1);\n                }\n                return tok;\n            })\n            .join('');\n\n        if (!formatCache) {\n            formatCache = this._longDateFormatCache = {};\n        }\n        formatCache[key] = {\n            formatUpper: formatUpper,\n            format: format,\n        };\n        return format;\n    }\n\n    var defaultInvalidDate = 'Invalid date';\n\n    function invalidDate() {\n        return this._invalidDate;\n    }\n\n    var defaultOrdinal = '%d',\n        defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n    function ordinal(number) {\n        return this._ordinal.replace('%d', number);\n    }\n\n    var defaultRelativeTime = {\n        future: 'in %s',\n        past: '%s ago',\n        s: 'a few seconds',\n        ss: '%d seconds',\n        m: 'a minute',\n        mm: '%d minutes',\n        h: 'an hour',\n        hh: '%d hours',\n        d: 'a day',\n        dd: '%d days',\n        w: 'a week',\n        ww: '%d weeks',\n        M: 'a month',\n        MM: '%d months',\n        y: 'a year',\n        yy: '%d years',\n    };\n\n    function relativeTimeWithoutPostformat(\n        number,\n        withoutSuffix,\n        string,\n        isFuture\n    ) {\n        var output = this._relativeTime[string];\n        return isFunction(output)\n            ? output(number, withoutSuffix, string, isFuture)\n            : output.replace(/%d/i, number);\n    }\n\n    function relativeTime$1(number, withoutSuffix, string, isFuture) {\n        return this.postformat(\n            relativeTimeWithoutPostformat.call(\n                this,\n                number,\n                withoutSuffix,\n                string,\n                isFuture\n            )\n        );\n    }\n\n    function pastFutureWithoutPostformat(diff, output) {\n        var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n        return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n    }\n\n    function pastFuture(diff, output) {\n        return this.postformat(\n            pastFutureWithoutPostformat.call(this, diff, output)\n        );\n    }\n\n    function createDate(y, m, d, h, M, s, ms) {\n        // can't just apply() to create a date:\n        // https://stackoverflow.com/q/181348\n        var date;\n        // the date constructor remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            // preserve leap years using a full 400 year cycle, then reset\n            date = new Date(y + 400, m, d, h, M, s, ms);\n            if (isFinite(date.getFullYear())) {\n                date.setFullYear(y);\n            }\n        } else {\n            date = new Date(y, m, d, h, M, s, ms);\n        }\n\n        return date;\n    }\n\n    function createUTCDate(y) {\n        var date, args;\n        // the Date.UTC function remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            args = Array.prototype.slice.call(arguments);\n            // preserve leap years using a full 400 year cycle, then reset\n            args[0] = y + 400;\n            date = new Date(Date.UTC.apply(null, args));\n            if (isFinite(date.getUTCFullYear())) {\n                date.setUTCFullYear(y);\n            }\n        } else {\n            date = new Date(Date.UTC.apply(null, arguments));\n        }\n\n        return date;\n    }\n\n    // start-of-first-week - start-of-year\n    function firstWeekOffset(year, dow, doy) {\n        var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n            fwd = 7 + dow - doy,\n            // first-week day local weekday -- which local weekday is fwd\n            fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n        return -fwdlw + fwd - 1;\n    }\n\n    // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n    function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n        var localWeekday = (7 + weekday - dow) % 7,\n            weekOffset = firstWeekOffset(year, dow, doy),\n            dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n            resYear,\n            resDayOfYear;\n\n        if (dayOfYear <= 0) {\n            resYear = year - 1;\n            resDayOfYear = daysInYear(resYear) + dayOfYear;\n        } else if (dayOfYear > daysInYear(year)) {\n            resYear = year + 1;\n            resDayOfYear = dayOfYear - daysInYear(year);\n        } else {\n            resYear = year;\n            resDayOfYear = dayOfYear;\n        }\n\n        return {\n            year: resYear,\n            dayOfYear: resDayOfYear,\n        };\n    }\n\n    function weekOfYearFromDayOfYear(year, dayOfYear, dow, doy) {\n        var weekOffset = firstWeekOffset(year, dow, doy),\n            week = Math.floor((dayOfYear - weekOffset - 1) / 7) + 1,\n            resWeek,\n            resYear;\n\n        if (week < 1) {\n            resYear = year - 1;\n            resWeek = week + weeksInYear(resYear, dow, doy);\n        } else if (week > weeksInYear(year, dow, doy)) {\n            resWeek = week - weeksInYear(year, dow, doy);\n            resYear = year + 1;\n        } else {\n            resYear = year;\n            resWeek = week;\n        }\n\n        return {\n            week: resWeek,\n            year: resYear,\n        };\n    }\n\n    function weekOfYear(mom, dow, doy) {\n        return weekOfYearFromDayOfYear(mom.year(), mom.dayOfYear(), dow, doy);\n    }\n\n    function weekOfYearFromDate(year, month, date, dow, doy) {\n        var dayOfYear =\n            Math.round(\n                (createUTCDate(year, month, date) - createUTCDate(year, 0, 1)) /\n                    864e5\n            ) + 1;\n\n        return weekOfYearFromDayOfYear(year, dayOfYear, dow, doy);\n    }\n\n    function weeksInYear(year, dow, doy) {\n        var weekOffset = firstWeekOffset(year, dow, doy),\n            weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n        return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n    }\n\n    // FORMATTING\n\n    addFormatToken('w', ['ww', 2], 'wo', 'week');\n    addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n    // PARSING\n\n    addRegexToken('w', match1to2, match1to2NoLeadingZero);\n    addRegexToken('ww', match1to2, match2);\n    addRegexToken('W', match1to2, match1to2NoLeadingZero);\n    addRegexToken('WW', match1to2, match2);\n\n    addWeekParseToken(\n        ['w', 'ww', 'W', 'WW'],\n        function (input, week, config, token) {\n            week[token.substr(0, 1)] = toInt(input);\n        }\n    );\n\n    // HELPERS\n\n    // LOCALES\n\n    function localeWeek(mom) {\n        return weekOfYear(mom, this._week.dow, this._week.doy).week;\n    }\n\n    var defaultLocaleWeek = {\n        dow: 0, // Sunday is the first day of the week.\n        doy: 6, // The week that contains Jan 6th is the first week of the year.\n    };\n\n    function localeFirstDayOfWeek() {\n        return this._week.dow;\n    }\n\n    function localeFirstDayOfYear() {\n        return this._week.doy;\n    }\n\n    // MOMENTS\n\n    function getSetWeek(input) {\n        var week = this.localeData().week(this);\n        return input == null ? week : this.add((input - week) * 7, 'd');\n    }\n\n    function getSetISOWeek(input) {\n        var week = weekOfYear(this, 1, 4).week;\n        return input == null ? week : this.add((input - week) * 7, 'd');\n    }\n\n    // FORMATTING\n\n    function hFormat() {\n        return this.hours() % 12 || 12;\n    }\n\n    function kFormat() {\n        return this.hours() || 24;\n    }\n\n    addFormatToken('H', ['HH', 2], 0, 'hour');\n    addFormatToken('h', ['hh', 2], 0, hFormat);\n    addFormatToken('k', ['kk', 2], 0, kFormat);\n\n    addFormatToken('hmm', 0, 0, function () {\n        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n    });\n\n    addFormatToken('hmmss', 0, 0, function () {\n        return (\n            '' +\n            hFormat.apply(this) +\n            zeroFill(this.minutes(), 2) +\n            zeroFill(this.seconds(), 2)\n        );\n    });\n\n    addFormatToken('Hmm', 0, 0, function () {\n        return '' + this.hours() + zeroFill(this.minutes(), 2);\n    });\n\n    addFormatToken('Hmmss', 0, 0, function () {\n        return (\n            '' +\n            this.hours() +\n            zeroFill(this.minutes(), 2) +\n            zeroFill(this.seconds(), 2)\n        );\n    });\n\n    function meridiem(token, lowercase) {\n        addFormatToken(token, 0, 0, function () {\n            return this.localeData().meridiem(\n                this.hours(),\n                this.minutes(),\n                lowercase\n            );\n        });\n    }\n\n    meridiem('a', true);\n    meridiem('A', false);\n\n    // PARSING\n\n    function matchMeridiem(isStrict, locale) {\n        return locale._meridiemParse;\n    }\n\n    addRegexToken('a', matchMeridiem);\n    addRegexToken('A', matchMeridiem);\n    addRegexToken('H', match1to2, match1to2HasZero);\n    addRegexToken('h', match1to2, match1to2NoLeadingZero);\n    addRegexToken('k', match1to2, match1to2NoLeadingZero);\n    addRegexToken('HH', match1to2, match2);\n    addRegexToken('hh', match1to2, match2);\n    addRegexToken('kk', match1to2, match2);\n\n    addRegexToken('hmm', match3to4);\n    addRegexToken('hmmss', match5to6);\n    addRegexToken('Hmm', match3to4);\n    addRegexToken('Hmmss', match5to6);\n\n    addParseToken(['H', 'HH'], HOUR);\n    addParseToken(['k', 'kk'], function (input, array, config) {\n        var kInput = toInt(input);\n        array[HOUR] = kInput === 24 ? 0 : kInput;\n    });\n    addParseToken(['a', 'A'], function (input, array, config) {\n        config._isPm = config._locale.isPM(input);\n        config._meridiem = input;\n    });\n    addParseToken(['h', 'hh'], function (input, array, config) {\n        array[HOUR] = toInt(input);\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('hmm', function (input, array, config) {\n        var pos = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos));\n        array[MINUTE] = toInt(input.substr(pos));\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('hmmss', function (input, array, config) {\n        var pos1 = input.length - 4,\n            pos2 = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos1));\n        array[MINUTE] = toInt(input.substr(pos1, 2));\n        array[SECOND] = toInt(input.substr(pos2));\n        getParsingFlags(config).bigHour = true;\n    });\n    addParseToken('Hmm', function (input, array, config) {\n        var pos = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos));\n        array[MINUTE] = toInt(input.substr(pos));\n    });\n    addParseToken('Hmmss', function (input, array, config) {\n        var pos1 = input.length - 4,\n            pos2 = input.length - 2;\n        array[HOUR] = toInt(input.substr(0, pos1));\n        array[MINUTE] = toInt(input.substr(pos1, 2));\n        array[SECOND] = toInt(input.substr(pos2));\n    });\n\n    // LOCALES\n\n    function localeIsPM(input) {\n        // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n        // Using charAt should be more compatible.\n        return (input + '').toLowerCase().charAt(0) === 'p';\n    }\n\n    var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n        // Setting the hour should keep the time, because the user explicitly\n        // specified which hour they want. So trying to maintain the same hour (in\n        // a new timezone) makes sense. Adding/subtracting hours does not follow\n        // this rule.\n        getSetHour = makeGetSet('Hours', true);\n\n    function localeMeridiem(hours, minutes, isLower) {\n        if (hours > 11) {\n            return isLower ? 'pm' : 'PM';\n        } else {\n            return isLower ? 'am' : 'AM';\n        }\n    }\n\n    var baseConfig = {\n        calendar: defaultCalendar,\n        longDateFormat: defaultLongDateFormat,\n        invalidDate: defaultInvalidDate,\n        ordinal: defaultOrdinal,\n        dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n        relativeTime: defaultRelativeTime,\n\n        months: defaultLocaleMonths,\n        monthsShort: defaultLocaleMonthsShort,\n\n        week: defaultLocaleWeek,\n\n        weekdays: defaultLocaleWeekdays,\n        weekdaysMin: defaultLocaleWeekdaysMin,\n        weekdaysShort: defaultLocaleWeekdaysShort,\n\n        meridiemParse: defaultLocaleMeridiemParse,\n    };\n\n    // internal storage for locale config files\n    var locales = {},\n        localeFamilies = {},\n        globalLocale;\n\n    function commonPrefix(arr1, arr2) {\n        var i,\n            minl = Math.min(arr1.length, arr2.length);\n        for (i = 0; i < minl; i += 1) {\n            if (arr1[i] !== arr2[i]) {\n                return i;\n            }\n        }\n        return minl;\n    }\n\n    function normalizeLocale(key) {\n        return key ? key.toLowerCase().replace('_', '-') : key;\n    }\n\n    // pick the locale from the array\n    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n    function chooseLocale(names) {\n        var i = 0,\n            j,\n            next,\n            locale,\n            split;\n\n        while (i < names.length) {\n            split = normalizeLocale(names[i]).split('-');\n            j = split.length;\n            next = normalizeLocale(names[i + 1]);\n            next = next ? next.split('-') : null;\n            while (j > 0) {\n                locale = loadLocale(split.slice(0, j).join('-'));\n                if (locale) {\n                    return locale;\n                }\n                if (\n                    next &&\n                    next.length >= j &&\n                    commonPrefix(split, next) >= j - 1\n                ) {\n                    //the next array item is better than a shallower substring of this one\n                    break;\n                }\n                j--;\n            }\n            i++;\n        }\n        return globalLocale;\n    }\n\n    function isLocaleNameSane(name) {\n        // Only canonical locale module names are safe to append to the require path.\n        return typeof name === 'string' && /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(name);\n    }\n\n    function loadLocale(name) {\n        var oldLocale = null,\n            aliasedRequire,\n            normalizedName;\n\n        // Preserve exact custom locale names before trying the canonical built-in name.\n        // Use hasOwnProp rather than a plain lookup so that names like \"__proto__\",\n        // \"constructor\", or \"prototype\" can't resolve to an inherited Object.prototype\n        // property instead of a real (or missing) locale entry.\n        if (hasOwnProp(locales, name)) {\n            return locales[name];\n        }\n\n        normalizedName = normalizeLocale(name);\n        if (hasOwnProp(locales, normalizedName)) {\n            return locales[normalizedName];\n        }\n\n        // TODO: Find a better way to register and load all the locales in Node\n        if (\n            typeof module !== 'undefined' &&\n            module &&\n            module.exports &&\n            isLocaleNameSane(normalizedName)\n        ) {\n            try {\n                oldLocale = globalLocale._abbr;\n                aliasedRequire = require;\n                aliasedRequire('./locale/' + normalizedName);\n                getSetGlobalLocale(oldLocale);\n            } catch (e) {\n                // mark as not found to avoid repeating expensive file require call causing high CPU\n                // when trying to find en-US, en_US, en-us for every format call\n                locales[normalizedName] = null; // null means not found\n            }\n        }\n        if (hasOwnProp(locales, normalizedName)) {\n            return locales[normalizedName];\n        }\n    }\n\n    // This function will load locale and then set the global locale.  If\n    // no arguments are passed in, it will simply return the current global\n    // locale key.\n    function getSetGlobalLocale(key, values) {\n        var data;\n        if (key) {\n            if (isUndefined(values)) {\n                data = getLocale(key);\n            } else {\n                data = defineLocale(key, values);\n            }\n\n            if (data) {\n                // moment.duration._locale = moment._locale = data;\n                globalLocale = data;\n            } else {\n                if (typeof console !== 'undefined' && console.warn) {\n                    //warn user if arguments are passed but the locale could not be set\n                    console.warn(\n                        'Locale ' + key + ' not found. Did you forget to load it?'\n                    );\n                }\n            }\n        }\n\n        return globalLocale._abbr;\n    }\n\n    function defineLocale(name, config) {\n        if (config !== null) {\n            var locale,\n                parentConfig = baseConfig;\n            config.abbr = name;\n            if (locales[name] != null) {\n                deprecateSimple(\n                    'defineLocaleOverride',\n                    'use moment.updateLocale(localeName, config) to change ' +\n                        'an existing locale. moment.defineLocale(localeName, ' +\n                        'config) should only be used for creating a new locale ' +\n                        'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n                );\n                parentConfig = locales[name]._config;\n            } else if (config.parentLocale != null) {\n                if (locales[config.parentLocale] != null) {\n                    parentConfig = locales[config.parentLocale]._config;\n                } else {\n                    locale = loadLocale(config.parentLocale);\n                    if (locale != null) {\n                        parentConfig = locale._config;\n                    } else {\n                        if (!localeFamilies[config.parentLocale]) {\n                            localeFamilies[config.parentLocale] = [];\n                        }\n                        localeFamilies[config.parentLocale].push({\n                            name: name,\n                            config: config,\n                        });\n                        return null;\n                    }\n                }\n            }\n            locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n            if (localeFamilies[name]) {\n                localeFamilies[name].forEach(function (x) {\n                    defineLocale(x.name, x.config);\n                });\n            }\n\n            // backwards compat for now: also set the locale\n            // make sure we set the locale AFTER all child locales have been\n            // created, so we won't end up with the child locale set.\n            getSetGlobalLocale(name);\n\n            return locales[name];\n        } else {\n            // useful for testing\n            delete locales[name];\n            return null;\n        }\n    }\n\n    function updateLocale(name, config) {\n        var locale,\n            tmpLocale = loadLocale(name),\n            parentConfig = baseConfig;\n\n        if (tmpLocale != null) {\n            name = tmpLocale._abbr;\n        }\n\n        if (config != null) {\n            if (locales[name] != null && locales[name].parentLocale != null) {\n                // Update existing child locale in-place to avoid memory-leaks\n                locales[name].set(mergeConfigs(locales[name]._config, config));\n            } else {\n                // MERGE\n                if (tmpLocale != null) {\n                    parentConfig = tmpLocale._config;\n                }\n                config = mergeConfigs(parentConfig, config);\n                if (tmpLocale == null) {\n                    // updateLocale is called for creating a new locale\n                    // Set abbr so it will have a name (getters return\n                    // undefined otherwise).\n                    config.abbr = name;\n                }\n                locale = new Locale(config);\n                locale.parentLocale = locales[name];\n                locales[name] = locale;\n            }\n\n            // backwards compat for now: also set the locale\n            getSetGlobalLocale(name);\n        } else {\n            // pass null for config to unupdate, useful for tests\n            if (locales[name] != null) {\n                if (locales[name].parentLocale != null) {\n                    locales[name] = locales[name].parentLocale;\n                    if (name === getSetGlobalLocale()) {\n                        getSetGlobalLocale(name);\n                    }\n                } else if (locales[name] != null) {\n                    delete locales[name];\n                }\n            }\n        }\n        return locales[name];\n    }\n\n    // returns locale data\n    function getLocale(key) {\n        var locale;\n\n        if (key && key._locale && key._locale._abbr) {\n            key = key._locale._abbr;\n        }\n\n        if (!key) {\n            return globalLocale;\n        }\n\n        if (!isArray(key)) {\n            //short-circuit everything else\n            locale = loadLocale(key);\n            if (locale) {\n                return locale;\n            }\n            key = [key];\n        }\n\n        return chooseLocale(key);\n    }\n\n    function listLocales() {\n        return keys(locales);\n    }\n\n    function checkOverflow(m) {\n        var overflow,\n            a = m._a;\n\n        if (a && getParsingFlags(m).overflow === -2) {\n            overflow =\n                a[MONTH] < 0 || a[MONTH] > 11\n                    ? MONTH\n                    : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n                      ? DATE\n                      : a[HOUR] < 0 ||\n                          a[HOUR] > 24 ||\n                          (a[HOUR] === 24 &&\n                              (a[MINUTE] !== 0 ||\n                                  a[SECOND] !== 0 ||\n                                  a[MILLISECOND] !== 0))\n                        ? HOUR\n                        : a[MINUTE] < 0 || a[MINUTE] > 59\n                          ? MINUTE\n                          : a[SECOND] < 0 || a[SECOND] > 59\n                            ? SECOND\n                            : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n                              ? MILLISECOND\n                              : -1;\n\n            if (\n                getParsingFlags(m)._overflowDayOfYear &&\n                (overflow < YEAR || overflow > DATE)\n            ) {\n                overflow = DATE;\n            }\n            if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n                overflow = WEEK;\n            }\n            if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n                overflow = WEEKDAY;\n            }\n\n            getParsingFlags(m).overflow = overflow;\n        }\n\n        return m;\n    }\n\n    // iso 8601 regex\n    // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n    var extendedIsoRegex =\n            /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n        basicIsoRegex =\n            /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n        tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n        isoDates = [\n            ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n            ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n            ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n            ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n            ['YYYY-DDD', /\\d{4}-\\d{3}/],\n            ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n            ['YYYYYYMMDD', /[+-]\\d{10}/],\n            ['YYYYMMDD', /\\d{8}/],\n            ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n            ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n            ['YYYYDDD', /\\d{7}/],\n            ['YYYYMM', /\\d{6}/, false],\n            ['YYYY', /\\d{4}/, false],\n        ],\n        // iso time formats and regexes\n        isoTimes = [\n            ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n            ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n            ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n            ['HH:mm', /\\d\\d:\\d\\d/],\n            ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n            ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n            ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n            ['HHmm', /\\d\\d\\d\\d/],\n            ['HH', /\\d\\d/],\n        ],\n        aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n        // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n        rfc2822 =\n            /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n        obsOffsets = {\n            UT: 0,\n            GMT: 0,\n            EDT: -4 * 60,\n            EST: -5 * 60,\n            CDT: -5 * 60,\n            CST: -6 * 60,\n            MDT: -6 * 60,\n            MST: -7 * 60,\n            PDT: -7 * 60,\n            PST: -8 * 60,\n        };\n\n    // date from iso format\n    function configFromISO(config) {\n        var i,\n            l,\n            string = config._i,\n            match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n            allowTime,\n            dateFormat,\n            timeFormat,\n            tzFormat,\n            isoDatesLen = isoDates.length,\n            isoTimesLen = isoTimes.length;\n\n        if (match) {\n            getParsingFlags(config).iso = true;\n            for (i = 0, l = isoDatesLen; i < l; i++) {\n                if (isoDates[i][1].exec(match[1])) {\n                    dateFormat = isoDates[i][0];\n                    allowTime = isoDates[i][2] !== false;\n                    break;\n                }\n            }\n            if (dateFormat == null) {\n                config._isValid = false;\n                return;\n            }\n            if (match[3]) {\n                for (i = 0, l = isoTimesLen; i < l; i++) {\n                    if (isoTimes[i][1].exec(match[3])) {\n                        // match[2] should be 'T' or space\n                        timeFormat = (match[2] || ' ') + isoTimes[i][0];\n                        break;\n                    }\n                }\n                if (timeFormat == null) {\n                    config._isValid = false;\n                    return;\n                }\n            }\n            if (!allowTime && timeFormat != null) {\n                config._isValid = false;\n                return;\n            }\n            if (match[4]) {\n                if (tzRegex.exec(match[4])) {\n                    tzFormat = 'Z';\n                } else {\n                    config._isValid = false;\n                    return;\n                }\n            }\n            config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n            configFromStringAndFormat(config);\n        } else {\n            config._isValid = false;\n        }\n    }\n\n    function extractFromRFC2822Strings(\n        yearStr,\n        monthStr,\n        dayStr,\n        hourStr,\n        minuteStr,\n        secondStr\n    ) {\n        var result = [\n            untruncateYear(yearStr),\n            defaultLocaleMonthsShort.indexOf(monthStr),\n            parseInt(dayStr, 10),\n            parseInt(hourStr, 10),\n            parseInt(minuteStr, 10),\n        ];\n\n        if (secondStr) {\n            result.push(parseInt(secondStr, 10));\n        }\n\n        return result;\n    }\n\n    function untruncateYear(yearStr) {\n        var year = parseInt(yearStr, 10);\n        if (year <= 49) {\n            return 2000 + year;\n        } else if (year <= 999) {\n            return 1900 + year;\n        }\n        return year;\n    }\n\n    function preprocessRFC2822(s) {\n        // Remove comments and folding whitespace and replace multiple-spaces with a single space\n        return s\n            .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n            .replace(/(\\s\\s+)/g, ' ')\n            .replace(/^\\s\\s*/, '')\n            .replace(/\\s\\s*$/, '');\n    }\n\n    function checkWeekday(weekdayStr, parsedInput, config) {\n        if (weekdayStr) {\n            // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n            var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n                weekdayActual = new Date(\n                    parsedInput[0],\n                    parsedInput[1],\n                    parsedInput[2]\n                ).getDay();\n            if (weekdayProvided !== weekdayActual) {\n                getParsingFlags(config).weekdayMismatch = true;\n                config._isValid = false;\n                return false;\n            }\n        }\n        return true;\n    }\n\n    function calculateOffset(obsOffset, militaryOffset, numOffset) {\n        if (obsOffset) {\n            return obsOffsets[obsOffset];\n        } else if (militaryOffset) {\n            // the only allowed military tz is Z\n            return 0;\n        } else {\n            var hm = parseInt(numOffset, 10),\n                m = hm % 100,\n                h = (hm - m) / 100;\n            return h * 60 + m;\n        }\n    }\n\n    // date and time from ref 2822 format\n    function configFromRFC2822(config) {\n        var match = rfc2822.exec(preprocessRFC2822(config._i)),\n            parsedArray;\n        if (match) {\n            parsedArray = extractFromRFC2822Strings(\n                match[4],\n                match[3],\n                match[2],\n                match[5],\n                match[6],\n                match[7]\n            );\n            if (!checkWeekday(match[1], parsedArray, config)) {\n                return;\n            }\n\n            config._a = parsedArray;\n            config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n            config._d = createUTCDate.apply(null, config._a);\n            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n            getParsingFlags(config).rfc2822 = true;\n        } else {\n            config._isValid = false;\n        }\n    }\n\n    // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n    function configFromString(config) {\n        var matched = aspNetJsonRegex.exec(config._i);\n        if (matched !== null) {\n            config._d = new Date(+matched[1]);\n            return;\n        }\n\n        configFromISO(config);\n        if (config._isValid === false) {\n            delete config._isValid;\n        } else {\n            return;\n        }\n\n        configFromRFC2822(config);\n        if (config._isValid === false) {\n            delete config._isValid;\n        } else {\n            return;\n        }\n\n        if (config._strict) {\n            config._isValid = false;\n        } else {\n            // Final attempt, use Input Fallback\n            hooks.createFromInputFallback(config);\n        }\n    }\n\n    hooks.createFromInputFallback = deprecate(\n        'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n            'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n            'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n        function (config) {\n            config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n        }\n    );\n\n    // Pick the first defined of two or three arguments.\n    function defaults(a, b, c) {\n        if (a != null) {\n            return a;\n        }\n        if (b != null) {\n            return b;\n        }\n        return c;\n    }\n\n    function currentDateArray(config, now, forWeek) {\n        var hadWeekContext = Object.prototype.hasOwnProperty.call(\n                config,\n                '_isDefaultDatePartsForWeek'\n            ),\n            weekContext = config._isDefaultDatePartsForWeek;\n\n        // hooks is actually the exported moment object\n        config._isDefaultDatePartsForWeek = !!forWeek;\n        try {\n            return hooks._getDefaultDateParts(config, now, forWeek);\n        } finally {\n            if (hadWeekContext) {\n                config._isDefaultDatePartsForWeek = weekContext;\n            } else {\n                delete config._isDefaultDatePartsForWeek;\n            }\n        }\n    }\n\n    function currentDateNow(config) {\n        var now = config._defaultDatePartsNow;\n\n        if (!now) {\n            return hooks.now();\n        }\n        if (!now.hasValue) {\n            now.value = hooks.now();\n            now.hasValue = true;\n        }\n        return now.value;\n    }\n\n    // Internal hook for extensions that supply omitted calendar fields.\n    function getDefaultDateParts(config, now, forWeek) {\n        var useWeekDefaults = forWeek || config._isDefaultDatePartsForWeek,\n            nowValue = useWeekDefaults ? createLocal(now) : new Date(now);\n        if (useWeekDefaults) {\n            return [nowValue.year(), nowValue.month(), nowValue.date()];\n        }\n        if (config._useUTC) {\n            return [\n                nowValue.getUTCFullYear(),\n                nowValue.getUTCMonth(),\n                nowValue.getUTCDate(),\n            ];\n        }\n        return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n    }\n\n    hooks._getDefaultDateParts = getDefaultDateParts;\n\n    // convert an array to a date.\n    // the array should mirror the parameters below\n    // note: all values past the year are optional and will default to the lowest possible value.\n    // [year, month, day , hour, minute, second, millisecond]\n    function configFromArray(config) {\n        var i,\n            date,\n            input = [],\n            now,\n            currentDate,\n            expectedWeekday,\n            yearToUse,\n            dateIsDefaulted;\n\n        if (config._d) {\n            return;\n        }\n\n        if (\n            config._a[YEAR] == null ||\n            config._a[MONTH] == null ||\n            config._a[DATE] == null\n        ) {\n            now = currentDateNow(config);\n            currentDate = currentDateArray(config, now);\n        }\n\n        //compute day of the year from weeks and weekdays\n        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n            dayOfYearFromWeekInfo(config, currentDateArray(config, now, true));\n        }\n\n        //if the day of the year is set, figure out what it is\n        if (config._dayOfYear != null) {\n            yearToUse =\n                config._a[YEAR] != null ? config._a[YEAR] : currentDate[YEAR];\n\n            if (\n                config._dayOfYear > daysInYear(yearToUse) ||\n                config._dayOfYear === 0\n            ) {\n                getParsingFlags(config)._overflowDayOfYear = true;\n            }\n\n            date = createUTCDate(yearToUse, 0, config._dayOfYear);\n            config._a[MONTH] = date.getUTCMonth();\n            config._a[DATE] = date.getUTCDate();\n        }\n\n        dateIsDefaulted =\n            config._a[YEAR] == null ||\n            config._a[MONTH] == null ||\n            config._a[DATE] == null;\n\n        // Default to current date.\n        // * if no year, month, day of month are given, default to today\n        // * if day of month is given, default month and year\n        // * if month is given, default only year\n        // * if year is given, don't default anything\n        for (i = 0; i < 3 && config._a[i] == null; ++i) {\n            config._a[i] = input[i] = currentDate[i];\n        }\n\n        // Zero out whatever was not defaulted, including time\n        for (; i < 7; i++) {\n            config._a[i] = input[i] =\n                config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n        }\n\n        // Check for 24:00:00.000\n        if (\n            config._a[HOUR] === 24 &&\n            config._a[MINUTE] === 0 &&\n            config._a[SECOND] === 0 &&\n            config._a[MILLISECOND] === 0\n        ) {\n            config._nextDay = true;\n            config._a[HOUR] = 0;\n        }\n\n        config._d = (config._useUTC ? createUTCDate : createDate).apply(\n            null,\n            input\n        );\n        expectedWeekday = config._useUTC\n            ? config._d.getUTCDay()\n            : config._d.getDay();\n\n        // Apply timezone offset from input. The actual utcOffset can be changed\n        // with parseZone.\n        if (config._tzm != null) {\n            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n        }\n\n        if (config._nextDay) {\n            config._a[HOUR] = 24;\n        }\n\n        // check for mismatching day of week\n        if (\n            config._w &&\n            typeof config._w.d !== 'undefined' &&\n            !dateIsDefaulted &&\n            config._w.d !== expectedWeekday\n        ) {\n            getParsingFlags(config).weekdayMismatch = true;\n        }\n    }\n\n    function dayOfYearFromWeekInfo(config, currentDate) {\n        var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n        w = config._w;\n        if (w.GG != null || w.W != null || w.E != null) {\n            dow = 1;\n            doy = 4;\n\n            // TODO: We need to take the current isoWeekYear, but that depends on\n            // how we interpret now (local, utc, fixed offset). So create\n            // a now version of current config (take local/utc/offset flags, and\n            // create now).\n            weekYear = defaults(\n                w.GG,\n                config._a[YEAR],\n                weekOfYearFromDate(\n                    currentDate[YEAR],\n                    currentDate[MONTH],\n                    currentDate[DATE],\n                    1,\n                    4\n                ).year\n            );\n            week = defaults(w.W, 1);\n            weekday = defaults(w.E, 1);\n            if (weekday < 1 || weekday > 7) {\n                weekdayOverflow = true;\n            }\n        } else {\n            dow = config._locale._week.dow;\n            doy = config._locale._week.doy;\n\n            curWeek = weekOfYearFromDate(\n                currentDate[YEAR],\n                currentDate[MONTH],\n                currentDate[DATE],\n                dow,\n                doy\n            );\n\n            weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n            // Default to current week.\n            week = defaults(w.w, curWeek.week);\n\n            if (w.d != null) {\n                // weekday -- low day numbers are considered next week\n                weekday = w.d;\n                if (weekday < 0 || weekday > 6) {\n                    weekdayOverflow = true;\n                }\n            } else if (w.e != null) {\n                // local weekday -- counting starts from beginning of week\n                weekday = w.e + dow;\n                if (w.e < 0 || w.e > 6) {\n                    weekdayOverflow = true;\n                }\n            } else {\n                // default to beginning of week\n                weekday = dow;\n            }\n        }\n        if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n            getParsingFlags(config)._overflowWeeks = true;\n        } else if (weekdayOverflow != null) {\n            getParsingFlags(config)._overflowWeekday = true;\n        } else {\n            temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n            config._a[YEAR] = temp.year;\n            config._dayOfYear = temp.dayOfYear;\n        }\n    }\n\n    // constant that refers to the ISO standard\n    hooks.ISO_8601 = function () {};\n\n    // constant that refers to the RFC 2822 form\n    hooks.RFC_2822 = function () {};\n\n    // date from string and format string\n    function configFromStringAndFormat(config) {\n        // TODO: Move this to another part of the creation flow to prevent circular deps\n        if (config._f === hooks.ISO_8601) {\n            configFromISO(config);\n            return;\n        }\n        if (config._f === hooks.RFC_2822) {\n            configFromRFC2822(config);\n            return;\n        }\n        config._a = [];\n        getParsingFlags(config).empty = true;\n\n        // This array is used to make a Date, either with `new Date` or `Date.UTC`\n        var string = '' + config._i,\n            i,\n            parsedInput,\n            tokens,\n            token,\n            skipped,\n            stringLength = string.length,\n            totalParsedInputLength = 0,\n            era,\n            tokenLen;\n\n        tokens =\n            expandFormat(config._f, config._locale).match(formattingTokens) || [];\n        tokenLen = tokens.length;\n        for (i = 0; i < tokenLen; i++) {\n            token = tokens[i];\n            parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n                [])[0];\n            if (parsedInput) {\n                skipped = string.substr(0, string.indexOf(parsedInput));\n                if (skipped.length > 0) {\n                    getParsingFlags(config).unusedInput.push(skipped);\n                }\n                string = string.slice(\n                    string.indexOf(parsedInput) + parsedInput.length\n                );\n                totalParsedInputLength += parsedInput.length;\n            }\n            // don't parse if it's not a known token\n            if (formatTokenFunctions[token]) {\n                if (parsedInput) {\n                    getParsingFlags(config).empty = false;\n                } else {\n                    getParsingFlags(config).unusedTokens.push(token);\n                }\n                addTimeToArrayFromToken(token, parsedInput, config);\n            } else if (config._strict && !parsedInput) {\n                getParsingFlags(config).unusedTokens.push(token);\n            }\n        }\n\n        // add remaining unparsed input length to the string\n        getParsingFlags(config).charsLeftOver =\n            stringLength - totalParsedInputLength;\n        if (string.length > 0) {\n            getParsingFlags(config).unusedInput.push(string);\n        }\n\n        // clear _12h flag if hour is <= 12\n        if (\n            config._a[HOUR] <= 12 &&\n            getParsingFlags(config).bigHour === true &&\n            config._a[HOUR] > 0\n        ) {\n            getParsingFlags(config).bigHour = undefined;\n        }\n\n        getParsingFlags(config).parsedDateParts = config._a.slice(0);\n        getParsingFlags(config).meridiem = config._meridiem;\n        // handle meridiem\n        config._a[HOUR] = meridiemFixWrap(\n            config._locale,\n            config._a[HOUR],\n            config._meridiem\n        );\n\n        // handle era\n        era = getParsingFlags(config).era;\n        if (era !== null) {\n            config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n        }\n\n        configFromArray(config);\n        checkOverflow(config);\n    }\n\n    function meridiemFixWrap(locale, hour, meridiem) {\n        var isPm;\n\n        if (meridiem == null) {\n            // nothing to do\n            return hour;\n        }\n        if (locale.meridiemHour != null) {\n            return locale.meridiemHour(hour, meridiem);\n        } else if (locale.isPM != null) {\n            // Fallback\n            isPm = locale.isPM(meridiem);\n            if (isPm && hour < 12) {\n                hour += 12;\n            }\n            if (!isPm && hour === 12) {\n                hour = 0;\n            }\n            return hour;\n        } else {\n            // this is not supposed to happen\n            return hour;\n        }\n    }\n\n    // date from string and array of format strings\n    function configFromStringAndArray(config) {\n        var tempConfig,\n            bestMoment,\n            scoreToBeat,\n            i,\n            currentScore,\n            validFormatFound,\n            bestFormatIsValid = false,\n            defaultDatePartsNow = {},\n            configfLen = config._f.length;\n\n        if (configfLen === 0) {\n            getParsingFlags(config).invalidFormat = true;\n            config._d = new Date(NaN);\n            return;\n        }\n\n        for (i = 0; i < configfLen; i++) {\n            currentScore = 0;\n            validFormatFound = false;\n            tempConfig = copyConfig({}, config);\n            if (config._useUTC != null) {\n                tempConfig._useUTC = config._useUTC;\n            }\n            tempConfig._defaultDatePartsNow = defaultDatePartsNow;\n            tempConfig._f = config._f[i];\n            configFromStringAndFormat(tempConfig);\n\n            if (isValid$2(tempConfig)) {\n                validFormatFound = true;\n            }\n\n            // if there is any input that was not parsed add a penalty for that format\n            currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n            //or tokens\n            currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n            getParsingFlags(tempConfig).score = currentScore;\n\n            if (!bestFormatIsValid) {\n                if (\n                    scoreToBeat == null ||\n                    currentScore < scoreToBeat ||\n                    validFormatFound\n                ) {\n                    scoreToBeat = currentScore;\n                    bestMoment = tempConfig;\n                    if (validFormatFound) {\n                        bestFormatIsValid = true;\n                    }\n                }\n            } else {\n                if (currentScore < scoreToBeat) {\n                    scoreToBeat = currentScore;\n                    bestMoment = tempConfig;\n                }\n            }\n        }\n\n        extend(config, bestMoment || tempConfig);\n    }\n\n    function configFromObject(config) {\n        if (config._d) {\n            return;\n        }\n\n        var i = normalizeObjectUnits(config._i),\n            dayOrDate = i.day === undefined ? i.date : i.day;\n        config._a = map(\n            [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n            function (obj) {\n                return obj && parseInt(obj, 10);\n            }\n        );\n\n        configFromArray(config);\n    }\n\n    function createFromConfig(config) {\n        var res = new Moment(checkOverflow(prepareConfig(config)));\n        if (res._nextDay) {\n            // Adding is smart enough around DST\n            res.add(1, 'd');\n            res._nextDay = undefined;\n        }\n\n        return res;\n    }\n\n    function prepareConfig(config) {\n        var input = config._i,\n            format = config._f;\n\n        config._locale = config._locale || getLocale(config._l);\n\n        if (input === null || (format === undefined && input === '')) {\n            return createInvalid$1({ nullInput: true });\n        }\n\n        if (typeof input === 'string') {\n            config._i = input = config._locale.preparse(input);\n        }\n\n        if (isMoment(input)) {\n            return new Moment(checkOverflow(input));\n        } else if (isDate(input)) {\n            config._d = input;\n        } else if (isArray(format)) {\n            configFromStringAndArray(config);\n        } else if (format) {\n            configFromStringAndFormat(config);\n        } else {\n            configFromInput(config);\n        }\n\n        if (!isValid$2(config)) {\n            config._d = null;\n        }\n\n        return config;\n    }\n\n    function configFromInput(config) {\n        var input = config._i;\n        if (isUndefined(input)) {\n            config._d = new Date(hooks.now());\n        } else if (isDate(input)) {\n            config._d = new Date(input.valueOf());\n        } else if (typeof input === 'string') {\n            configFromString(config);\n        } else if (isArray(input)) {\n            config._a = map(input.slice(0), function (obj) {\n                return parseInt(obj, 10);\n            });\n            configFromArray(config);\n        } else if (isObject(input)) {\n            configFromObject(config);\n        } else if (isNumber(input)) {\n            // from milliseconds\n            config._d = new Date(input);\n        } else {\n            hooks.createFromInputFallback(config);\n        }\n    }\n\n    function createLocalOrUTC(input, format, locale, strict, isUTC) {\n        var c = {};\n\n        if (format === true || format === false) {\n            strict = format;\n            format = undefined;\n        }\n\n        if (locale === true || locale === false) {\n            strict = locale;\n            locale = undefined;\n        }\n\n        if (\n            (isObject(input) && isObjectEmpty(input)) ||\n            (isArray(input) && input.length === 0)\n        ) {\n            input = undefined;\n        }\n        // object construction must be done this way.\n        // https://github.com/moment/moment/issues/1423\n        c._isAMomentObject = true;\n        c._useUTC = c._isUTC = isUTC;\n        c._l = locale;\n        c._i = input;\n        c._f = format;\n        c._strict = strict;\n\n        return createFromConfig(c);\n    }\n\n    function createLocal(input, format, locale, strict) {\n        return createLocalOrUTC(input, format, locale, strict, false);\n    }\n\n    var prototypeMin = deprecate(\n            'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n            function () {\n                var other = createLocal.apply(null, arguments);\n                if (this.isValid() && other.isValid()) {\n                    return other < this ? this : other;\n                } else {\n                    return createInvalid$1();\n                }\n            }\n        ),\n        prototypeMax = deprecate(\n            'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n            function () {\n                var other = createLocal.apply(null, arguments);\n                if (this.isValid() && other.isValid()) {\n                    return other > this ? this : other;\n                } else {\n                    return createInvalid$1();\n                }\n            }\n        );\n\n    // Pick a moment m from moments so that m[fn](other) is true for all\n    // other. This relies on the function fn to be transitive.\n    //\n    // moments should either be an array of moment objects or an array, whose\n    // first element is an array of moment objects.\n    function pickBy(fn, moments) {\n        var res, i;\n        if (moments.length === 1 && isArray(moments[0])) {\n            moments = moments[0];\n        }\n        if (!moments.length) {\n            return createLocal();\n        }\n        for (i = 0; i < moments.length; ++i) {\n            if (isMoment(moments[i])) {\n                res = moments[i];\n                break;\n            }\n        }\n        if (!res) {\n            return createInvalid$1();\n        }\n        for (++i; i < moments.length; ++i) {\n            if (\n                isMoment(moments[i]) &&\n                (!moments[i].isValid() || moments[i][fn](res))\n            ) {\n                res = moments[i];\n            }\n        }\n        return res;\n    }\n\n    // TODO: Use [].sort instead?\n    function min() {\n        var args = [].slice.call(arguments, 0);\n\n        return pickBy('isBefore', args);\n    }\n\n    function max() {\n        var args = [].slice.call(arguments, 0);\n\n        return pickBy('isAfter', args);\n    }\n\n    var now = function () {\n        return Date.now ? Date.now() : +new Date();\n    };\n\n    var ordering = [\n        'year',\n        'quarter',\n        'month',\n        'week',\n        'day',\n        'hour',\n        'minute',\n        'second',\n        'millisecond',\n    ];\n\n    function isDurationValid(m) {\n        var key,\n            unitHasDecimal = false,\n            i,\n            orderLen = ordering.length;\n        for (key in m) {\n            if (\n                hasOwnProp(m, key) &&\n                !(\n                    indexOf.call(ordering, key) !== -1 &&\n                    (m[key] == null || !isNaN(m[key]))\n                )\n            ) {\n                return false;\n            }\n        }\n\n        for (i = 0; i < orderLen; ++i) {\n            if (m[ordering[i]]) {\n                if (unitHasDecimal) {\n                    return false; // only allow non-integers for smallest unit\n                }\n                if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n                    unitHasDecimal = true;\n                }\n            }\n        }\n\n        return true;\n    }\n\n    function isValid$1() {\n        return this._isValid;\n    }\n\n    function createInvalid() {\n        return createDuration(NaN);\n    }\n\n    function Duration(duration) {\n        var normalizedInput = normalizeObjectUnits(duration),\n            years = normalizedInput.year || 0,\n            quarters = normalizedInput.quarter || 0,\n            months = normalizedInput.month || 0,\n            weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n            days = normalizedInput.day || 0,\n            hours = normalizedInput.hour || 0,\n            minutes = normalizedInput.minute || 0,\n            seconds = normalizedInput.second || 0,\n            milliseconds = normalizedInput.millisecond || 0;\n\n        this._isValid = isDurationValid(normalizedInput);\n\n        // representation for dateAddRemove\n        this._milliseconds =\n            +milliseconds +\n            seconds * 1e3 + // 1000\n            minutes * 6e4 + // 1000 * 60\n            hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n        // Because of dateAddRemove treats 24 hours as different from a\n        // day when working around DST, we need to store them separately\n        this._days = +days + weeks * 7;\n        // It is impossible to translate months into days without knowing\n        // which months you are are talking about, so we have to store\n        // it separately.\n        this._months = +months + quarters * 3 + years * 12;\n\n        this._data = {};\n\n        this._locale = getLocale();\n\n        this._bubble();\n    }\n\n    function isDuration(obj) {\n        return obj instanceof Duration;\n    }\n\n    function absRound(number) {\n        if (number < 0) {\n            return Math.round(-1 * number) * -1;\n        } else {\n            return Math.round(number);\n        }\n    }\n\n    // compare two arrays, return the number of differences\n    function compareArrays(array1, array2, dontConvert) {\n        var len = Math.min(array1.length, array2.length),\n            lengthDiff = Math.abs(array1.length - array2.length),\n            diffs = 0,\n            i;\n        for (i = 0; i < len; i++) {\n            if (\n                (toInt(array1[i]) !== toInt(array2[i]))\n            ) {\n                diffs++;\n            }\n        }\n        return diffs + lengthDiff;\n    }\n\n    // FORMATTING\n\n    function offset(token, separator) {\n        addFormatToken(token, 0, 0, function () {\n            var offset = this.utcOffset(),\n                sign = '+';\n            if (offset < 0) {\n                offset = -offset;\n                sign = '-';\n            }\n            return (\n                sign +\n                zeroFill(~~(offset / 60), 2) +\n                separator +\n                zeroFill(~~offset % 60, 2)\n            );\n        });\n    }\n\n    offset('Z', ':');\n    offset('ZZ', '');\n\n    // PARSING\n\n    addRegexToken('Z', matchShortOffset);\n    addRegexToken('ZZ', matchShortOffset);\n    addParseToken(['Z', 'ZZ'], function (input, array, config) {\n        var offset = offsetFromString(matchShortOffset, input);\n        config._useUTC = true;\n        config._tzm = offset;\n        if (offset === null) {\n            getParsingFlags(config).invalidOffset = input;\n        }\n    });\n\n    // HELPERS\n\n    // timezone chunker\n    // '+10:00' > ['10',  '00']\n    // '-1530'  > ['-15', '30']\n    var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n    function offsetFromString(matcher, string) {\n        var matches = (string || '').match(matcher),\n            chunk,\n            parts,\n            minutes;\n\n        if (matches === null) {\n            return null;\n        }\n\n        chunk = matches[matches.length - 1] || [];\n        parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n        minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n        if (\n            toInt(parts[2]) > 59 ||\n            (parts[0] === '+' ? minutes > 14 * 60 : minutes > 12 * 60)\n        ) {\n            return null;\n        }\n\n        return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n    }\n\n    // Return a moment from input, that is local/utc/zone equivalent to model.\n    function cloneWithOffset(input, model) {\n        var res, diff;\n        if (model._isUTC) {\n            res = model.clone();\n            diff =\n                (isMoment(input) || isDate(input)\n                    ? input.valueOf()\n                    : createLocal(input).valueOf()) - res.valueOf();\n            // Use low-level api, because this fn is low-level api.\n            res._d.setTime(res._d.valueOf() + diff);\n            hooks.updateOffset(res, false);\n            return res;\n        } else {\n            return createLocal(input).local();\n        }\n    }\n\n    function getDateOffset(m) {\n        // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n        // https://github.com/moment/moment/pull/1871\n        return -Math.round(m._d.getTimezoneOffset());\n    }\n\n    // HOOKS\n\n    // This function will be called whenever a moment is mutated.\n    // It is intended to keep the offset in sync with the timezone.\n    hooks.updateOffset = function () {};\n\n    // MOMENTS\n\n    // keepLocalTime = true means only change the timezone, without\n    // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n    // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n    // +0200, so we adjust the time as needed, to be valid.\n    //\n    // Keeping the time actually adds/subtracts (one hour)\n    // from the actual represented time. That is why we call updateOffset\n    // a second time. In case it wants us to change the offset again\n    // _changeInProgress == true case, then we have to adjust, because\n    // there is no such time in the given timezone.\n    function getSetOffset(input, keepLocalTime, keepMinutes) {\n        var offset = this._offset || 0,\n            localAdjust;\n        if (!this.isValid()) {\n            return input != null ? this : NaN;\n        }\n        if (input != null) {\n            if (typeof input === 'string') {\n                input = offsetFromString(matchShortOffset, input);\n                if (input === null) {\n                    return this;\n                }\n            } else if (Math.abs(input) < 16 && !keepMinutes) {\n                input = input * 60;\n            }\n            if (!this._isUTC && keepLocalTime) {\n                localAdjust = getDateOffset(this);\n            }\n            this._offset = input;\n            this._isUTC = true;\n            if (localAdjust != null) {\n                this.add(localAdjust, 'm');\n            }\n            if (offset !== input) {\n                if (!keepLocalTime || this._changeInProgress) {\n                    addSubtract$1(\n                        this,\n                        createDuration(input - offset, 'm'),\n                        1,\n                        false\n                    );\n                } else if (!this._changeInProgress) {\n                    this._changeInProgress = true;\n                    hooks.updateOffset(this, true);\n                    this._changeInProgress = null;\n                }\n            }\n            return this;\n        } else {\n            return this._isUTC ? offset : getDateOffset(this);\n        }\n    }\n\n    function getSetZone(input, keepLocalTime) {\n        if (input != null) {\n            if (typeof input !== 'string') {\n                input = -input;\n            }\n\n            this.utcOffset(input, keepLocalTime);\n\n            return this;\n        } else {\n            return -this.utcOffset();\n        }\n    }\n\n    function setOffsetToUTC(keepLocalTime) {\n        return this.utcOffset(0, keepLocalTime);\n    }\n\n    function setOffsetToLocal(keepLocalTime) {\n        if (this._isUTC) {\n            this.utcOffset(0, keepLocalTime);\n            this._isUTC = false;\n\n            if (keepLocalTime) {\n                this.subtract(getDateOffset(this), 'm');\n            }\n        }\n        return this;\n    }\n\n    function setOffsetToParsedOffset() {\n        if (this._tzm != null) {\n            this.utcOffset(this._tzm, false, true);\n        } else if (typeof this._i === 'string') {\n            var tZone = offsetFromString(matchOffset, this._i);\n            if (tZone != null) {\n                this.utcOffset(tZone);\n            } else {\n                this.utcOffset(0, true);\n            }\n        }\n        return this;\n    }\n\n    function hasAlignedHourOffset(input) {\n        if (!this.isValid()) {\n            return false;\n        }\n        input = input ? createLocal(input).utcOffset() : 0;\n\n        return (this.utcOffset() - input) % 60 === 0;\n    }\n\n    function isDaylightSavingTime() {\n        return (\n            this.utcOffset() > this.clone().month(0).utcOffset() ||\n            this.utcOffset() > this.clone().month(5).utcOffset()\n        );\n    }\n\n    function isDaylightSavingTimeShifted() {\n        if (!isUndefined(this._isDSTShifted)) {\n            return this._isDSTShifted;\n        }\n\n        var c = {},\n            other;\n\n        copyConfig(c, this);\n        c = prepareConfig(c);\n\n        if (c._a) {\n            other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n            this._isDSTShifted =\n                this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n        } else {\n            this._isDSTShifted = false;\n        }\n\n        return this._isDSTShifted;\n    }\n\n    function isLocal() {\n        return this.isValid() ? !this._isUTC : false;\n    }\n\n    function isUtcOffset() {\n        return this.isValid() ? this._isUTC : false;\n    }\n\n    function isUtc() {\n        return this.isValid() ? this._isUTC && this._offset === 0 : false;\n    }\n\n    // ASP.NET json date format regex\n    var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n        // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n        // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n        // and further modified to allow for strings containing both week and day\n        isoRegex =\n            /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n    function createDuration(input, key) {\n        var duration = input,\n            // matching against regexp is expensive, do it on demand\n            match = null,\n            sign,\n            ret,\n            diffRes;\n\n        if (isDuration(input)) {\n            duration = {\n                ms: input._milliseconds,\n                d: input._days,\n                M: input._months,\n            };\n        } else if (isNumber(input) || !isNaN(+input)) {\n            duration = {};\n            if (key) {\n                duration[key] = +input;\n            } else {\n                duration.milliseconds = +input;\n            }\n        } else if ((match = aspNetRegex.exec(input))) {\n            sign = match[1] === '-' ? -1 : 1;\n            duration = {\n                y: 0,\n                d: toInt(match[DATE]) * sign,\n                h: toInt(match[HOUR]) * sign,\n                m: toInt(match[MINUTE]) * sign,\n                s: toInt(match[SECOND]) * sign,\n                ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n            };\n        } else if ((match = isoRegex.exec(input))) {\n            sign = match[1] === '-' ? -1 : 1;\n            duration = {\n                y: parseIso(match[2], sign),\n                M: parseIso(match[3], sign),\n                w: parseIso(match[4], sign),\n                d: parseIso(match[5], sign),\n                h: parseIso(match[6], sign),\n                m: parseIso(match[7], sign),\n                s: parseIso(match[8], sign),\n            };\n        } else if (duration == null) {\n            // checks for null or undefined\n            duration = {};\n        } else if (\n            typeof duration === 'object' &&\n            ('from' in duration || 'to' in duration)\n        ) {\n            diffRes = momentsDifference(\n                createLocal(duration.from),\n                createLocal(duration.to)\n            );\n\n            duration = {};\n            duration.ms = diffRes.milliseconds;\n            duration.M = diffRes.months;\n        }\n\n        ret = new Duration(duration);\n\n        if (isDuration(input) && hasOwnProp(input, '_locale')) {\n            ret._locale = input._locale;\n        }\n\n        if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n            ret._isValid = input._isValid;\n        }\n\n        return ret;\n    }\n\n    createDuration.fn = Duration.prototype;\n    createDuration.invalid = createInvalid;\n\n    function parseIso(inp, sign) {\n        // We'd normally use ~~inp for this, but unfortunately it also\n        // converts floats to ints.\n        // inp may be undefined, so careful calling replace on it.\n        var res = inp && parseFloat(inp.replace(',', '.'));\n        // apply sign while we're at it\n        return (isNaN(res) ? 0 : res) * sign;\n    }\n\n    function positiveMomentsDifference(base, other) {\n        var res = {};\n\n        res.months =\n            other.month() - base.month() + (other.year() - base.year()) * 12;\n        if (base.clone().add(res.months, 'M').isAfter(other)) {\n            --res.months;\n        }\n\n        res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n        return res;\n    }\n\n    function momentsDifference(base, other) {\n        var res;\n        if (!(base.isValid() && other.isValid())) {\n            return { milliseconds: 0, months: 0 };\n        }\n\n        other = cloneWithOffset(other, base);\n        if (base.isBefore(other)) {\n            res = positiveMomentsDifference(base, other);\n        } else {\n            res = positiveMomentsDifference(other, base);\n            res.milliseconds = -res.milliseconds;\n            res.months = -res.months;\n        }\n\n        return res;\n    }\n\n    // TODO: remove 'name' arg after deprecation is removed\n    function createAdder(direction, name) {\n        return function (val, period) {\n            var dur, tmp;\n            //invert the arguments, but complain about it\n            if (period !== null && !isNaN(+period)) {\n                deprecateSimple(\n                    name,\n                    'moment().' +\n                        name +\n                        '(period, number) is deprecated. Please use moment().' +\n                        name +\n                        '(number, period). ' +\n                        'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n                );\n                tmp = val;\n                val = period;\n                period = tmp;\n            }\n\n            dur = createDuration(val, period);\n            addSubtract$1(this, dur, direction);\n            return this;\n        };\n    }\n\n    function addSubtract$1(mom, duration, isAdding, updateOffset) {\n        var milliseconds = duration._milliseconds,\n            days = absRound(duration._days),\n            months = absRound(duration._months);\n\n        if (!mom.isValid()) {\n            // No op\n            return;\n        }\n\n        updateOffset = updateOffset == null ? true : updateOffset;\n\n        if (months) {\n            setMonth(mom, get$2(mom, 'Month') + months * isAdding);\n        }\n        if (days) {\n            set$1(mom, 'Date', get$2(mom, 'Date') + days * isAdding);\n        }\n        if (milliseconds) {\n            mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n        }\n        if (updateOffset) {\n            hooks.updateOffset(mom, days || months);\n        }\n    }\n\n    var add$1 = createAdder(1, 'add'),\n        subtract$1 = createAdder(-1, 'subtract');\n\n    function isString(input) {\n        return typeof input === 'string' || input instanceof String;\n    }\n\n    // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n    function isMomentInput(input) {\n        return (\n            isMoment(input) ||\n            isDate(input) ||\n            isString(input) ||\n            isNumber(input) ||\n            isNumberOrStringArray(input) ||\n            isMomentInputObject(input) ||\n            input === null ||\n            input === undefined\n        );\n    }\n\n    function isMomentInputObject(input) {\n        var objectTest = isObject(input) && !isObjectEmpty(input),\n            propertyTest = false,\n            properties = [\n                'years',\n                'year',\n                'y',\n                'months',\n                'month',\n                'M',\n                'days',\n                'day',\n                'd',\n                'dates',\n                'date',\n                'D',\n                'hours',\n                'hour',\n                'h',\n                'minutes',\n                'minute',\n                'm',\n                'seconds',\n                'second',\n                's',\n                'milliseconds',\n                'millisecond',\n                'ms',\n            ],\n            i,\n            property,\n            propertyLen = properties.length;\n\n        for (i = 0; i < propertyLen; i += 1) {\n            property = properties[i];\n            propertyTest = propertyTest || hasOwnProp(input, property);\n        }\n\n        return objectTest && propertyTest;\n    }\n\n    function isNumberOrStringArray(input) {\n        var arrayTest = isArray(input),\n            dataTypeTest = false;\n        if (arrayTest) {\n            dataTypeTest =\n                input.filter(function (item) {\n                    return !isNumber(item) && isString(input);\n                }).length === 0;\n        }\n        return arrayTest && dataTypeTest;\n    }\n\n    function isCalendarSpec(input) {\n        var objectTest = isObject(input) && !isObjectEmpty(input),\n            propertyTest = false,\n            properties = [\n                'sameDay',\n                'nextDay',\n                'lastDay',\n                'nextWeek',\n                'lastWeek',\n                'sameElse',\n            ],\n            i,\n            property;\n\n        for (i = 0; i < properties.length; i += 1) {\n            property = properties[i];\n            propertyTest = propertyTest || hasOwnProp(input, property);\n        }\n\n        return objectTest && propertyTest;\n    }\n\n    function getCalendarFormat(myMoment, now) {\n        var diff = myMoment.diff(now, 'days', true);\n        return diff < -6\n            ? 'sameElse'\n            : diff < -1\n              ? 'lastWeek'\n              : diff < 0\n                ? 'lastDay'\n                : diff < 1\n                  ? 'sameDay'\n                  : diff < 2\n                    ? 'nextDay'\n                    : diff < 7\n                      ? 'nextWeek'\n                      : 'sameElse';\n    }\n\n    function calendar(time, formats) {\n        // Support for single parameter, formats only overload to the calendar function\n        if (arguments.length === 1) {\n            if (!arguments[0]) {\n                time = undefined;\n                formats = undefined;\n            } else if (isMomentInput(arguments[0])) {\n                time = arguments[0];\n                formats = undefined;\n            } else if (isCalendarSpec(arguments[0])) {\n                formats = arguments[0];\n                time = undefined;\n            }\n        }\n        // We want to compare the start of today, vs this.\n        // Getting start-of-today depends on whether we're local/utc/offset or not.\n        var now = time || createLocal(),\n            sod = cloneWithOffset(now, this).startOf('day'),\n            format = hooks.calendarFormat(this, sod) || 'sameElse',\n            output =\n                formats &&\n                (isFunction(formats[format])\n                    ? formats[format].call(this, now)\n                    : formats[format]);\n\n        return this.format(\n            output || this.localeData().calendar(format, this, createLocal(now))\n        );\n    }\n\n    function clone$1() {\n        return new Moment(this);\n    }\n\n    function isAfter(input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input);\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units) || 'millisecond';\n        if (units === 'millisecond') {\n            return this.valueOf() > localInput.valueOf();\n        } else {\n            return localInput.valueOf() < this.clone().startOf(units).valueOf();\n        }\n    }\n\n    function isBefore(input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input);\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units) || 'millisecond';\n        if (units === 'millisecond') {\n            return this.valueOf() < localInput.valueOf();\n        } else {\n            return this.clone().endOf(units).valueOf() < localInput.valueOf();\n        }\n    }\n\n    function isBetween(from, to, units, inclusivity) {\n        var localFrom = isMoment(from) ? from : createLocal(from),\n            localTo = isMoment(to) ? to : createLocal(to);\n        if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n            return false;\n        }\n        inclusivity = inclusivity || '()';\n        return (\n            (inclusivity[0] === '('\n                ? this.isAfter(localFrom, units)\n                : !this.isBefore(localFrom, units)) &&\n            (inclusivity[1] === ')'\n                ? this.isBefore(localTo, units)\n                : !this.isAfter(localTo, units))\n        );\n    }\n\n    function isSame(input, units) {\n        var localInput = isMoment(input) ? input : createLocal(input),\n            inputMs;\n        if (!(this.isValid() && localInput.isValid())) {\n            return false;\n        }\n        units = normalizeUnits(units) || 'millisecond';\n        if (units === 'millisecond') {\n            return this.valueOf() === localInput.valueOf();\n        } else {\n            inputMs = localInput.valueOf();\n            return (\n                this.clone().startOf(units).valueOf() <= inputMs &&\n                inputMs <= this.clone().endOf(units).valueOf()\n            );\n        }\n    }\n\n    function isSameOrAfter(input, units) {\n        return this.isSame(input, units) || this.isAfter(input, units);\n    }\n\n    function isSameOrBefore(input, units) {\n        return this.isSame(input, units) || this.isBefore(input, units);\n    }\n\n    function diff(input, units, asFloat) {\n        var that, zoneDelta, output;\n\n        if (!this.isValid()) {\n            return NaN;\n        }\n\n        that = cloneWithOffset(input, this);\n\n        if (!that.isValid()) {\n            return NaN;\n        }\n\n        zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n        units = normalizeUnits(units);\n\n        switch (units) {\n            case 'year':\n                output = monthDiff(this, that) / 12;\n                break;\n            case 'month':\n                output = monthDiff(this, that);\n                break;\n            case 'quarter':\n                output = monthDiff(this, that) / 3;\n                break;\n            case 'second':\n                output = (this - that) / 1e3;\n                break; // 1000\n            case 'minute':\n                output = (this - that) / 6e4;\n                break; // 1000 * 60\n            case 'hour':\n                output = (this - that) / 36e5;\n                break; // 1000 * 60 * 60\n            case 'day':\n                output = (this - that - zoneDelta) / 864e5;\n                break; // 1000 * 60 * 60 * 24, negate dst\n            case 'week':\n                output = (this - that - zoneDelta) / 6048e5;\n                break; // 1000 * 60 * 60 * 24 * 7, negate dst\n            default:\n                output = this - that;\n        }\n\n        return asFloat ? output : absFloor(output);\n    }\n\n    function monthDiff(a, b) {\n        if (a.date() < b.date()) {\n            // end-of-month calculations work correct when the start month has more\n            // days than the end month.\n            return -monthDiff(b, a);\n        }\n        // difference in months\n        var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n            // b is in (anchor - 1 month, anchor + 1 month)\n            anchor = a.clone().add(wholeMonthDiff, 'months'),\n            anchor2,\n            adjust;\n\n        if (b - anchor < 0) {\n            anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n            // linear across the month\n            adjust = (b - anchor) / (anchor - anchor2);\n        } else {\n            anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n            // linear across the month\n            adjust = (b - anchor) / (anchor2 - anchor);\n        }\n\n        //check for negative zero, return zero if negative zero\n        return -(wholeMonthDiff + adjust) || 0;\n    }\n\n    hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n    hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n    function toString() {\n        return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n    }\n\n    function toISOString$1(keepOffset) {\n        if (!this.isValid()) {\n            return null;\n        }\n        var utc = keepOffset !== true,\n            m = utc ? this.clone().utc() : this;\n        if (m.year() < 0 || m.year() > 9999) {\n            return formatMoment(\n                m,\n                utc\n                    ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n                    : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n            );\n        }\n        if (isFunction(Date.prototype.toISOString)) {\n            // native implementation is ~50x faster, use it when we can\n            if (utc) {\n                return this.toDate().toISOString();\n            } else {\n                return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n                    .toISOString()\n                    .replace('Z', formatMoment(m, 'Z'));\n            }\n        }\n        return formatMoment(\n            m,\n            utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n        );\n    }\n\n    /**\n     * Return a human readable representation of a moment that can\n     * also be evaluated to get a new moment which is the same\n     *\n     * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n     */\n    function inspect() {\n        if (!this.isValid()) {\n            return 'moment.invalid(/* ' + this._i + ' */)';\n        }\n        var func = 'moment',\n            zone = '',\n            prefix,\n            year,\n            datetime,\n            suffix;\n        if (!this.isLocal()) {\n            func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n            zone = 'Z';\n        }\n        prefix = '[' + func + '(\"]';\n        year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n        datetime = '-MM-DD[T]HH:mm:ss.SSS';\n        suffix = zone + '[\")]';\n\n        return this.format(prefix + year + datetime + suffix);\n    }\n\n    function format(inputString) {\n        if (!inputString) {\n            inputString = this.isUtc()\n                ? hooks.defaultFormatUtc\n                : hooks.defaultFormat;\n        }\n        var output = formatMoment(this, inputString);\n        return this.localeData().postformat(output);\n    }\n\n    function from(time, withoutSuffix) {\n        if (\n            this.isValid() &&\n            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n        ) {\n            return createDuration({ to: this, from: time })\n                .locale(this.locale())\n                .humanize(!withoutSuffix);\n        } else {\n            return this.localeData().invalidDate();\n        }\n    }\n\n    function fromNow(withoutSuffix) {\n        return this.from(createLocal(), withoutSuffix);\n    }\n\n    function to(time, withoutSuffix) {\n        if (\n            this.isValid() &&\n            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n        ) {\n            return createDuration({ from: this, to: time })\n                .locale(this.locale())\n                .humanize(!withoutSuffix);\n        } else {\n            return this.localeData().invalidDate();\n        }\n    }\n\n    function toNow(withoutSuffix) {\n        return this.to(createLocal(), withoutSuffix);\n    }\n\n    // If passed a locale key, it will set the locale for this\n    // instance.  Otherwise, it will return the locale configuration\n    // variables for this instance.\n    function locale(key) {\n        var newLocaleData;\n\n        if (key === undefined) {\n            return this._locale._abbr;\n        } else {\n            newLocaleData = getLocale(key);\n            if (newLocaleData != null) {\n                this._locale = newLocaleData;\n            }\n            return this;\n        }\n    }\n\n    var lang = deprecate(\n        'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n        function (key) {\n            if (key === undefined) {\n                return this.localeData();\n            } else {\n                return this.locale(key);\n            }\n        }\n    );\n\n    function localeData() {\n        return this._locale;\n    }\n\n    var MS_PER_SECOND = 1000,\n        MS_PER_MINUTE = 60 * MS_PER_SECOND,\n        MS_PER_HOUR = 60 * MS_PER_MINUTE,\n        MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n    // actual modulo - handles negative numbers (for dates before 1970):\n    function mod(dividend, divisor) {\n        return ((dividend % divisor) + divisor) % divisor;\n    }\n\n    function localStartOfDate(y, m, d) {\n        // the date constructor remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            // preserve leap years using a full 400 year cycle, then reset\n            return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n        } else {\n            return new Date(y, m, d).valueOf();\n        }\n    }\n\n    function utcStartOfDate(y, m, d) {\n        // Date.UTC remaps years 0-99 to 1900-1999\n        if (y < 100 && y >= 0) {\n            // preserve leap years using a full 400 year cycle, then reset\n            return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n        } else {\n            return Date.UTC(y, m, d);\n        }\n    }\n\n    function startOf(units) {\n        var time, startOfDate;\n        units = normalizeUnits(units);\n        if (units === undefined || units === 'millisecond' || !this.isValid()) {\n            return this;\n        }\n\n        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n        switch (units) {\n            case 'year':\n                time = startOfDate(this.year(), 0, 1);\n                break;\n            case 'quarter':\n                time = startOfDate(\n                    this.year(),\n                    this.month() - (this.month() % 3),\n                    1\n                );\n                break;\n            case 'month':\n                time = startOfDate(this.year(), this.month(), 1);\n                break;\n            case 'week':\n                time = startOfDate(\n                    this.year(),\n                    this.month(),\n                    this.date() - this.weekday()\n                );\n                break;\n            case 'isoWeek':\n                time = startOfDate(\n                    this.year(),\n                    this.month(),\n                    this.date() - (this.isoWeekday() - 1)\n                );\n                break;\n            case 'day':\n            case 'date':\n                time = startOfDate(this.year(), this.month(), this.date());\n                break;\n            case 'hour':\n                time = this._d.valueOf();\n                time -= mod(\n                    time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n                    MS_PER_HOUR\n                );\n                break;\n            case 'minute':\n                time = this._d.valueOf();\n                time -= mod(time, MS_PER_MINUTE);\n                break;\n            case 'second':\n                time = this._d.valueOf();\n                time -= mod(time, MS_PER_SECOND);\n                break;\n        }\n\n        this._d.setTime(time);\n        hooks.updateOffset(this, true);\n        return this;\n    }\n\n    function endOf(units) {\n        var time, startOfDate;\n        units = normalizeUnits(units);\n        if (units === undefined || units === 'millisecond' || !this.isValid()) {\n            return this;\n        }\n\n        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n        switch (units) {\n            case 'year':\n                time = startOfDate(this.year() + 1, 0, 1) - 1;\n                break;\n            case 'quarter':\n                time =\n                    startOfDate(\n                        this.year(),\n                        this.month() - (this.month() % 3) + 3,\n                        1\n                    ) - 1;\n                break;\n            case 'month':\n                time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n                break;\n            case 'week':\n                time =\n                    startOfDate(\n                        this.year(),\n                        this.month(),\n                        this.date() - this.weekday() + 7\n                    ) - 1;\n                break;\n            case 'isoWeek':\n                time =\n                    startOfDate(\n                        this.year(),\n                        this.month(),\n                        this.date() - (this.isoWeekday() - 1) + 7\n                    ) - 1;\n                break;\n            case 'day':\n            case 'date':\n                time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n                break;\n            case 'hour':\n                time = this._d.valueOf();\n                time +=\n                    MS_PER_HOUR -\n                    mod(\n                        time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n                        MS_PER_HOUR\n                    ) -\n                    1;\n                break;\n            case 'minute':\n                time = this._d.valueOf();\n                time += MS_PER_MINUTE - mod(time, MS_PER_MINUTE) - 1;\n                break;\n            case 'second':\n                time = this._d.valueOf();\n                time += MS_PER_SECOND - mod(time, MS_PER_SECOND) - 1;\n                break;\n        }\n\n        this._d.setTime(time);\n        hooks.updateOffset(this, true);\n        return this;\n    }\n\n    function valueOf$1() {\n        return this._d.valueOf() - (this._offset || 0) * 60000;\n    }\n\n    function unix() {\n        return Math.floor(this.valueOf() / 1000);\n    }\n\n    function toDate() {\n        return new Date(this.valueOf());\n    }\n\n    function toArray() {\n        var m = this;\n        return [\n            m.year(),\n            m.month(),\n            m.date(),\n            m.hour(),\n            m.minute(),\n            m.second(),\n            m.millisecond(),\n        ];\n    }\n\n    function toObject() {\n        var m = this;\n        return {\n            years: m.year(),\n            months: m.month(),\n            date: m.date(),\n            hours: m.hours(),\n            minutes: m.minutes(),\n            seconds: m.seconds(),\n            milliseconds: m.milliseconds(),\n        };\n    }\n\n    function toJSON() {\n        // new Date(NaN).toJSON() === null\n        return this.isValid() ? this.toISOString() : null;\n    }\n\n    function isValid() {\n        return isValid$2(this);\n    }\n\n    function parsingFlags() {\n        return extend({}, getParsingFlags(this));\n    }\n\n    function invalidAt() {\n        return getParsingFlags(this).overflow;\n    }\n\n    function creationData() {\n        return {\n            input: this._i,\n            format: this._f,\n            locale: this._locale,\n            isUTC: this._isUTC,\n            strict: this._strict,\n        };\n    }\n\n    addFormatToken('N', 0, 0, 'eraAbbr');\n    addFormatToken('NN', 0, 0, 'eraAbbr');\n    addFormatToken('NNN', 0, 0, 'eraAbbr');\n    addFormatToken('NNNN', 0, 0, 'eraName');\n    addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\n    addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n    addFormatToken('y', ['yy', 2], 0, 'eraYear');\n    addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n    addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\n    addRegexToken('N', matchEraAbbr);\n    addRegexToken('NN', matchEraAbbr);\n    addRegexToken('NNN', matchEraAbbr);\n    addRegexToken('NNNN', matchEraName);\n    addRegexToken('NNNNN', matchEraNarrow);\n\n    addParseToken(\n        ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n        function (input, array, config, token) {\n            var era = config._locale.erasParse(input, token, config._strict);\n            if (era) {\n                getParsingFlags(config).era = era;\n            } else {\n                getParsingFlags(config).invalidEra = input;\n            }\n        }\n    );\n\n    addRegexToken('y', matchUnsigned);\n    addRegexToken('yy', matchUnsigned);\n    addRegexToken('yyy', matchUnsigned);\n    addRegexToken('yyyy', matchUnsigned);\n    addRegexToken('yo', matchEraYearOrdinal);\n\n    addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n    addParseToken(['yo'], function (input, array, config, token) {\n        var match;\n        if (config._locale._eraYearOrdinalRegex) {\n            match = input.match(config._locale._eraYearOrdinalRegex);\n        }\n\n        if (config._locale.eraYearOrdinalParse) {\n            array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n        } else {\n            array[YEAR] = parseInt(input, 10);\n        }\n    });\n\n    function localeEras(m, format) {\n        var i,\n            l,\n            date,\n            eras = this._eras || getLocale('en')._eras;\n        for (i = 0, l = eras.length; i < l; ++i) {\n            switch (typeof eras[i].since) {\n                case 'string':\n                    // truncate time\n                    date = hooks(eras[i].since).startOf('day');\n                    eras[i].since = date.valueOf();\n                    break;\n            }\n\n            switch (typeof eras[i].until) {\n                case 'undefined':\n                    eras[i].until = +Infinity;\n                    break;\n                case 'string':\n                    // truncate time\n                    date = hooks(eras[i].until).startOf('day').valueOf();\n                    eras[i].until = date.valueOf();\n                    break;\n            }\n        }\n        return eras;\n    }\n\n    function localeErasParse(eraName, format, strict) {\n        var i,\n            l,\n            eras = this.eras(),\n            name,\n            abbr,\n            narrow;\n        eraName = eraName.toUpperCase();\n\n        for (i = 0, l = eras.length; i < l; ++i) {\n            name = eras[i].name.toUpperCase();\n            abbr = eras[i].abbr.toUpperCase();\n            narrow = eras[i].narrow.toUpperCase();\n\n            if (strict) {\n                switch (format) {\n                    case 'N':\n                    case 'NN':\n                    case 'NNN':\n                        if (abbr === eraName) {\n                            return eras[i];\n                        }\n                        break;\n\n                    case 'NNNN':\n                        if (name === eraName) {\n                            return eras[i];\n                        }\n                        break;\n\n                    case 'NNNNN':\n                        if (narrow === eraName) {\n                            return eras[i];\n                        }\n                        break;\n                }\n            } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n                return eras[i];\n            }\n        }\n    }\n\n    function localeErasConvertYear(era, year) {\n        var dir = era.since <= era.until ? 1 : -1;\n        if (year === undefined) {\n            return hooks(era.since).year();\n        } else {\n            return hooks(era.since).year() + (year - era.offset) * dir;\n        }\n    }\n\n    function getEraName() {\n        var i,\n            l,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (eras[i].since <= val && val <= eras[i].until) {\n                return eras[i].name;\n            }\n            if (eras[i].until <= val && val <= eras[i].since) {\n                return eras[i].name;\n            }\n        }\n\n        return '';\n    }\n\n    function getEraNarrow() {\n        var i,\n            l,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (eras[i].since <= val && val <= eras[i].until) {\n                return eras[i].narrow;\n            }\n            if (eras[i].until <= val && val <= eras[i].since) {\n                return eras[i].narrow;\n            }\n        }\n\n        return '';\n    }\n\n    function getEraAbbr() {\n        var i,\n            l,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (eras[i].since <= val && val <= eras[i].until) {\n                return eras[i].abbr;\n            }\n            if (eras[i].until <= val && val <= eras[i].since) {\n                return eras[i].abbr;\n            }\n        }\n\n        return '';\n    }\n\n    function getEraYear() {\n        var i,\n            l,\n            dir,\n            val,\n            eras = this.localeData().eras();\n        for (i = 0, l = eras.length; i < l; ++i) {\n            dir = eras[i].since <= eras[i].until ? 1 : -1;\n\n            // truncate time\n            val = this.clone().startOf('day').valueOf();\n\n            if (\n                (eras[i].since <= val && val <= eras[i].until) ||\n                (eras[i].until <= val && val <= eras[i].since)\n            ) {\n                return (\n                    (this.year() - hooks(eras[i].since).year()) * dir +\n                    eras[i].offset\n                );\n            }\n        }\n\n        return this.year();\n    }\n\n    function erasNameRegex(isStrict) {\n        if (!hasOwnProp(this, '_erasNameRegex')) {\n            computeErasParse.call(this);\n        }\n        return isStrict ? this._erasNameRegex : this._erasRegex;\n    }\n\n    function erasAbbrRegex(isStrict) {\n        if (!hasOwnProp(this, '_erasAbbrRegex')) {\n            computeErasParse.call(this);\n        }\n        return isStrict ? this._erasAbbrRegex : this._erasRegex;\n    }\n\n    function erasNarrowRegex(isStrict) {\n        if (!hasOwnProp(this, '_erasNarrowRegex')) {\n            computeErasParse.call(this);\n        }\n        return isStrict ? this._erasNarrowRegex : this._erasRegex;\n    }\n\n    function matchEraAbbr(isStrict, locale) {\n        return locale.erasAbbrRegex(isStrict);\n    }\n\n    function matchEraName(isStrict, locale) {\n        return locale.erasNameRegex(isStrict);\n    }\n\n    function matchEraNarrow(isStrict, locale) {\n        return locale.erasNarrowRegex(isStrict);\n    }\n\n    function matchEraYearOrdinal(isStrict, locale) {\n        return locale._eraYearOrdinalRegex || matchUnsigned;\n    }\n\n    function computeErasParse() {\n        var abbrPieces = [],\n            namePieces = [],\n            narrowPieces = [],\n            mixedPieces = [],\n            i,\n            l,\n            erasName,\n            erasAbbr,\n            erasNarrow,\n            eras = this.eras();\n\n        for (i = 0, l = eras.length; i < l; ++i) {\n            erasName = regexEscape(eras[i].name);\n            erasAbbr = regexEscape(eras[i].abbr);\n            erasNarrow = regexEscape(eras[i].narrow);\n\n            namePieces.push(erasName);\n            abbrPieces.push(erasAbbr);\n            narrowPieces.push(erasNarrow);\n            mixedPieces.push(erasName);\n            mixedPieces.push(erasAbbr);\n            mixedPieces.push(erasNarrow);\n        }\n\n        this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n        this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n        this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n        this._erasNarrowRegex = new RegExp(\n            '^(' + narrowPieces.join('|') + ')',\n            'i'\n        );\n    }\n\n    // FORMATTING\n\n    addFormatToken(0, ['gg', 2], 0, function () {\n        return this.weekYear() % 100;\n    });\n\n    addFormatToken(0, ['GG', 2], 0, function () {\n        return this.isoWeekYear() % 100;\n    });\n\n    function addWeekYearFormatToken(token, getter) {\n        addFormatToken(0, [token, token.length], 0, getter);\n    }\n\n    addWeekYearFormatToken('gggg', 'weekYear');\n    addWeekYearFormatToken('ggggg', 'weekYear');\n    addWeekYearFormatToken('GGGG', 'isoWeekYear');\n    addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n    // ALIASES\n\n    // PARSING\n\n    addRegexToken('G', matchSigned);\n    addRegexToken('g', matchSigned);\n    addRegexToken('GG', match1to2, match2);\n    addRegexToken('gg', match1to2, match2);\n    addRegexToken('GGGG', match1to4, match4);\n    addRegexToken('gggg', match1to4, match4);\n    addRegexToken('GGGGG', match1to6, match6);\n    addRegexToken('ggggg', match1to6, match6);\n\n    addWeekParseToken(\n        ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n        function (input, week, config, token) {\n            week[token.substr(0, 2)] = toInt(input);\n        }\n    );\n\n    addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n        week[token] = hooks.parseTwoDigitYear(input);\n    });\n\n    // MOMENTS\n\n    function getSetWeekYear(input) {\n        return getSetWeekYearHelper.call(\n            this,\n            input,\n            this.week(),\n            this.weekday() + this.localeData()._week.dow,\n            this.localeData()._week.dow,\n            this.localeData()._week.doy\n        );\n    }\n\n    function getSetISOWeekYear(input) {\n        return getSetWeekYearHelper.call(\n            this,\n            input,\n            this.isoWeek(),\n            this.isoWeekday(),\n            1,\n            4\n        );\n    }\n\n    function getISOWeeksInYear() {\n        return weeksInYear(this.year(), 1, 4);\n    }\n\n    function getISOWeeksInISOWeekYear() {\n        return weeksInYear(this.isoWeekYear(), 1, 4);\n    }\n\n    function getWeeksInYear() {\n        var weekInfo = this.localeData()._week;\n        return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n    }\n\n    function getWeeksInWeekYear() {\n        var weekInfo = this.localeData()._week;\n        return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n    }\n\n    function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n        var weeksTarget;\n        if (input == null) {\n            return weekOfYear(this, dow, doy).year;\n        } else {\n            weeksTarget = weeksInYear(input, dow, doy);\n            if (week > weeksTarget) {\n                week = weeksTarget;\n            }\n            return setWeekAll.call(this, input, week, weekday, dow, doy);\n        }\n    }\n\n    function setWeekAll(weekYear, week, weekday, dow, doy) {\n        var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n            date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n        this.year(date.getUTCFullYear());\n        this.month(date.getUTCMonth());\n        this.date(date.getUTCDate());\n        return this;\n    }\n\n    // FORMATTING\n\n    addFormatToken('Q', 0, 'Qo', 'quarter');\n\n    // PARSING\n\n    addRegexToken('Q', match1);\n    addParseToken('Q', function (input, array) {\n        array[MONTH] = (toInt(input) - 1) * 3;\n    });\n\n    // MOMENTS\n\n    function getSetQuarter(input) {\n        return input == null\n            ? Math.ceil((this.month() + 1) / 3)\n            : this.month((input - 1) * 3 + (this.month() % 3));\n    }\n\n    // FORMATTING\n\n    addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n    // PARSING\n\n    addRegexToken('D', match1to2, match1to2NoLeadingZero);\n    addRegexToken('DD', match1to2, match2);\n    addRegexToken('Do', function (isStrict, locale) {\n        // TODO: Remove \"ordinalParse\" fallback in next major release.\n        return isStrict\n            ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n            : locale._dayOfMonthOrdinalParseLenient;\n    });\n\n    addParseToken(['D', 'DD'], DATE);\n    addParseToken('Do', function (input, array) {\n        array[DATE] = toInt(input.match(match1to2)[0]);\n    });\n\n    // MOMENTS\n\n    var getSetDayOfMonth = makeGetSet('Date', true);\n\n    // FORMATTING\n\n    addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n    // PARSING\n\n    addRegexToken('DDD', match1to3);\n    addRegexToken('DDDD', match3);\n    addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n        config._dayOfYear = toInt(input);\n    });\n\n    // HELPERS\n\n    // MOMENTS\n\n    function getSetDayOfYear(input) {\n        var dayOfYear =\n            Math.round(\n                (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n            ) + 1;\n        return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n    }\n\n    // FORMATTING\n\n    addFormatToken('m', ['mm', 2], 0, 'minute');\n\n    // PARSING\n\n    addRegexToken('m', match1to2, match1to2HasZero);\n    addRegexToken('mm', match1to2, match2);\n    addParseToken(['m', 'mm'], MINUTE);\n\n    // MOMENTS\n\n    var getSetMinute = makeGetSet('Minutes', false);\n\n    // FORMATTING\n\n    addFormatToken('s', ['ss', 2], 0, 'second');\n\n    // PARSING\n\n    addRegexToken('s', match1to2, match1to2HasZero);\n    addRegexToken('ss', match1to2, match2);\n    addParseToken(['s', 'ss'], SECOND);\n\n    // MOMENTS\n\n    var getSetSecond = makeGetSet('Seconds', false);\n\n    // FORMATTING\n\n    addFormatToken('S', 0, 0, function () {\n        return ~~(this.millisecond() / 100);\n    });\n\n    addFormatToken(0, ['SS', 2], 0, function () {\n        return ~~(this.millisecond() / 10);\n    });\n\n    addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n    addFormatToken(0, ['SSSS', 4], 0, function () {\n        return this.millisecond() * 10;\n    });\n    addFormatToken(0, ['SSSSS', 5], 0, function () {\n        return this.millisecond() * 100;\n    });\n    addFormatToken(0, ['SSSSSS', 6], 0, function () {\n        return this.millisecond() * 1000;\n    });\n    addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n        return this.millisecond() * 10000;\n    });\n    addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n        return this.millisecond() * 100000;\n    });\n    addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n        return this.millisecond() * 1000000;\n    });\n\n    // PARSING\n\n    addRegexToken('S', match1to3, match1);\n    addRegexToken('SS', match1to3, match2);\n    addRegexToken('SSS', match1to3, match3);\n\n    var token, getSetMillisecond;\n    for (token = 'SSSS'; token.length <= 9; token += 'S') {\n        addRegexToken(token, matchUnsigned);\n    }\n\n    function parseMs(input, array) {\n        array[MILLISECOND] = toInt(('0.' + input) * 1000);\n    }\n\n    for (token = 'S'; token.length <= 9; token += 'S') {\n        addParseToken(token, parseMs);\n    }\n\n    getSetMillisecond = makeGetSet('Milliseconds', false);\n\n    // FORMATTING\n\n    addFormatToken('z', 0, 0, 'zoneAbbr');\n    addFormatToken('zz', 0, 0, 'zoneName');\n\n    // MOMENTS\n\n    function getZoneAbbr() {\n        return this._isUTC ? 'UTC' : '';\n    }\n\n    function getZoneName() {\n        return this._isUTC ? 'Coordinated Universal Time' : '';\n    }\n\n    var proto$2 = Moment.prototype;\n\n    proto$2.add = add$1;\n    proto$2.calendar = calendar;\n    proto$2.clone = clone$1;\n    proto$2.diff = diff;\n    proto$2.endOf = endOf;\n    proto$2.format = format;\n    proto$2.from = from;\n    proto$2.fromNow = fromNow;\n    proto$2.to = to;\n    proto$2.toNow = toNow;\n    proto$2.get = stringGet;\n    proto$2.invalidAt = invalidAt;\n    proto$2.isAfter = isAfter;\n    proto$2.isBefore = isBefore;\n    proto$2.isBetween = isBetween;\n    proto$2.isSame = isSame;\n    proto$2.isSameOrAfter = isSameOrAfter;\n    proto$2.isSameOrBefore = isSameOrBefore;\n    proto$2.isValid = isValid;\n    proto$2.lang = lang;\n    proto$2.locale = locale;\n    proto$2.localeData = localeData;\n    proto$2.max = prototypeMax;\n    proto$2.min = prototypeMin;\n    proto$2.parsingFlags = parsingFlags;\n    proto$2.set = stringSet;\n    proto$2.startOf = startOf;\n    proto$2.subtract = subtract$1;\n    proto$2.toArray = toArray;\n    proto$2.toObject = toObject;\n    proto$2.toDate = toDate;\n    proto$2.toISOString = toISOString$1;\n    proto$2.inspect = inspect;\n    if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n        proto$2[Symbol.for('nodejs.util.inspect.custom')] = function () {\n            return 'Moment<' + this.format() + '>';\n        };\n    }\n    proto$2.toJSON = toJSON;\n    proto$2.toString = toString;\n    proto$2.unix = unix;\n    proto$2.valueOf = valueOf$1;\n    proto$2.creationData = creationData;\n    proto$2.eraName = getEraName;\n    proto$2.eraNarrow = getEraNarrow;\n    proto$2.eraAbbr = getEraAbbr;\n    proto$2.eraYear = getEraYear;\n    proto$2.year = getSetYear;\n    proto$2.isLeapYear = getIsLeapYear;\n    proto$2.weekYear = getSetWeekYear;\n    proto$2.isoWeekYear = getSetISOWeekYear;\n    proto$2.quarter = proto$2.quarters = getSetQuarter;\n    proto$2.month = getSetMonth;\n    proto$2.daysInMonth = getDaysInMonth;\n    proto$2.week = proto$2.weeks = getSetWeek;\n    proto$2.isoWeek = proto$2.isoWeeks = getSetISOWeek;\n    proto$2.weeksInYear = getWeeksInYear;\n    proto$2.weeksInWeekYear = getWeeksInWeekYear;\n    proto$2.isoWeeksInYear = getISOWeeksInYear;\n    proto$2.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n    proto$2.date = getSetDayOfMonth;\n    proto$2.day = proto$2.days = getSetDayOfWeek;\n    proto$2.weekday = getSetLocaleDayOfWeek;\n    proto$2.isoWeekday = getSetISODayOfWeek;\n    proto$2.dayOfYear = getSetDayOfYear;\n    proto$2.hour = proto$2.hours = getSetHour;\n    proto$2.minute = proto$2.minutes = getSetMinute;\n    proto$2.second = proto$2.seconds = getSetSecond;\n    proto$2.millisecond = proto$2.milliseconds = getSetMillisecond;\n    proto$2.utcOffset = getSetOffset;\n    proto$2.utc = setOffsetToUTC;\n    proto$2.local = setOffsetToLocal;\n    proto$2.parseZone = setOffsetToParsedOffset;\n    proto$2.hasAlignedHourOffset = hasAlignedHourOffset;\n    proto$2.isDST = isDaylightSavingTime;\n    proto$2.isLocal = isLocal;\n    proto$2.isUtcOffset = isUtcOffset;\n    proto$2.isUtc = isUtc;\n    proto$2.isUTC = isUtc;\n    proto$2.zoneAbbr = getZoneAbbr;\n    proto$2.zoneName = getZoneName;\n    proto$2.dates = deprecate(\n        'dates accessor is deprecated. Use date instead.',\n        getSetDayOfMonth\n    );\n    proto$2.months = deprecate(\n        'months accessor is deprecated. Use month instead',\n        getSetMonth\n    );\n    proto$2.years = deprecate(\n        'years accessor is deprecated. Use year instead',\n        getSetYear\n    );\n    proto$2.zone = deprecate(\n        'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n        getSetZone\n    );\n    proto$2.isDSTShifted = deprecate(\n        'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n        isDaylightSavingTimeShifted\n    );\n\n    function createUnix(input) {\n        return createLocal(input * 1000);\n    }\n\n    function createInZone() {\n        return createLocal.apply(null, arguments).parseZone();\n    }\n\n    function preParsePostFormat(string) {\n        return string;\n    }\n\n    var proto$1 = Locale.prototype;\n\n    proto$1.calendar = calendar$1;\n    proto$1.longDateFormat = longDateFormat;\n    proto$1.invalidDate = invalidDate;\n    proto$1.ordinal = ordinal;\n    proto$1.preparse = preParsePostFormat;\n    proto$1.postformat = preParsePostFormat;\n    proto$1.relativeTime = relativeTime$1;\n    proto$1.pastFuture = pastFuture;\n    proto$1.set = set;\n    proto$1.eras = localeEras;\n    proto$1.erasParse = localeErasParse;\n    proto$1.erasConvertYear = localeErasConvertYear;\n    proto$1.erasAbbrRegex = erasAbbrRegex;\n    proto$1.erasNameRegex = erasNameRegex;\n    proto$1.erasNarrowRegex = erasNarrowRegex;\n\n    proto$1.months = localeMonths;\n    proto$1.monthsShort = localeMonthsShort;\n    proto$1.monthsParse = localeMonthsParse;\n    proto$1.monthsRegex = monthsRegex;\n    proto$1.monthsShortRegex = monthsShortRegex;\n    proto$1.week = localeWeek;\n    proto$1.firstDayOfYear = localeFirstDayOfYear;\n    proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n    proto$1.weekdays = localeWeekdays;\n    proto$1.weekdaysMin = localeWeekdaysMin;\n    proto$1.weekdaysShort = localeWeekdaysShort;\n    proto$1.weekdaysParse = localeWeekdaysParse;\n\n    proto$1.weekdaysRegex = weekdaysRegex;\n    proto$1.weekdaysShortRegex = weekdaysShortRegex;\n    proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n    proto$1.isPM = localeIsPM;\n    proto$1.meridiem = localeMeridiem;\n\n    function get$1(format, index, field, setter) {\n        var locale = getLocale(),\n            utc = createUTC().set(setter, index);\n        return locale[field](utc, format);\n    }\n\n    function listMonthsImpl(format, index, field) {\n        if (isNumber(format)) {\n            index = format;\n            format = undefined;\n        }\n\n        format = format || '';\n\n        if (index != null) {\n            return get$1(format, index, field, 'month');\n        }\n\n        var i,\n            out = [];\n        for (i = 0; i < 12; i++) {\n            out[i] = get$1(format, i, field, 'month');\n        }\n        return out;\n    }\n\n    // ()\n    // (5)\n    // (fmt, 5)\n    // (fmt)\n    // (true)\n    // (true, 5)\n    // (true, fmt, 5)\n    // (true, fmt)\n    function listWeekdaysImpl(localeSorted, format, index, field) {\n        if (typeof localeSorted === 'boolean') {\n            if (isNumber(format)) {\n                index = format;\n                format = undefined;\n            }\n\n            format = format || '';\n        } else {\n            format = localeSorted;\n            index = format;\n            localeSorted = false;\n\n            if (isNumber(format)) {\n                index = format;\n                format = undefined;\n            }\n\n            format = format || '';\n        }\n\n        var locale = getLocale(),\n            shift = localeSorted ? locale._week.dow : 0,\n            i,\n            out = [];\n\n        if (index != null) {\n            return get$1(format, (index + shift) % 7, field, 'day');\n        }\n\n        for (i = 0; i < 7; i++) {\n            out[i] = get$1(format, (i + shift) % 7, field, 'day');\n        }\n        return out;\n    }\n\n    function listMonths(format, index) {\n        return listMonthsImpl(format, index, 'months');\n    }\n\n    function listMonthsShort(format, index) {\n        return listMonthsImpl(format, index, 'monthsShort');\n    }\n\n    function listWeekdays(localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n    }\n\n    function listWeekdaysShort(localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n    }\n\n    function listWeekdaysMin(localeSorted, format, index) {\n        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n    }\n\n    getSetGlobalLocale('en', {\n        eras: [\n            {\n                since: '0001-01-01',\n                until: +Infinity,\n                offset: 1,\n                name: 'Anno Domini',\n                narrow: 'AD',\n                abbr: 'AD',\n            },\n            {\n                since: '0000-12-31',\n                until: -Infinity,\n                offset: 1,\n                name: 'Before Christ',\n                narrow: 'BC',\n                abbr: 'BC',\n            },\n        ],\n        dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n        ordinal: function (number) {\n            var b = number % 10,\n                output =\n                    toInt((number % 100) / 10) === 1\n                        ? 'th'\n                        : b === 1\n                          ? 'st'\n                          : b === 2\n                            ? 'nd'\n                            : b === 3\n                              ? 'rd'\n                              : 'th';\n            return number + output;\n        },\n    });\n\n    // Side effect imports\n\n    hooks.lang = deprecate(\n        'moment.lang is deprecated. Use moment.locale instead.',\n        getSetGlobalLocale\n    );\n    hooks.langData = deprecate(\n        'moment.langData is deprecated. Use moment.localeData instead.',\n        getLocale\n    );\n\n    var mathAbs = Math.abs;\n\n    function abs$1() {\n        var data = this._data;\n\n        this._milliseconds = mathAbs(this._milliseconds);\n        this._days = mathAbs(this._days);\n        this._months = mathAbs(this._months);\n\n        data.milliseconds = mathAbs(data.milliseconds);\n        data.seconds = mathAbs(data.seconds);\n        data.minutes = mathAbs(data.minutes);\n        data.hours = mathAbs(data.hours);\n        data.months = mathAbs(data.months);\n        data.years = mathAbs(data.years);\n\n        return this;\n    }\n\n    function addSubtract(duration, input, value, direction) {\n        var other = createDuration(input, value);\n\n        duration._milliseconds += direction * other._milliseconds;\n        duration._days += direction * other._days;\n        duration._months += direction * other._months;\n\n        return duration._bubble();\n    }\n\n    // supports only 2.0-style add(1, 's') or add(duration)\n    function add(input, value) {\n        return addSubtract(this, input, value, 1);\n    }\n\n    // supports only 2.0-style subtract(1, 's') or subtract(duration)\n    function subtract(input, value) {\n        return addSubtract(this, input, value, -1);\n    }\n\n    function absCeil(number) {\n        if (number < 0) {\n            return Math.floor(number);\n        } else {\n            return Math.ceil(number);\n        }\n    }\n\n    function bubble() {\n        var milliseconds = this._milliseconds,\n            days = this._days,\n            months = this._months,\n            data = this._data,\n            seconds,\n            minutes,\n            hours,\n            years,\n            monthsFromDays;\n\n        // if we have a mix of positive and negative values, bubble down first\n        // check: https://github.com/moment/moment/issues/2166\n        if (!(\n            (milliseconds >= 0 && days >= 0 && months >= 0) ||\n            (milliseconds <= 0 && days <= 0 && months <= 0)\n        )) {\n            milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n            days = 0;\n            months = 0;\n        }\n\n        // The following code bubbles up values, see the tests for\n        // examples of what that means.\n        data.milliseconds = milliseconds % 1000;\n\n        seconds = absFloor(milliseconds / 1000);\n        data.seconds = seconds % 60;\n\n        minutes = absFloor(seconds / 60);\n        data.minutes = minutes % 60;\n\n        hours = absFloor(minutes / 60);\n        data.hours = hours % 24;\n\n        days += absFloor(hours / 24);\n\n        // convert days to months\n        monthsFromDays = absFloor(daysToMonths(days));\n        months += monthsFromDays;\n        days -= absCeil(monthsToDays(monthsFromDays));\n\n        // 12 months -> 1 year\n        years = absFloor(months / 12);\n        months %= 12;\n\n        data.days = days;\n        data.months = months;\n        data.years = years;\n\n        return this;\n    }\n\n    function daysToMonths(days) {\n        // 400 years have 146097 days (taking into account leap year rules)\n        // 400 years have 12 months === 4800\n        return (days * 4800) / 146097;\n    }\n\n    function monthsToDays(months) {\n        // the reverse of daysToMonths\n        return (months * 146097) / 4800;\n    }\n\n    function as(units) {\n        if (!this.isValid()) {\n            return NaN;\n        }\n        var days,\n            months,\n            milliseconds = this._milliseconds;\n\n        units = normalizeUnits(units);\n\n        if (units === 'month' || units === 'quarter' || units === 'year') {\n            days = this._days + milliseconds / 864e5;\n            months = this._months + daysToMonths(days);\n            switch (units) {\n                case 'month':\n                    return months;\n                case 'quarter':\n                    return months / 3;\n                case 'year':\n                    return months / 12;\n            }\n        } else {\n            // handle milliseconds separately because of floating point math errors (issue #1867)\n            days = this._days + Math.round(monthsToDays(this._months));\n            switch (units) {\n                case 'week':\n                    return days / 7 + milliseconds / 6048e5;\n                case 'day':\n                    return days + milliseconds / 864e5;\n                case 'hour':\n                    return days * 24 + milliseconds / 36e5;\n                case 'minute':\n                    return days * 1440 + milliseconds / 6e4;\n                case 'second':\n                    return days * 86400 + milliseconds / 1000;\n                // Math.floor prevents floating point math errors here\n                case 'millisecond':\n                    return Math.floor(days * 864e5) + milliseconds;\n                default:\n                    throw new Error('Unknown unit ' + units);\n            }\n        }\n    }\n\n    function makeAs(alias) {\n        return function () {\n            return this.as(alias);\n        };\n    }\n\n    var asMilliseconds = makeAs('ms'),\n        asSeconds = makeAs('s'),\n        asMinutes = makeAs('m'),\n        asHours = makeAs('h'),\n        asDays = makeAs('d'),\n        asWeeks = makeAs('w'),\n        asMonths = makeAs('M'),\n        asQuarters = makeAs('Q'),\n        asYears = makeAs('y'),\n        valueOf = asMilliseconds;\n\n    function clone() {\n        return createDuration(this);\n    }\n\n    function get(units) {\n        units = normalizeUnits(units);\n        return this.isValid() ? this[units + 's']() : NaN;\n    }\n\n    function makeGetter(name) {\n        return function () {\n            return this.isValid() ? this._data[name] : NaN;\n        };\n    }\n\n    var milliseconds = makeGetter('milliseconds'),\n        seconds = makeGetter('seconds'),\n        minutes = makeGetter('minutes'),\n        hours = makeGetter('hours'),\n        days = makeGetter('days'),\n        months = makeGetter('months'),\n        years = makeGetter('years');\n\n    function weeks() {\n        return absFloor(this.days() / 7);\n    }\n\n    var round = Math.round,\n        thresholds = {\n            ss: 44, // a few seconds to seconds\n            s: 45, // seconds to minute\n            m: 45, // minutes to hour\n            h: 22, // hours to day\n            d: 26, // days to month/week\n            w: null, // weeks to month\n            M: 11, // months to year\n        };\n\n    // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n        return relativeTimeWithoutPostformat.call(\n            locale,\n            number || 1,\n            !!withoutSuffix,\n            string,\n            isFuture\n        );\n    }\n\n    function relativeTime(posNegDuration, withoutSuffix, thresholds, locale) {\n        var duration = createDuration(posNegDuration).abs(),\n            seconds = round(duration.as('s')),\n            minutes = round(duration.as('m')),\n            hours = round(duration.as('h')),\n            days = round(duration.as('d')),\n            months = round(duration.as('M')),\n            weeks = round(duration.as('w')),\n            years = round(duration.as('y')),\n            a =\n                (seconds <= thresholds.ss && ['s', seconds]) ||\n                (seconds < thresholds.s && ['ss', seconds]) ||\n                (minutes <= 1 && ['m']) ||\n                (minutes < thresholds.m && ['mm', minutes]) ||\n                (hours <= 1 && ['h']) ||\n                (hours < thresholds.h && ['hh', hours]) ||\n                (days <= 1 && ['d']) ||\n                (days < thresholds.d && ['dd', days]);\n\n        if (thresholds.w != null) {\n            a =\n                a ||\n                (weeks <= 1 && ['w']) ||\n                (weeks < thresholds.w && ['ww', weeks]);\n        }\n        a = a ||\n            (months <= 1 && ['M']) ||\n            (months < thresholds.M && ['MM', months]) ||\n            (years <= 1 && ['y']) || ['yy', years];\n\n        a[2] = withoutSuffix;\n        a[3] = +posNegDuration > 0;\n        a[4] = locale;\n        return substituteTimeAgo.apply(null, a);\n    }\n\n    // This function allows you to set the rounding function for relative time strings\n    function getSetRelativeTimeRounding(roundingFunction) {\n        if (roundingFunction === undefined) {\n            return round;\n        }\n        if (typeof roundingFunction === 'function') {\n            round = roundingFunction;\n            return true;\n        }\n        return false;\n    }\n\n    // This function allows you to set a threshold for relative time strings\n    function getSetRelativeTimeThreshold(threshold, limit) {\n        if (thresholds[threshold] === undefined) {\n            return false;\n        }\n        if (limit === undefined) {\n            return thresholds[threshold];\n        }\n        thresholds[threshold] = limit;\n        if (threshold === 's') {\n            thresholds.ss = limit - 1;\n        }\n        return true;\n    }\n\n    function humanize(argWithSuffix, argThresholds) {\n        if (!this.isValid()) {\n            return this.localeData().invalidDate();\n        }\n\n        var withSuffix = false,\n            th = thresholds,\n            locale,\n            output;\n\n        if (typeof argWithSuffix === 'object') {\n            argThresholds = argWithSuffix;\n            argWithSuffix = false;\n        }\n        if (typeof argWithSuffix === 'boolean') {\n            withSuffix = argWithSuffix;\n        }\n        if (typeof argThresholds === 'object') {\n            th = extend(extend({}, thresholds), argThresholds || {});\n            if (argThresholds.s != null && argThresholds.ss == null) {\n                th.ss = argThresholds.s - 1;\n            }\n        }\n\n        locale = this.localeData();\n        output = relativeTime(this, !withSuffix, th, locale);\n\n        if (withSuffix) {\n            output = pastFutureWithoutPostformat.call(locale, +this, output);\n        }\n\n        return locale.postformat(output);\n    }\n\n    var abs = Math.abs;\n\n    function sign(x) {\n        return (x > 0) - (x < 0) || +x;\n    }\n\n    function toISOString() {\n        // for ISO strings we do not use the normal bubbling rules:\n        //  * milliseconds bubble up until they become hours\n        //  * days do not bubble at all\n        //  * months bubble up until they become years\n        // This is because there is no context-free conversion between hours and days\n        // (think of clock changes)\n        // and also not between days and months (28-31 days per month)\n        if (!this.isValid()) {\n            return this.localeData().invalidDate();\n        }\n\n        var seconds = abs(this._milliseconds) / 1000,\n            days = abs(this._days),\n            months = abs(this._months),\n            minutes,\n            hours,\n            years,\n            s,\n            total = this.asSeconds(),\n            totalSign,\n            ymSign,\n            daysSign,\n            hmsSign;\n\n        if (!total) {\n            // this is the same as C#'s (Noda) and python (isodate)...\n            // but not other JS (goog.date)\n            return 'P0D';\n        }\n\n        // 3600 seconds -> 60 minutes -> 1 hour\n        minutes = absFloor(seconds / 60);\n        hours = absFloor(minutes / 60);\n        seconds %= 60;\n        minutes %= 60;\n\n        // 12 months -> 1 year\n        years = absFloor(months / 12);\n        months %= 12;\n\n        // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n        s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n        totalSign = total < 0 ? '-' : '';\n        ymSign = sign(this._months) !== sign(total) ? '-' : '';\n        daysSign = sign(this._days) !== sign(total) ? '-' : '';\n        hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n        return (\n            totalSign +\n            'P' +\n            (years ? ymSign + years + 'Y' : '') +\n            (months ? ymSign + months + 'M' : '') +\n            (days ? daysSign + days + 'D' : '') +\n            (hours || minutes || seconds ? 'T' : '') +\n            (hours ? hmsSign + hours + 'H' : '') +\n            (minutes ? hmsSign + minutes + 'M' : '') +\n            (seconds ? hmsSign + s + 'S' : '')\n        );\n    }\n\n    var proto = Duration.prototype;\n\n    proto.isValid = isValid$1;\n    proto.abs = abs$1;\n    proto.add = add;\n    proto.subtract = subtract;\n    proto.as = as;\n    proto.asMilliseconds = asMilliseconds;\n    proto.asSeconds = asSeconds;\n    proto.asMinutes = asMinutes;\n    proto.asHours = asHours;\n    proto.asDays = asDays;\n    proto.asWeeks = asWeeks;\n    proto.asMonths = asMonths;\n    proto.asQuarters = asQuarters;\n    proto.asYears = asYears;\n    proto.valueOf = valueOf;\n    proto._bubble = bubble;\n    proto.clone = clone;\n    proto.get = get;\n    proto.milliseconds = milliseconds;\n    proto.seconds = seconds;\n    proto.minutes = minutes;\n    proto.hours = hours;\n    proto.days = days;\n    proto.weeks = weeks;\n    proto.months = months;\n    proto.years = years;\n    proto.humanize = humanize;\n    proto.toISOString = toISOString;\n    proto.toString = toISOString;\n    proto.toJSON = toISOString;\n    proto.locale = locale;\n    proto.localeData = localeData;\n\n    proto.toIsoString = deprecate(\n        'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n        toISOString\n    );\n    proto.lang = lang;\n\n    // FORMATTING\n\n    addFormatToken('X', 0, 0, 'unix');\n    addFormatToken('x', 0, 0, 'valueOf');\n\n    // PARSING\n\n    addRegexToken('x', matchSigned);\n    addRegexToken('X', matchTimestamp);\n    addParseToken('X', function (input, array, config) {\n        config._d = new Date(parseFloat(input) * 1000);\n    });\n    addParseToken('x', function (input, array, config) {\n        config._d = new Date(toInt(input));\n    });\n\n    //! moment.js\n\n    hooks.version = '2.31.0';\n\n    setHookCallback(createLocal);\n\n    hooks.fn = proto$2;\n    hooks.min = min;\n    hooks.max = max;\n    hooks.now = now;\n    hooks.utc = createUTC;\n    hooks.unix = createUnix;\n    hooks.months = listMonths;\n    hooks.isDate = isDate;\n    hooks.locale = getSetGlobalLocale;\n    hooks.invalid = createInvalid$1;\n    hooks.duration = createDuration;\n    hooks.isMoment = isMoment;\n    hooks.weekdays = listWeekdays;\n    hooks.parseZone = createInZone;\n    hooks.localeData = getLocale;\n    hooks.isDuration = isDuration;\n    hooks.monthsShort = listMonthsShort;\n    hooks.weekdaysMin = listWeekdaysMin;\n    hooks.defineLocale = defineLocale;\n    hooks.updateLocale = updateLocale;\n    hooks.locales = listLocales;\n    hooks.weekdaysShort = listWeekdaysShort;\n    hooks.normalizeUnits = normalizeUnits;\n    hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n    hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n    hooks.calendarFormat = getCalendarFormat;\n    hooks.prototype = proto$2;\n\n    // currently HTML5 input type only supports 24-hour formats\n    hooks.HTML5_FMT = {\n        DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type=\"datetime-local\" />\n        DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type=\"datetime-local\" step=\"1\" />\n        DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type=\"datetime-local\" step=\"0.001\" />\n        DATE: 'YYYY-MM-DD', // <input type=\"date\" />\n        TIME: 'HH:mm', // <input type=\"time\" />\n        TIME_SECONDS: 'HH:mm:ss', // <input type=\"time\" step=\"1\" />\n        TIME_MS: 'HH:mm:ss.SSS', // <input type=\"time\" step=\"0.001\" />\n        WEEK: 'GGGG-[W]WW', // <input type=\"week\" />\n        MONTH: 'YYYY-MM', // <input type=\"month\" />\n    };\n\n    return hooks;\n\n})));\n","import { assert } from '@ember/debug';\nimport { get } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\nimport { createCache, getValue } from '@glimmer/tracking/primitives/cache';\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction _initializerDefineProperty(target, property, descriptor, context) {\n  if (!descriptor) return;\n  Object.defineProperty(target, property, {\n    enumerable: descriptor.enumerable,\n    configurable: descriptor.configurable,\n    writable: descriptor.writable,\n    value: descriptor.initializer ? descriptor.initializer.call(context) : void 0\n  });\n}\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {\n  var desc = {};\n  Object.keys(descriptor).forEach(function (key) {\n    desc[key] = descriptor[key];\n  });\n  desc.enumerable = !!desc.enumerable;\n  desc.configurable = !!desc.configurable;\n\n  if ('value' in desc || desc.initializer) {\n    desc.writable = true;\n  }\n\n  desc = decorators.slice().reverse().reduce(function (desc, decorator) {\n    return decorator(target, property, desc) || desc;\n  }, desc);\n\n  if (context && desc.initializer !== void 0) {\n    desc.value = desc.initializer ? desc.initializer.call(context) : void 0;\n    desc.initializer = undefined;\n  }\n\n  if (desc.initializer === void 0) {\n    Object.defineProperty(target, property, desc);\n    desc = null;\n  }\n\n  return desc;\n}\n\nvar _class, _descriptor;\nlet Meta = (_class = class Meta {\n  constructor() {\n    _defineProperty(this, \"prevRemote\", void 0);\n\n    _defineProperty(this, \"peek\", void 0);\n\n    _initializerDefineProperty(this, \"value\", _descriptor, this);\n  }\n\n}, (_descriptor = _applyDecoratedDescriptor(_class.prototype, \"value\", [tracked], {\n  configurable: true,\n  enumerable: true,\n  writable: true,\n  initializer: null\n})), _class);\n\nfunction getOrCreateMeta(instance, metas, initializer) {\n  let meta = metas.get(instance);\n\n  if (meta === undefined) {\n    meta = new Meta();\n    metas.set(instance, meta);\n    meta.value = meta.peek = typeof initializer === 'function' ? initializer.call(instance) : initializer;\n  }\n\n  return meta;\n}\n\nfunction localCopy(memo, initializer) {\n  assert(`@localCopy() must be given a memo path as its first argument, received \\`${String(memo)}\\``, typeof memo === 'string');\n  let metas = new WeakMap();\n  return () => {\n    let memoFn = obj => get(obj, memo);\n\n    return {\n      get() {\n        let meta = getOrCreateMeta(this, metas, initializer);\n        let {\n          prevRemote\n        } = meta;\n        let incomingValue = memoFn(this);\n\n        if (prevRemote !== incomingValue) {\n          // If the incoming value is not the same as the previous incoming value,\n          // update the local value to match the new incoming value, and update\n          // the previous incoming value.\n          meta.value = meta.prevRemote = incomingValue;\n        }\n\n        return meta.value;\n      },\n\n      set(value) {\n        if (!metas.has(this)) {\n          let meta = getOrCreateMeta(this, metas, initializer);\n          meta.prevRemote = memoFn(this);\n          meta.value = value;\n          return;\n        }\n\n        getOrCreateMeta(this, metas, initializer).value = value;\n      }\n\n    };\n  };\n}\nfunction trackedReset(memoOrConfig) {\n  assert(`@trackedReset() must be given a memo path, a memo function, or config object with a memo path or function as its first argument, received \\`${String(memoOrConfig)}\\``, typeof memoOrConfig === 'string' || typeof memoOrConfig === 'function' || typeof memoOrConfig === 'object' && memoOrConfig !== null && memoOrConfig.memo !== undefined);\n  let metas = new WeakMap();\n  return (_prototype, key, desc) => {\n    let memo, update;\n\n    let initializer = desc.initializer ?? (() => undefined);\n\n    if (typeof memoOrConfig === 'object') {\n      memo = memoOrConfig.memo;\n      update = memoOrConfig.update ?? initializer;\n    } else {\n      memo = memoOrConfig;\n      update = initializer;\n    }\n\n    let memoFn = typeof memo === 'function' ? (obj, last) => memo.call(obj, obj, key, last) : obj => get(obj, memo);\n    return {\n      get() {\n        let meta = getOrCreateMeta(this, metas, initializer);\n        let {\n          prevRemote\n        } = meta;\n        let incomingValue = memoFn(this, prevRemote);\n\n        if (incomingValue !== prevRemote) {\n          meta.prevRemote = incomingValue;\n          meta.value = meta.peek = update.call(this, this, key, meta.peek);\n        }\n\n        return meta.value;\n      },\n\n      set(value) {\n        getOrCreateMeta(this, metas, initializer).value = value;\n      }\n\n    };\n  };\n}\nfunction cached(target, key, value) {\n  assert('@cached can only be used on getters', value && value.get);\n  let {\n    get,\n    set\n  } = value;\n  let caches = new WeakMap();\n  return {\n    get() {\n      let cache = caches.get(this);\n\n      if (cache === undefined) {\n        cache = createCache(get.bind(this));\n        caches.set(this, cache);\n      }\n\n      return getValue(cache);\n    },\n\n    set\n  };\n}\nfunction dedupeTracked() {\n  let comparator;\n\n  const descriptor = function (target, key, desc) {\n    let {\n      initializer\n    } = desc;\n    let {\n      get,\n      set\n    } = tracked(target, key, desc);\n    let values = new WeakMap();\n    return {\n      get() {\n        if (!values.has(this)) {\n          let value = initializer?.call(this);\n          values.set(this, value);\n          set.call(this, value);\n        }\n\n        return get.call(this);\n      },\n\n      set(value) {\n        if (!values.has(this) || !comparator(value, values.get(this))) {\n          values.set(this, value);\n          set.call(this, value);\n        }\n      }\n\n    };\n  };\n\n  if (arguments.length === 3) {\n    comparator = (a, b) => a === b;\n\n    return descriptor(...arguments);\n  }\n\n  if (arguments.length === 1 && typeof arguments[0] === 'function') {\n    comparator = arguments[0];\n    return descriptor;\n  }\n\n  assert(`@dedupeTracked() can either be invoked without arguments or with one comparator function, received \\`${String(arguments)}\\``, false);\n}\n\nexport { cached, dedupeTracked, localCopy, trackedReset };\n","/*!\n * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com\n * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)\n * Copyright 2024 Fonticons, Inc.\n */\nfunction _defineProperty(e, r, t) {\n  return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n    value: t,\n    enumerable: !0,\n    configurable: !0,\n    writable: !0\n  }) : e[r] = t, e;\n}\nfunction _inherits(t, e) {\n  if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n  t.prototype = Object.create(e && e.prototype, {\n    constructor: {\n      value: t,\n      writable: !0,\n      configurable: !0\n    }\n  }), Object.defineProperty(t, \"prototype\", {\n    writable: !1\n  }), e && _setPrototypeOf(t, e);\n}\nfunction ownKeys(e, r) {\n  var t = Object.keys(e);\n  if (Object.getOwnPropertySymbols) {\n    var o = Object.getOwnPropertySymbols(e);\n    r && (o = o.filter(function (r) {\n      return Object.getOwnPropertyDescriptor(e, r).enumerable;\n    })), t.push.apply(t, o);\n  }\n  return t;\n}\nfunction _objectSpread2(e) {\n  for (var r = 1; r < arguments.length; r++) {\n    var t = null != arguments[r] ? arguments[r] : {};\n    r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n      _defineProperty(e, r, t[r]);\n    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n      Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n    });\n  }\n  return e;\n}\nfunction _setPrototypeOf(t, e) {\n  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n    return t.__proto__ = e, t;\n  }, _setPrototypeOf(t, e);\n}\nfunction _toPrimitive(t, r) {\n  if (\"object\" != typeof t || !t) return t;\n  var e = t[Symbol.toPrimitive];\n  if (void 0 !== e) {\n    var i = e.call(t, r || \"default\");\n    if (\"object\" != typeof i) return i;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (\"string\" === r ? String : Number)(t);\n}\nfunction _toPropertyKey(t) {\n  var i = _toPrimitive(t, \"string\");\n  return \"symbol\" == typeof i ? i : i + \"\";\n}\nfunction _wrapRegExp() {\n  _wrapRegExp = function (e, r) {\n    return new BabelRegExp(e, void 0, r);\n  };\n  var e = RegExp.prototype,\n    r = new WeakMap();\n  function BabelRegExp(e, t, p) {\n    var o = RegExp(e, t);\n    return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype);\n  }\n  function buildGroups(e, t) {\n    var p = r.get(t);\n    return Object.keys(p).reduce(function (r, t) {\n      var o = p[t];\n      if (\"number\" == typeof o) r[t] = e[o];else {\n        for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++;\n        r[t] = e[o[i]];\n      }\n      return r;\n    }, Object.create(null));\n  }\n  return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) {\n    var t = e.exec.call(this, r);\n    if (t) {\n      t.groups = buildGroups(t, this);\n      var p = t.indices;\n      p && (p.groups = buildGroups(p, this));\n    }\n    return t;\n  }, BabelRegExp.prototype[Symbol.replace] = function (t, p) {\n    if (\"string\" == typeof p) {\n      var o = r.get(this);\n      return e[Symbol.replace].call(this, t, p.replace(/\\$<([^>]+)>/g, function (e, r) {\n        var t = o[r];\n        return \"$\" + (Array.isArray(t) ? t.join(\"$\") : t);\n      }));\n    }\n    if (\"function\" == typeof p) {\n      var i = this;\n      return e[Symbol.replace].call(this, t, function () {\n        var e = arguments;\n        return \"object\" != typeof e[e.length - 1] && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e);\n      });\n    }\n    return e[Symbol.replace].call(this, t, p);\n  }, _wrapRegExp.apply(this, arguments);\n}\n\nconst noop = () => {};\nlet _WINDOW = {};\nlet _DOCUMENT = {};\nlet _MUTATION_OBSERVER = null;\nlet _PERFORMANCE = {\n  mark: noop,\n  measure: noop\n};\ntry {\n  if (typeof window !== 'undefined') _WINDOW = window;\n  if (typeof document !== 'undefined') _DOCUMENT = document;\n  if (typeof MutationObserver !== 'undefined') _MUTATION_OBSERVER = MutationObserver;\n  if (typeof performance !== 'undefined') _PERFORMANCE = performance;\n} catch (e) {}\nconst {\n  userAgent = ''\n} = _WINDOW.navigator || {};\nconst WINDOW = _WINDOW;\nconst DOCUMENT = _DOCUMENT;\nconst MUTATION_OBSERVER = _MUTATION_OBSERVER;\nconst PERFORMANCE = _PERFORMANCE;\nconst IS_BROWSER = !!WINDOW.document;\nconst IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === 'function' && typeof DOCUMENT.createElement === 'function';\nconst IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/');\n\nvar p = /fa(s|r|l|t|d|dr|dl|dt|b|k|kd|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\\-\\ ]/,\n  g = /Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i;\nvar S = {\n    classic: {\n      fa: \"solid\",\n      fas: \"solid\",\n      \"fa-solid\": \"solid\",\n      far: \"regular\",\n      \"fa-regular\": \"regular\",\n      fal: \"light\",\n      \"fa-light\": \"light\",\n      fat: \"thin\",\n      \"fa-thin\": \"thin\",\n      fab: \"brands\",\n      \"fa-brands\": \"brands\"\n    },\n    duotone: {\n      fa: \"solid\",\n      fad: \"solid\",\n      \"fa-solid\": \"solid\",\n      \"fa-duotone\": \"solid\",\n      fadr: \"regular\",\n      \"fa-regular\": \"regular\",\n      fadl: \"light\",\n      \"fa-light\": \"light\",\n      fadt: \"thin\",\n      \"fa-thin\": \"thin\"\n    },\n    sharp: {\n      fa: \"solid\",\n      fass: \"solid\",\n      \"fa-solid\": \"solid\",\n      fasr: \"regular\",\n      \"fa-regular\": \"regular\",\n      fasl: \"light\",\n      \"fa-light\": \"light\",\n      fast: \"thin\",\n      \"fa-thin\": \"thin\"\n    },\n    \"sharp-duotone\": {\n      fa: \"solid\",\n      fasds: \"solid\",\n      \"fa-solid\": \"solid\",\n      fasdr: \"regular\",\n      \"fa-regular\": \"regular\",\n      fasdl: \"light\",\n      \"fa-light\": \"light\",\n      fasdt: \"thin\",\n      \"fa-thin\": \"thin\"\n    }\n  },\n  A = {\n    GROUP: \"duotone-group\",\n    SWAP_OPACITY: \"swap-opacity\",\n    PRIMARY: \"primary\",\n    SECONDARY: \"secondary\"\n  },\n  P = [\"fa-classic\", \"fa-duotone\", \"fa-sharp\", \"fa-sharp-duotone\"];\nvar s = \"classic\",\n  t = \"duotone\",\n  r = \"sharp\",\n  o = \"sharp-duotone\",\n  L = [s, t, r, o];\nvar G = {\n    classic: {\n      900: \"fas\",\n      400: \"far\",\n      normal: \"far\",\n      300: \"fal\",\n      100: \"fat\"\n    },\n    duotone: {\n      900: \"fad\",\n      400: \"fadr\",\n      300: \"fadl\",\n      100: \"fadt\"\n    },\n    sharp: {\n      900: \"fass\",\n      400: \"fasr\",\n      300: \"fasl\",\n      100: \"fast\"\n    },\n    \"sharp-duotone\": {\n      900: \"fasds\",\n      400: \"fasdr\",\n      300: \"fasdl\",\n      100: \"fasdt\"\n    }\n  };\nvar lt = {\n    \"Font Awesome 6 Free\": {\n      900: \"fas\",\n      400: \"far\"\n    },\n    \"Font Awesome 6 Pro\": {\n      900: \"fas\",\n      400: \"far\",\n      normal: \"far\",\n      300: \"fal\",\n      100: \"fat\"\n    },\n    \"Font Awesome 6 Brands\": {\n      400: \"fab\",\n      normal: \"fab\"\n    },\n    \"Font Awesome 6 Duotone\": {\n      900: \"fad\",\n      400: \"fadr\",\n      normal: \"fadr\",\n      300: \"fadl\",\n      100: \"fadt\"\n    },\n    \"Font Awesome 6 Sharp\": {\n      900: \"fass\",\n      400: \"fasr\",\n      normal: \"fasr\",\n      300: \"fasl\",\n      100: \"fast\"\n    },\n    \"Font Awesome 6 Sharp Duotone\": {\n      900: \"fasds\",\n      400: \"fasdr\",\n      normal: \"fasdr\",\n      300: \"fasdl\",\n      100: \"fasdt\"\n    }\n  };\nvar pt = new Map([[\"classic\", {\n    defaultShortPrefixId: \"fas\",\n    defaultStyleId: \"solid\",\n    styleIds: [\"solid\", \"regular\", \"light\", \"thin\", \"brands\"],\n    futureStyleIds: [],\n    defaultFontWeight: 900\n  }], [\"sharp\", {\n    defaultShortPrefixId: \"fass\",\n    defaultStyleId: \"solid\",\n    styleIds: [\"solid\", \"regular\", \"light\", \"thin\"],\n    futureStyleIds: [],\n    defaultFontWeight: 900\n  }], [\"duotone\", {\n    defaultShortPrefixId: \"fad\",\n    defaultStyleId: \"solid\",\n    styleIds: [\"solid\", \"regular\", \"light\", \"thin\"],\n    futureStyleIds: [],\n    defaultFontWeight: 900\n  }], [\"sharp-duotone\", {\n    defaultShortPrefixId: \"fasds\",\n    defaultStyleId: \"solid\",\n    styleIds: [\"solid\", \"regular\", \"light\", \"thin\"],\n    futureStyleIds: [],\n    defaultFontWeight: 900\n  }]]),\n  xt = {\n    classic: {\n      solid: \"fas\",\n      regular: \"far\",\n      light: \"fal\",\n      thin: \"fat\",\n      brands: \"fab\"\n    },\n    duotone: {\n      solid: \"fad\",\n      regular: \"fadr\",\n      light: \"fadl\",\n      thin: \"fadt\"\n    },\n    sharp: {\n      solid: \"fass\",\n      regular: \"fasr\",\n      light: \"fasl\",\n      thin: \"fast\"\n    },\n    \"sharp-duotone\": {\n      solid: \"fasds\",\n      regular: \"fasdr\",\n      light: \"fasdl\",\n      thin: \"fasdt\"\n    }\n  };\nvar Ft = [\"fak\", \"fa-kit\", \"fakd\", \"fa-kit-duotone\"],\n  St = {\n    kit: {\n      fak: \"kit\",\n      \"fa-kit\": \"kit\"\n    },\n    \"kit-duotone\": {\n      fakd: \"kit-duotone\",\n      \"fa-kit-duotone\": \"kit-duotone\"\n    }\n  },\n  At = [\"kit\"];\nvar Ct = {\n  kit: {\n    \"fa-kit\": \"fak\"\n  },\n  \"kit-duotone\": {\n    \"fa-kit-duotone\": \"fakd\"\n  }\n};\nvar Lt = [\"fak\", \"fakd\"],\n  Wt = {\n    kit: {\n      fak: \"fa-kit\"\n    },\n    \"kit-duotone\": {\n      fakd: \"fa-kit-duotone\"\n    }\n  };\nvar Et = {\n    kit: {\n      kit: \"fak\"\n    },\n    \"kit-duotone\": {\n      \"kit-duotone\": \"fakd\"\n    }\n  };\n\nvar t$1 = {\n    GROUP: \"duotone-group\",\n    SWAP_OPACITY: \"swap-opacity\",\n    PRIMARY: \"primary\",\n    SECONDARY: \"secondary\"\n  },\n  r$1 = [\"fa-classic\", \"fa-duotone\", \"fa-sharp\", \"fa-sharp-duotone\"];\nvar bt$1 = [\"fak\", \"fa-kit\", \"fakd\", \"fa-kit-duotone\"];\nvar Yt = {\n    \"Font Awesome Kit\": {\n      400: \"fak\",\n      normal: \"fak\"\n    },\n    \"Font Awesome Kit Duotone\": {\n      400: \"fakd\",\n      normal: \"fakd\"\n    }\n  };\nvar ua = {\n    classic: {\n      \"fa-brands\": \"fab\",\n      \"fa-duotone\": \"fad\",\n      \"fa-light\": \"fal\",\n      \"fa-regular\": \"far\",\n      \"fa-solid\": \"fas\",\n      \"fa-thin\": \"fat\"\n    },\n    duotone: {\n      \"fa-regular\": \"fadr\",\n      \"fa-light\": \"fadl\",\n      \"fa-thin\": \"fadt\"\n    },\n    sharp: {\n      \"fa-solid\": \"fass\",\n      \"fa-regular\": \"fasr\",\n      \"fa-light\": \"fasl\",\n      \"fa-thin\": \"fast\"\n    },\n    \"sharp-duotone\": {\n      \"fa-solid\": \"fasds\",\n      \"fa-regular\": \"fasdr\",\n      \"fa-light\": \"fasdl\",\n      \"fa-thin\": \"fasdt\"\n    }\n  },\n  I$1 = {\n    classic: [\"fas\", \"far\", \"fal\", \"fat\", \"fad\"],\n    duotone: [\"fadr\", \"fadl\", \"fadt\"],\n    sharp: [\"fass\", \"fasr\", \"fasl\", \"fast\"],\n    \"sharp-duotone\": [\"fasds\", \"fasdr\", \"fasdl\", \"fasdt\"]\n  },\n  ga = {\n    classic: {\n      fab: \"fa-brands\",\n      fad: \"fa-duotone\",\n      fal: \"fa-light\",\n      far: \"fa-regular\",\n      fas: \"fa-solid\",\n      fat: \"fa-thin\"\n    },\n    duotone: {\n      fadr: \"fa-regular\",\n      fadl: \"fa-light\",\n      fadt: \"fa-thin\"\n    },\n    sharp: {\n      fass: \"fa-solid\",\n      fasr: \"fa-regular\",\n      fasl: \"fa-light\",\n      fast: \"fa-thin\"\n    },\n    \"sharp-duotone\": {\n      fasds: \"fa-solid\",\n      fasdr: \"fa-regular\",\n      fasdl: \"fa-light\",\n      fasdt: \"fa-thin\"\n    }\n  },\n  x = [\"fa-solid\", \"fa-regular\", \"fa-light\", \"fa-thin\", \"fa-duotone\", \"fa-brands\"],\n  Ia = [\"fa\", \"fas\", \"far\", \"fal\", \"fat\", \"fad\", \"fadr\", \"fadl\", \"fadt\", \"fab\", \"fass\", \"fasr\", \"fasl\", \"fast\", \"fasds\", \"fasdr\", \"fasdl\", \"fasdt\", ...r$1, ...x],\n  m$1 = [\"solid\", \"regular\", \"light\", \"thin\", \"duotone\", \"brands\"],\n  c$1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],\n  F$1 = c$1.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),\n  ma = [...Object.keys(I$1), ...m$1, \"2xs\", \"xs\", \"sm\", \"lg\", \"xl\", \"2xl\", \"beat\", \"border\", \"fade\", \"beat-fade\", \"bounce\", \"flip-both\", \"flip-horizontal\", \"flip-vertical\", \"flip\", \"fw\", \"inverse\", \"layers-counter\", \"layers-text\", \"layers\", \"li\", \"pull-left\", \"pull-right\", \"pulse\", \"rotate-180\", \"rotate-270\", \"rotate-90\", \"rotate-by\", \"shake\", \"spin-pulse\", \"spin-reverse\", \"spin\", \"stack-1x\", \"stack-2x\", \"stack\", \"ul\", t$1.GROUP, t$1.SWAP_OPACITY, t$1.PRIMARY, t$1.SECONDARY].concat(c$1.map(a => \"\".concat(a, \"x\"))).concat(F$1.map(a => \"w-\".concat(a)));\nvar wa = {\n    \"Font Awesome 5 Free\": {\n      900: \"fas\",\n      400: \"far\"\n    },\n    \"Font Awesome 5 Pro\": {\n      900: \"fas\",\n      400: \"far\",\n      normal: \"far\",\n      300: \"fal\"\n    },\n    \"Font Awesome 5 Brands\": {\n      400: \"fab\",\n      normal: \"fab\"\n    },\n    \"Font Awesome 5 Duotone\": {\n      900: \"fad\"\n    }\n  };\n\nconst NAMESPACE_IDENTIFIER = '___FONT_AWESOME___';\nconst UNITS_IN_GRID = 16;\nconst DEFAULT_CSS_PREFIX = 'fa';\nconst DEFAULT_REPLACEMENT_CLASS = 'svg-inline--fa';\nconst DATA_FA_I2SVG = 'data-fa-i2svg';\nconst DATA_FA_PSEUDO_ELEMENT = 'data-fa-pseudo-element';\nconst DATA_FA_PSEUDO_ELEMENT_PENDING = 'data-fa-pseudo-element-pending';\nconst DATA_PREFIX = 'data-prefix';\nconst DATA_ICON = 'data-icon';\nconst HTML_CLASS_I2SVG_BASE_CLASS = 'fontawesome-i2svg';\nconst MUTATION_APPROACH_ASYNC = 'async';\nconst TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS = ['HTML', 'HEAD', 'STYLE', 'SCRIPT'];\nconst PRODUCTION = (() => {\n  try {\n    return process.env.NODE_ENV === 'production';\n  } catch (e$$1) {\n    return false;\n  }\n})();\nfunction familyProxy(obj) {\n  // Defaults to the classic family if family is not available\n  return new Proxy(obj, {\n    get(target, prop) {\n      return prop in target ? target[prop] : target[s];\n    }\n  });\n}\nconst _PREFIX_TO_STYLE = _objectSpread2({}, S);\n\n// We changed FACSSClassesToStyleId in the icons repo to be canonical and as such, \"classic\" family does not have any\n// duotone styles.  But we do still need duotone in _PREFIX_TO_STYLE below, so we are manually adding\n// {'fa-duotone': 'duotone'}\n_PREFIX_TO_STYLE[s] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, {\n  'fa-duotone': 'duotone'\n}), S[s]), St['kit']), St['kit-duotone']);\nconst PREFIX_TO_STYLE = familyProxy(_PREFIX_TO_STYLE);\nconst _STYLE_TO_PREFIX = _objectSpread2({}, xt);\n\n// We changed FAStyleIdToShortPrefixId in the icons repo to be canonical and as such, \"classic\" family does not have any\n// duotone styles.  But we do still need duotone in _STYLE_TO_PREFIX below, so we are manually adding {duotone: 'fad'}\n_STYLE_TO_PREFIX[s] = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, {\n  duotone: 'fad'\n}), _STYLE_TO_PREFIX[s]), Et['kit']), Et['kit-duotone']);\nconst STYLE_TO_PREFIX = familyProxy(_STYLE_TO_PREFIX);\nconst _PREFIX_TO_LONG_STYLE = _objectSpread2({}, ga);\n_PREFIX_TO_LONG_STYLE[s] = _objectSpread2(_objectSpread2({}, _PREFIX_TO_LONG_STYLE[s]), Wt['kit']);\nconst PREFIX_TO_LONG_STYLE = familyProxy(_PREFIX_TO_LONG_STYLE);\nconst _LONG_STYLE_TO_PREFIX = _objectSpread2({}, ua);\n_LONG_STYLE_TO_PREFIX[s] = _objectSpread2(_objectSpread2({}, _LONG_STYLE_TO_PREFIX[s]), Ct['kit']);\nconst LONG_STYLE_TO_PREFIX = familyProxy(_LONG_STYLE_TO_PREFIX);\nconst ICON_SELECTION_SYNTAX_PATTERN = p; // eslint-disable-line no-useless-escape\n\nconst LAYERS_TEXT_CLASSNAME = 'fa-layers-text';\nconst FONT_FAMILY_PATTERN = g;\nconst _FONT_WEIGHT_TO_PREFIX = _objectSpread2({}, G);\nconst FONT_WEIGHT_TO_PREFIX = familyProxy(_FONT_WEIGHT_TO_PREFIX);\nconst ATTRIBUTES_WATCHED_FOR_MUTATION = ['class', 'data-prefix', 'data-icon', 'data-fa-transform', 'data-fa-mask'];\nconst DUOTONE_CLASSES = A;\nconst RESERVED_CLASSES = [...At, ...ma];\n\nconst initial = WINDOW.FontAwesomeConfig || {};\nfunction getAttrConfig(attr) {\n  var element = DOCUMENT.querySelector('script[' + attr + ']');\n  if (element) {\n    return element.getAttribute(attr);\n  }\n}\nfunction coerce(val) {\n  // Getting an empty string will occur if the attribute is set on the HTML tag but without a value\n  // We'll assume that this is an indication that it should be toggled to true\n  if (val === '') return true;\n  if (val === 'false') return false;\n  if (val === 'true') return true;\n  return val;\n}\nif (DOCUMENT && typeof DOCUMENT.querySelector === 'function') {\n  const attrs = [['data-family-prefix', 'familyPrefix'], ['data-css-prefix', 'cssPrefix'], ['data-family-default', 'familyDefault'], ['data-style-default', 'styleDefault'], ['data-replacement-class', 'replacementClass'], ['data-auto-replace-svg', 'autoReplaceSvg'], ['data-auto-add-css', 'autoAddCss'], ['data-auto-a11y', 'autoA11y'], ['data-search-pseudo-elements', 'searchPseudoElements'], ['data-observe-mutations', 'observeMutations'], ['data-mutate-approach', 'mutateApproach'], ['data-keep-original-source', 'keepOriginalSource'], ['data-measure-performance', 'measurePerformance'], ['data-show-missing-icons', 'showMissingIcons']];\n  attrs.forEach(_ref => {\n    let [attr, key] = _ref;\n    const val = coerce(getAttrConfig(attr));\n    if (val !== undefined && val !== null) {\n      initial[key] = val;\n    }\n  });\n}\nconst _default = {\n  styleDefault: 'solid',\n  familyDefault: s,\n  cssPrefix: DEFAULT_CSS_PREFIX,\n  replacementClass: DEFAULT_REPLACEMENT_CLASS,\n  autoReplaceSvg: true,\n  autoAddCss: true,\n  autoA11y: true,\n  searchPseudoElements: false,\n  observeMutations: true,\n  mutateApproach: 'async',\n  keepOriginalSource: true,\n  measurePerformance: false,\n  showMissingIcons: true\n};\n\n// familyPrefix is deprecated but we must still support it if present\nif (initial.familyPrefix) {\n  initial.cssPrefix = initial.familyPrefix;\n}\nconst _config = _objectSpread2(_objectSpread2({}, _default), initial);\nif (!_config.autoReplaceSvg) _config.observeMutations = false;\nconst config = {};\nObject.keys(_default).forEach(key => {\n  Object.defineProperty(config, key, {\n    enumerable: true,\n    set: function (val) {\n      _config[key] = val;\n      _onChangeCb.forEach(cb => cb(config));\n    },\n    get: function () {\n      return _config[key];\n    }\n  });\n});\n\n// familyPrefix is deprecated as of 6.2.0 and should be removed in 7.0.0\nObject.defineProperty(config, 'familyPrefix', {\n  enumerable: true,\n  set: function (val) {\n    _config.cssPrefix = val;\n    _onChangeCb.forEach(cb => cb(config));\n  },\n  get: function () {\n    return _config.cssPrefix;\n  }\n});\nWINDOW.FontAwesomeConfig = config;\nconst _onChangeCb = [];\nfunction onChange(cb) {\n  _onChangeCb.push(cb);\n  return () => {\n    _onChangeCb.splice(_onChangeCb.indexOf(cb), 1);\n  };\n}\n\nconst d$2 = UNITS_IN_GRID;\nconst meaninglessTransform = {\n  size: 16,\n  x: 0,\n  y: 0,\n  rotate: 0,\n  flipX: false,\n  flipY: false\n};\nfunction insertCss(css) {\n  if (!css || !IS_DOM) {\n    return;\n  }\n  const style = DOCUMENT.createElement('style');\n  style.setAttribute('type', 'text/css');\n  style.innerHTML = css;\n  const headChildren = DOCUMENT.head.childNodes;\n  let beforeChild = null;\n  for (let i = headChildren.length - 1; i > -1; i--) {\n    const child = headChildren[i];\n    const tagName = (child.tagName || '').toUpperCase();\n    if (['STYLE', 'LINK'].indexOf(tagName) > -1) {\n      beforeChild = child;\n    }\n  }\n  DOCUMENT.head.insertBefore(style, beforeChild);\n  return css;\n}\nconst idPool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\nfunction nextUniqueId() {\n  let size = 12;\n  let id = '';\n  while (size-- > 0) {\n    id += idPool[Math.random() * 62 | 0];\n  }\n  return id;\n}\nfunction toArray(obj) {\n  const array = [];\n  for (let i = (obj || []).length >>> 0; i--;) {\n    array[i] = obj[i];\n  }\n  return array;\n}\nfunction classArray(node) {\n  if (node.classList) {\n    return toArray(node.classList);\n  } else {\n    return (node.getAttribute('class') || '').split(' ').filter(i => i);\n  }\n}\nfunction htmlEscape(str) {\n  return \"\".concat(str).replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\nfunction joinAttributes(attributes) {\n  return Object.keys(attributes || {}).reduce((acc, attributeName) => {\n    return acc + \"\".concat(attributeName, \"=\\\"\").concat(htmlEscape(attributes[attributeName]), \"\\\" \");\n  }, '').trim();\n}\nfunction joinStyles(styles) {\n  return Object.keys(styles || {}).reduce((acc, styleName) => {\n    return acc + \"\".concat(styleName, \": \").concat(styles[styleName].trim(), \";\");\n  }, '');\n}\nfunction transformIsMeaningful(transform) {\n  return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY;\n}\nfunction transformForSvg(_ref) {\n  let {\n    transform,\n    containerWidth,\n    iconWidth\n  } = _ref;\n  const outer = {\n    transform: \"translate(\".concat(containerWidth / 2, \" 256)\")\n  };\n  const innerTranslate = \"translate(\".concat(transform.x * 32, \", \").concat(transform.y * 32, \") \");\n  const innerScale = \"scale(\".concat(transform.size / 16 * (transform.flipX ? -1 : 1), \", \").concat(transform.size / 16 * (transform.flipY ? -1 : 1), \") \");\n  const innerRotate = \"rotate(\".concat(transform.rotate, \" 0 0)\");\n  const inner = {\n    transform: \"\".concat(innerTranslate, \" \").concat(innerScale, \" \").concat(innerRotate)\n  };\n  const path = {\n    transform: \"translate(\".concat(iconWidth / 2 * -1, \" -256)\")\n  };\n  return {\n    outer,\n    inner,\n    path\n  };\n}\nfunction transformForCss(_ref2) {\n  let {\n    transform,\n    width = UNITS_IN_GRID,\n    height = UNITS_IN_GRID,\n    startCentered = false\n  } = _ref2;\n  let val = '';\n  if (startCentered && IS_IE) {\n    val += \"translate(\".concat(transform.x / d$2 - width / 2, \"em, \").concat(transform.y / d$2 - height / 2, \"em) \");\n  } else if (startCentered) {\n    val += \"translate(calc(-50% + \".concat(transform.x / d$2, \"em), calc(-50% + \").concat(transform.y / d$2, \"em)) \");\n  } else {\n    val += \"translate(\".concat(transform.x / d$2, \"em, \").concat(transform.y / d$2, \"em) \");\n  }\n  val += \"scale(\".concat(transform.size / d$2 * (transform.flipX ? -1 : 1), \", \").concat(transform.size / d$2 * (transform.flipY ? -1 : 1), \") \");\n  val += \"rotate(\".concat(transform.rotate, \"deg) \");\n  return val;\n}\n\nvar baseStyles = \":root, :host {\\n  --fa-font-solid: normal 900 1em/1 \\\"Font Awesome 6 Free\\\";\\n  --fa-font-regular: normal 400 1em/1 \\\"Font Awesome 6 Free\\\";\\n  --fa-font-light: normal 300 1em/1 \\\"Font Awesome 6 Pro\\\";\\n  --fa-font-thin: normal 100 1em/1 \\\"Font Awesome 6 Pro\\\";\\n  --fa-font-duotone: normal 900 1em/1 \\\"Font Awesome 6 Duotone\\\";\\n  --fa-font-duotone-regular: normal 400 1em/1 \\\"Font Awesome 6 Duotone\\\";\\n  --fa-font-duotone-light: normal 300 1em/1 \\\"Font Awesome 6 Duotone\\\";\\n  --fa-font-duotone-thin: normal 100 1em/1 \\\"Font Awesome 6 Duotone\\\";\\n  --fa-font-brands: normal 400 1em/1 \\\"Font Awesome 6 Brands\\\";\\n  --fa-font-sharp-solid: normal 900 1em/1 \\\"Font Awesome 6 Sharp\\\";\\n  --fa-font-sharp-regular: normal 400 1em/1 \\\"Font Awesome 6 Sharp\\\";\\n  --fa-font-sharp-light: normal 300 1em/1 \\\"Font Awesome 6 Sharp\\\";\\n  --fa-font-sharp-thin: normal 100 1em/1 \\\"Font Awesome 6 Sharp\\\";\\n  --fa-font-sharp-duotone-solid: normal 900 1em/1 \\\"Font Awesome 6 Sharp Duotone\\\";\\n  --fa-font-sharp-duotone-regular: normal 400 1em/1 \\\"Font Awesome 6 Sharp Duotone\\\";\\n  --fa-font-sharp-duotone-light: normal 300 1em/1 \\\"Font Awesome 6 Sharp Duotone\\\";\\n  --fa-font-sharp-duotone-thin: normal 100 1em/1 \\\"Font Awesome 6 Sharp Duotone\\\";\\n}\\n\\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\\n  overflow: visible;\\n  box-sizing: content-box;\\n}\\n\\n.svg-inline--fa {\\n  display: var(--fa-display, inline-block);\\n  height: 1em;\\n  overflow: visible;\\n  vertical-align: -0.125em;\\n}\\n.svg-inline--fa.fa-2xs {\\n  vertical-align: 0.1em;\\n}\\n.svg-inline--fa.fa-xs {\\n  vertical-align: 0em;\\n}\\n.svg-inline--fa.fa-sm {\\n  vertical-align: -0.0714285705em;\\n}\\n.svg-inline--fa.fa-lg {\\n  vertical-align: -0.2em;\\n}\\n.svg-inline--fa.fa-xl {\\n  vertical-align: -0.25em;\\n}\\n.svg-inline--fa.fa-2xl {\\n  vertical-align: -0.3125em;\\n}\\n.svg-inline--fa.fa-pull-left {\\n  margin-right: var(--fa-pull-margin, 0.3em);\\n  width: auto;\\n}\\n.svg-inline--fa.fa-pull-right {\\n  margin-left: var(--fa-pull-margin, 0.3em);\\n  width: auto;\\n}\\n.svg-inline--fa.fa-li {\\n  width: var(--fa-li-width, 2em);\\n  top: 0.25em;\\n}\\n.svg-inline--fa.fa-fw {\\n  width: var(--fa-fw-width, 1.25em);\\n}\\n\\n.fa-layers svg.svg-inline--fa {\\n  bottom: 0;\\n  left: 0;\\n  margin: auto;\\n  position: absolute;\\n  right: 0;\\n  top: 0;\\n}\\n\\n.fa-layers-counter, .fa-layers-text {\\n  display: inline-block;\\n  position: absolute;\\n  text-align: center;\\n}\\n\\n.fa-layers {\\n  display: inline-block;\\n  height: 1em;\\n  position: relative;\\n  text-align: center;\\n  vertical-align: -0.125em;\\n  width: 1em;\\n}\\n.fa-layers svg.svg-inline--fa {\\n  transform-origin: center center;\\n}\\n\\n.fa-layers-text {\\n  left: 50%;\\n  top: 50%;\\n  transform: translate(-50%, -50%);\\n  transform-origin: center center;\\n}\\n\\n.fa-layers-counter {\\n  background-color: var(--fa-counter-background-color, #ff253a);\\n  border-radius: var(--fa-counter-border-radius, 1em);\\n  box-sizing: border-box;\\n  color: var(--fa-inverse, #fff);\\n  line-height: var(--fa-counter-line-height, 1);\\n  max-width: var(--fa-counter-max-width, 5em);\\n  min-width: var(--fa-counter-min-width, 1.5em);\\n  overflow: hidden;\\n  padding: var(--fa-counter-padding, 0.25em 0.5em);\\n  right: var(--fa-right, 0);\\n  text-overflow: ellipsis;\\n  top: var(--fa-top, 0);\\n  transform: scale(var(--fa-counter-scale, 0.25));\\n  transform-origin: top right;\\n}\\n\\n.fa-layers-bottom-right {\\n  bottom: var(--fa-bottom, 0);\\n  right: var(--fa-right, 0);\\n  top: auto;\\n  transform: scale(var(--fa-layers-scale, 0.25));\\n  transform-origin: bottom right;\\n}\\n\\n.fa-layers-bottom-left {\\n  bottom: var(--fa-bottom, 0);\\n  left: var(--fa-left, 0);\\n  right: auto;\\n  top: auto;\\n  transform: scale(var(--fa-layers-scale, 0.25));\\n  transform-origin: bottom left;\\n}\\n\\n.fa-layers-top-right {\\n  top: var(--fa-top, 0);\\n  right: var(--fa-right, 0);\\n  transform: scale(var(--fa-layers-scale, 0.25));\\n  transform-origin: top right;\\n}\\n\\n.fa-layers-top-left {\\n  left: var(--fa-left, 0);\\n  right: auto;\\n  top: var(--fa-top, 0);\\n  transform: scale(var(--fa-layers-scale, 0.25));\\n  transform-origin: top left;\\n}\\n\\n.fa-1x {\\n  font-size: 1em;\\n}\\n\\n.fa-2x {\\n  font-size: 2em;\\n}\\n\\n.fa-3x {\\n  font-size: 3em;\\n}\\n\\n.fa-4x {\\n  font-size: 4em;\\n}\\n\\n.fa-5x {\\n  font-size: 5em;\\n}\\n\\n.fa-6x {\\n  font-size: 6em;\\n}\\n\\n.fa-7x {\\n  font-size: 7em;\\n}\\n\\n.fa-8x {\\n  font-size: 8em;\\n}\\n\\n.fa-9x {\\n  font-size: 9em;\\n}\\n\\n.fa-10x {\\n  font-size: 10em;\\n}\\n\\n.fa-2xs {\\n  font-size: 0.625em;\\n  line-height: 0.1em;\\n  vertical-align: 0.225em;\\n}\\n\\n.fa-xs {\\n  font-size: 0.75em;\\n  line-height: 0.0833333337em;\\n  vertical-align: 0.125em;\\n}\\n\\n.fa-sm {\\n  font-size: 0.875em;\\n  line-height: 0.0714285718em;\\n  vertical-align: 0.0535714295em;\\n}\\n\\n.fa-lg {\\n  font-size: 1.25em;\\n  line-height: 0.05em;\\n  vertical-align: -0.075em;\\n}\\n\\n.fa-xl {\\n  font-size: 1.5em;\\n  line-height: 0.0416666682em;\\n  vertical-align: -0.125em;\\n}\\n\\n.fa-2xl {\\n  font-size: 2em;\\n  line-height: 0.03125em;\\n  vertical-align: -0.1875em;\\n}\\n\\n.fa-fw {\\n  text-align: center;\\n  width: 1.25em;\\n}\\n\\n.fa-ul {\\n  list-style-type: none;\\n  margin-left: var(--fa-li-margin, 2.5em);\\n  padding-left: 0;\\n}\\n.fa-ul > li {\\n  position: relative;\\n}\\n\\n.fa-li {\\n  left: calc(-1 * var(--fa-li-width, 2em));\\n  position: absolute;\\n  text-align: center;\\n  width: var(--fa-li-width, 2em);\\n  line-height: inherit;\\n}\\n\\n.fa-border {\\n  border-color: var(--fa-border-color, #eee);\\n  border-radius: var(--fa-border-radius, 0.1em);\\n  border-style: var(--fa-border-style, solid);\\n  border-width: var(--fa-border-width, 0.08em);\\n  padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\\n}\\n\\n.fa-pull-left {\\n  float: left;\\n  margin-right: var(--fa-pull-margin, 0.3em);\\n}\\n\\n.fa-pull-right {\\n  float: right;\\n  margin-left: var(--fa-pull-margin, 0.3em);\\n}\\n\\n.fa-beat {\\n  animation-name: fa-beat;\\n  animation-delay: var(--fa-animation-delay, 0s);\\n  animation-direction: var(--fa-animation-direction, normal);\\n  animation-duration: var(--fa-animation-duration, 1s);\\n  animation-iteration-count: var(--fa-animation-iteration-count, infinite);\\n  animation-timing-function: var(--fa-animation-timing, ease-in-out);\\n}\\n\\n.fa-bounce {\\n  animation-name: fa-bounce;\\n  animation-delay: var(--fa-animation-delay, 0s);\\n  animation-direction: var(--fa-animation-direction, normal);\\n  animation-duration: var(--fa-animation-duration, 1s);\\n  animation-iteration-count: var(--fa-animation-iteration-count, infinite);\\n  animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\\n}\\n\\n.fa-fade {\\n  animation-name: fa-fade;\\n  animation-delay: var(--fa-animation-delay, 0s);\\n  animation-direction: var(--fa-animation-direction, normal);\\n  animation-duration: var(--fa-animation-duration, 1s);\\n  animation-iteration-count: var(--fa-animation-iteration-count, infinite);\\n  animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\\n}\\n\\n.fa-beat-fade {\\n  animation-name: fa-beat-fade;\\n  animation-delay: var(--fa-animation-delay, 0s);\\n  animation-direction: var(--fa-animation-direction, normal);\\n  animation-duration: var(--fa-animation-duration, 1s);\\n  animation-iteration-count: var(--fa-animation-iteration-count, infinite);\\n  animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\\n}\\n\\n.fa-flip {\\n  animation-name: fa-flip;\\n  animation-delay: var(--fa-animation-delay, 0s);\\n  animation-direction: var(--fa-animation-direction, normal);\\n  animation-duration: var(--fa-animation-duration, 1s);\\n  animation-iteration-count: var(--fa-animation-iteration-count, infinite);\\n  animation-timing-function: var(--fa-animation-timing, ease-in-out);\\n}\\n\\n.fa-shake {\\n  animation-name: fa-shake;\\n  animation-delay: var(--fa-animation-delay, 0s);\\n  animation-direction: var(--fa-animation-direction, normal);\\n  animation-duration: var(--fa-animation-duration, 1s);\\n  animation-iteration-count: var(--fa-animation-iteration-count, infinite);\\n  animation-timing-function: var(--fa-animation-timing, linear);\\n}\\n\\n.fa-spin {\\n  animation-name: fa-spin;\\n  animation-delay: var(--fa-animation-delay, 0s);\\n  animation-direction: var(--fa-animation-direction, normal);\\n  animation-duration: var(--fa-animation-duration, 2s);\\n  animation-iteration-count: var(--fa-animation-iteration-count, infinite);\\n  animation-timing-function: var(--fa-animation-timing, linear);\\n}\\n\\n.fa-spin-reverse {\\n  --fa-animation-direction: reverse;\\n}\\n\\n.fa-pulse,\\n.fa-spin-pulse {\\n  animation-name: fa-spin;\\n  animation-direction: var(--fa-animation-direction, normal);\\n  animation-duration: var(--fa-animation-duration, 1s);\\n  animation-iteration-count: var(--fa-animation-iteration-count, infinite);\\n  animation-timing-function: var(--fa-animation-timing, steps(8));\\n}\\n\\n@media (prefers-reduced-motion: reduce) {\\n  .fa-beat,\\n.fa-bounce,\\n.fa-fade,\\n.fa-beat-fade,\\n.fa-flip,\\n.fa-pulse,\\n.fa-shake,\\n.fa-spin,\\n.fa-spin-pulse {\\n    animation-delay: -1ms;\\n    animation-duration: 1ms;\\n    animation-iteration-count: 1;\\n    transition-delay: 0s;\\n    transition-duration: 0s;\\n  }\\n}\\n@keyframes fa-beat {\\n  0%, 90% {\\n    transform: scale(1);\\n  }\\n  45% {\\n    transform: scale(var(--fa-beat-scale, 1.25));\\n  }\\n}\\n@keyframes fa-bounce {\\n  0% {\\n    transform: scale(1, 1) translateY(0);\\n  }\\n  10% {\\n    transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\\n  }\\n  30% {\\n    transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\\n  }\\n  50% {\\n    transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\\n  }\\n  57% {\\n    transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\\n  }\\n  64% {\\n    transform: scale(1, 1) translateY(0);\\n  }\\n  100% {\\n    transform: scale(1, 1) translateY(0);\\n  }\\n}\\n@keyframes fa-fade {\\n  50% {\\n    opacity: var(--fa-fade-opacity, 0.4);\\n  }\\n}\\n@keyframes fa-beat-fade {\\n  0%, 100% {\\n    opacity: var(--fa-beat-fade-opacity, 0.4);\\n    transform: scale(1);\\n  }\\n  50% {\\n    opacity: 1;\\n    transform: scale(var(--fa-beat-fade-scale, 1.125));\\n  }\\n}\\n@keyframes fa-flip {\\n  50% {\\n    transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\\n  }\\n}\\n@keyframes fa-shake {\\n  0% {\\n    transform: rotate(-15deg);\\n  }\\n  4% {\\n    transform: rotate(15deg);\\n  }\\n  8%, 24% {\\n    transform: rotate(-18deg);\\n  }\\n  12%, 28% {\\n    transform: rotate(18deg);\\n  }\\n  16% {\\n    transform: rotate(-22deg);\\n  }\\n  20% {\\n    transform: rotate(22deg);\\n  }\\n  32% {\\n    transform: rotate(-12deg);\\n  }\\n  36% {\\n    transform: rotate(12deg);\\n  }\\n  40%, 100% {\\n    transform: rotate(0deg);\\n  }\\n}\\n@keyframes fa-spin {\\n  0% {\\n    transform: rotate(0deg);\\n  }\\n  100% {\\n    transform: rotate(360deg);\\n  }\\n}\\n.fa-rotate-90 {\\n  transform: rotate(90deg);\\n}\\n\\n.fa-rotate-180 {\\n  transform: rotate(180deg);\\n}\\n\\n.fa-rotate-270 {\\n  transform: rotate(270deg);\\n}\\n\\n.fa-flip-horizontal {\\n  transform: scale(-1, 1);\\n}\\n\\n.fa-flip-vertical {\\n  transform: scale(1, -1);\\n}\\n\\n.fa-flip-both,\\n.fa-flip-horizontal.fa-flip-vertical {\\n  transform: scale(-1, -1);\\n}\\n\\n.fa-rotate-by {\\n  transform: rotate(var(--fa-rotate-angle, 0));\\n}\\n\\n.fa-stack {\\n  display: inline-block;\\n  vertical-align: middle;\\n  height: 2em;\\n  position: relative;\\n  width: 2.5em;\\n}\\n\\n.fa-stack-1x,\\n.fa-stack-2x {\\n  bottom: 0;\\n  left: 0;\\n  margin: auto;\\n  position: absolute;\\n  right: 0;\\n  top: 0;\\n  z-index: var(--fa-stack-z-index, auto);\\n}\\n\\n.svg-inline--fa.fa-stack-1x {\\n  height: 1em;\\n  width: 1.25em;\\n}\\n.svg-inline--fa.fa-stack-2x {\\n  height: 2em;\\n  width: 2.5em;\\n}\\n\\n.fa-inverse {\\n  color: var(--fa-inverse, #fff);\\n}\\n\\n.sr-only,\\n.fa-sr-only {\\n  position: absolute;\\n  width: 1px;\\n  height: 1px;\\n  padding: 0;\\n  margin: -1px;\\n  overflow: hidden;\\n  clip: rect(0, 0, 0, 0);\\n  white-space: nowrap;\\n  border-width: 0;\\n}\\n\\n.sr-only-focusable:not(:focus),\\n.fa-sr-only-focusable:not(:focus) {\\n  position: absolute;\\n  width: 1px;\\n  height: 1px;\\n  padding: 0;\\n  margin: -1px;\\n  overflow: hidden;\\n  clip: rect(0, 0, 0, 0);\\n  white-space: nowrap;\\n  border-width: 0;\\n}\\n\\n.svg-inline--fa .fa-primary {\\n  fill: var(--fa-primary-color, currentColor);\\n  opacity: var(--fa-primary-opacity, 1);\\n}\\n\\n.svg-inline--fa .fa-secondary {\\n  fill: var(--fa-secondary-color, currentColor);\\n  opacity: var(--fa-secondary-opacity, 0.4);\\n}\\n\\n.svg-inline--fa.fa-swap-opacity .fa-primary {\\n  opacity: var(--fa-secondary-opacity, 0.4);\\n}\\n\\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\\n  opacity: var(--fa-primary-opacity, 1);\\n}\\n\\n.svg-inline--fa mask .fa-primary,\\n.svg-inline--fa mask .fa-secondary {\\n  fill: black;\\n}\";\n\nfunction css() {\n  const dcp = DEFAULT_CSS_PREFIX;\n  const drc = DEFAULT_REPLACEMENT_CLASS;\n  const fp = config.cssPrefix;\n  const rc = config.replacementClass;\n  let s = baseStyles;\n  if (fp !== dcp || rc !== drc) {\n    const dPatt = new RegExp(\"\\\\.\".concat(dcp, \"\\\\-\"), 'g');\n    const customPropPatt = new RegExp(\"\\\\--\".concat(dcp, \"\\\\-\"), 'g');\n    const rPatt = new RegExp(\"\\\\.\".concat(drc), 'g');\n    s = s.replace(dPatt, \".\".concat(fp, \"-\")).replace(customPropPatt, \"--\".concat(fp, \"-\")).replace(rPatt, \".\".concat(rc));\n  }\n  return s;\n}\nlet _cssInserted = false;\nfunction ensureCss() {\n  if (config.autoAddCss && !_cssInserted) {\n    insertCss(css());\n    _cssInserted = true;\n  }\n}\nvar InjectCSS = {\n  mixout() {\n    return {\n      dom: {\n        css,\n        insertCss: ensureCss\n      }\n    };\n  },\n  hooks() {\n    return {\n      beforeDOMElementCreation() {\n        ensureCss();\n      },\n      beforeI2svg() {\n        ensureCss();\n      }\n    };\n  }\n};\n\nconst w = WINDOW || {};\nif (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {};\nif (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {};\nif (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {};\nif (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = [];\nvar namespace = w[NAMESPACE_IDENTIFIER];\n\nconst functions = [];\nconst listener = function () {\n  DOCUMENT.removeEventListener('DOMContentLoaded', listener);\n  loaded = 1;\n  functions.map(fn => fn());\n};\nlet loaded = false;\nif (IS_DOM) {\n  loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);\n  if (!loaded) DOCUMENT.addEventListener('DOMContentLoaded', listener);\n}\nfunction domready (fn) {\n  if (!IS_DOM) return;\n  loaded ? setTimeout(fn, 0) : functions.push(fn);\n}\n\nfunction toHtml(abstractNodes) {\n  const {\n    tag,\n    attributes = {},\n    children = []\n  } = abstractNodes;\n  if (typeof abstractNodes === 'string') {\n    return htmlEscape(abstractNodes);\n  } else {\n    return \"<\".concat(tag, \" \").concat(joinAttributes(attributes), \">\").concat(children.map(toHtml).join(''), \"</\").concat(tag, \">\");\n  }\n}\n\nfunction iconFromMapping(mapping, prefix, iconName) {\n  if (mapping && mapping[prefix] && mapping[prefix][iconName]) {\n    return {\n      prefix,\n      iconName,\n      icon: mapping[prefix][iconName]\n    };\n  }\n}\n\n/**\n * Internal helper to bind a function known to have 4 arguments\n * to a given context.\n */\nvar bindInternal4 = function bindInternal4(func, thisContext) {\n  return function (a, b, c, d) {\n    return func.call(thisContext, a, b, c, d);\n  };\n};\n\n/**\n * # Reduce\n *\n * A fast object `.reduce()` implementation.\n *\n * @param  {Object}   subject      The object to reduce over.\n * @param  {Function} fn           The reducer function.\n * @param  {mixed}    initialValue The initial value for the reducer, defaults to subject[0].\n * @param  {Object}   thisContext  The context for the reducer.\n * @return {mixed}                 The final result.\n */\nvar reduce = function fastReduceObject(subject, fn, initialValue, thisContext) {\n  var keys = Object.keys(subject),\n    length = keys.length,\n    iterator = thisContext !== undefined ? bindInternal4(fn, thisContext) : fn,\n    i,\n    key,\n    result;\n  if (initialValue === undefined) {\n    i = 1;\n    result = subject[keys[0]];\n  } else {\n    i = 0;\n    result = initialValue;\n  }\n  for (; i < length; i++) {\n    key = keys[i];\n    result = iterator(result, subject[key], key, subject);\n  }\n  return result;\n};\n\n/**\n * ucs2decode() and codePointAt() are both works of Mathias Bynens and licensed under MIT\n *\n * Copyright Mathias Bynens <https://mathiasbynens.be/>\n\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\nfunction ucs2decode(string) {\n  const output = [];\n  let counter = 0;\n  const length = string.length;\n  while (counter < length) {\n    const value = string.charCodeAt(counter++);\n    if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n      const extra = string.charCodeAt(counter++);\n      if ((extra & 0xFC00) == 0xDC00) {\n        // eslint-disable-line eqeqeq\n        output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n      } else {\n        output.push(value);\n        counter--;\n      }\n    } else {\n      output.push(value);\n    }\n  }\n  return output;\n}\nfunction toHex(unicode) {\n  const decoded = ucs2decode(unicode);\n  return decoded.length === 1 ? decoded[0].toString(16) : null;\n}\nfunction codePointAt(string, index) {\n  const size = string.length;\n  let first = string.charCodeAt(index);\n  let second;\n  if (first >= 0xD800 && first <= 0xDBFF && size > index + 1) {\n    second = string.charCodeAt(index + 1);\n    if (second >= 0xDC00 && second <= 0xDFFF) {\n      return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n    }\n  }\n  return first;\n}\n\nfunction normalizeIcons(icons) {\n  return Object.keys(icons).reduce((acc, iconName) => {\n    const icon = icons[iconName];\n    const expanded = !!icon.icon;\n    if (expanded) {\n      acc[icon.iconName] = icon.icon;\n    } else {\n      acc[iconName] = icon;\n    }\n    return acc;\n  }, {});\n}\nfunction defineIcons(prefix, icons) {\n  let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  const {\n    skipHooks = false\n  } = params;\n  const normalized = normalizeIcons(icons);\n  if (typeof namespace.hooks.addPack === 'function' && !skipHooks) {\n    namespace.hooks.addPack(prefix, normalizeIcons(icons));\n  } else {\n    namespace.styles[prefix] = _objectSpread2(_objectSpread2({}, namespace.styles[prefix] || {}), normalized);\n  }\n\n  /**\n   * Font Awesome 4 used the prefix of `fa` for all icons. With the introduction\n   * of new styles we needed to differentiate between them. Prefix `fa` is now an alias\n   * for `fas` so we'll ease the upgrade process for our users by automatically defining\n   * this as well.\n   */\n  if (prefix === 'fas') {\n    defineIcons('fa', icons);\n  }\n}\n\nconst duotonePathRe = [/*#__PURE__*/_wrapRegExp(/path d=\"([^\"]+)\".*path d=\"([^\"]+)\"/, {\n  d1: 1,\n  d2: 2\n}), /*#__PURE__*/_wrapRegExp(/path class=\"([^\"]+)\".*d=\"([^\"]+)\".*path class=\"([^\"]+)\".*d=\"([^\"]+)\"/, {\n  cls1: 1,\n  d1: 2,\n  cls2: 3,\n  d2: 4\n}), /*#__PURE__*/_wrapRegExp(/path class=\"([^\"]+)\".*d=\"([^\"]+)\"/, {\n  cls1: 1,\n  d1: 2\n})];\n\nconst {\n  styles,\n  shims\n} = namespace;\nconst FAMILY_NAMES = Object.keys(PREFIX_TO_LONG_STYLE);\nconst PREFIXES_FOR_FAMILY = FAMILY_NAMES.reduce((acc, familyId) => {\n  acc[familyId] = Object.keys(PREFIX_TO_LONG_STYLE[familyId]);\n  return acc;\n}, {});\nlet _defaultUsablePrefix = null;\nlet _byUnicode = {};\nlet _byLigature = {};\nlet _byOldName = {};\nlet _byOldUnicode = {};\nlet _byAlias = {};\nfunction isReserved(name) {\n  return ~RESERVED_CLASSES.indexOf(name);\n}\nfunction getIconName(cssPrefix, cls) {\n  const parts = cls.split('-');\n  const prefix = parts[0];\n  const iconName = parts.slice(1).join('-');\n  if (prefix === cssPrefix && iconName !== '' && !isReserved(iconName)) {\n    return iconName;\n  } else {\n    return null;\n  }\n}\nconst build = () => {\n  const lookup = reducer => {\n    return reduce(styles, (o$$1, style, prefix) => {\n      o$$1[prefix] = reduce(style, reducer, {});\n      return o$$1;\n    }, {});\n  };\n  _byUnicode = lookup((acc, icon, iconName) => {\n    if (icon[3]) {\n      acc[icon[3]] = iconName;\n    }\n    if (icon[2]) {\n      const aliases = icon[2].filter(a$$1 => {\n        return typeof a$$1 === 'number';\n      });\n      aliases.forEach(alias => {\n        acc[alias.toString(16)] = iconName;\n      });\n    }\n    return acc;\n  });\n  _byLigature = lookup((acc, icon, iconName) => {\n    acc[iconName] = iconName;\n    if (icon[2]) {\n      const aliases = icon[2].filter(a$$1 => {\n        return typeof a$$1 === 'string';\n      });\n      aliases.forEach(alias => {\n        acc[alias] = iconName;\n      });\n    }\n    return acc;\n  });\n  _byAlias = lookup((acc, icon, iconName) => {\n    const aliases = icon[2];\n    acc[iconName] = iconName;\n    aliases.forEach(alias => {\n      acc[alias] = iconName;\n    });\n    return acc;\n  });\n\n  // If we have a Kit, we can't determine if regular is available since we\n  // could be auto-fetching it. We'll have to assume that it is available.\n  const hasRegular = 'far' in styles || config.autoFetchSvg;\n  const shimLookups = reduce(shims, (acc, shim) => {\n    const maybeNameMaybeUnicode = shim[0];\n    let prefix = shim[1];\n    const iconName = shim[2];\n    if (prefix === 'far' && !hasRegular) {\n      prefix = 'fas';\n    }\n    if (typeof maybeNameMaybeUnicode === 'string') {\n      acc.names[maybeNameMaybeUnicode] = {\n        prefix,\n        iconName\n      };\n    }\n    if (typeof maybeNameMaybeUnicode === 'number') {\n      acc.unicodes[maybeNameMaybeUnicode.toString(16)] = {\n        prefix,\n        iconName\n      };\n    }\n    return acc;\n  }, {\n    names: {},\n    unicodes: {}\n  });\n  _byOldName = shimLookups.names;\n  _byOldUnicode = shimLookups.unicodes;\n  _defaultUsablePrefix = getCanonicalPrefix(config.styleDefault, {\n    family: config.familyDefault\n  });\n};\nonChange(c$$1 => {\n  _defaultUsablePrefix = getCanonicalPrefix(c$$1.styleDefault, {\n    family: config.familyDefault\n  });\n});\nbuild();\nfunction byUnicode(prefix, unicode) {\n  return (_byUnicode[prefix] || {})[unicode];\n}\nfunction byLigature(prefix, ligature) {\n  return (_byLigature[prefix] || {})[ligature];\n}\nfunction byAlias(prefix, alias) {\n  return (_byAlias[prefix] || {})[alias];\n}\nfunction byOldName(name) {\n  return _byOldName[name] || {\n    prefix: null,\n    iconName: null\n  };\n}\nfunction byOldUnicode(unicode) {\n  const oldUnicode = _byOldUnicode[unicode];\n  const newUnicode = byUnicode('fas', unicode);\n  return oldUnicode || (newUnicode ? {\n    prefix: 'fas',\n    iconName: newUnicode\n  } : null) || {\n    prefix: null,\n    iconName: null\n  };\n}\nfunction getDefaultUsablePrefix() {\n  return _defaultUsablePrefix;\n}\nconst emptyCanonicalIcon = () => {\n  return {\n    prefix: null,\n    iconName: null,\n    rest: []\n  };\n};\nfunction getFamilyId(values) {\n  let family = s;\n  const famProps = FAMILY_NAMES.reduce((acc, familyId) => {\n    acc[familyId] = \"\".concat(config.cssPrefix, \"-\").concat(familyId);\n    return acc;\n  }, {});\n  L.forEach(familyId => {\n    if (values.includes(famProps[familyId]) || values.some(v$$1 => PREFIXES_FOR_FAMILY[familyId].includes(v$$1))) {\n      family = familyId;\n    }\n  });\n  return family;\n}\nfunction getCanonicalPrefix(styleOrPrefix) {\n  let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  const {\n    family = s\n  } = params;\n  const style = PREFIX_TO_STYLE[family][styleOrPrefix];\n\n  // handles the exception of passing in only a family of 'duotone' with no style\n  if (family === t && !styleOrPrefix) {\n    return 'fad';\n  }\n  const prefix = STYLE_TO_PREFIX[family][styleOrPrefix] || STYLE_TO_PREFIX[family][style];\n  const defined = styleOrPrefix in namespace.styles ? styleOrPrefix : null;\n  const result = prefix || defined || null;\n  return result;\n}\nfunction moveNonFaClassesToRest(classNames) {\n  let rest = [];\n  let iconName = null;\n  classNames.forEach(cls => {\n    const result = getIconName(config.cssPrefix, cls);\n    if (result) {\n      iconName = result;\n    } else if (cls) {\n      rest.push(cls);\n    }\n  });\n  return {\n    iconName,\n    rest\n  };\n}\nfunction sortedUniqueValues(arr) {\n  return arr.sort().filter((value, index, arr) => {\n    return arr.indexOf(value) === index;\n  });\n}\nfunction getCanonicalIcon(values) {\n  let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  const {\n    skipLookups = false\n  } = params;\n  let givenPrefix = null;\n  const faCombinedClasses = Ia.concat(bt$1);\n  const faStyleOrFamilyClasses = sortedUniqueValues(values.filter(cls => faCombinedClasses.includes(cls)));\n  const nonStyleOrFamilyClasses = sortedUniqueValues(values.filter(cls => !Ia.includes(cls)));\n  const faStyles = faStyleOrFamilyClasses.filter(cls => {\n    givenPrefix = cls;\n    return !P.includes(cls);\n  });\n  const [styleFromValues = null] = faStyles;\n  const family = getFamilyId(faStyleOrFamilyClasses);\n  const canonical = _objectSpread2(_objectSpread2({}, moveNonFaClassesToRest(nonStyleOrFamilyClasses)), {}, {\n    prefix: getCanonicalPrefix(styleFromValues, {\n      family\n    })\n  });\n  return _objectSpread2(_objectSpread2(_objectSpread2({}, canonical), getDefaultCanonicalPrefix({\n    values,\n    family,\n    styles,\n    config,\n    canonical,\n    givenPrefix\n  })), applyShimAndAlias(skipLookups, givenPrefix, canonical));\n}\nfunction applyShimAndAlias(skipLookups, givenPrefix, canonical) {\n  let {\n    prefix,\n    iconName\n  } = canonical;\n  if (skipLookups || !prefix || !iconName) {\n    return {\n      prefix,\n      iconName\n    };\n  }\n  const shim = givenPrefix === 'fa' ? byOldName(iconName) : {};\n  const aliasIconName = byAlias(prefix, iconName);\n  iconName = shim.iconName || aliasIconName || iconName;\n  prefix = shim.prefix || prefix;\n  if (prefix === 'far' && !styles['far'] && styles['fas'] && !config.autoFetchSvg) {\n    // Allow a fallback from the regular style to solid if regular is not available\n    // but only if we aren't auto-fetching SVGs\n    prefix = 'fas';\n  }\n  return {\n    prefix,\n    iconName\n  };\n}\nconst newCanonicalFamilies = L.filter(familyId => {\n  return familyId !== s || familyId !== t;\n});\nconst newCanonicalStyles = Object.keys(ga).filter(key => key !== s).map(key => Object.keys(ga[key])).flat();\nfunction getDefaultCanonicalPrefix(prefixOptions) {\n  const {\n    values,\n    family,\n    canonical,\n    givenPrefix = '',\n    styles = {},\n    config: config$$1 = {}\n  } = prefixOptions;\n  const isDuotoneFamily = family === t;\n  const valuesHasDuotone = values.includes('fa-duotone') || values.includes('fad');\n  const defaultFamilyIsDuotone = config$$1.familyDefault === 'duotone';\n  const canonicalPrefixIsDuotone = canonical.prefix === 'fad' || canonical.prefix === 'fa-duotone';\n  if (!isDuotoneFamily && (valuesHasDuotone || defaultFamilyIsDuotone || canonicalPrefixIsDuotone)) {\n    canonical.prefix = 'fad';\n  }\n  if (values.includes('fa-brands') || values.includes('fab')) {\n    canonical.prefix = 'fab';\n  }\n  if (!canonical.prefix && newCanonicalFamilies.includes(family)) {\n    const validPrefix = Object.keys(styles).find(key => newCanonicalStyles.includes(key));\n    if (validPrefix || config$$1.autoFetchSvg) {\n      const defaultPrefix = pt.get(family).defaultShortPrefixId;\n      canonical.prefix = defaultPrefix;\n      canonical.iconName = byAlias(canonical.prefix, canonical.iconName) || canonical.iconName;\n    }\n  }\n  if (canonical.prefix === 'fa' || givenPrefix === 'fa') {\n    // The fa prefix is not canonical. So if it has made it through until this point\n    // we will shift it to the correct prefix.\n    canonical.prefix = getDefaultUsablePrefix() || 'fas';\n  }\n  return canonical;\n}\n\nclass Library {\n  constructor() {\n    this.definitions = {};\n  }\n  add() {\n    for (var _len = arguments.length, definitions = new Array(_len), _key = 0; _key < _len; _key++) {\n      definitions[_key] = arguments[_key];\n    }\n    const additions = definitions.reduce(this._pullDefinitions, {});\n    Object.keys(additions).forEach(key => {\n      this.definitions[key] = _objectSpread2(_objectSpread2({}, this.definitions[key] || {}), additions[key]);\n      defineIcons(key, additions[key]);\n\n      // TODO can we stop doing this? We can't get the icons by 'fa-solid' any longer so this probably needs to change\n      const longPrefix = PREFIX_TO_LONG_STYLE[s][key];\n      if (longPrefix) defineIcons(longPrefix, additions[key]);\n      build();\n    });\n  }\n  reset() {\n    this.definitions = {};\n  }\n  _pullDefinitions(additions, definition) {\n    const normalized = definition.prefix && definition.iconName && definition.icon ? {\n      0: definition\n    } : definition;\n    Object.keys(normalized).map(key => {\n      const {\n        prefix,\n        iconName,\n        icon\n      } = normalized[key];\n      const aliases = icon[2];\n      if (!additions[prefix]) additions[prefix] = {};\n      if (aliases.length > 0) {\n        aliases.forEach(alias => {\n          if (typeof alias === 'string') {\n            additions[prefix][alias] = icon;\n          }\n        });\n      }\n      additions[prefix][iconName] = icon;\n    });\n    return additions;\n  }\n}\n\nlet _plugins = [];\nlet _hooks = {};\nconst providers = {};\nconst defaultProviderKeys = Object.keys(providers);\nfunction registerPlugins(nextPlugins, _ref) {\n  let {\n    mixoutsTo: obj\n  } = _ref;\n  _plugins = nextPlugins;\n  _hooks = {};\n  Object.keys(providers).forEach(k => {\n    if (defaultProviderKeys.indexOf(k) === -1) {\n      delete providers[k];\n    }\n  });\n  _plugins.forEach(plugin => {\n    const mixout = plugin.mixout ? plugin.mixout() : {};\n    Object.keys(mixout).forEach(tk => {\n      if (typeof mixout[tk] === 'function') {\n        obj[tk] = mixout[tk];\n      }\n      if (typeof mixout[tk] === 'object') {\n        Object.keys(mixout[tk]).forEach(sk => {\n          if (!obj[tk]) {\n            obj[tk] = {};\n          }\n          obj[tk][sk] = mixout[tk][sk];\n        });\n      }\n    });\n    if (plugin.hooks) {\n      const hooks = plugin.hooks();\n      Object.keys(hooks).forEach(hook => {\n        if (!_hooks[hook]) {\n          _hooks[hook] = [];\n        }\n        _hooks[hook].push(hooks[hook]);\n      });\n    }\n    if (plugin.provides) {\n      plugin.provides(providers);\n    }\n  });\n  return obj;\n}\nfunction chainHooks(hook, accumulator) {\n  for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n    args[_key - 2] = arguments[_key];\n  }\n  const hookFns = _hooks[hook] || [];\n  hookFns.forEach(hookFn => {\n    accumulator = hookFn.apply(null, [accumulator, ...args]); // eslint-disable-line no-useless-call\n  });\n  return accumulator;\n}\nfunction callHooks(hook) {\n  for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n    args[_key2 - 1] = arguments[_key2];\n  }\n  const hookFns = _hooks[hook] || [];\n  hookFns.forEach(hookFn => {\n    hookFn.apply(null, args);\n  });\n  return undefined;\n}\nfunction callProvided() {\n  const hook = arguments[0];\n  const args = Array.prototype.slice.call(arguments, 1);\n  return providers[hook] ? providers[hook].apply(null, args) : undefined;\n}\n\nfunction findIconDefinition(iconLookup) {\n  if (iconLookup.prefix === 'fa') {\n    iconLookup.prefix = 'fas';\n  }\n  let {\n    iconName\n  } = iconLookup;\n  const prefix = iconLookup.prefix || getDefaultUsablePrefix();\n  if (!iconName) return;\n  iconName = byAlias(prefix, iconName) || iconName;\n  return iconFromMapping(library.definitions, prefix, iconName) || iconFromMapping(namespace.styles, prefix, iconName);\n}\nconst library = new Library();\nconst noAuto = () => {\n  config.autoReplaceSvg = false;\n  config.observeMutations = false;\n  callHooks('noAuto');\n};\nconst dom = {\n  i2svg: function () {\n    let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    if (IS_DOM) {\n      callHooks('beforeI2svg', params);\n      callProvided('pseudoElements2svg', params);\n      return callProvided('i2svg', params);\n    } else {\n      return Promise.reject(new Error('Operation requires a DOM of some kind.'));\n    }\n  },\n  watch: function () {\n    let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    const {\n      autoReplaceSvgRoot\n    } = params;\n    if (config.autoReplaceSvg === false) {\n      config.autoReplaceSvg = true;\n    }\n    config.observeMutations = true;\n    domready(() => {\n      autoReplace({\n        autoReplaceSvgRoot\n      });\n      callHooks('watch', params);\n    });\n  }\n};\nconst parse = {\n  icon: icon => {\n    if (icon === null) {\n      return null;\n    }\n    if (typeof icon === 'object' && icon.prefix && icon.iconName) {\n      return {\n        prefix: icon.prefix,\n        iconName: byAlias(icon.prefix, icon.iconName) || icon.iconName\n      };\n    }\n    if (Array.isArray(icon) && icon.length === 2) {\n      const iconName = icon[1].indexOf('fa-') === 0 ? icon[1].slice(3) : icon[1];\n      const prefix = getCanonicalPrefix(icon[0]);\n      return {\n        prefix,\n        iconName: byAlias(prefix, iconName) || iconName\n      };\n    }\n    if (typeof icon === 'string' && (icon.indexOf(\"\".concat(config.cssPrefix, \"-\")) > -1 || icon.match(ICON_SELECTION_SYNTAX_PATTERN))) {\n      const canonicalIcon = getCanonicalIcon(icon.split(' '), {\n        skipLookups: true\n      });\n      return {\n        prefix: canonicalIcon.prefix || getDefaultUsablePrefix(),\n        iconName: byAlias(canonicalIcon.prefix, canonicalIcon.iconName) || canonicalIcon.iconName\n      };\n    }\n    if (typeof icon === 'string') {\n      const prefix = getDefaultUsablePrefix();\n      return {\n        prefix,\n        iconName: byAlias(prefix, icon) || icon\n      };\n    }\n  }\n};\nconst api = {\n  noAuto,\n  config,\n  dom,\n  parse,\n  library,\n  findIconDefinition,\n  toHtml\n};\nconst autoReplace = function () {\n  let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  const {\n    autoReplaceSvgRoot = DOCUMENT\n  } = params;\n  if ((Object.keys(namespace.styles).length > 0 || config.autoFetchSvg) && IS_DOM && config.autoReplaceSvg) api.dom.i2svg({\n    node: autoReplaceSvgRoot\n  });\n};\n\nfunction domVariants(val, abstractCreator) {\n  Object.defineProperty(val, 'abstract', {\n    get: abstractCreator\n  });\n  Object.defineProperty(val, 'html', {\n    get: function () {\n      return val.abstract.map(a => toHtml(a));\n    }\n  });\n  Object.defineProperty(val, 'node', {\n    get: function () {\n      if (!IS_DOM) return;\n      const container = DOCUMENT.createElement('div');\n      container.innerHTML = val.html;\n      return container.children;\n    }\n  });\n  return val;\n}\n\nfunction asIcon (_ref) {\n  let {\n    children,\n    main,\n    mask,\n    attributes,\n    styles,\n    transform\n  } = _ref;\n  if (transformIsMeaningful(transform) && main.found && !mask.found) {\n    const {\n      width,\n      height\n    } = main;\n    const offset = {\n      x: width / height / 2,\n      y: 0.5\n    };\n    attributes['style'] = joinStyles(_objectSpread2(_objectSpread2({}, styles), {}, {\n      'transform-origin': \"\".concat(offset.x + transform.x / 16, \"em \").concat(offset.y + transform.y / 16, \"em\")\n    }));\n  }\n  return [{\n    tag: 'svg',\n    attributes,\n    children\n  }];\n}\n\nfunction asSymbol (_ref) {\n  let {\n    prefix,\n    iconName,\n    children,\n    attributes,\n    symbol\n  } = _ref;\n  const id = symbol === true ? \"\".concat(prefix, \"-\").concat(config.cssPrefix, \"-\").concat(iconName) : symbol;\n  return [{\n    tag: 'svg',\n    attributes: {\n      style: 'display: none;'\n    },\n    children: [{\n      tag: 'symbol',\n      attributes: _objectSpread2(_objectSpread2({}, attributes), {}, {\n        id\n      }),\n      children\n    }]\n  }];\n}\n\nfunction makeInlineSvgAbstract(params) {\n  const {\n    icons: {\n      main,\n      mask\n    },\n    prefix,\n    iconName,\n    transform,\n    symbol,\n    title,\n    maskId,\n    titleId,\n    extra,\n    watchable = false\n  } = params;\n  const {\n    width,\n    height\n  } = mask.found ? mask : main;\n  const isUploadedIcon = Lt.includes(prefix);\n  const attrClass = [config.replacementClass, iconName ? \"\".concat(config.cssPrefix, \"-\").concat(iconName) : ''].filter(c$$1 => extra.classes.indexOf(c$$1) === -1).filter(c$$1 => c$$1 !== '' || !!c$$1).concat(extra.classes).join(' ');\n  let content = {\n    children: [],\n    attributes: _objectSpread2(_objectSpread2({}, extra.attributes), {}, {\n      'data-prefix': prefix,\n      'data-icon': iconName,\n      'class': attrClass,\n      'role': extra.attributes.role || 'img',\n      'xmlns': 'http://www.w3.org/2000/svg',\n      'viewBox': \"0 0 \".concat(width, \" \").concat(height)\n    })\n  };\n  const uploadedIconWidthStyle = isUploadedIcon && !~extra.classes.indexOf('fa-fw') ? {\n    width: \"\".concat(width / height * 16 * 0.0625, \"em\")\n  } : {};\n  if (watchable) {\n    content.attributes[DATA_FA_I2SVG] = '';\n  }\n  if (title) {\n    content.children.push({\n      tag: 'title',\n      attributes: {\n        id: content.attributes['aria-labelledby'] || \"title-\".concat(titleId || nextUniqueId())\n      },\n      children: [title]\n    });\n    delete content.attributes.title;\n  }\n  const args = _objectSpread2(_objectSpread2({}, content), {}, {\n    prefix,\n    iconName,\n    main,\n    mask,\n    maskId,\n    transform,\n    symbol,\n    styles: _objectSpread2(_objectSpread2({}, uploadedIconWidthStyle), extra.styles)\n  });\n  const {\n    children,\n    attributes\n  } = mask.found && main.found ? callProvided('generateAbstractMask', args) || {\n    children: [],\n    attributes: {}\n  } : callProvided('generateAbstractIcon', args) || {\n    children: [],\n    attributes: {}\n  };\n  args.children = children;\n  args.attributes = attributes;\n  if (symbol) {\n    return asSymbol(args);\n  } else {\n    return asIcon(args);\n  }\n}\nfunction makeLayersTextAbstract(params) {\n  const {\n    content,\n    width,\n    height,\n    transform,\n    title,\n    extra,\n    watchable = false\n  } = params;\n  const attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, extra.attributes), title ? {\n    'title': title\n  } : {}), {}, {\n    'class': extra.classes.join(' ')\n  });\n  if (watchable) {\n    attributes[DATA_FA_I2SVG] = '';\n  }\n  const styles = _objectSpread2({}, extra.styles);\n  if (transformIsMeaningful(transform)) {\n    styles['transform'] = transformForCss({\n      transform,\n      startCentered: true,\n      width,\n      height\n    });\n    styles['-webkit-transform'] = styles['transform'];\n  }\n  const styleString = joinStyles(styles);\n  if (styleString.length > 0) {\n    attributes['style'] = styleString;\n  }\n  const val = [];\n  val.push({\n    tag: 'span',\n    attributes,\n    children: [content]\n  });\n  if (title) {\n    val.push({\n      tag: 'span',\n      attributes: {\n        class: 'sr-only'\n      },\n      children: [title]\n    });\n  }\n  return val;\n}\nfunction makeLayersCounterAbstract(params) {\n  const {\n    content,\n    title,\n    extra\n  } = params;\n  const attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, extra.attributes), title ? {\n    'title': title\n  } : {}), {}, {\n    'class': extra.classes.join(' ')\n  });\n  const styleString = joinStyles(extra.styles);\n  if (styleString.length > 0) {\n    attributes['style'] = styleString;\n  }\n  const val = [];\n  val.push({\n    tag: 'span',\n    attributes,\n    children: [content]\n  });\n  if (title) {\n    val.push({\n      tag: 'span',\n      attributes: {\n        class: 'sr-only'\n      },\n      children: [title]\n    });\n  }\n  return val;\n}\n\nconst {\n  styles: styles$1\n} = namespace;\nfunction asFoundIcon(icon) {\n  const width = icon[0];\n  const height = icon[1];\n  const [vectorData] = icon.slice(4);\n  let element = null;\n  if (Array.isArray(vectorData)) {\n    element = {\n      tag: 'g',\n      attributes: {\n        class: \"\".concat(config.cssPrefix, \"-\").concat(DUOTONE_CLASSES.GROUP)\n      },\n      children: [{\n        tag: 'path',\n        attributes: {\n          class: \"\".concat(config.cssPrefix, \"-\").concat(DUOTONE_CLASSES.SECONDARY),\n          fill: 'currentColor',\n          d: vectorData[0]\n        }\n      }, {\n        tag: 'path',\n        attributes: {\n          class: \"\".concat(config.cssPrefix, \"-\").concat(DUOTONE_CLASSES.PRIMARY),\n          fill: 'currentColor',\n          d: vectorData[1]\n        }\n      }]\n    };\n  } else {\n    element = {\n      tag: 'path',\n      attributes: {\n        fill: 'currentColor',\n        d: vectorData\n      }\n    };\n  }\n  return {\n    found: true,\n    width,\n    height,\n    icon: element\n  };\n}\nconst missingIconResolutionMixin = {\n  found: false,\n  width: 512,\n  height: 512\n};\nfunction maybeNotifyMissing(iconName, prefix) {\n  if (!PRODUCTION && !config.showMissingIcons && iconName) {\n    console.error(\"Icon with name \\\"\".concat(iconName, \"\\\" and prefix \\\"\").concat(prefix, \"\\\" is missing.\"));\n  }\n}\nfunction findIcon(iconName, prefix) {\n  let givenPrefix = prefix;\n  if (prefix === 'fa' && config.styleDefault !== null) {\n    prefix = getDefaultUsablePrefix();\n  }\n  return new Promise((resolve, reject) => {\n    if (givenPrefix === 'fa') {\n      const shim = byOldName(iconName) || {};\n      iconName = shim.iconName || iconName;\n      prefix = shim.prefix || prefix;\n    }\n    if (iconName && prefix && styles$1[prefix] && styles$1[prefix][iconName]) {\n      const icon = styles$1[prefix][iconName];\n      return resolve(asFoundIcon(icon));\n    }\n    maybeNotifyMissing(iconName, prefix);\n    resolve(_objectSpread2(_objectSpread2({}, missingIconResolutionMixin), {}, {\n      icon: config.showMissingIcons && iconName ? callProvided('missingIconAbstract') || {} : {}\n    }));\n  });\n}\n\nconst noop$1 = () => {};\nconst p$2 = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : {\n  mark: noop$1,\n  measure: noop$1\n};\nconst preamble = \"FA \\\"6.7.2\\\"\";\nconst begin = name => {\n  p$2.mark(\"\".concat(preamble, \" \").concat(name, \" begins\"));\n  return () => end(name);\n};\nconst end = name => {\n  p$2.mark(\"\".concat(preamble, \" \").concat(name, \" ends\"));\n  p$2.measure(\"\".concat(preamble, \" \").concat(name), \"\".concat(preamble, \" \").concat(name, \" begins\"), \"\".concat(preamble, \" \").concat(name, \" ends\"));\n};\nvar perf = {\n  begin,\n  end\n};\n\nconst noop$2 = () => {};\nfunction isWatched(node) {\n  const i2svg = node.getAttribute ? node.getAttribute(DATA_FA_I2SVG) : null;\n  return typeof i2svg === 'string';\n}\nfunction hasPrefixAndIcon(node) {\n  const prefix = node.getAttribute ? node.getAttribute(DATA_PREFIX) : null;\n  const icon = node.getAttribute ? node.getAttribute(DATA_ICON) : null;\n  return prefix && icon;\n}\nfunction hasBeenReplaced(node) {\n  return node && node.classList && node.classList.contains && node.classList.contains(config.replacementClass);\n}\nfunction getMutator() {\n  if (config.autoReplaceSvg === true) {\n    return mutators.replace;\n  }\n  const mutator = mutators[config.autoReplaceSvg];\n  return mutator || mutators.replace;\n}\nfunction createElementNS(tag) {\n  return DOCUMENT.createElementNS('http://www.w3.org/2000/svg', tag);\n}\nfunction createElement(tag) {\n  return DOCUMENT.createElement(tag);\n}\nfunction convertSVG(abstractObj) {\n  let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  const {\n    ceFn = abstractObj.tag === 'svg' ? createElementNS : createElement\n  } = params;\n  if (typeof abstractObj === 'string') {\n    return DOCUMENT.createTextNode(abstractObj);\n  }\n  const tag = ceFn(abstractObj.tag);\n  Object.keys(abstractObj.attributes || []).forEach(function (key) {\n    tag.setAttribute(key, abstractObj.attributes[key]);\n  });\n  const children = abstractObj.children || [];\n  children.forEach(function (child) {\n    tag.appendChild(convertSVG(child, {\n      ceFn\n    }));\n  });\n  return tag;\n}\nfunction nodeAsComment(node) {\n  let comment = \" \".concat(node.outerHTML, \" \");\n  /* BEGIN.ATTRIBUTION */\n  comment = \"\".concat(comment, \"Font Awesome fontawesome.com \");\n  /* END.ATTRIBUTION */\n  return comment;\n}\nconst mutators = {\n  replace: function (mutation) {\n    const node = mutation[0];\n    if (node.parentNode) {\n      mutation[1].forEach(abstract => {\n        node.parentNode.insertBefore(convertSVG(abstract), node);\n      });\n      if (node.getAttribute(DATA_FA_I2SVG) === null && config.keepOriginalSource) {\n        let comment = DOCUMENT.createComment(nodeAsComment(node));\n        node.parentNode.replaceChild(comment, node);\n      } else {\n        node.remove();\n      }\n    }\n  },\n  nest: function (mutation) {\n    const node = mutation[0];\n    const abstract = mutation[1];\n\n    // If we already have a replaced node we do not want to continue nesting within it.\n    // Short-circuit to the standard replacement\n    if (~classArray(node).indexOf(config.replacementClass)) {\n      return mutators.replace(mutation);\n    }\n    const forSvg = new RegExp(\"\".concat(config.cssPrefix, \"-.*\"));\n    delete abstract[0].attributes.id;\n    if (abstract[0].attributes.class) {\n      const splitClasses = abstract[0].attributes.class.split(' ').reduce((acc, cls) => {\n        if (cls === config.replacementClass || cls.match(forSvg)) {\n          acc.toSvg.push(cls);\n        } else {\n          acc.toNode.push(cls);\n        }\n        return acc;\n      }, {\n        toNode: [],\n        toSvg: []\n      });\n      abstract[0].attributes.class = splitClasses.toSvg.join(' ');\n      if (splitClasses.toNode.length === 0) {\n        node.removeAttribute('class');\n      } else {\n        node.setAttribute('class', splitClasses.toNode.join(' '));\n      }\n    }\n    const newInnerHTML = abstract.map(a => toHtml(a)).join('\\n');\n    node.setAttribute(DATA_FA_I2SVG, '');\n    node.innerHTML = newInnerHTML;\n  }\n};\nfunction performOperationSync(op) {\n  op();\n}\nfunction perform(mutations, callback) {\n  const callbackFunction = typeof callback === 'function' ? callback : noop$2;\n  if (mutations.length === 0) {\n    callbackFunction();\n  } else {\n    let frame = performOperationSync;\n    if (config.mutateApproach === MUTATION_APPROACH_ASYNC) {\n      frame = WINDOW.requestAnimationFrame || performOperationSync;\n    }\n    frame(() => {\n      const mutator = getMutator();\n      const mark = perf.begin('mutate');\n      mutations.map(mutator);\n      mark();\n      callbackFunction();\n    });\n  }\n}\nlet disabled = false;\nfunction disableObservation() {\n  disabled = true;\n}\nfunction enableObservation() {\n  disabled = false;\n}\nlet mo = null;\nfunction observe(options) {\n  if (!MUTATION_OBSERVER) {\n    return;\n  }\n  if (!config.observeMutations) {\n    return;\n  }\n  const {\n    treeCallback = noop$2,\n    nodeCallback = noop$2,\n    pseudoElementsCallback = noop$2,\n    observeMutationsRoot = DOCUMENT\n  } = options;\n  mo = new MUTATION_OBSERVER(objects => {\n    if (disabled) return;\n    const defaultPrefix = getDefaultUsablePrefix();\n    toArray(objects).forEach(mutationRecord => {\n      if (mutationRecord.type === 'childList' && mutationRecord.addedNodes.length > 0 && !isWatched(mutationRecord.addedNodes[0])) {\n        if (config.searchPseudoElements) {\n          pseudoElementsCallback(mutationRecord.target);\n        }\n        treeCallback(mutationRecord.target);\n      }\n      if (mutationRecord.type === 'attributes' && mutationRecord.target.parentNode && config.searchPseudoElements) {\n        pseudoElementsCallback(mutationRecord.target.parentNode);\n      }\n      if (mutationRecord.type === 'attributes' && isWatched(mutationRecord.target) && ~ATTRIBUTES_WATCHED_FOR_MUTATION.indexOf(mutationRecord.attributeName)) {\n        if (mutationRecord.attributeName === 'class' && hasPrefixAndIcon(mutationRecord.target)) {\n          const {\n            prefix,\n            iconName\n          } = getCanonicalIcon(classArray(mutationRecord.target));\n          mutationRecord.target.setAttribute(DATA_PREFIX, prefix || defaultPrefix);\n          if (iconName) mutationRecord.target.setAttribute(DATA_ICON, iconName);\n        } else if (hasBeenReplaced(mutationRecord.target)) {\n          nodeCallback(mutationRecord.target);\n        }\n      }\n    });\n  });\n  if (!IS_DOM) return;\n  mo.observe(observeMutationsRoot, {\n    childList: true,\n    attributes: true,\n    characterData: true,\n    subtree: true\n  });\n}\nfunction disconnect() {\n  if (!mo) return;\n  mo.disconnect();\n}\n\nfunction styleParser (node) {\n  const style = node.getAttribute('style');\n  let val = [];\n  if (style) {\n    val = style.split(';').reduce((acc, style) => {\n      const styles = style.split(':');\n      const prop = styles[0];\n      const value = styles.slice(1);\n      if (prop && value.length > 0) {\n        acc[prop] = value.join(':').trim();\n      }\n      return acc;\n    }, {});\n  }\n  return val;\n}\n\nfunction classParser (node) {\n  const existingPrefix = node.getAttribute('data-prefix');\n  const existingIconName = node.getAttribute('data-icon');\n  const innerText = node.innerText !== undefined ? node.innerText.trim() : '';\n  let val = getCanonicalIcon(classArray(node));\n  if (!val.prefix) {\n    val.prefix = getDefaultUsablePrefix();\n  }\n  if (existingPrefix && existingIconName) {\n    val.prefix = existingPrefix;\n    val.iconName = existingIconName;\n  }\n  if (val.iconName && val.prefix) {\n    return val;\n  }\n  if (val.prefix && innerText.length > 0) {\n    val.iconName = byLigature(val.prefix, node.innerText) || byUnicode(val.prefix, toHex(node.innerText));\n  }\n  if (!val.iconName && config.autoFetchSvg && node.firstChild && node.firstChild.nodeType === Node.TEXT_NODE) {\n    val.iconName = node.firstChild.data;\n  }\n  return val;\n}\n\nfunction attributesParser (node) {\n  const extraAttributes = toArray(node.attributes).reduce((acc, attr) => {\n    if (acc.name !== 'class' && acc.name !== 'style') {\n      acc[attr.name] = attr.value;\n    }\n    return acc;\n  }, {});\n  const title = node.getAttribute('title');\n  const titleId = node.getAttribute('data-fa-title-id');\n  if (config.autoA11y) {\n    if (title) {\n      extraAttributes['aria-labelledby'] = \"\".concat(config.replacementClass, \"-title-\").concat(titleId || nextUniqueId());\n    } else {\n      extraAttributes['aria-hidden'] = 'true';\n      extraAttributes['focusable'] = 'false';\n    }\n  }\n  return extraAttributes;\n}\n\nfunction blankMeta() {\n  return {\n    iconName: null,\n    title: null,\n    titleId: null,\n    prefix: null,\n    transform: meaninglessTransform,\n    symbol: false,\n    mask: {\n      iconName: null,\n      prefix: null,\n      rest: []\n    },\n    maskId: null,\n    extra: {\n      classes: [],\n      styles: {},\n      attributes: {}\n    }\n  };\n}\nfunction parseMeta(node) {\n  let parser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n    styleParser: true\n  };\n  const {\n    iconName,\n    prefix,\n    rest: extraClasses\n  } = classParser(node);\n  const extraAttributes = attributesParser(node);\n  const pluginMeta = chainHooks('parseNodeAttributes', {}, node);\n  let extraStyles = parser.styleParser ? styleParser(node) : [];\n  return _objectSpread2({\n    iconName,\n    title: node.getAttribute('title'),\n    titleId: node.getAttribute('data-fa-title-id'),\n    prefix,\n    transform: meaninglessTransform,\n    mask: {\n      iconName: null,\n      prefix: null,\n      rest: []\n    },\n    maskId: null,\n    symbol: false,\n    extra: {\n      classes: extraClasses,\n      styles: extraStyles,\n      attributes: extraAttributes\n    }\n  }, pluginMeta);\n}\n\nconst {\n  styles: styles$2\n} = namespace;\nfunction generateMutation(node) {\n  const nodeMeta = config.autoReplaceSvg === 'nest' ? parseMeta(node, {\n    styleParser: false\n  }) : parseMeta(node);\n  if (~nodeMeta.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)) {\n    return callProvided('generateLayersText', node, nodeMeta);\n  } else {\n    return callProvided('generateSvgReplacementMutation', node, nodeMeta);\n  }\n}\nfunction getKnownPrefixes() {\n  return [...Ft, ...Ia];\n}\nfunction onTree(root) {\n  let callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n  if (!IS_DOM) return Promise.resolve();\n  const htmlClassList = DOCUMENT.documentElement.classList;\n  const hclAdd = suffix => htmlClassList.add(\"\".concat(HTML_CLASS_I2SVG_BASE_CLASS, \"-\").concat(suffix));\n  const hclRemove = suffix => htmlClassList.remove(\"\".concat(HTML_CLASS_I2SVG_BASE_CLASS, \"-\").concat(suffix));\n  const prefixes = config.autoFetchSvg ? getKnownPrefixes() : P.concat(Object.keys(styles$2));\n  if (!prefixes.includes('fa')) {\n    prefixes.push('fa');\n  }\n  const prefixesDomQuery = [\".\".concat(LAYERS_TEXT_CLASSNAME, \":not([\").concat(DATA_FA_I2SVG, \"])\")].concat(prefixes.map(p$$1 => \".\".concat(p$$1, \":not([\").concat(DATA_FA_I2SVG, \"])\"))).join(', ');\n  if (prefixesDomQuery.length === 0) {\n    return Promise.resolve();\n  }\n  let candidates = [];\n  try {\n    candidates = toArray(root.querySelectorAll(prefixesDomQuery));\n  } catch (e$$1) {\n    // noop\n  }\n  if (candidates.length > 0) {\n    hclAdd('pending');\n    hclRemove('complete');\n  } else {\n    return Promise.resolve();\n  }\n  const mark = perf.begin('onTree');\n  const mutations = candidates.reduce((acc, node) => {\n    try {\n      const mutation = generateMutation(node);\n      if (mutation) {\n        acc.push(mutation);\n      }\n    } catch (e$$1) {\n      if (!PRODUCTION) {\n        if (e$$1.name === 'MissingIcon') {\n          console.error(e$$1);\n        }\n      }\n    }\n    return acc;\n  }, []);\n  return new Promise((resolve, reject) => {\n    Promise.all(mutations).then(resolvedMutations => {\n      perform(resolvedMutations, () => {\n        hclAdd('active');\n        hclAdd('complete');\n        hclRemove('pending');\n        if (typeof callback === 'function') callback();\n        mark();\n        resolve();\n      });\n    }).catch(e$$1 => {\n      mark();\n      reject(e$$1);\n    });\n  });\n}\nfunction onNode(node) {\n  let callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n  generateMutation(node).then(mutation => {\n    if (mutation) {\n      perform([mutation], callback);\n    }\n  });\n}\nfunction resolveIcons(next) {\n  return function (maybeIconDefinition) {\n    let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    const iconDefinition = (maybeIconDefinition || {}).icon ? maybeIconDefinition : findIconDefinition(maybeIconDefinition || {});\n    let {\n      mask\n    } = params;\n    if (mask) {\n      mask = (mask || {}).icon ? mask : findIconDefinition(mask || {});\n    }\n    return next(iconDefinition, _objectSpread2(_objectSpread2({}, params), {}, {\n      mask\n    }));\n  };\n}\nconst render = function (iconDefinition) {\n  let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  const {\n    transform = meaninglessTransform,\n    symbol = false,\n    mask = null,\n    maskId = null,\n    title = null,\n    titleId = null,\n    classes = [],\n    attributes = {},\n    styles = {}\n  } = params;\n  if (!iconDefinition) return;\n  const {\n    prefix,\n    iconName,\n    icon\n  } = iconDefinition;\n  return domVariants(_objectSpread2({\n    type: 'icon'\n  }, iconDefinition), () => {\n    callHooks('beforeDOMElementCreation', {\n      iconDefinition,\n      params\n    });\n    if (config.autoA11y) {\n      if (title) {\n        attributes['aria-labelledby'] = \"\".concat(config.replacementClass, \"-title-\").concat(titleId || nextUniqueId());\n      } else {\n        attributes['aria-hidden'] = 'true';\n        attributes['focusable'] = 'false';\n      }\n    }\n    return makeInlineSvgAbstract({\n      icons: {\n        main: asFoundIcon(icon),\n        mask: mask ? asFoundIcon(mask.icon) : {\n          found: false,\n          width: null,\n          height: null,\n          icon: {}\n        }\n      },\n      prefix,\n      iconName,\n      transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform),\n      symbol,\n      title,\n      maskId,\n      titleId,\n      extra: {\n        attributes,\n        styles,\n        classes\n      }\n    });\n  });\n};\nvar ReplaceElements = {\n  mixout() {\n    return {\n      icon: resolveIcons(render)\n    };\n  },\n  hooks() {\n    return {\n      mutationObserverCallbacks(accumulator) {\n        accumulator.treeCallback = onTree;\n        accumulator.nodeCallback = onNode;\n        return accumulator;\n      }\n    };\n  },\n  provides(providers$$1) {\n    providers$$1.i2svg = function (params) {\n      const {\n        node = DOCUMENT,\n        callback = () => {}\n      } = params;\n      return onTree(node, callback);\n    };\n    providers$$1.generateSvgReplacementMutation = function (node, nodeMeta) {\n      const {\n        iconName,\n        title,\n        titleId,\n        prefix,\n        transform,\n        symbol,\n        mask,\n        maskId,\n        extra\n      } = nodeMeta;\n      return new Promise((resolve, reject) => {\n        Promise.all([findIcon(iconName, prefix), mask.iconName ? findIcon(mask.iconName, mask.prefix) : Promise.resolve({\n          found: false,\n          width: 512,\n          height: 512,\n          icon: {}\n        })]).then(_ref => {\n          let [main, mask] = _ref;\n          resolve([node, makeInlineSvgAbstract({\n            icons: {\n              main,\n              mask\n            },\n            prefix,\n            iconName,\n            transform,\n            symbol,\n            maskId,\n            title,\n            titleId,\n            extra,\n            watchable: true\n          })]);\n        }).catch(reject);\n      });\n    };\n    providers$$1.generateAbstractIcon = function (_ref2) {\n      let {\n        children,\n        attributes,\n        main,\n        transform,\n        styles\n      } = _ref2;\n      const styleString = joinStyles(styles);\n      if (styleString.length > 0) {\n        attributes['style'] = styleString;\n      }\n      let nextChild;\n      if (transformIsMeaningful(transform)) {\n        nextChild = callProvided('generateAbstractTransformGrouping', {\n          main,\n          transform,\n          containerWidth: main.width,\n          iconWidth: main.width\n        });\n      }\n      children.push(nextChild || main.icon);\n      return {\n        children,\n        attributes\n      };\n    };\n  }\n};\n\nvar Layers = {\n  mixout() {\n    return {\n      layer(assembler) {\n        let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n        const {\n          classes = []\n        } = params;\n        return domVariants({\n          type: 'layer'\n        }, () => {\n          callHooks('beforeDOMElementCreation', {\n            assembler,\n            params\n          });\n          let children = [];\n          assembler(args => {\n            Array.isArray(args) ? args.map(a => {\n              children = children.concat(a.abstract);\n            }) : children = children.concat(args.abstract);\n          });\n          return [{\n            tag: 'span',\n            attributes: {\n              class: [\"\".concat(config.cssPrefix, \"-layers\"), ...classes].join(' ')\n            },\n            children\n          }];\n        });\n      }\n    };\n  }\n};\n\nvar LayersCounter = {\n  mixout() {\n    return {\n      counter(content) {\n        let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n        const {\n          title = null,\n          classes = [],\n          attributes = {},\n          styles = {}\n        } = params;\n        return domVariants({\n          type: 'counter',\n          content\n        }, () => {\n          callHooks('beforeDOMElementCreation', {\n            content,\n            params\n          });\n          return makeLayersCounterAbstract({\n            content: content.toString(),\n            title,\n            extra: {\n              attributes,\n              styles,\n              classes: [\"\".concat(config.cssPrefix, \"-layers-counter\"), ...classes]\n            }\n          });\n        });\n      }\n    };\n  }\n};\n\nvar LayersText = {\n  mixout() {\n    return {\n      text(content) {\n        let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n        const {\n          transform = meaninglessTransform,\n          title = null,\n          classes = [],\n          attributes = {},\n          styles = {}\n        } = params;\n        return domVariants({\n          type: 'text',\n          content\n        }, () => {\n          callHooks('beforeDOMElementCreation', {\n            content,\n            params\n          });\n          return makeLayersTextAbstract({\n            content,\n            transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform),\n            title,\n            extra: {\n              attributes,\n              styles,\n              classes: [\"\".concat(config.cssPrefix, \"-layers-text\"), ...classes]\n            }\n          });\n        });\n      }\n    };\n  },\n  provides(providers$$1) {\n    providers$$1.generateLayersText = function (node, nodeMeta) {\n      const {\n        title,\n        transform,\n        extra\n      } = nodeMeta;\n      let width = null;\n      let height = null;\n      if (IS_IE) {\n        const computedFontSize = parseInt(getComputedStyle(node).fontSize, 10);\n        const boundingClientRect = node.getBoundingClientRect();\n        width = boundingClientRect.width / computedFontSize;\n        height = boundingClientRect.height / computedFontSize;\n      }\n      if (config.autoA11y && !title) {\n        extra.attributes['aria-hidden'] = 'true';\n      }\n      return Promise.resolve([node, makeLayersTextAbstract({\n        content: node.innerHTML,\n        width,\n        height,\n        transform,\n        title,\n        extra,\n        watchable: true\n      })]);\n    };\n  }\n};\n\nconst CLEAN_CONTENT_PATTERN = new RegExp('\\u{22}', 'ug');\nconst SECONDARY_UNICODE_RANGE = [1105920, 1112319];\nconst _FONT_FAMILY_WEIGHT_TO_PREFIX = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, {\n  FontAwesome: {\n    normal: 'fas',\n    400: 'fas'\n  }\n}), lt), wa), Yt);\nconst FONT_FAMILY_WEIGHT_TO_PREFIX = Object.keys(_FONT_FAMILY_WEIGHT_TO_PREFIX).reduce((acc, key) => {\n  acc[key.toLowerCase()] = _FONT_FAMILY_WEIGHT_TO_PREFIX[key];\n  return acc;\n}, {});\nconst FONT_FAMILY_WEIGHT_FALLBACK = Object.keys(FONT_FAMILY_WEIGHT_TO_PREFIX).reduce((acc, fontFamily) => {\n  const weights = FONT_FAMILY_WEIGHT_TO_PREFIX[fontFamily];\n  acc[fontFamily] = weights[900] || [...Object.entries(weights)][0][1];\n  return acc;\n}, {});\nfunction hexValueFromContent(content) {\n  const cleaned = content.replace(CLEAN_CONTENT_PATTERN, '');\n  const codePoint = codePointAt(cleaned, 0);\n  const isPrependTen = codePoint >= SECONDARY_UNICODE_RANGE[0] && codePoint <= SECONDARY_UNICODE_RANGE[1];\n  const isDoubled = cleaned.length === 2 ? cleaned[0] === cleaned[1] : false;\n  return {\n    value: isDoubled ? toHex(cleaned[0]) : toHex(cleaned),\n    isSecondary: isPrependTen || isDoubled\n  };\n}\nfunction getPrefix(fontFamily, fontWeight) {\n  const fontFamilySanitized = fontFamily.replace(/^['\"]|['\"]$/g, '').toLowerCase();\n  const fontWeightInteger = parseInt(fontWeight);\n  const fontWeightSanitized = isNaN(fontWeightInteger) ? 'normal' : fontWeightInteger;\n  return (FONT_FAMILY_WEIGHT_TO_PREFIX[fontFamilySanitized] || {})[fontWeightSanitized] || FONT_FAMILY_WEIGHT_FALLBACK[fontFamilySanitized];\n}\nfunction replaceForPosition(node, position) {\n  const pendingAttribute = \"\".concat(DATA_FA_PSEUDO_ELEMENT_PENDING).concat(position.replace(':', '-'));\n  return new Promise((resolve, reject) => {\n    if (node.getAttribute(pendingAttribute) !== null) {\n      // This node is already being processed\n      return resolve();\n    }\n    const children = toArray(node.children);\n    const alreadyProcessedPseudoElement = children.filter(c$$1 => c$$1.getAttribute(DATA_FA_PSEUDO_ELEMENT) === position)[0];\n    const styles = WINDOW.getComputedStyle(node, position);\n    const fontFamily = styles.getPropertyValue('font-family');\n    const fontFamilyMatch = fontFamily.match(FONT_FAMILY_PATTERN);\n    const fontWeight = styles.getPropertyValue('font-weight');\n    const content = styles.getPropertyValue('content');\n    if (alreadyProcessedPseudoElement && !fontFamilyMatch) {\n      // If we've already processed it but the current computed style does not result in a font-family,\n      // that probably means that a class name that was previously present to make the icon has been\n      // removed. So we now should delete the icon.\n      node.removeChild(alreadyProcessedPseudoElement);\n      return resolve();\n    } else if (fontFamilyMatch && content !== 'none' && content !== '') {\n      const content = styles.getPropertyValue('content');\n      let prefix = getPrefix(fontFamily, fontWeight);\n      const {\n        value: hexValue,\n        isSecondary\n      } = hexValueFromContent(content);\n      const isV4 = fontFamilyMatch[0].startsWith('FontAwesome');\n      let iconName = byUnicode(prefix, hexValue);\n      let iconIdentifier = iconName;\n      if (isV4) {\n        const iconName4 = byOldUnicode(hexValue);\n        if (iconName4.iconName && iconName4.prefix) {\n          iconName = iconName4.iconName;\n          prefix = iconName4.prefix;\n        }\n      }\n\n      // Only convert the pseudo element in this ::before/::after position into an icon if we haven't\n      // already done so with the same prefix and iconName\n      if (iconName && !isSecondary && (!alreadyProcessedPseudoElement || alreadyProcessedPseudoElement.getAttribute(DATA_PREFIX) !== prefix || alreadyProcessedPseudoElement.getAttribute(DATA_ICON) !== iconIdentifier)) {\n        node.setAttribute(pendingAttribute, iconIdentifier);\n        if (alreadyProcessedPseudoElement) {\n          // Delete the old one, since we're replacing it with a new one\n          node.removeChild(alreadyProcessedPseudoElement);\n        }\n        const meta = blankMeta();\n        const {\n          extra\n        } = meta;\n        extra.attributes[DATA_FA_PSEUDO_ELEMENT] = position;\n        findIcon(iconName, prefix).then(main => {\n          const abstract = makeInlineSvgAbstract(_objectSpread2(_objectSpread2({}, meta), {}, {\n            icons: {\n              main,\n              mask: emptyCanonicalIcon()\n            },\n            prefix,\n            iconName: iconIdentifier,\n            extra,\n            watchable: true\n          }));\n          const element = DOCUMENT.createElementNS('http://www.w3.org/2000/svg', 'svg');\n          if (position === '::before') {\n            node.insertBefore(element, node.firstChild);\n          } else {\n            node.appendChild(element);\n          }\n          element.outerHTML = abstract.map(a$$1 => toHtml(a$$1)).join('\\n');\n          node.removeAttribute(pendingAttribute);\n          resolve();\n        }).catch(reject);\n      } else {\n        resolve();\n      }\n    } else {\n      resolve();\n    }\n  });\n}\nfunction replace(node) {\n  return Promise.all([replaceForPosition(node, '::before'), replaceForPosition(node, '::after')]);\n}\nfunction processable(node) {\n  return node.parentNode !== document.head && !~TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS.indexOf(node.tagName.toUpperCase()) && !node.getAttribute(DATA_FA_PSEUDO_ELEMENT) && (!node.parentNode || node.parentNode.tagName !== 'svg');\n}\nfunction searchPseudoElements(root) {\n  if (!IS_DOM) return;\n  return new Promise((resolve, reject) => {\n    const operations = toArray(root.querySelectorAll('*')).filter(processable).map(replace);\n    const end = perf.begin('searchPseudoElements');\n    disableObservation();\n    Promise.all(operations).then(() => {\n      end();\n      enableObservation();\n      resolve();\n    }).catch(() => {\n      end();\n      enableObservation();\n      reject();\n    });\n  });\n}\nvar PseudoElements = {\n  hooks() {\n    return {\n      mutationObserverCallbacks(accumulator) {\n        accumulator.pseudoElementsCallback = searchPseudoElements;\n        return accumulator;\n      }\n    };\n  },\n  provides(providers) {\n    providers.pseudoElements2svg = function (params) {\n      const {\n        node = DOCUMENT\n      } = params;\n      if (config.searchPseudoElements) {\n        searchPseudoElements(node);\n      }\n    };\n  }\n};\n\nlet _unwatched = false;\nvar MutationObserver$1 = {\n  mixout() {\n    return {\n      dom: {\n        unwatch() {\n          disableObservation();\n          _unwatched = true;\n        }\n      }\n    };\n  },\n  hooks() {\n    return {\n      bootstrap() {\n        observe(chainHooks('mutationObserverCallbacks', {}));\n      },\n      noAuto() {\n        disconnect();\n      },\n      watch(params) {\n        const {\n          observeMutationsRoot\n        } = params;\n        if (_unwatched) {\n          enableObservation();\n        } else {\n          observe(chainHooks('mutationObserverCallbacks', {\n            observeMutationsRoot\n          }));\n        }\n      }\n    };\n  }\n};\n\nconst parseTransformString = transformString => {\n  let transform = {\n    size: 16,\n    x: 0,\n    y: 0,\n    flipX: false,\n    flipY: false,\n    rotate: 0\n  };\n  return transformString.toLowerCase().split(' ').reduce((acc, n) => {\n    const parts = n.toLowerCase().split('-');\n    const first = parts[0];\n    let rest = parts.slice(1).join('-');\n    if (first && rest === 'h') {\n      acc.flipX = true;\n      return acc;\n    }\n    if (first && rest === 'v') {\n      acc.flipY = true;\n      return acc;\n    }\n    rest = parseFloat(rest);\n    if (isNaN(rest)) {\n      return acc;\n    }\n    switch (first) {\n      case 'grow':\n        acc.size = acc.size + rest;\n        break;\n      case 'shrink':\n        acc.size = acc.size - rest;\n        break;\n      case 'left':\n        acc.x = acc.x - rest;\n        break;\n      case 'right':\n        acc.x = acc.x + rest;\n        break;\n      case 'up':\n        acc.y = acc.y - rest;\n        break;\n      case 'down':\n        acc.y = acc.y + rest;\n        break;\n      case 'rotate':\n        acc.rotate = acc.rotate + rest;\n        break;\n    }\n    return acc;\n  }, transform);\n};\nvar PowerTransforms = {\n  mixout() {\n    return {\n      parse: {\n        transform: transformString => {\n          return parseTransformString(transformString);\n        }\n      }\n    };\n  },\n  hooks() {\n    return {\n      parseNodeAttributes(accumulator, node) {\n        const transformString = node.getAttribute('data-fa-transform');\n        if (transformString) {\n          accumulator.transform = parseTransformString(transformString);\n        }\n        return accumulator;\n      }\n    };\n  },\n  provides(providers) {\n    providers.generateAbstractTransformGrouping = function (_ref) {\n      let {\n        main,\n        transform,\n        containerWidth,\n        iconWidth\n      } = _ref;\n      const outer = {\n        transform: \"translate(\".concat(containerWidth / 2, \" 256)\")\n      };\n      const innerTranslate = \"translate(\".concat(transform.x * 32, \", \").concat(transform.y * 32, \") \");\n      const innerScale = \"scale(\".concat(transform.size / 16 * (transform.flipX ? -1 : 1), \", \").concat(transform.size / 16 * (transform.flipY ? -1 : 1), \") \");\n      const innerRotate = \"rotate(\".concat(transform.rotate, \" 0 0)\");\n      const inner = {\n        transform: \"\".concat(innerTranslate, \" \").concat(innerScale, \" \").concat(innerRotate)\n      };\n      const path = {\n        transform: \"translate(\".concat(iconWidth / 2 * -1, \" -256)\")\n      };\n      const operations = {\n        outer,\n        inner,\n        path\n      };\n      return {\n        tag: 'g',\n        attributes: _objectSpread2({}, operations.outer),\n        children: [{\n          tag: 'g',\n          attributes: _objectSpread2({}, operations.inner),\n          children: [{\n            tag: main.icon.tag,\n            children: main.icon.children,\n            attributes: _objectSpread2(_objectSpread2({}, main.icon.attributes), operations.path)\n          }]\n        }]\n      };\n    };\n  }\n};\n\nconst ALL_SPACE = {\n  x: 0,\n  y: 0,\n  width: '100%',\n  height: '100%'\n};\nfunction fillBlack(abstract) {\n  let force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n  if (abstract.attributes && (abstract.attributes.fill || force)) {\n    abstract.attributes.fill = 'black';\n  }\n  return abstract;\n}\nfunction deGroup(abstract) {\n  if (abstract.tag === 'g') {\n    return abstract.children;\n  } else {\n    return [abstract];\n  }\n}\nvar Masks = {\n  hooks() {\n    return {\n      parseNodeAttributes(accumulator, node) {\n        const maskData = node.getAttribute('data-fa-mask');\n        const mask = !maskData ? emptyCanonicalIcon() : getCanonicalIcon(maskData.split(' ').map(i => i.trim()));\n        if (!mask.prefix) {\n          mask.prefix = getDefaultUsablePrefix();\n        }\n        accumulator.mask = mask;\n        accumulator.maskId = node.getAttribute('data-fa-mask-id');\n        return accumulator;\n      }\n    };\n  },\n  provides(providers) {\n    providers.generateAbstractMask = function (_ref) {\n      let {\n        children,\n        attributes,\n        main,\n        mask,\n        maskId: explicitMaskId,\n        transform\n      } = _ref;\n      const {\n        width: mainWidth,\n        icon: mainPath\n      } = main;\n      const {\n        width: maskWidth,\n        icon: maskPath\n      } = mask;\n      const trans = transformForSvg({\n        transform,\n        containerWidth: maskWidth,\n        iconWidth: mainWidth\n      });\n      const maskRect = {\n        tag: 'rect',\n        attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, {\n          fill: 'white'\n        })\n      };\n      const maskInnerGroupChildrenMixin = mainPath.children ? {\n        children: mainPath.children.map(fillBlack)\n      } : {};\n      const maskInnerGroup = {\n        tag: 'g',\n        attributes: _objectSpread2({}, trans.inner),\n        children: [fillBlack(_objectSpread2({\n          tag: mainPath.tag,\n          attributes: _objectSpread2(_objectSpread2({}, mainPath.attributes), trans.path)\n        }, maskInnerGroupChildrenMixin))]\n      };\n      const maskOuterGroup = {\n        tag: 'g',\n        attributes: _objectSpread2({}, trans.outer),\n        children: [maskInnerGroup]\n      };\n      const maskId = \"mask-\".concat(explicitMaskId || nextUniqueId());\n      const clipId = \"clip-\".concat(explicitMaskId || nextUniqueId());\n      const maskTag = {\n        tag: 'mask',\n        attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, {\n          id: maskId,\n          maskUnits: 'userSpaceOnUse',\n          maskContentUnits: 'userSpaceOnUse'\n        }),\n        children: [maskRect, maskOuterGroup]\n      };\n      const defs = {\n        tag: 'defs',\n        children: [{\n          tag: 'clipPath',\n          attributes: {\n            id: clipId\n          },\n          children: deGroup(maskPath)\n        }, maskTag]\n      };\n      children.push(defs, {\n        tag: 'rect',\n        attributes: _objectSpread2({\n          fill: 'currentColor',\n          'clip-path': \"url(#\".concat(clipId, \")\"),\n          mask: \"url(#\".concat(maskId, \")\")\n        }, ALL_SPACE)\n      });\n      return {\n        children,\n        attributes\n      };\n    };\n  }\n};\n\nvar MissingIconIndicator = {\n  provides(providers) {\n    let reduceMotion = false;\n    if (WINDOW.matchMedia) {\n      reduceMotion = WINDOW.matchMedia('(prefers-reduced-motion: reduce)').matches;\n    }\n    providers.missingIconAbstract = function () {\n      const gChildren = [];\n      const FILL = {\n        fill: 'currentColor'\n      };\n      const ANIMATION_BASE = {\n        attributeType: 'XML',\n        repeatCount: 'indefinite',\n        dur: '2s'\n      };\n\n      // Ring\n      gChildren.push({\n        tag: 'path',\n        attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {\n          d: 'M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z'\n        })\n      });\n      const OPACITY_ANIMATE = _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, {\n        attributeName: 'opacity'\n      });\n      const dot = {\n        tag: 'circle',\n        attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {\n          cx: '256',\n          cy: '364',\n          r: '28'\n        }),\n        children: []\n      };\n      if (!reduceMotion) {\n        dot.children.push({\n          tag: 'animate',\n          attributes: _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, {\n            attributeName: 'r',\n            values: '28;14;28;28;14;28;'\n          })\n        }, {\n          tag: 'animate',\n          attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {\n            values: '1;0;1;1;0;1;'\n          })\n        });\n      }\n      gChildren.push(dot);\n      gChildren.push({\n        tag: 'path',\n        attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {\n          opacity: '1',\n          d: 'M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z'\n        }),\n        children: reduceMotion ? [] : [{\n          tag: 'animate',\n          attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {\n            values: '1;0;0;0;0;1;'\n          })\n        }]\n      });\n      if (!reduceMotion) {\n        // Exclamation\n        gChildren.push({\n          tag: 'path',\n          attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {\n            opacity: '0',\n            d: 'M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z'\n          }),\n          children: [{\n            tag: 'animate',\n            attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {\n              values: '0;0;1;1;0;0;'\n            })\n          }]\n        });\n      }\n      return {\n        tag: 'g',\n        attributes: {\n          'class': 'missing'\n        },\n        children: gChildren\n      };\n    };\n  }\n};\n\nvar SvgSymbols = {\n  hooks() {\n    return {\n      parseNodeAttributes(accumulator, node) {\n        const symbolData = node.getAttribute('data-fa-symbol');\n        const symbol = symbolData === null ? false : symbolData === '' ? true : symbolData;\n        accumulator['symbol'] = symbol;\n        return accumulator;\n      }\n    };\n  }\n};\n\nvar plugins = [InjectCSS, ReplaceElements, Layers, LayersCounter, LayersText, PseudoElements, MutationObserver$1, PowerTransforms, Masks, MissingIconIndicator, SvgSymbols];\n\nregisterPlugins(plugins, {\n  mixoutsTo: api\n});\nconst noAuto$1 = api.noAuto;\nconst config$1 = api.config;\nconst library$1 = api.library;\nconst dom$1 = api.dom;\nconst parse$1 = api.parse;\nconst findIconDefinition$1 = api.findIconDefinition;\nconst toHtml$1 = api.toHtml;\nconst icon = api.icon;\nconst layer = api.layer;\nconst text = api.text;\nconst counter = api.counter;\n\nexport { noAuto$1 as noAuto, config$1 as config, library$1 as library, dom$1 as dom, parse$1 as parse, findIconDefinition$1 as findIconDefinition, toHtml$1 as toHtml, icon, layer, text, counter, api };\n","var RELEASE_TRAIN = 'basil';\n\nvar runtimeVersionToUrlVersion = function runtimeVersionToUrlVersion(version) {\n  return version === 3 ? 'v3' : version;\n};\n\nvar ORIGIN = 'https://js.stripe.com';\nvar STRIPE_JS_URL = \"\".concat(ORIGIN, \"/\").concat(RELEASE_TRAIN, \"/stripe.js\");\nvar V3_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/v3\\/?(\\?.*)?$/;\nvar STRIPE_JS_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/(v3|[a-z]+)\\/stripe\\.js(\\?.*)?$/;\nvar EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';\n\nvar isStripeJSURL = function isStripeJSURL(url) {\n  return V3_URL_REGEX.test(url) || STRIPE_JS_URL_REGEX.test(url);\n};\n\nvar findScript = function findScript() {\n  var scripts = document.querySelectorAll(\"script[src^=\\\"\".concat(ORIGIN, \"\\\"]\"));\n\n  for (var i = 0; i < scripts.length; i++) {\n    var script = scripts[i];\n\n    if (!isStripeJSURL(script.src)) {\n      continue;\n    }\n\n    return script;\n  }\n\n  return null;\n};\n\nvar injectScript = function injectScript(params) {\n  var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';\n  var script = document.createElement('script');\n  script.src = \"\".concat(STRIPE_JS_URL).concat(queryString);\n  var headOrBody = document.head || document.body;\n\n  if (!headOrBody) {\n    throw new Error('Expected document.body not to be null. Stripe.js requires a <body> element.');\n  }\n\n  headOrBody.appendChild(script);\n  return script;\n};\n\nvar registerWrapper = function registerWrapper(stripe, startTime) {\n  if (!stripe || !stripe._registerWrapper) {\n    return;\n  }\n\n  stripe._registerWrapper({\n    name: 'stripe-js',\n    version: \"7.3.1\",\n    startTime: startTime\n  });\n};\n\nvar stripePromise$1 = null;\nvar onErrorListener = null;\nvar onLoadListener = null;\n\nvar onError = function onError(reject) {\n  return function (cause) {\n    reject(new Error('Failed to load Stripe.js', {\n      cause: cause\n    }));\n  };\n};\n\nvar onLoad = function onLoad(resolve, reject) {\n  return function () {\n    if (window.Stripe) {\n      resolve(window.Stripe);\n    } else {\n      reject(new Error('Stripe.js not available'));\n    }\n  };\n};\n\nvar loadScript = function loadScript(params) {\n  // Ensure that we only attempt to load Stripe.js at most once\n  if (stripePromise$1 !== null) {\n    return stripePromise$1;\n  }\n\n  stripePromise$1 = new Promise(function (resolve, reject) {\n    if (typeof window === 'undefined' || typeof document === 'undefined') {\n      // Resolve to null when imported server side. This makes the module\n      // safe to import in an isomorphic code base.\n      resolve(null);\n      return;\n    }\n\n    if (window.Stripe && params) {\n      console.warn(EXISTING_SCRIPT_MESSAGE);\n    }\n\n    if (window.Stripe) {\n      resolve(window.Stripe);\n      return;\n    }\n\n    try {\n      var script = findScript();\n\n      if (script && params) {\n        console.warn(EXISTING_SCRIPT_MESSAGE);\n      } else if (!script) {\n        script = injectScript(params);\n      } else if (script && onLoadListener !== null && onErrorListener !== null) {\n        var _script$parentNode;\n\n        // remove event listeners\n        script.removeEventListener('load', onLoadListener);\n        script.removeEventListener('error', onErrorListener); // if script exists, but we are reloading due to an error,\n        // reload script to trigger 'load' event\n\n        (_script$parentNode = script.parentNode) === null || _script$parentNode === void 0 ? void 0 : _script$parentNode.removeChild(script);\n        script = injectScript(params);\n      }\n\n      onLoadListener = onLoad(resolve, reject);\n      onErrorListener = onError(reject);\n      script.addEventListener('load', onLoadListener);\n      script.addEventListener('error', onErrorListener);\n    } catch (error) {\n      reject(error);\n      return;\n    }\n  }); // Resets stripePromise on error\n\n  return stripePromise$1[\"catch\"](function (error) {\n    stripePromise$1 = null;\n    return Promise.reject(error);\n  });\n};\nvar initStripe = function initStripe(maybeStripe, args, startTime) {\n  if (maybeStripe === null) {\n    return null;\n  }\n\n  var pk = args[0];\n  var isTestKey = pk.match(/^pk_test/); // @ts-expect-error this is not publicly typed\n\n  var version = runtimeVersionToUrlVersion(maybeStripe.version);\n  var expectedVersion = RELEASE_TRAIN;\n\n  if (isTestKey && version !== expectedVersion) {\n    console.warn(\"Stripe.js@\".concat(version, \" was loaded on the page, but @stripe/stripe-js@\").concat(\"7.3.1\", \" expected Stripe.js@\").concat(expectedVersion, \". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning\"));\n  }\n\n  var stripe = maybeStripe.apply(undefined, args);\n  registerWrapper(stripe, startTime);\n  return stripe;\n}; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nvar stripePromise;\nvar loadCalled = false;\n\nvar getStripePromise = function getStripePromise() {\n  if (stripePromise) {\n    return stripePromise;\n  }\n\n  stripePromise = loadScript(null)[\"catch\"](function (error) {\n    // clear cache on error\n    stripePromise = null;\n    return Promise.reject(error);\n  });\n  return stripePromise;\n}; // Execute our own script injection after a tick to give users time to do their\n// own script injection.\n\n\nPromise.resolve().then(function () {\n  return getStripePromise();\n})[\"catch\"](function (error) {\n  if (!loadCalled) {\n    console.warn(error);\n  }\n});\nvar loadStripe = function loadStripe() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n\n  loadCalled = true;\n  var startTime = Date.now(); // if previous attempts are unsuccessful, will re-load script\n\n  return getStripePromise().then(function (maybeStripe) {\n    return initStripe(maybeStripe, args, startTime);\n  });\n};\n\nexport { loadStripe };\n","// src/utils.ts\nfunction isString(input) {\n  return typeof input === \"string\";\n}\nfunction isObject(input) {\n  return typeof input === \"object\" && input?.constructor === Object;\n}\nfunction isArray(input) {\n  return Array.isArray(input);\n}\nfunction Lowercase(str) {\n  return str.toLowerCase();\n}\nfunction Uppercase(str) {\n  return str.toUpperCase();\n}\nfunction Capitalize(str) {\n  return str.charAt(0).toUpperCase() + str.slice(1);\n}\nfunction Uncapitalize(str) {\n  return str.charAt(0).toLowerCase() + str.slice(1);\n}\n\n// src/parser/stringParser.ts\nvar CamelToDash = (str) => str.replace(/([A-Z])/g, (g) => \"-\" + g[0].toLowerCase());\nvar CamelToPascal = (str) => Capitalize(str);\nvar CamelToSnake = (str) => str.replace(/([A-Z])/g, (g) => \"_\" + g[0].toLowerCase());\nvar CamelToUpperDash = (str) => Uppercase(CamelToDash(str));\nvar CamelToUpperSnake = (str) => Uppercase(CamelToSnake(str));\nvar DashToCamel = (str) => str.replace(/(\\-\\w)/g, (g) => g[1].toUpperCase());\nvar DashToPascal = (str) => Capitalize(DashToCamel(str));\nvar DashToSnake = (str) => str.replace(/(\\-)/g, \"_\");\nvar DashToUpperDash = (str) => Uppercase(str);\nvar DashToUpperSnake = (str) => Uppercase(DashToSnake(str));\nvar PascalToCamel = (str) => Uncapitalize(str);\nvar PascalToDash = (str) => CamelToDash(Uncapitalize(str));\nvar PascalToSnake = (str) => CamelToSnake(Uncapitalize(str));\nvar PascalToUpperDash = (str) => Uppercase(PascalToDash(str));\nvar PascalToUpperSnake = (str) => Uppercase(PascalToSnake(str));\nvar SnakeToCamel = (str) => str.replace(/(\\_\\w)/g, (g) => g[1].toUpperCase());\nvar SnakeToDash = (str) => str.replace(/(\\_)/g, \"-\");\nvar SnakeToPascal = (str) => Capitalize(SnakeToCamel(str));\nvar SnakeToUpperDash = (str) => Uppercase(SnakeToDash(str));\nvar SnakeToUpperSnake = (str) => Uppercase(str);\nvar UpperDashToCamel = (str) => DashToCamel(Lowercase(str));\nvar UpperDashToDash = (str) => Lowercase(str);\nvar UpperDashToPascal = (str) => Capitalize(UpperDashToCamel(str));\nvar UpperDashToSnake = (str) => DashToSnake(UpperDashToDash(str));\nvar UpperDashToUpperSnake = (str) => Uppercase(UpperDashToSnake(str));\nvar UpperSnakeToCamel = (str) => SnakeToCamel(Lowercase(str));\nvar UpperSnakeToDash = (str) => str.replace(/(\\_)/g, \"-\").toLowerCase();\nvar UpperSnakeToPascal = (str) => SnakeToPascal(Lowercase(str));\nvar UpperSnakeToSnake = (str) => Lowercase(str);\nvar UpperSnakeToUpperDash = (str) => Uppercase(UpperSnakeToDash(str));\nfunction parse(input, type) {\n  return {\n    CamelToDash,\n    CamelToPascal,\n    CamelToSnake,\n    CamelToUpperDash,\n    CamelToUpperSnake,\n    DashToCamel,\n    DashToSnake,\n    DashToPascal,\n    DashToUpperSnake,\n    DashToUpperDash,\n    PascalToCamel,\n    PascalToSnake,\n    PascalToDash,\n    PascalToUpperSnake,\n    PascalToUpperDash,\n    SnakeToCamel,\n    SnakeToDash,\n    SnakeToPascal,\n    SnakeToUpperSnake,\n    SnakeToUpperDash,\n    UpperSnakeToCamel,\n    UpperSnakeToSnake,\n    UpperSnakeToDash,\n    UpperSnakeToPascal,\n    UpperSnakeToUpperDash,\n    UpperDashToCamel,\n    UpperDashToSnake,\n    UpperDashToDash,\n    UpperDashToPascal,\n    UpperDashToUpperSnake\n  }[type](input);\n}\n\n// src/parser/objectParser.ts\nfunction objectParser(input, type) {\n  const result = {};\n  for (const property in input) {\n    const parsedKey = parse(property, type);\n    const value = input[property];\n    if (isArray(value)) {\n      result[parsedKey] = arrayParser(value, type);\n    } else if (isObject(value)) {\n      result[parsedKey] = objectParser(value, type);\n    } else {\n      result[parsedKey] = value;\n    }\n  }\n  return result;\n}\n\n// src/parser/arrayParser.ts\nfunction arrayParser(input, type) {\n  return input.map((item) => {\n    if (isArray(item))\n      return arrayParser(item, type);\n    if (isObject(item))\n      return objectParser(item, type);\n    return item;\n  });\n}\n\n// src/parser/parser.ts\nfunction converter(input, type) {\n  let result;\n  if (isString(input))\n    result = parse(input, type);\n  if (isArray(input))\n    result = arrayParser(input, type);\n  if (isObject(input))\n    result = objectParser(input, type);\n  return result;\n}\n\n// src/camelCase/camelCase.ts\nfunction camelToDash(input) {\n  return converter(input, \"CamelToDash\");\n}\nfunction camelToSnake(input) {\n  return converter(input, \"CamelToSnake\");\n}\nfunction camelToPascal(input) {\n  return converter(input, \"CamelToPascal\");\n}\nfunction camelToUpperSnake(input) {\n  return converter(input, \"CamelToUpperSnake\");\n}\nfunction camelToUpperDash(input) {\n  return converter(input, \"CamelToUpperDash\");\n}\n\n// src/dashCase/dashCase.ts\nfunction dashToSnake(input) {\n  return converter(input, \"DashToSnake\");\n}\nfunction dashToCamel(input) {\n  return converter(input, \"DashToCamel\");\n}\nfunction dashToPascal(input) {\n  return converter(input, \"DashToPascal\");\n}\nfunction dashToUpperSnake(input) {\n  return converter(input, \"DashToUpperSnake\");\n}\nfunction dashToUpperDash(input) {\n  return converter(input, \"DashToUpperDash\");\n}\n\n// src/pascalCase/pascalCase.ts\nfunction pascalToCamel(input) {\n  return converter(input, \"PascalToCamel\");\n}\nfunction pascalToSnake(input) {\n  return converter(input, \"PascalToSnake\");\n}\nfunction pascalToDash(input) {\n  return converter(input, \"PascalToDash\");\n}\nfunction pascalToUpperSnake(input) {\n  return converter(input, \"PascalToUpperSnake\");\n}\nfunction pascalToUpperDash(input) {\n  return converter(input, \"PascalToUpperDash\");\n}\n\n// src/snakeCase/snakeCase.ts\nfunction snakeToCamel(input) {\n  return converter(input, \"SnakeToCamel\");\n}\nfunction snakeToDash(input) {\n  return converter(input, \"SnakeToDash\");\n}\nfunction snakeToPascal(input) {\n  return converter(input, \"SnakeToPascal\");\n}\nfunction snakeToUpperSnake(input) {\n  return converter(input, \"SnakeToUpperSnake\");\n}\nfunction snakeToUpperDash(input) {\n  return converter(input, \"SnakeToUpperDash\");\n}\n\n// src/upperDashCase/upperDashCase.ts\nfunction upperDashToCamel(input) {\n  return converter(input, \"UpperDashToCamel\");\n}\nfunction upperDashToSnake(input) {\n  return converter(input, \"UpperDashToSnake\");\n}\nfunction upperDashToDash(input) {\n  return converter(input, \"UpperDashToDash\");\n}\nfunction upperDashToPascal(input) {\n  return converter(input, \"UpperDashToPascal\");\n}\nfunction upperDashToUpperSnake(input) {\n  return converter(input, \"UpperDashToUpperSnake\");\n}\n\n// src/upperSnakeCase/upperSnakeCase.ts\nfunction upperSnakeToCamel(input) {\n  return converter(input, \"UpperSnakeToCamel\");\n}\nfunction upperSnakeToSnake(input) {\n  return converter(input, \"UpperSnakeToSnake\");\n}\nfunction upperSnakeToDash(input) {\n  return converter(input, \"UpperSnakeToDash\");\n}\nfunction upperSnakeToPascal(input) {\n  return converter(input, \"UpperSnakeToPascal\");\n}\nfunction upperSnakeToUpperDash(input) {\n  return converter(input, \"UpperSnakeToUpperDash\");\n}\nexport {\n  camelToDash,\n  camelToPascal,\n  camelToSnake,\n  camelToUpperDash,\n  camelToUpperSnake,\n  dashToCamel,\n  dashToPascal,\n  dashToSnake,\n  dashToUpperDash,\n  dashToUpperSnake,\n  pascalToCamel,\n  pascalToDash,\n  pascalToSnake,\n  pascalToUpperDash,\n  pascalToUpperSnake,\n  snakeToCamel,\n  snakeToDash,\n  snakeToPascal,\n  snakeToUpperDash,\n  snakeToUpperSnake,\n  upperDashToCamel,\n  upperDashToDash,\n  upperDashToPascal,\n  upperDashToSnake,\n  upperDashToUpperSnake,\n  upperSnakeToCamel,\n  upperSnakeToDash,\n  upperSnakeToPascal,\n  upperSnakeToSnake,\n  upperSnakeToUpperDash\n};\n","export interface Descriptor {\n  configurable?: boolean;\n  enumerable?: boolean;\n  writable?: boolean;\n  get?(): any;\n  set?(v: any): void;\n  initializer?: null | (() => any);\n  value?: any;\n}\nexport type LegacyDecorator = (\n  target: object,\n  prop: unknown,\n  desc: Descriptor,\n) => Descriptor | null | undefined | void;\n\nexport type LegacyClassDecorator = (target: new (...args: any) => any) =>\n  | {\n      new (...args: any): any;\n    }\n  | null\n  | undefined\n  | void;\n\nconst deferred: WeakMap<\n  object,\n  Map<string | number | symbol, Descriptor>\n> = new WeakMap();\n\nfunction deferDecorator(\n  proto: object,\n  prop: string | number | symbol,\n  desc: Descriptor,\n): void {\n  let map = deferred.get(proto);\n  if (!map) {\n    map = new Map();\n    deferred.set(proto, map);\n  }\n  map.set(prop, desc);\n}\n\nfunction findDeferredDecorator(\n  target: object,\n  prop: string | number | symbol,\n): Descriptor | undefined {\n  let cursor: object = (target as any).prototype;\n  while (cursor) {\n    let desc = deferred.get(cursor)?.get(prop);\n    if (desc) {\n      return desc;\n    }\n    cursor = (cursor as any).prototype;\n  }\n}\n\nfunction decorateFieldV1(\n  target: { prototype: object },\n  prop: string | number | symbol,\n  decorators: LegacyDecorator[],\n  initializer?: () => any,\n): void {\n  return decorateFieldV2(target.prototype, prop, decorators, initializer);\n}\n\nfunction decorateFieldV2(\n  prototype: object,\n  prop: string | number | symbol,\n  decorators: LegacyDecorator[],\n  initializer?: () => any,\n): void {\n  let desc: Descriptor = {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: null,\n  };\n  if (initializer) {\n    desc.initializer = initializer;\n  }\n  for (let decorator of decorators) {\n    desc = decorator(prototype, prop, desc) || desc;\n  }\n  if (desc.initializer === undefined) {\n    Object.defineProperty(prototype, prop, desc);\n  } else {\n    deferDecorator(prototype, prop, desc);\n  }\n}\n\nfunction decorateMethodV1(\n  { prototype }: { prototype: object },\n  prop: string | number | symbol,\n  decorators: LegacyDecorator[],\n): void {\n  return decorateMethodV2(prototype, prop, decorators);\n}\n\nfunction decorateMethodV2(\n  prototype: object,\n  prop: string | number | symbol,\n  decorators: LegacyDecorator[],\n): void {\n  const origDesc = Object.getOwnPropertyDescriptor(prototype, prop);\n  let desc: Descriptor = { ...origDesc };\n  for (let decorator of decorators) {\n    desc = decorator(prototype, prop, desc) || desc;\n  }\n  if (desc.initializer !== undefined) {\n    desc.value = desc.initializer ? desc.initializer.call(prototype) : void 0;\n    desc.initializer = undefined;\n  }\n  Object.defineProperty(prototype, prop, desc);\n}\n\nfunction initializeDeferredDecorator(\n  target: object,\n  prop: string | number | symbol,\n): void {\n  let desc = findDeferredDecorator(target.constructor, prop);\n  if (desc) {\n    Object.defineProperty(target, prop, {\n      enumerable: desc.enumerable,\n      configurable: desc.configurable,\n      writable: desc.writable,\n      value: desc.initializer ? desc.initializer.call(target) : undefined,\n    });\n  }\n}\n\nfunction decorateClass(\n  target: new (...args: any) => any,\n  decorators: LegacyClassDecorator[],\n): new (...args: any) => any {\n  return decorators.reduce(\n    (accum, decorator) => decorator(accum) || accum,\n    target,\n  );\n}\n\nfunction decoratePOJO(\n  pojo: object,\n  decorated: [\n    'field' | 'method',\n    string | number | symbol,\n    LegacyDecorator[],\n  ][],\n) {\n  for (let [type, prop, decorators] of decorated) {\n    if (type === 'field') {\n      decoratePojoField(pojo, prop, decorators);\n    } else {\n      decorateMethodV2(pojo, prop, decorators);\n    }\n  }\n  return pojo;\n}\nfunction decoratePojoField(\n  pojo: object,\n  prop: string | number | symbol,\n  decorators: LegacyDecorator[],\n) {\n  let desc: Descriptor = {\n    configurable: true,\n    enumerable: true,\n    writable: true,\n    initializer: () => Object.getOwnPropertyDescriptor(pojo, prop)?.value,\n  };\n  for (let decorator of decorators) {\n    desc = decorator(pojo, prop, desc) || desc;\n  }\n  if (desc.initializer) {\n    desc.value = desc.initializer.call(pojo);\n    delete desc.initializer;\n  }\n  Object.defineProperty(pojo, prop, desc);\n}\n\nexport {\n  decorateFieldV1 as f,\n  decorateFieldV2 as g,\n  decorateMethodV1 as m,\n  decorateMethodV2 as n,\n  initializeDeferredDecorator as i,\n  decorateClass as c,\n  decoratePOJO as p,\n};\n","// Matches one or more consecutive percent-encoded bytes (e.g. `%C3%A5`).\nconst token = '%[a-f0-9]{2}';\nconst multiMatcher = new RegExp(`(${token})+`, 'gi');\n\nconst hexPair = /^[a-f\\d]{2}$/i;\n\n// Read a `%XX` sequence at `position`, returning the byte value and where to continue scanning.\nfunction parsePercentByte(input, position) {\n\tif (input.codePointAt(position) !== 37 || position + 3 > input.length) {\n\t\treturn;\n\t}\n\n\tconst digits = input.slice(position + 1, position + 3);\n\n\tif (!hexPair.test(digits)) {\n\t\treturn;\n\t}\n\n\treturn {byte: Number.parseInt(digits, 16), next: position + 3};\n}\n\n/**\n * Return how many bytes a UTF-8 code point needs based on its lead byte.\n * Returns 0 for continuation bytes and other invalid lead bytes.\n */\nfunction utf8SequenceLength(byte) {\n\tif (byte <= 0x7F) {\n\t\treturn 1;\n\t}\n\n\t// Start at 0xC2 to exclude overlong 2-byte encodings (0xC0/0xC1).\n\tif (byte >= 0xC2 && byte <= 0xDF) {\n\t\treturn 2;\n\t}\n\n\tif (byte >= 0xE0 && byte <= 0xEF) {\n\t\treturn 3;\n\t}\n\n\tif (byte >= 0xF0 && byte <= 0xF4) {\n\t\treturn 4;\n\t}\n\n\treturn 0;\n}\n\nfunction isContinuationByte(byte) {\n\treturn byte >= 0x80 && byte <= 0xBF;\n}\n\n/**\n * Decode as much of `input` as possible without throwing.\n *Scans left-to-right in O(n), decoding valid UTF-8 runs and leaving the rest literal.\n */\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch {\n\t\tlet output = '';\n\t\tlet position = 0;\n\n\t\twhile (position < input.length) {\n\t\t\tif (input.codePointAt(position) !== 37) {\n\t\t\t\toutput += input.charAt(position);\n\t\t\t\tposition++;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst firstByte = parsePercentByte(input, position);\n\n\t\t\t// `%` not followed by two hex digits (e.g. `%` or `%G`).\n\t\t\tif (!firstByte) {\n\t\t\t\toutput += input.charAt(position);\n\t\t\t\tposition++;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst sequenceLength = utf8SequenceLength(firstByte.byte);\n\n\t\t\t// Continuation byte or invalid lead byte — emit one `%XX` literally.\n\t\t\tif (sequenceLength === 0) {\n\t\t\t\toutput += input.slice(position, position + 3);\n\t\t\t\tposition += 3;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tlet end = firstByte.next;\n\t\t\tlet validSequence = true;\n\n\t\t\tfor (let index = 1; index < sequenceLength; index++) {\n\t\t\t\tconst nextByte = parsePercentByte(input, end);\n\n\t\t\t\tif (!nextByte || !isContinuationByte(nextByte.byte)) {\n\t\t\t\t\tvalidSequence = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tend = nextByte.next;\n\t\t\t}\n\n\t\t\tif (validSequence) {\n\t\t\t\tconst encodedSequence = input.slice(position, end);\n\n\t\t\t\ttry {\n\t\t\t\t\toutput += decodeURIComponent(encodedSequence);\n\t\t\t\t\tposition = end;\n\t\t\t\t\tcontinue;\n\t\t\t\t} catch {\n\t\t\t\t\t// Invalid UTF-8 despite correct structure — emit the first byte literally.\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Missing continuation bytes or decode failure — emit the first byte literally.\n\t\t\toutput += input.slice(position, position + 3);\n\t\t\tposition += 3;\n\t\t}\n\n\t\treturn output;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tconst replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD',\n\t};\n\n\t// Find percent-encoded runs separated by literal text or lone `%` characters.\n\tlet match = multiMatcher.exec(input);\n\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch {\n\t\t\tconst result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tconst entries = Object.keys(replaceMap);\n\n\tfor (const key of entries) {\n\t\t// Replace all decoded components\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nexport default function decodeUriComponent(encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError(`Expected \\`encodedURI\\` to be of type \\`string\\`, got \\`${typeof encodedURI}\\``);\n\t}\n\n\ttry {\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n}\n","export function includeKeys(object, predicate) {\n\tconst result = {};\n\n\tif (Array.isArray(predicate)) {\n\t\tfor (const key of predicate) {\n\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(object, key);\n\t\t\tif (descriptor?.enumerable) {\n\t\t\t\tObject.defineProperty(result, key, descriptor);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// `Reflect.ownKeys()` is required to retrieve symbol properties\n\t\tfor (const key of Reflect.ownKeys(object)) {\n\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(object, key);\n\t\t\tif (descriptor.enumerable) {\n\t\t\t\tconst value = object[key];\n\t\t\t\tif (predicate(key, value, object)) {\n\t\t\t\t\tObject.defineProperty(result, key, descriptor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n\nexport function excludeKeys(object, predicate) {\n\tif (Array.isArray(predicate)) {\n\t\tconst set = new Set(predicate);\n\t\treturn includeKeys(object, key => !set.has(key));\n\t}\n\n\treturn includeKeys(object, (key, value, object) => !predicate(key, value, object));\n}\n","export default function splitOnFirst(string, separator) {\n\tif (!(typeof string === 'string' && typeof separator === 'string')) {\n\t\tthrow new TypeError('Expected the arguments to be of type `string`');\n\t}\n\n\tif (string === '' || separator === '') {\n\t\treturn [];\n\t}\n\n\tconst separatorIndex = string.indexOf(separator);\n\n\tif (separatorIndex === -1) {\n\t\treturn [];\n\t}\n\n\treturn [\n\t\tstring.slice(0, separatorIndex),\n\t\tstring.slice(separatorIndex + separator.length)\n\t];\n}\n","import decodeComponent from 'decode-uri-component';\nimport {includeKeys} from 'filter-obj';\nimport splitOnFirst from 'split-on-first';\n\nconst isNullOrUndefined = value => value === null || value === undefined;\n\n// eslint-disable-next-line unicorn/prefer-code-point\nconst strictUriEncode = string => encodeURIComponent(string).replaceAll(/[!'()*]/g, x => `%${x.charCodeAt(0).toString(16).toUpperCase()}`);\n\nconst encodeFragmentIdentifier = Symbol('encodeFragmentIdentifier');\n\nfunction encoderForArrayFormat(options) {\n\tswitch (options.arrayFormat) {\n\t\tcase 'index': {\n\t\t\treturn key => (result, value) => {\n\t\t\t\tconst index = result.length;\n\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined\n\t\t\t\t\t|| (options.skipNull && value === null)\n\t\t\t\t\t|| (options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\tresult.push([encode(key, options), '[', index, ']'].join(''));\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tresult.push([encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join(''));\n\t\t\t\treturn result;\n\t\t\t};\n\t\t}\n\n\t\tcase 'bracket': {\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined\n\t\t\t\t\t|| (options.skipNull && value === null)\n\t\t\t\t\t|| (options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\tresult.push([encode(key, options), '[]'].join(''));\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tresult.push([encode(key, options), '[]=', encode(value, options)].join(''));\n\t\t\t\treturn result;\n\t\t\t};\n\t\t}\n\n\t\tcase 'colon-list-separator': {\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined\n\t\t\t\t\t|| (options.skipNull && value === null)\n\t\t\t\t\t|| (options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\tresult.push([encode(key, options), ':list='].join(''));\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tresult.push([encode(key, options), ':list=', encode(value, options)].join(''));\n\t\t\t\treturn result;\n\t\t\t};\n\t\t}\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\tcase 'bracket-separator': {\n\t\t\tconst keyValueSeparator = options.arrayFormat === 'bracket-separator'\n\t\t\t\t? '[]='\n\t\t\t\t: '=';\n\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined\n\t\t\t\t\t|| (options.skipNull && value === null)\n\t\t\t\t\t|| (options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\t// Translate null to an empty string so that it doesn't serialize as 'null'\n\t\t\t\tvalue = value === null ? '' : value;\n\n\t\t\t\tif (result.length === 0) {\n\t\t\t\t\tresult.push([encode(key, options), keyValueSeparator, encode(value, options)].join(''));\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tresult.push(encode(value, options));\n\t\t\t\treturn result;\n\t\t\t};\n\t\t}\n\n\t\tdefault: {\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined\n\t\t\t\t\t|| (options.skipNull && value === null)\n\t\t\t\t\t|| (options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\tresult.push(encode(key, options));\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tresult.push([encode(key, options), '=', encode(value, options)].join(''));\n\t\t\t\treturn result;\n\t\t\t};\n\t\t}\n\t}\n}\n\nfunction parserForArrayFormat(options) {\n\tlet result;\n\n\tswitch (options.arrayFormat) {\n\t\tcase 'index': {\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /\\[(\\d*)]$/.exec(key);\n\n\t\t\t\tkey = key.replace(/\\[\\d*]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = {};\n\t\t\t\t}\n\n\t\t\t\taccumulator[key][result[1]] = value;\n\t\t\t};\n\t\t}\n\n\t\tcase 'bracket': {\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(\\[])$/.exec(key);\n\t\t\t\tkey = key.replace(/\\[]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (!Array.isArray(accumulator[key])) {\n\t\t\t\t\taccumulator[key] = [accumulator[key], value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key].push(value);\n\t\t\t};\n\t\t}\n\n\t\tcase 'colon-list-separator': {\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(:list)$/.exec(key);\n\t\t\t\tkey = key.replace(/:list$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (!Array.isArray(accumulator[key])) {\n\t\t\t\t\taccumulator[key] = [accumulator[key], value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key].push(value);\n\t\t\t};\n\t\t}\n\n\t\tcase 'comma':\n\t\tcase 'separator': {\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator);\n\t\t\t\tconst newValue = isArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : (value === null ? value : decode(value, options));\n\t\t\t\taccumulator[key] = newValue;\n\t\t\t};\n\t\t}\n\n\t\tcase 'bracket-separator': {\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = /(\\[])$/.test(key);\n\t\t\t\tkey = key.replace(/\\[]$/, '');\n\n\t\t\t\tif (!isArray) {\n\t\t\t\t\taccumulator[key] = value ? decode(value, options) : value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst arrayValue = value === null\n\t\t\t\t\t? []\n\t\t\t\t\t: decode(value, options).split(options.arrayFormatSeparator);\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = arrayValue;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (!Array.isArray(accumulator[key])) {\n\t\t\t\t\taccumulator[key] = [accumulator[key]];\n\t\t\t\t}\n\n\t\t\t\tfor (const item of arrayValue) {\n\t\t\t\t\taccumulator[key].push(item);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tdefault: {\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (Array.isArray(accumulator[key])) {\n\t\t\t\t\taccumulator[key].push(value);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [accumulator[key], value];\n\t\t\t};\n\t\t}\n\t}\n}\n\nfunction validateArrayFormatSeparator(value) {\n\tif (typeof value !== 'string' || value.length !== 1) {\n\t\tthrow new TypeError('arrayFormatSeparator must be single character string');\n\t}\n}\n\nfunction encode(value, options) {\n\tif (options.encode) {\n\t\treturn options.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction decode(value, options) {\n\tif (options.decode) {\n\t\treturn decodeComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction keysSorter(input) {\n\tif (Array.isArray(input)) {\n\t\treturn input.sort();\n\t}\n\n\tif (typeof input === 'object') {\n\t\treturn keysSorter(Object.keys(input))\n\t\t\t.sort((a, b) => Number(a) - Number(b))\n\t\t\t.map(key => input[key]);\n\t}\n\n\treturn input;\n}\n\nfunction removeHash(input) {\n\tconst hashStart = input.indexOf('#');\n\tif (hashStart !== -1) {\n\t\tinput = input.slice(0, hashStart);\n\t}\n\n\treturn input;\n}\n\nfunction getHash(url) {\n\tlet hash = '';\n\tconst hashStart = url.indexOf('#');\n\tif (hashStart !== -1) {\n\t\thash = url.slice(hashStart);\n\t}\n\n\treturn hash;\n}\n\nfunction getUrlWithoutQuery(url) {\n\t// Avoid `split('?')` so query-heavy URLs don't allocate large arrays.\n\tconst queryStart = url.indexOf('?');\n\treturn queryStart === -1 ? url : url.slice(0, queryStart);\n}\n\nfunction parseValue(value, options, type) {\n\tif (type === 'string' && typeof value === 'string') {\n\t\treturn value;\n\t}\n\n\tif (typeof type === 'function' && typeof value === 'string') {\n\t\treturn type(value);\n\t}\n\n\tif (type === 'boolean' && value === null) {\n\t\treturn true;\n\t}\n\n\tif (type === 'boolean' && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {\n\t\treturn value.toLowerCase() === 'true';\n\t}\n\n\tif (type === 'boolean' && value !== null && (value.toLowerCase() === '1' || value.toLowerCase() === '0')) {\n\t\treturn value.toLowerCase() === '1';\n\t}\n\n\tif (type === 'string[]' && options.arrayFormat !== 'none' && typeof value === 'string') {\n\t\treturn [value];\n\t}\n\n\tif (type === 'number[]' && options.arrayFormat !== 'none' && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {\n\t\treturn [Number(value)];\n\t}\n\n\tif (type === 'number' && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {\n\t\treturn Number(value);\n\t}\n\n\tif (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {\n\t\treturn value.toLowerCase() === 'true';\n\t}\n\n\tif (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {\n\t\treturn Number(value);\n\t}\n\n\treturn value;\n}\n\nexport function extract(input) {\n\tinput = removeHash(input);\n\tconst queryStart = input.indexOf('?');\n\tif (queryStart === -1) {\n\t\treturn '';\n\t}\n\n\treturn input.slice(queryStart + 1);\n}\n\nexport function parse(query, options) {\n\toptions = {\n\t\tdecode: true,\n\t\tsort: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ',',\n\t\tparseNumbers: false,\n\t\tparseBooleans: false,\n\t\ttypes: Object.create(null),\n\t\t...options,\n\t};\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst formatter = parserForArrayFormat(options);\n\n\t// Create an object with no prototype\n\tconst returnValue = Object.create(null);\n\n\tif (typeof query !== 'string') {\n\t\treturn returnValue;\n\t}\n\n\tquery = query.trim().replace(/^[?#&]/, '');\n\n\tif (!query) {\n\t\treturn returnValue;\n\t}\n\n\tif (/^&+$/.test(query)) {\n\t\treturn returnValue;\n\t}\n\n\tlet parameterStart = 0;\n\tlet firstSeparator = query.indexOf('&');\n\tif (firstSeparator === -1) {\n\t\tfirstSeparator = query.length;\n\t}\n\n\tfor (let index = firstSeparator; index <= query.length; index++) {\n\t\tif (index < query.length && query[index] !== '&') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (index === parameterStart) {\n\t\t\tparameterStart = index + 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst parameter = query.slice(parameterStart, index);\n\t\tconst parameter_ = options.decode ? parameter.replaceAll('+', ' ') : parameter;\n\n\t\tlet [key, value] = splitOnFirst(parameter_, '=');\n\n\t\tif (key === undefined) {\n\t\t\tkey = parameter_;\n\t\t}\n\n\t\t// Missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tvalue = value === undefined ? null : (['comma', 'separator', 'bracket-separator'].includes(options.arrayFormat) ? value : decode(value, options));\n\t\tformatter(decode(key, options), value, returnValue);\n\n\t\tparameterStart = index + 1;\n\t}\n\n\tfor (const [key, value] of Object.entries(returnValue)) {\n\t\tif (typeof value === 'object' && value !== null && options.types[key] !== 'string') {\n\t\t\tfor (const [key2, value2] of Object.entries(value)) {\n\t\t\t\tconst typeOption = options.types[key];\n\t\t\t\tconst type = typeof typeOption === 'function' ? typeOption : (typeOption ? typeOption.replace('[]', '') : undefined);\n\t\t\t\tvalue[key2] = parseValue(value2, options, type);\n\t\t\t}\n\t\t} else if (typeof value === 'object' && value !== null && options.types[key] === 'string') {\n\t\t\treturnValue[key] = Object.values(value).join(options.arrayFormatSeparator);\n\t\t} else {\n\t\t\treturnValue[key] = parseValue(value, options, options.types[key]);\n\t\t}\n\t}\n\n\tif (options.sort === false) {\n\t\treturn returnValue;\n\t}\n\n\t// TODO: Remove the use of `reduce`.\n\t// eslint-disable-next-line unicorn/no-array-reduce\n\treturn (options.sort === true ? Object.keys(returnValue).sort() : Object.keys(returnValue).sort(options.sort)).reduce((result, key) => {\n\t\tconst value = returnValue[key];\n\t\tresult[key] = Boolean(value) && typeof value === 'object' && !Array.isArray(value) ? keysSorter(value) : value;\n\t\treturn result;\n\t}, Object.create(null));\n}\n\nexport function stringify(object, options) {\n\tif (!object) {\n\t\treturn '';\n\t}\n\n\toptions = {\n\t\tencode: true,\n\t\tstrict: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ',',\n\t\t...options,\n\t};\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst shouldFilter = key => (\n\t\t(options.skipNull && isNullOrUndefined(object[key]))\n\t\t|| (options.skipEmptyString && object[key] === '')\n\t);\n\n\tconst formatter = encoderForArrayFormat(options);\n\n\tconst objectCopy = {};\n\n\tfor (const [key, value] of Object.entries(object)) {\n\t\tif (!shouldFilter(key)) {\n\t\t\tobjectCopy[key] = value;\n\t\t}\n\t}\n\n\tconst keys = Object.keys(objectCopy);\n\n\tif (options.sort !== false) {\n\t\tkeys.sort(options.sort);\n\t}\n\n\treturn keys.map(key => {\n\t\tlet value = object[key];\n\n\t\t// Apply replacer function if provided\n\t\tif (options.replacer) {\n\t\t\tvalue = options.replacer(key, value);\n\n\t\t\t// If replacer returns undefined, skip this key\n\t\t\tif (value === undefined) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t}\n\n\t\tif (value === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn encode(key, options);\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\tif (value.length === 0 && options.arrayFormat === 'bracket-separator') {\n\t\t\t\treturn encode(key, options) + '[]';\n\t\t\t}\n\n\t\t\t// Apply replacer to array elements if provided\n\t\t\t// Note: We don't re-apply replacer to the array itself, only to elements\n\t\t\tlet processedArray = value;\n\t\t\tif (options.replacer) {\n\t\t\t\tprocessedArray = value.map((item, index) =>\n\t\t\t\t\toptions.replacer(`${key}[${index}]`, item),\n\t\t\t\t).filter(item => item !== undefined);\n\t\t\t}\n\n\t\t\tconst result = processedArray.reduce(formatter(key), []);\n\t\t\tconst arrayFormatSeparator = ['comma', 'separator', 'bracket-separator'].includes(options.arrayFormat) ? options.arrayFormatSeparator : '&';\n\t\t\treturn result.join(arrayFormatSeparator);\n\t\t}\n\n\t\treturn encode(key, options) + '=' + encode(value, options);\n\t}).filter(x => x.length > 0).join('&');\n}\n\nexport function parseUrl(url, options) {\n\toptions = {\n\t\tdecode: true,\n\t\t...options,\n\t};\n\n\tlet [url_, hash] = splitOnFirst(url, '#');\n\n\tif (url_ === undefined) {\n\t\turl_ = url;\n\t}\n\n\treturn {\n\t\turl: getUrlWithoutQuery(url_ ?? ''),\n\t\tquery: parse(extract(url), options),\n\t\t...(options && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {}),\n\t};\n}\n\nexport function stringifyUrl(object, options) {\n\toptions = {\n\t\tencode: true,\n\t\tstrict: true,\n\t\t[encodeFragmentIdentifier]: true,\n\t\t...options,\n\t};\n\n\tconst url = getUrlWithoutQuery(removeHash(object.url)) || '';\n\tconst queryFromUrl = extract(object.url);\n\n\tconst query = {\n\t\t...parse(queryFromUrl, {sort: false, ...options}),\n\t\t...object.query,\n\t};\n\n\tlet queryString = stringify(query, options);\n\tqueryString &&= `?${queryString}`;\n\n\tlet hash = getHash(object.url);\n\tif (typeof object.fragmentIdentifier === 'string') {\n\t\thash = `#${object.fragmentIdentifier}`;\n\n\t\tif (options[encodeFragmentIdentifier]) {\n\t\t\t// Percent-encode the fragment with a throwaway URL. The fragment percent-encode set does not depend on the scheme, so the caller's URL is deliberately not parsed here; it may not even be parseable.\n\t\t\tconst throwawayUrl = new URL('https://query-string.invalid');\n\t\t\tthrowawayUrl.hash = hash;\n\t\t\thash = throwawayUrl.hash;\n\t\t}\n\t}\n\n\treturn `${url}${queryString}${hash}`;\n}\n\nexport function pick(input, filter, options) {\n\toptions = {\n\t\tparseFragmentIdentifier: true,\n\t\t[encodeFragmentIdentifier]: false,\n\t\t...options,\n\t};\n\n\tconst {url, query, fragmentIdentifier} = parseUrl(input, options);\n\n\treturn stringifyUrl({\n\t\turl,\n\t\tquery: includeKeys(query, filter),\n\t\tfragmentIdentifier,\n\t}, options);\n}\n\nexport function exclude(input, filter, options) {\n\tif (Array.isArray(filter)) {\n\t\tconst filterSet = new Set(filter);\n\t\treturn pick(input, key => !filterSet.has(key), options);\n\t}\n\n\treturn pick(input, (key, value) => !filter(key, value), options);\n}\n"],"mappings":";;;;AA2Ce,MAAMA,UAAuBC,UAK1C,eAAAC,GAYE,SAXAC,UACG,iEAAgEC,KAAKC,KAAKH,iBAC1C,iBAA1BE,KAAKC,KAAKH,gBAGnBC,UACG,oDAA+DC,KAAKE,8BAA8BF,KAAKC,KAAKH,iBAC7GE,KAAKC,KAAKH,aAfG,GAgBXE,KAAKC,KAAKH,aAAeE,KAAKE,UAG3BF,KAAKC,KAAKH,WACnB,CAEA,gBAAAK,GAME,SALAJ,UACG,kEAAiEC,KAAKC,KAAKE,kBAC1C,iBAA3BH,KAAKC,KAAKE,cAGZH,KAAKC,KAAKE,YACnB,CAEA,eAAAC,GACE,MAAqC,iBAA1BJ,KAAKC,KAAKG,YACZ,MAGTL,UACG,mEAAkEC,KAAKC,KAAKG,iBAC7EJ,KAAKC,KAAKG,YAAc,GAGnBJ,KAAKC,KAAKG,YACnB,CAEA,aAAAC,GACE,MAAmC,iBAAxBL,KAAKC,KAAKI,UACZ,SAGTN,UACG,kHAAiHC,KAAKC,KAAKI,eAC5HL,KAAKC,KAAKI,UAAY,GAAM,GAGvBL,KAAKC,KAAKI,UACnB,CAEA,cAAAC,GAME,SALAP,UACG,gEAA+DC,KAAKC,KAAKK,gBAC1C,iBAAzBN,KAAKC,KAAKK,YAGZN,KAAKC,KAAKK,UACnB,CAMA,gBAAAC,GACE,OAqLWC,EArLER,KAAKF,YAqLsBW,EArLGT,KAAKE,SAsL3CQ,KAAKC,IAAID,KAA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,CACL,IACA,KACA,KACA,KAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,IACA,MAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,IAAK,KACZC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CAAC,KACPC,GAAM,CACL,IACA,KACA,KAEDC,GAAM,CACL,IACA,KACA,KAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,KACA,KAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,KACA,KAEDC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CAAC,IAAK,KACZC,GAAM,CAAC,IAAK,MACZC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,KACA,KACA,IACA,KAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,KACPC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CAAC,IAAK,KACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,IAAK,KACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,KAAM,KACbC,GAAM,CACL,IACA,IACA,MAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,KACA,KAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,IACA,MAEDC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,KACPC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,KACPC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,IAAK,KACZC,GAAM,CAAC,KACPC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CAAC,IAAK,KACZC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,KACA,KACA,IACA,KAEDC,GAAM,CAAC,KACPC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CAAC,IAAK,KACZC,GAAM,CAAC,IAAK,MACZC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,KACA,KAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,IAAK,KACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,IAAK,KACZC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CAAC,IAAK,KACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,KACPC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,IAAK,KACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CAAC,KAAM,KACbC,GAAM,CAAC,KACPC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CACL,IACA,IACA,KAEDC,GAAM,CACL,KACA,KACA,IACA,KAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,KACA,IACA,IACA,MAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,KACA,KAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CAAC,IAAK,KACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,IACA,MAEDC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,KACA,KAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CAAC,IAAK,KACZC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,KACPC,GAAM,CACL,KACA,KACA,IACA,KAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,IAAK,KACZC,GAAM,CAAC,IAAK,KACZC,GAAM,CAAC,IAAK,KACZC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,KACA,KACA,IACA,KAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CAAC,KACPC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CAAC,IAAK,KACZC,GAAM,CACL,IACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,IACA,MAEDC,GAAM,CAAC,IAAK,KACZC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CACL,IACA,KACA,KAEDC,GAAM,CAAC,IAAK,KACZC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CAAC,IAAK,KACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,KACA,KAEDC,GAAM,CAAC,KACPC,GAAM,CAAC,IAAK,KACZC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,MAEDC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CAAC,KACPC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CAAC,KACPC,GAAM,CAAC,KACPC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,MAEDC,GAAM,CAAC,IAAK,KACZC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,MAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CAAC,IAAK,KACZC,GAAM,CAAC,IAAK,KACZC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CAAC,IAAK,KACZC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CAAC,IAAK,KACZC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,KACA,KACA,IACA,KAEDC,GAAM,CACL,KACA,KACA,IACA,KAEDC,GAAM,CACL,IACA,KACA,KAEDC,GAAM,CACL,KACA,KACA,IACA,KAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,KAEDC,GAAM,CACL,IACA,IACA,MAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CAAC,IAAK,KACZC,GAAM,CAAC,IAAK,KACZC,GAAM,CAAC,IAAK,MACZC,GAAM,CAAC,IAAK,KACZC,GAAM,CACL,IACA,KACA,KAEDC,GAAM,CACL,IACA,KACA,KACA,KAEDC,GAAM,CAAC,IAAK,MACZC,GAAM,CACL,IACA,IACA,KACA,MAEDC,GAAM,CACL,IACA,KACA,IACA,MAEDC,GAAM,CAAC,IAAK,KACZ,QAAS,CACR,IACA,IACA,KACA,MAED,SAAU,CACT,IACA,KACA,KACA,KAED,QAAS,CACR,IACA,IACA,MAED,SAAU,CACT,IACA,KACA,IACA,MAED,QAAS,CACR,IACA,KACA,IACA,MAED,QAAS,CACR,IACA,IACA,KACA,MAED,QAAS,CACR,IACA,KACA,IACA,MAED,QAAS,CACR,IACA,IACA,KACA,MAED,QAAS,CACR,IACA,IACA,KACA,MAED,QAAS,CACR,IACA,IACA,KACA,MAED,QAAS,CACR,IACA,IACA,MAED,QAAS,CACR,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C,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,KACHC,IAAG,KACHC,IAAG,KACHC,IAAG,KACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,KACHC,IAAG,KACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,KACHC,IAAG,KACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,KACHC,IAAG,KACHC,IAAG,KACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,KACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,KACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,KACHC,IAAG,KACHC,IAAG,KACHC,IAAG,KACHC,IAAG,KACHC,IAAG,KACHC,IAAG,KACHC,IAAG,KACHC,IAAG,KACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,KACHC,IAAG,KACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,KACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,KACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,KACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,KACHC,IAAG,KACHC,IAAG,KACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,KACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACH,IAAK,IACLC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,IACHC,IAAG,KACH,IAAK,IACLC,IAAG,IACHC,IA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